shaka-player 4.3.1 → 4.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,46 +16,46 @@
16
16
  SPDX-License-Identifier: Apache-2.0
17
17
  */
18
18
  var q;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
19
- function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}}
20
- fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
21
- fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
19
+ 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&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}}
20
+ 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_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
21
+ 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]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(aa(this))}})}return a});function fa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
22
22
  function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
23
23
  if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
24
24
  function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.vj=b.prototype}function qa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function ra(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}qa.prototype.B=function(a){this.h=a};
25
- function sa(a,b){a.i={Bf:b,Kf:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.D=function(a){this.g=a};function B(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ta(a){a.m=0;a.j=2}function ua(a,b){a.g=b;a.m=0}function va(a){a.m=0;var b=a.i.Bf;a.i=null;return b}function wa(a){a.C=[a.i];a.m=0;a.j=0}
25
+ function sa(a,b){a.i={Bf:b,Kf:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.D=function(a){this.g=a};function B(a){a.g=0}function D(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ta(a){a.m=0;a.j=2}function ua(a,b,c){a.g=b;a.m=c||0}function va(a,b){a.m=b||0;b=a.i.Bf;a.i=null;return b}function wa(a){a.C=[a.i];a.m=0;a.j=0}
26
26
  function xa(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.Kf?a.g=a.m||a.j:void 0!=c.D&&a.j<c.D?(a.g=c.D,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new qa;this.h=a}function Ba(a,b){ra(a.g);var c=a.g.l;if(c)return Ca(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Da(a)}
27
27
  function Ca(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Kf)throw b.Bf;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
28
28
  function Ea(a){this.next=function(b){ra(a.g);a.g.l?b=Ca(a,a.g.l.next,b,a.g.B):(a.g.B(b),b=Da(a));return b};this.throw=function(b){ra(a.g);a.g.l?b=Ca(a,a.g.l["throw"],b,a.g.B):(sa(a.g,b),b=Da(a));return b};this.return=function(b){return Ba(a,b)};this[Symbol.iterator]=function(){return this}}function Fa(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
29
29
  function G(a){return Fa(new Ea(new ya(a)))}function Ga(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
30
- fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.s=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
30
+ ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.s=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=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=
31
31
  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.H),reject:g(this.l)}};b.prototype.H=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.G(g):this.m(g)}};
32
- b.prototype.G=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.B(2,g)};b.prototype.m=function(g){this.B(1,g)};b.prototype.B=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.I();this.C()};b.prototype.I=function(){var g=this;e(function(){if(g.F()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
33
- function(){if(this.s)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.C=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
34
- b.prototype.J=function(g){var h=this.j();g.nd(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,t){return"function"==typeof p?function(v){try{l(p(v))}catch(y){m(y)}}:t}var l,m,n=new b(function(p,t){l=p;m=t});this.nd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.nd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
35
- break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.s=!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).nd(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;t--;0==t&&l(p)}}var p=[],t=0;do p.push(void 0),t++,d(k.value).nd(n(p.length-1),m),k=h.next();
32
+ b.prototype.G=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.B(2,g)};b.prototype.m=function(g){this.B(1,g)};b.prototype.B=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.I();this.C()};b.prototype.I=function(){var g=this;e(function(){if(g.F()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
33
+ function(){if(this.s)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.C=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
34
+ b.prototype.J=function(g){var h=this.j();g.nd(h.resolve,h.reject)};b.prototype.K=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(n,t){return"function"==typeof n?function(v){try{l(n(v))}catch(y){m(y)}}:t}var l,m,p=new b(function(n,t){l=n;m=t});this.nd(k(g,l),k(h,m));return p};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.nd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
35
+ break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.s=!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).nd(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function p(v){return function(y){n[v]=y;t--;0==t&&l(n)}}var n=[],t=0;do n.push(void 0),t++,d(k.value).nd(p(n.length-1),m),k=h.next();
36
36
  while(!k.done)})};return b});function Ha(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
37
- fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ha(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({}),
38
- m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ha(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ha(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ha(k,
37
+ ea("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"object"===l&&null!==k||"function"===l}function e(k){if(!Ha(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({}),
38
+ m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(p){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ha(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ha(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ha(k,
39
39
  g)&&Ha(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ha(k,g)&&Ha(k[g],this.g)?delete k[g][this.g]:!1};return b});
40
- fa("Map",function(a){function b(){var h={};return h.kb=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.kb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ha(h.h,l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,va:n}}return{id:l,
40
+ ea("Map",function(a){function b(){var h={};return h.mb=h.next=h.head=h}function c(h,k){var l=h.g;return fa(function(){if(l){for(;l.head!=h.g;)l=l.mb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ha(h.h,l))for(h=0;h<m.length;h++){var p=m[h];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:h,va:p}}return{id:l,
41
41
  list:m,index:-1,va:void 0}}function e(h){this.h={};this.g=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||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(r([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
42
- "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.va?l.va.value=k:(l.va={next:this.g,kb:this.g.kb,head:this.g,key:h,value:k},l.list.push(l.va),this.g.kb.next=l.va,this.g.kb=l.va,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.va&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.va.kb.next=h.va.next,h.va.next.kb=h.va.kb,
43
- h.va.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.kb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).va};e.prototype.get=function(h){return(h=d(this,h).va)&&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(),
44
- 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});function Ia(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.keys",function(a){return a?a:function(){return Ia(this,function(b){return b})}});
45
- fa("Set",function(a){function b(c){this.g=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
42
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(p){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.va?l.va.value=k:(l.va={next:this.g,mb:this.g.mb,head:this.g,key:h,value:k},l.list.push(l.va),this.g.mb.next=l.va,this.g.mb=l.va,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.va&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.va.mb.next=h.va.next,h.va.next.mb=h.va.mb,
43
+ h.va.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.mb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).va};e.prototype.get=function(h){return(h=d(this,h).va)&&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(),
44
+ 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});function Ia(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ea("Array.prototype.keys",function(a){return a?a:function(){return Ia(this,function(b){return b})}});
45
+ ea("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||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
46
46
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
47
- 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});fa("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});
48
- 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{If:e,v:f}}return{If:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ja(this,b,c).If}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
49
- fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function Ka(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
50
- fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ka(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ja(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ka(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});
51
- var La="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ha(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||La});fa("Array.prototype.values",function(a){return a?a:function(){return Ia(this,function(b,c){return c})}});
52
- fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});fa("Array.prototype.entries",function(a){return a?a:function(){return Ia(this,function(b,c){return[b,c]})}});
53
- fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Ka(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
54
- fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push([d,b[d]]);return c}});var Ma=this||self;
47
+ 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});ea("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});
48
+ 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{If:e,v:f}}return{If:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ja(this,b,c).If}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
49
+ 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(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function Ka(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
50
+ ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ka(this,b,"includes").indexOf(b,c||0)}});ea("Array.prototype.find",function(a){return a?a:function(b,c){return Ja(this,b,c).v}});ea("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ka(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});
51
+ var La="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ha(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||La});ea("Array.prototype.values",function(a){return a?a:function(){return Ia(this,function(b,c){return c})}});
52
+ 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 Ia(this,function(b,c){return[b,c]})}});
53
+ ea("String.prototype.repeat",function(a){return a?a:function(b){var c=Ka(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ea("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push(b[d]);return c}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
54
+ ea("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push([d,b[d]]);return c}});var Ma=this||self;
55
55
  function I(a,b){a=a.split(".");var c=Ma;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};function L(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}
56
56
  function Oa(a){var b=new L(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}L.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};L.prototype.stopImmediatePropagation=function(){this.g=!0};L.prototype.stopPropagation=function(){};I("shaka.util.FakeEvent",L);
57
57
  var Pa={Uh:"abrstatuschanged",Vh:"adaptation",Wh:"buffering",$h:"downloadfailed",ai:"downloadheadersreceived",bi:"drmsessionupdate",ki:"emsg",Oi:"prft",Error:"error",li:"expirationupdated",oi:"gapjumped",ti:"loaded",wi:"loading",Ci:"manifestparsed",Di:"mediaqualitychanged",Metadata:"metadata",Ii:"onstatechange",Ji:"onstateidle",Ti:"ratechange",Zi:"segmentappended",$i:"sessiondata",aj:"stalldetected",bj:"streaming",cj:"textchanged",dj:"texttrackvisibility",ej:"timelineregionadded",fj:"timelineregionenter",
58
- gj:"timelineregionexit",hj:"trackschanged",mj:"unloading",oj:"variantchanged"};function Qa(){}function Sa(){}function Ta(){}function Va(a){var b=Ga.apply(1,arguments);Wa.has(a)||(Wa.add(a),Ta.apply(Qa,ia(b)))}function Xa(){}function Ya(){}function Za(){}function $a(){}var Wa=new Set;if(window.console&&window.console.log.bind){var cb={},db=(cb[1]=console.error.bind(console),cb[2]=console.warn.bind(console),cb[3]=console.info.bind(console),cb[4]=console.log.bind(console),cb[5]=console.debug.bind(console),cb[6]=console.debug.bind(console),cb);Ta=db[2];Sa=db[1]};function eb(){this.g={}}q=eb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function fb(){this.ra=new eb;this.Dd=this}fb.prototype.addEventListener=function(a,b){this.ra&&this.ra.push(a,b)};fb.prototype.removeEventListener=function(a,b){this.ra&&this.ra.remove(a,b)};fb.prototype.dispatchEvent=function(a){if(!this.ra)return!0;var b=this.ra.get(a.type)||[],c=this.ra.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.Dd;a.currentTarget=this.Dd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
58
+ gj:"timelineregionexit",hj:"trackschanged",mj:"unloading",oj:"variantchanged"};function Qa(){}function Sa(){}function Ta(){}function Va(a){var b=Ga.apply(1,arguments);Wa.has(a)||(Wa.add(a),Ta.apply(Qa,ia(b)))}function Xa(){}function Ya(){}function Za(){}function $a(){}var Wa=new Set;if(window.console&&window.console.log.bind){var bb={},db=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Ta=db[2];Sa=db[1]};function eb(){this.g={}}q=eb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function fb(){this.ra=new eb;this.Dd=this}fb.prototype.addEventListener=function(a,b){this.ra&&this.ra.push(a,b)};fb.prototype.removeEventListener=function(a,b){this.ra&&this.ra.remove(a,b)};fb.prototype.dispatchEvent=function(a){if(!this.ra)return!0;var b=this.ra.get(a.type)||[],c=this.ra.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.Dd;a.currentTarget=this.Dd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
59
59
  fb.prototype.release=function(){this.ra=null};function gb(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 hb(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function ib(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function jb(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
60
60
  @license
61
61
  Copyright 2008 The Closure Library Authors
@@ -66,10 +66,10 @@ var kb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
66
66
  Copyright 2006 The Closure Library Authors
67
67
  SPDX-License-Identifier: Apache-2.0
68
68
  */
69
- function lb(a){var b;a instanceof lb?(mb(this,a.Ua),this.Tb=a.Tb,this.Ya=a.Ya,nb(this,a.nc),this.Ga=a.Ga,ob(this,a.g.clone()),this.Hb=a.Hb):a&&(b=String(a).match(kb))?(mb(this,b[1]||"",!0),this.Tb=pb(b[2]||""),this.Ya=pb(b[3]||"",!0),nb(this,b[4]),this.Ga=pb(b[5]||"",!0),ob(this,b[6]||"",!0),this.Hb=pb(b[7]||"")):this.g=new qb(null)}q=lb.prototype;q.Ua="";q.Tb="";q.Ya="";q.nc=null;q.Ga="";q.Hb="";
70
- q.toString=function(){var a=[],b=this.Ua;b&&a.push(rb(b,sb,!0),":");if(b=this.Ya){a.push("//");var c=this.Tb;c&&a.push(rb(c,sb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.nc;null!=b&&a.push(":",String(b))}if(b=this.Ga)this.Ya&&"/"!=b.charAt(0)&&a.push("/"),a.push(rb(b,"/"==b.charAt(0)?tb:ub,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Hb)&&a.push("#",rb(b,vb));return a.join("")};
71
- q.resolve=function(a){var b=this.clone();"data"===b.Ua&&(b=new lb);var c=!!a.Ua;c?mb(b,a.Ua):c=!!a.Tb;c?b.Tb=a.Tb:c=!!a.Ya;c?b.Ya=a.Ya:c=null!=a.nc;var d=a.Ga;if(c)nb(b,a.nc);else if(c=!!a.Ga){if("/"!=d.charAt(0))if(this.Ya&&!this.Ga)d="/"+d;else{var e=b.Ga.lastIndexOf("/");-1!=e&&(d=b.Ga.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
72
- h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Ga=d:c=""!==a.g.toString();c?ob(b,a.g.clone()):c=!!a.Hb;c&&(b.Hb=a.Hb);return b};q.clone=function(){return new lb(this)};function mb(a,b,c){a.Ua=c?pb(b,!0):b;a.Ua&&(a.Ua=a.Ua.replace(/:$/,""))}function nb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.nc=b}else a.nc=null}function ob(a,b,c){b instanceof qb?a.g=b:(c||(b=rb(b,wb)),a.g=new qb(b))}
69
+ function lb(a){var b;a instanceof lb?(mb(this,a.Va),this.Tb=a.Tb,this.Za=a.Za,nb(this,a.nc),this.Ha=a.Ha,ob(this,a.g.clone()),this.Hb=a.Hb):a&&(b=String(a).match(kb))?(mb(this,b[1]||"",!0),this.Tb=pb(b[2]||""),this.Za=pb(b[3]||"",!0),nb(this,b[4]),this.Ha=pb(b[5]||"",!0),ob(this,b[6]||"",!0),this.Hb=pb(b[7]||"")):this.g=new qb(null)}q=lb.prototype;q.Va="";q.Tb="";q.Za="";q.nc=null;q.Ha="";q.Hb="";
70
+ q.toString=function(){var a=[],b=this.Va;b&&a.push(rb(b,sb,!0),":");if(b=this.Za){a.push("//");var c=this.Tb;c&&a.push(rb(c,sb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.nc;null!=b&&a.push(":",String(b))}if(b=this.Ha)this.Za&&"/"!=b.charAt(0)&&a.push("/"),a.push(rb(b,"/"==b.charAt(0)?tb:ub,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Hb)&&a.push("#",rb(b,vb));return a.join("")};
71
+ q.resolve=function(a){var b=this.clone();"data"===b.Va&&(b=new lb);var c=!!a.Va;c?mb(b,a.Va):c=!!a.Tb;c?b.Tb=a.Tb:c=!!a.Za;c?b.Za=a.Za:c=null!=a.nc;var d=a.Ha;if(c)nb(b,a.nc);else if(c=!!a.Ha){if("/"!=d.charAt(0))if(this.Za&&!this.Ha)d="/"+d;else{var e=b.Ha.lastIndexOf("/");-1!=e&&(d=b.Ha.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
72
+ h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Ha=d:c=""!==a.g.toString();c?ob(b,a.g.clone()):c=!!a.Hb;c&&(b.Hb=a.Hb);return b};q.clone=function(){return new lb(this)};function mb(a,b,c){a.Va=c?pb(b,!0):b;a.Va&&(a.Va=a.Va.replace(/:$/,""))}function nb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.nc=b}else a.nc=null}function ob(a,b,c){b instanceof qb?a.g=b:(c||(b=rb(b,wb)),a.g=new qb(b))}
73
73
  function pb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function rb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,xb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function xb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var sb=/[#\/\?@]/g,ub=/[#\?:]/g,tb=/[#\?]/g,wb=/[#\?@]/g,vb=/#/g;function qb(a){this.g=a||null}
74
74
  function zb(a){if(!a.Ca&&(a.Ca={},a.qd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=qb.prototype;q.Ca=null;q.qd=null;q.add=function(a,b){zb(this);this.g=null;var c=this.Ca.hasOwnProperty(a)?this.Ca[a]:null;c||(this.Ca[a]=c=[]);c.push(b);this.qd++;return this};
75
75
  q.set=function(a,b){zb(this);this.g=null;this.Ca.hasOwnProperty(a)?this.Ca[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Ca)return"";var a=[],b;for(b in this.Ca)for(var c=encodeURIComponent(b),d=this.Ca[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new qb;a.g=this.g;if(this.Ca){var b={},c;for(c in this.Ca)b[c]=this.Ca[c].concat();a.Ca=b;a.qd=this.qd}return a};function M(a,b,c){var d=Ga.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}M.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};I("shaka.util.Error",M);M.Severity={RECOVERABLE:1,CRITICAL:2};M.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
@@ -82,7 +82,7 @@ NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILE
82
82
  LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,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,
83
83
  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};function Ab(a,b){return a.concat(b)}function Bb(){}function Cb(a){return null!=a};function Db(a,b){if(0==b.length)return a;var c=b.map(function(d){return new lb(d)});return a.map(function(d){return new lb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Ab,[]).map(function(d){return d.toString()})}function Eb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
84
84
  function Fb(a,b){if(1==b.length)return b[0];a=Gb(a,b);if(null!=a)return a;throw new M(2,4,4025,b);}function Gb(a,b){for(var c=r(Hb[a]),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==Ib?"":null}
85
- var Ib="text",Jb={Ka:"video",hd:"audio",ka:Ib,Ac:"image",Rh:"application"},Hb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Kb(){}function Lb(a,b){a=Mb(a);b=Mb(b);return a.split("-")[0]==b.split("-")[0]}function Nb(a,b){a=Mb(a);b=Mb(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Ob(a,b){a=Mb(a);b=Mb(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function Mb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Pb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Qb(a,b){var c=Rb(a),d=Rb(b);return a!=c&&b!=d&&c==d}
85
+ var Ib="text",Jb={Ma:"video",hd:"audio",ka:Ib,Ac:"image",Rh:"application"},Hb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Kb(){}function Lb(a,b){a=Mb(a);b=Mb(b);return a.split("-")[0]==b.split("-")[0]}function Nb(a,b){a=Mb(a);b=Mb(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Ob(a,b){a=Mb(a);b=Mb(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function Mb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Pb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Qb(a,b){var c=Rb(a),d=Rb(b);return a!=c&&b!=d&&c==d}
86
86
  function Sb(a,b){a=Mb(a);b=Mb(b);return b==a?4:Nb(b,a)?3:Ob(b,a)?2:Nb(a,b)?1:0}function Rb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Pb.get(a)||a}function Ub(a){return a.language?Mb(a.language):a.audio&&a.audio.language?Mb(a.audio.language):a.video&&a.video.language?Mb(a.video.language):"und"}
87
87
  function Vb(a,b){a=Mb(a);var c=new Set,d=r(b);for(b=d.next();!b.done;b=d.next())c.add(Mb(b.value));d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Nb(b,a))return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Ob(b,a))return b;c=r(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Nb(a,b))return b;return null}I("shaka.util.LanguageUtils",Kb);Kb.findClosestLocale=Vb;Kb.getLocaleForVariant=Ub;
88
88
  Kb.getLocaleForText=function(a){return Mb(a.language||"und")};Kb.getBase=Rb;Kb.relatedness=Sb;Kb.areSiblings=Qb;Kb.normalize=Mb;Kb.isSiblingOf=Ob;Kb.isParentOf=Nb;Kb.areLanguageCompatible=Lb;Kb.areLocaleCompatible=function(a,b){a=Mb(a);b=Mb(b);return a==b};
@@ -96,8 +96,8 @@ q.uf=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a
96
96
  q.ba=function(a,b,c){a=Mb(a);void 0===c&&(c=Yb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Yb||d.set(f,e)});this.h.set(a,d);Xb(this);this.dispatchEvent(new L("locale-updated"));return this};q.Bh=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new L("unknown-localization",a));return""};
97
97
  function Xb(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Xb:f.Xb},h=g.next()){f.Xb=h.value;e.add(f.Xb);e.add(Rb(f.Xb));h=jb(b.keys(),function(l){return function(m){return Qb(m,l.Xb)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=jb(b.keys(),function(l){return function(m){return Rb(m)==l.Xb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
98
98
  c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Zb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new L("missing-localizations",d)))}function Zb(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}I("shaka.ui.Localization",Wb);Wb.prototype.resolve=Wb.prototype.resolve;
99
- Wb.prototype.resolveDictionary=Wb.prototype.Bh;Wb.prototype.insert=Wb.prototype.ba;Wb.prototype.changeLocale=Wb.prototype.uf;Wb.prototype.release=Wb.prototype.release;var Yb=1;Wb.ConflictResolution={USE_OLD:0,USE_NEW:Yb};Wb.UNKNOWN_LOCALES="unknown-locales";Wb.UNKNOWN_LOCALIZATION="unknown-localization";Wb.MISSING_LOCALIZATIONS="missing-localizations";Wb.LOCALE_CHANGED="locale-changed";Wb.LOCALE_UPDATED="locale-updated";var $b={Fi:"OFF",Si:"REWIND",Oh:"AD_DURATION",ni:"FULL_SCREEN",Ph:"AD_TIME",zi:"MORE_SETTINGS",Ei:"NOT_APPLICABLE",Ri:"RESOLUTION",Ki:"PAUSE",lj:"UNRECOGNIZED_LANGUAGE",Yh:"CAST",Ui:"SEEK",BACK:"BACK",di:"ENTER_PICTURE_IN_PICTURE",kj:"UNMUTE",AD_PROGRESS:"AD_PROGRESS",mi:"FAST_FORWARD",ii:"EXIT_LOOP_MODE",Mi:"PLAY",gg:"SUBTITLE_FORCED",Sh:"AUTO_QUALITY",Qh:"AIRPLAY",fg:"LIVE",Wi:"SKIP_TO_LIVE",jj:"UNDETERMINED_LANGUAGE",Ni:"PLAYBACK_RATE",Xh:"CAPTIONS",Li:"PICTURE_IN_PICTURE",ji:"EXIT_PICTURE_IN_PICTURE",
100
- Gi:"ON",nj:"VOLUME",ci:"ENTER_LOOP_MODE",ri:"LANGUAGE",Vi:"SKIP_AD",Ai:"MULTIPLE_LANGUAGES",Qi:"REPLAY",Bi:"MUTE",Pi:"QUALITY",si:"LOOP",Yi:"STATISTICS",gi:"EXIT_FULL_SCREEN"};function ac(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ac.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 bc(a){return a.h/(1-Math.pow(a.g,a.i))};function cc(){this.h=new ac(2);this.j=new ac(5);this.g=0;this.i=128E3;this.l=16E3}cc.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)};cc.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)}};cc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(bc(this.h),bc(this.j))};function dc(a){if(ec.has(a))return ec.get(a);var b=MediaSource.isTypeSupported(a);ec.set(a,b);return b}var ec=new Map;function fc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function gc(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function hc(a,b,c){c||(c=fc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Td:d.Td},e=a.next()){d.Td=e.value;e=b.findIndex(function(f){return function(g){return c(f.Td,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
99
+ Wb.prototype.resolveDictionary=Wb.prototype.Bh;Wb.prototype.insert=Wb.prototype.ba;Wb.prototype.changeLocale=Wb.prototype.uf;Wb.prototype.release=Wb.prototype.release;var Yb=1;Wb.ConflictResolution={USE_OLD:0,USE_NEW:Yb};Wb.UNKNOWN_LOCALES="unknown-locales";Wb.UNKNOWN_LOCALIZATION="unknown-localization";Wb.MISSING_LOCALIZATIONS="missing-localizations";Wb.LOCALE_CHANGED="locale-changed";Wb.LOCALE_UPDATED="locale-updated";var $b={Si:"REWIND",Oh:"AD_DURATION",Ni:"PLAYBACK_RATE",nj:"VOLUME",Wi:"SKIP_TO_LIVE",Vi:"SKIP_AD",Sh:"AUTO_QUALITY",ri:"LANGUAGE",Fi:"OFF",ni:"FULL_SCREEN",kj:"UNMUTE",Ri:"RESOLUTION",mi:"FAST_FORWARD",fg:"LIVE",ci:"ENTER_LOOP_MODE",zi:"MORE_SETTINGS",di:"ENTER_PICTURE_IN_PICTURE",gg:"SUBTITLE_FORCED",Yi:"STATISTICS",Bi:"MUTE",gi:"EXIT_FULL_SCREEN",lj:"UNRECOGNIZED_LANGUAGE",BACK:"BACK",Xh:"CAPTIONS",ii:"EXIT_LOOP_MODE",Qh:"AIRPLAY",Qi:"REPLAY",si:"LOOP",ji:"EXIT_PICTURE_IN_PICTURE",Pi:"QUALITY",
100
+ Ei:"NOT_APPLICABLE",Ki:"PAUSE",Mi:"PLAY",Yh:"CAST",Ai:"MULTIPLE_LANGUAGES",AD_PROGRESS:"AD_PROGRESS",Li:"PICTURE_IN_PICTURE",Ui:"SEEK",Ph:"AD_TIME",jj:"UNDETERMINED_LANGUAGE",Gi:"ON"};function ac(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ac.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 bc(a){return a.h/(1-Math.pow(a.g,a.i))};function cc(){this.h=new ac(2);this.j=new ac(5);this.g=0;this.i=128E3;this.l=16E3}cc.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)};cc.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)}};cc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(bc(this.h),bc(this.j))};function dc(a){if(ec.has(a))return ec.get(a);var b=MediaSource.isTypeSupported(a);ec.set(a,b);return b}var ec=new Map;function fc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function gc(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function hc(a,b,c){c||(c=fc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Td:d.Td},e=a.next()){d.Td=e.value;e=b.findIndex(function(f){return function(g){return c(f.Td,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
101
101
  function ic(a,b,c){c||(c=fc);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 kc(a,b,c){this.startTime=a;this.direction=lc;this.endTime=b;this.payload=c;this.region=new mc;this.position=null;this.positionAlign=nc;this.size=0;this.textAlign=oc;this.writingMode=pc;this.lineInterpretation=qc;this.line=null;this.lineHeight="";this.lineAlign=rc;this.displayAlign=sc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=tc;this.fontStyle=uc;this.linePadding=this.letterSpacing=
102
102
  this.fontFamily="";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}kc.prototype.clone=function(){var a=new kc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
103
103
  function vc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!ic(a.nestedCues,b.nestedCues,vc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!ic(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}I("shaka.text.Cue",kc);var nc="auto";
@@ -132,16 +132,16 @@ function Yd(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;if(0!=a.dis
132
132
  function Zd(a,b,c){var d=!1;a=r(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Yd(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function $d(a,b){return G(function(c){if(1==c.g)return u(c,ae(b,0<b.offlineSessionIds.length),2);be(a,b);ce(b);return u(c,de(b),0)})}
133
133
  function ae(a,b){return G(function(c){if(1==c.g)return u(c,ee(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=fe(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Fb("video",g);f=fe(f);g=Fb("audio",g);g=ge(g);g=yd(e.mimeType,g,"audio");if(!dc(g))return!1}f=yd(e.mimeType,f,"video");if(!dc(f))return!1}if(f=d.audio)if(g=ge(f.codecs),f=yd(f.mimeType,g,"audio"),!dc(f))return!1;if(Rc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||
134
134
  e.codecs.includes("avc3.")))return Ya(he(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Ya(he(d));return e});B(c)})}
135
- function ee(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;return G(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v.return();e=navigator.mediaCapabilities;f=[];g=function(y,w){var x;return G(function(A){if(1==A.g)return C(A,2),u(A,e.decodingInfo(w),4);if(2!=A.g)return x=A.h,y.decodingInfos.push(x),ua(A,0);va(A);JSON.stringify(w);B(A)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=ie(l,b,c),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,f.push(g(l,t));return u(v,Promise.all(f),
135
+ function ee(a,b,c){var d,e,f,g,h,k,l,m,p,n,t;return G(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v.return();e=navigator.mediaCapabilities;f=[];g=function(y,w){var x;return G(function(A){if(1==A.g)return D(A,2),u(A,e.decodingInfo(w),4);if(2!=A.g)return x=A.h,y.decodingInfos.push(x),ua(A,0);va(A);JSON.stringify(w);B(A)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=ie(l,b,c),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,f.push(g(l,t));return u(v,Promise.all(f),
136
136
  0)})}
137
137
  function ie(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Fb("video",g);f=fe(f);g=Fb("audio",g);g=yd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=fe(f);f=yd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
138
138
  break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=ge(d.codecs),f=yd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
139
- f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=r(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,t=r(h.initData),v=t.next();!v.done;v=t.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
139
+ f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=r(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,t=r(h.initData),v=t.next();!v.done;v=t.next())n.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
140
140
  (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function ge(a){return Tc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
141
141
  function fe(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function be(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!je(d,a.audio)||c&&a&&a.video&&!je(c,a.video)?!1:!0})}function ce(a){a.textStreams=a.textStreams.filter(function(b){return Dd(xd(b.mimeType,b.codecs))})}
142
142
  function de(a){var b,c,d,e,f,g,h,k;return G(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.D(4);break}e=d.value;f=e.mimeType;if(ke.has(f)){l.D(5);break}g=le.get(f);if(!g){ke.set(f,!1);l.D(5);break}return u(l,me(g),7);case 7:h=l.h,ke.set(f,h);case 5:(k=ke.get(f))&&b.push(e);d=c.next();l.D(2);break;case 4:a.imageStreams=b,B(l)}})}
143
143
  function me(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function je(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
144
- function ne(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=r(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=r(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
144
+ function ne(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var p=r(b.roles),n=p.next();!n.done;n=p.next())m.add(n.value);if(c)for(p=r(c.roles),n=p.next();!n.done;n=p.next())m.add(n.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
145
145
  kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,
146
146
  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);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);return a}
147
147
  function oe(a){return{id:a.id,active:!1,type:Ib,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
@@ -172,23 +172,23 @@ function df(a){return new Ze(Promise.all(a.map(function(b){return b.promise})),f
172
172
  Ze.prototype.ha=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=ef(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Lc,g=new M(2,7,7001);this.promise.then(c(!0),c(!1));return new Ze(f,function(){return d()})};
173
173
  function ef(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()}}}I("shaka.util.AbortableOperation",Ze);Ze.prototype.chain=Ze.prototype.ha;Ze.prototype["finally"]=Ze.prototype.finally;Ze.all=df;Ze.prototype.abort=Ze.prototype.abort;Ze.notAbortable=cf;Ze.completed=bf;Ze.aborted=af;Ze.failed=$e;function ff(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function gf(a){var b={},c;for(c in a)b[c]=a[c];return b};function hf(){this.g=[]}function jf(a,b){a.g.push(b.finally(function(){gc(a.g,b)}))}hf.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 kf(a,b,c){fb.call(this);this.i=!1;this.m=new hf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.s=!1}pa(kf,fb);q=kf.prototype;q.Le=function(a){this.s=a};function lf(a,b,c,d){c=c||mf;var e=nf[a];if(!e||c>=e.priority)nf[a]={priority:c,qh:b,rh:void 0===d?!1:d}}q.sh=function(a){this.g.add(a)};q.Jh=function(a){this.g.delete(a)};q.og=function(){this.g.clear()};q.uh=function(a){this.h.add(a)};q.Kh=function(a){this.h.delete(a)};q.pg=function(){this.h.clear()};
174
174
  function of(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();fb.prototype.release.call(this);return this.m.destroy()};
175
- q.request=function(a,b){var c=this,d=new pf;if(this.i){var e=Promise.reject(new M(2,7,7001));e.catch(function(){});return new qf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?ff(b.retryParameters):Xe();b.uris=ff(b.uris);e=rf(this,a,b);var f=e.ha(function(){return sf(c,a,b,new We(b.retryParameters,!1),0,null,d)}),g=f.ha(function(n){return tf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
176
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.ha(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.bh||!c.l||t.fromCache||a!=uf||c.l(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new qf(m.promise,function(){return m.abort()},d);jf(this.m,e);return e};
175
+ q.request=function(a,b){var c=this,d=new pf;if(this.i){var e=Promise.reject(new M(2,7,7001));e.catch(function(){});return new qf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?ff(b.retryParameters):Xe();b.uris=ff(b.uris);e=rf(this,a,b);var f=e.ha(function(){return sf(c,a,b,new We(b.retryParameters,!1),0,null,d)}),g=f.ha(function(p){return tf(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
176
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.ha(function(p){var n=Date.now()-l,t=p.response;t.timeMs+=k;t.timeMs+=n;p.bh||!c.l||t.fromCache||a!=uf||c.l(t.timeMs,t.data.byteLength);return t},function(p){p&&(p.severity=2);throw p;});e=new qf(m.promise,function(){return m.abort()},d);jf(this.m,e);return e};
177
177
  function rf(a,b,c){var d=bf(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Zd:e.Zd},f=a.next())e.Zd=f.value,d=d.ha(function(g){return function(){c.body&&(c.body=Ic(c.body));return g.Zd(b,c)}}(e));return d.ha(void 0,function(g){if(g instanceof M&&7001==g.code)throw g;throw new M(2,1,1006,g);})}
178
- function sf(a,b,c,d,e,f,g){a.s&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new lb(c.uris[e]),k=h.Ua,l=!1;k||(k=location.protocol,k=k.slice(0,-1),mb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=nf[k])?k.qh:null;if(!m)return $e(new M(2,1,1E3,h));var n=k.rh,p=null,t=null,v=!1,y=!1,w;return cf(Ye(d)).ha(function(){if(a.i)return af();w=Date.now();var x=m(c.uris[e],c,b,function(D,E,F){p&&p.stop();t&&t.R(z/1E3);a.l&&b==uf&&(a.l(D,E),l=!0,g.g=F)},function(D){a.j&&a.j(D,c,b);y=!0});
179
- if(!n)return x;var A=c.retryParameters.connectionTimeout;A&&(p=new O(function(){v=!0;x.abort()}),p.R(A/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new O(function(){v=!0;x.abort()}));return x}).ha(function(x){p&&p.stop();t&&t.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-w);var A={response:x,bh:l};!y&&a.j&&a.j(x.headers,c,b);return A},function(x){p&&p.stop();t&&t.stop();if(a.B){var A=null,z=0;x instanceof M&&(A=x,1001==x.code&&(z=x.data[1]));a.B(c,A,z,v)}if(a.i)return af();v&&(x=new M(1,1,1003,
178
+ function sf(a,b,c,d,e,f,g){a.s&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new lb(c.uris[e]),k=h.Va,l=!1;k||(k=location.protocol,k=k.slice(0,-1),mb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=nf[k])?k.qh:null;if(!m)return $e(new M(2,1,1E3,h));var p=k.rh,n=null,t=null,v=!1,y=!1,w;return cf(Ye(d)).ha(function(){if(a.i)return af();w=Date.now();var x=m(c.uris[e],c,b,function(C,E,F){n&&n.stop();t&&t.R(z/1E3);a.l&&b==uf&&(a.l(C,E),l=!0,g.g=F)},function(C){a.j&&a.j(C,c,b);y=!0});
179
+ if(!p)return x;var A=c.retryParameters.connectionTimeout;A&&(n=new O(function(){v=!0;x.abort()}),n.R(A/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new O(function(){v=!0;x.abort()}));return x}).ha(function(x){n&&n.stop();t&&t.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-w);var A={response:x,bh:l};!y&&a.j&&a.j(x.headers,c,b);return A},function(x){n&&n.stop();t&&t.stop();if(a.B){var A=null,z=0;x instanceof M&&(A=x,1001==x.code&&(z=x.data[1]));a.B(c,A,z,v)}if(a.i)return af();v&&(x=new M(1,1,1003,
180
180
  c.uris[e],b));if(x instanceof M){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return A=(new Map).set("error",x),A=new L("retry",A),a.dispatchEvent(A),e=(e+1)%c.uris.length,sf(a,b,c,d,e,x,g)}throw x;})}
181
181
  function tf(a,b,c){var d=bf(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={$d:e.$d},f=a.next())e.$d=f.value,d=d.ha(function(g){return function(){var h=c.response;h.data&&(h.data=Ic(h.data));return g.$d(b,h)}}(e));return d.ha(function(){return c},function(g){var h=2;if(g instanceof M){if(7001==g.code)throw g;h=g.severity}throw new M(h,1,1007,g);})}I("shaka.net.NetworkingEngine",kf);kf.prototype.request=kf.prototype.request;kf.prototype.destroy=kf.prototype.destroy;kf.makeRequest=of;
182
182
  kf.defaultRetryParameters=function(){return Xe()};kf.prototype.clearAllResponseFilters=kf.prototype.pg;kf.prototype.unregisterResponseFilter=kf.prototype.Kh;kf.prototype.registerResponseFilter=kf.prototype.uh;kf.prototype.clearAllRequestFilters=kf.prototype.og;kf.prototype.unregisterRequestFilter=kf.prototype.Jh;kf.prototype.registerRequestFilter=kf.prototype.sh;kf.unregisterScheme=function(a){delete nf[a]};kf.registerScheme=lf;kf.prototype.setForceHTTPS=kf.prototype.Le;function pf(){this.g=0}
183
183
  kf.NumBytesRemainingClass=pf;function qf(a,b,c){Ze.call(this,a,b);this.h=c}pa(qf,Ze);kf.PendingRequest=qf;var uf=1;kf.RequestType={MANIFEST:0,SEGMENT:uf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var mf=3;kf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:mf};var nf={};function vf(a){this.g=!1;this.h=new Lc;this.i=a}vf.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 wf(a,b){if(a.g){if(b instanceof M&&7003==b.code)throw b;throw new M(2,7,7003,b);}};function xf(){this.g=new eb}q=xf.prototype;q.release=function(){this.Rb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new yf(a,b,c,d),this.g.push(b,a))};q.Da=function(a,b,c,d){function e(g){f.qc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.qc=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.qc(),this.g.remove(b,e))}};
184
184
  q.Rb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.qc();this.g.g={}}};I("shaka.util.EventManager",xf);xf.prototype.removeAll=xf.prototype.Rb;xf.prototype.unlisten=xf.prototype.qc;xf.prototype.listenOnce=xf.prototype.Da;xf.prototype.listen=xf.prototype.o;xf.prototype.release=xf.prototype.release;function yf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=zf(a,d);this.target.addEventListener(b,c,this.g)}
185
185
  yf.prototype.qc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function zf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return Af(a)?b:b.capture||!1}
186
- function Af(a){var b=Bf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}Bf=b}return b||!1}var Bf=void 0;function Cf(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 Df(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Ef(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function Ff(a,b){this.W=Kc(a);this.h=b==Gf;this.g=0}q=Ff.prototype;q.wa=function(){return this.g<this.W.byteLength};q.ma=function(){return this.g};q.Ig=function(){return this.W.byteLength};q.mb=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw Hf();}};q.Be=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Hf();}};q.N=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Hf();}};
186
+ function Af(a){var b=Bf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}Bf=b}return b||!1}var Bf=void 0;function Cf(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 Df(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Ef(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function Ff(a,b){this.W=Kc(a);this.h=b==Gf;this.g=0}q=Ff.prototype;q.wa=function(){return this.g<this.W.byteLength};q.ma=function(){return this.g};q.Ig=function(){return this.W.byteLength};q.ob=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw Hf();}};q.Be=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Hf();}};q.N=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Hf();}};
187
187
  q.Pf=function(){try{var a=this.W.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Hf();}};q.Cb=function(){try{if(this.h){var a=this.W.getUint32(this.g,!0);var b=this.W.getUint32(this.g+4,!0)}else b=this.W.getUint32(this.g,!1),a=this.W.getUint32(this.g+4,!1)}catch(c){throw Hf();}if(2097151<b)throw new M(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Bb=function(a){if(this.g+a>this.W.byteLength)throw Hf();var b=Hc(this.W,this.g,a);this.g+=a;return b};
188
188
  q.skip=function(a){if(this.g+a>this.W.byteLength)throw Hf();this.g+=a};q.Ch=function(a){if(this.g<a)throw Hf();this.g-=a};q.seek=function(a){if(0>a||a>this.W.byteLength)throw Hf();this.g=a};q.Uc=function(){for(var a=this.g;this.wa()&&0!=this.W.getUint8(this.g);)this.g+=1;a=Hc(this.W,a,this.g-a);this.g+=1;return ad(a)};function Hf(){return new M(2,3,3E3)}I("shaka.util.DataViewReader",Ff);Ff.prototype.readTerminatedString=Ff.prototype.Uc;Ff.prototype.seek=Ff.prototype.seek;Ff.prototype.rewind=Ff.prototype.Ch;
189
- Ff.prototype.skip=Ff.prototype.skip;Ff.prototype.readBytes=Ff.prototype.Bb;Ff.prototype.readUint64=Ff.prototype.Cb;Ff.prototype.readInt32=Ff.prototype.Pf;Ff.prototype.readUint32=Ff.prototype.N;Ff.prototype.readUint16=Ff.prototype.Be;Ff.prototype.readUint8=Ff.prototype.mb;Ff.prototype.getLength=Ff.prototype.Ig;Ff.prototype.getPosition=Ff.prototype.ma;Ff.prototype.hasMoreData=Ff.prototype.wa;var Gf=1;Ff.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Gf};function If(){this.i=[];this.h=[];this.g=!1}q=If.prototype;q.box=function(a,b){a=Jf(a);this.i[a]=Kf;this.h[a]=b;return this};q.S=function(a,b){a=Jf(a);this.i[a]=Lf;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Ff(a,0);for(this.g=!1;a.wa()&&!this.g;)this.Sc(0,a,b,c)};
190
- q.Sc=function(a,b,c,d){var e=b.ma();if(d&&e+8>b.W.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=Mf(g),k=!1;switch(f){case 0:f=b.W.byteLength-e;break;case 1:if(d&&b.ma()+8>b.W.byteLength){this.g=!0;return}f=b.Cb();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Lf){if(d&&b.ma()+4>b.W.byteLength){this.g=!0;return}n=b.N();m=n>>>24;n&=16777215}g=e+f;c&&g>b.W.byteLength&&(g=b.W.byteLength);d&&g>b.W.byteLength?this.g=!0:(d=g-b.ma(),b=0<d?b.Bb(d):new Uint8Array(0),b=new Ff(b,0),l({name:h,parser:this,
191
- partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.ma(),b.W.byteLength-b.ma()))}};function Nf(a){for(var b=Of(a);a.reader.wa()&&!a.parser.g;)a.parser.Sc(a.start+b,a.reader,a.partialOkay)}function Pf(a){for(var b=Of(a),c=a.reader.N(),d=0;d<c&&(a.parser.Sc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Qf(a){var b=Of(a);for(a.reader.skip(78);a.reader.wa()&&!a.parser.g;)a.parser.Sc(a.start+b,a.reader,a.partialOkay)}
189
+ Ff.prototype.skip=Ff.prototype.skip;Ff.prototype.readBytes=Ff.prototype.Bb;Ff.prototype.readUint64=Ff.prototype.Cb;Ff.prototype.readInt32=Ff.prototype.Pf;Ff.prototype.readUint32=Ff.prototype.N;Ff.prototype.readUint16=Ff.prototype.Be;Ff.prototype.readUint8=Ff.prototype.ob;Ff.prototype.getLength=Ff.prototype.Ig;Ff.prototype.getPosition=Ff.prototype.ma;Ff.prototype.hasMoreData=Ff.prototype.wa;var Gf=1;Ff.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Gf};function If(){this.i=[];this.h=[];this.g=!1}q=If.prototype;q.box=function(a,b){a=Jf(a);this.i[a]=Kf;this.h[a]=b;return this};q.S=function(a,b){a=Jf(a);this.i[a]=Lf;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Ff(a,0);for(this.g=!1;a.wa()&&!this.g;)this.Sc(0,a,b,c)};
190
+ q.Sc=function(a,b,c,d){var e=b.ma();if(d&&e+8>b.W.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=Mf(g),k=!1;switch(f){case 0:f=b.W.byteLength-e;break;case 1:if(d&&b.ma()+8>b.W.byteLength){this.g=!0;return}f=b.Cb();k=!0}var l=this.h[g];if(l){var m=null,p=null;if(this.i[g]==Lf){if(d&&b.ma()+4>b.W.byteLength){this.g=!0;return}p=b.N();m=p>>>24;p&=16777215}g=e+f;c&&g>b.W.byteLength&&(g=b.W.byteLength);d&&g>b.W.byteLength?this.g=!0:(d=g-b.ma(),b=0<d?b.Bb(d):new Uint8Array(0),b=new Ff(b,0),l({name:h,parser:this,
191
+ partialOkay:c||!1,version:m,flags:p,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.ma(),b.W.byteLength-b.ma()))}};function Nf(a){for(var b=Of(a);a.reader.wa()&&!a.parser.g;)a.parser.Sc(a.start+b,a.reader,a.partialOkay)}function Pf(a){for(var b=Of(a),c=a.reader.N(),d=0;d<c&&(a.parser.Sc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Qf(a){var b=Of(a);for(a.reader.skip(78);a.reader.wa()&&!a.parser.g;)a.parser.Sc(a.start+b,a.reader,a.partialOkay)}
192
192
  function Rf(a){return function(b){a(b.reader.Bb(b.reader.W.byteLength-b.reader.ma()))}}function Jf(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 Mf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Of(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}I("shaka.util.Mp4Parser",If);If.headerSize=Of;If.typeToString=Mf;If.allData=Rf;If.visualSampleEntry=Qf;If.sampleDescription=Pf;If.children=Nf;
193
193
  If.prototype.parseNext=If.prototype.Sc;If.prototype.parse=If.prototype.parse;If.prototype.stop=If.prototype.stop;If.prototype.fullBox=If.prototype.S;If.prototype.box=If.prototype.box;var Kf=0,Lf=1;function Sf(a){var b=this;this.g=[];this.h=[];this.data=[];(new If).box("moov",Nf).box("moof",Nf).S("pssh",function(c){if(!(1<c.version)){var d=Hc(c.reader.W,-12,c.size);b.data.push(d);b.g.push(ld(c.reader.Bb(16)));if(0<c.version){d=c.reader.N();for(var e=0;e<d;e++){var f=ld(c.reader.Bb(16));b.h.push(f)}}}}).parse(a)}
194
194
  function Tf(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Kc(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=r(c),c=b.next();!c.done;c=b.next())c=kd(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Uf(a,b){a=Vf(a,b);return 1!=a.length?null:a[0]}function Wf(a,b,c){a=Xf(a,b,c);return 1!=a.length?null:a[0]}function Vf(a,b){var c=[];a=r(a.childNodes);for(var d=a.next();!d.done;d=a.next())d=d.value,d instanceof Element&&d.tagName==b&&c.push(d);return c}function Yf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
@@ -197,55 +197,55 @@ function bg(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION
197
197
  function eg(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
198
198
  function fg(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 gg(a){a=Number(a);return 0===a%1?a:null}function hg(a){a=Number(a);return 0===a%1&&0<a?a:null}function ig(a){a=Number(a);return 0===a%1&&0<=a?a:null}function jg(a){a=Number(a);return isNaN(a)?null:a}function kg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
199
199
  function lg(a,b){var c=new DOMParser,d=mg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function ng(a,b){try{var c=ad(a);return lg(c,b)}catch(d){return null}}
200
- var mg=new Mc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function og(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.C=null;this.$=this.X=!1;this.J=0;this.g=null;this.B=new xf;this.i=new Map;this.F=[];this.s=new Lc;this.h=null;this.m=function(d){c.s.reject(d);a.onError(d)};this.aa=new Map;this.Z=new Map;this.P=new O(function(){return pg(c)});this.M=!1;this.K=[];this.O=!1;this.ra=(new O(function(){qg(c)})).ea(b);this.s.catch(function(){});this.j=new vf(function(){return rg(c)});this.U=!1;this.H=null}q=og.prototype;q.destroy=function(){return this.j.destroy()};
201
- function rg(a){return G(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.s.reject(),a.ra.stop(),a.ra=null,a.P.stop(),a.P=null,u(b,sg(a),2);case 2:if(!a.l){b.D(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:va(b);case 5:a.l=null;case 3:a.g=null,a.I.clear(),a.C=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.U=!1,a.H=null,B(b)}})}q.configure=function(a){this.h=a};function tg(a,b,c){a.$=!0;a.F=[];a.M=c;return ug(a,b)}
200
+ var mg=new Mc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function og(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.C=null;this.$=this.X=!1;this.J=0;this.g=null;this.B=new xf;this.i=new Map;this.F=[];this.s=new Lc;this.h=null;this.m=function(d){c.s.reject(d);a.onError(d)};this.aa=new Map;this.Z=new Map;this.P=new O(function(){return pg(c)});this.M=!1;this.K=[];this.O=!1;this.ra=(new O(function(){qg(c)})).ea(b);this.s.catch(function(){});this.j=new vf(function(){return rg(c)});this.V=!1;this.H=null}q=og.prototype;q.destroy=function(){return this.j.destroy()};
201
+ function rg(a){return G(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.s.reject(),a.ra.stop(),a.ra=null,a.P.stop(),a.P=null,u(b,sg(a),2);case 2:if(!a.l){b.D(3);break}D(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:va(b);case 5:a.l=null;case 3:a.g=null,a.I.clear(),a.C=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.V=!1,a.H=null,B(b)}})}q.configure=function(a){this.h=a};function tg(a,b,c){a.$=!0;a.F=[];a.M=c;return ug(a,b)}
202
202
  function vg(a,b,c){a.F=c;a.M=0<c.length;return ug(a,b)}function wg(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return xg(a,g,[])}
203
- function ug(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return G(function(w){if(1==w.g){if(c=yg(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=Cf(a.h.servers),zg(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Ag(l),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,Bg(t,Cf(a.h.servers),Cf(a.h.advanced||{}),a.h.keySystemsMapping);
204
- return u(w,ee(b,a.M,a.U),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.X=!0,w.return(Promise.resolve());y=xg(a,void 0,b);return w.return(g?y:y.catch(function(){}))})}function Cg(a){var b;return G(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.H){c.D(2);break}return u(c,a.H,3);case 3:return wf(a.j),c.return();case 2:return C(c,4),a.H=a.l.setMediaKeys(a.C),u(c,a.H,6);case 6:ua(c,5);break;case 4:b=va(c),a.m(new M(2,6,6003,b.message));case 5:wf(a.j),B(c)}})}
203
+ function ug(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;return G(function(w){if(1==w.g){if(c=yg(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=Cf(a.h.servers),zg(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Ag(l),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,Bg(t,Cf(a.h.servers),Cf(a.h.advanced||{}),a.h.keySystemsMapping);
204
+ return u(w,ee(b,a.M,a.V),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.X=!0,w.return(Promise.resolve());y=xg(a,void 0,b);return w.return(g?y:y.catch(function(){}))})}function Cg(a){var b;return G(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.H){c.D(2);break}return u(c,a.H,3);case 3:return wf(a.j),c.return();case 2:return D(c,4),a.H=a.l.setMediaKeys(a.C),u(c,a.H,6);case 6:ua(c,5);break;case 4:b=va(c),a.m(new M(2,6,6003,b.message));case 5:wf(a.j),B(c)}})}
205
205
  function Dg(a,b){return G(function(c){if(1==c.g)return u(c,Cg(a),2);Eg(a,b.initDataType,Hc(b.initData));B(c)})}
206
206
  q.Bc=function(a){var b=this,c;return G(function(d){if(1==d.g){if(!b.C)return b.B.Da(a,"encrypted",function(){b.m(new M(2,6,6010))}),d.return();b.l=a;b.B.Da(b.l,"play",function(){for(var e=r(b.K),f=e.next();!f.done;f=e.next())Fg(b,f.value);b.O=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.B.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return sg(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||"com.apple.fps"!==b.g.keySystem||b.F.length?u(d,
207
207
  Cg(b),2):d.D(2)}Gg(b);c||b.F.length||b.h.parseInbandPsshEnabled||b.B.o(b.l,"encrypted",function(e){return Dg(b,e)});B(d)})};
208
- function Hg(a){var b,c,d,e,f;return G(function(g){switch(g.g){case 1:if(!a.C||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=of([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.G.Ob.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Hc(d.data);ua(g,4);break;case 3:throw e=va(g),new M(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
209
- C(g,6);return u(g,a.C.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=va(g),new M(2,6,6004,f.message);}})}function Ig(a,b){var c,d,e;return G(function(f){if(1==f.g)return u(f,Jg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.bb=new Lc,d.push(e.bb);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);B(f)})}
208
+ function Hg(a){var b,c,d,e,f;return G(function(g){switch(g.g){case 1:if(!a.C||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=of([a.g.serverCertificateUri],a.h.retryParameters);D(g,3);c=a.G.Ob.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Hc(d.data);ua(g,4);break;case 3:throw e=va(g),new M(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
209
+ D(g,6);return u(g,a.C.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=va(g),new M(2,6,6004,f.message);}})}function Ig(a,b){var c,d,e;return G(function(f){if(1==f.g)return u(f,Jg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.bb=new Lc,d.push(e.bb);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);B(f)})}
210
210
  function Gg(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Eg(a,d.initDataType,d.initData);c=r(a.F);for(d=c.next();!d.done;d=c.next())Jg(a,d.value);b.length||a.F.length||a.s.resolve();return a.s}function Eg(a,b,c){if(c.length){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Fc(c,e.value.initData)&&!Sc("Tizen 2"))return;0<a.i.size&&Kg(a)&&(a.s.resolve(),a.s=new Lc,a.s.catch(function(){}));Lg(a,b,c,a.g.sessionType)}}
211
211
  function Mg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Ng(a){a=a.i.keys();a=gb(a,function(b){return b.sessionId});return Array.from(a)}q.Gc=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};q.td=function(){return Df(this.Z)};
212
- function xg(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y;return G(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Og(a,c,d);w.D(2);break}return u(w,Pg(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new M(2,6,6001);wf(a.j);C(w,4);a.I.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.I.add(n.contentType.toLowerCase());p=r(k);for(m=p.next();!m.done;m=p.next())t=m.value,a.I.add(t.contentType.toLowerCase());if(c.length){var x=
213
- f.keySystem;var A=d.get(f.keySystem);var z=[],D=[],E=[],F=[],H=new Set;Qg(A,z,E,D,F,H);var J=a.M?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:z[0],distinctiveIdentifierRequired:A[0].distinctiveIdentifierRequired,persistentStateRequired:A[0].persistentStateRequired,sessionType:A[0].sessionType||J,audioRobustness:A[0].audioRobustness||"",videoRobustness:A[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:D[0],initData:F,keyIds:H};A=r(A);for(z=A.next();!z.done;z=
214
- A.next())z=z.value,z.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(x.persistentStateRequired=z.persistentStateRequired);A=x}else A=f.keySystem,x=b.get(f.keySystem),z=[],D=[],E=[],F=[],H=new Set,Qg(x.drmInfos,z,E,D,F,H),A={keySystem:A,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
215
- x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:D[0],initData:F,keyIds:H};a.g=A;if(!a.g.licenseServerUri)throw new M(2,6,6012,a.g.keySystem);return u(w,f.createMediaKeys(),6);case 6:return v=w.h,wf(a.j),a.C=v,a.X=!0,u(w,Hg(a),7);case 7:wf(a.j);ua(w,0);break;case 4:y=va(w);wf(a.j,y);a.g=null;a.I.clear();if(y instanceof M)throw y;throw new M(2,6,6002,y.message);}})}
212
+ function xg(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y;return G(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Og(a,c,d);w.D(2);break}return u(w,Pg(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new M(2,6,6001);wf(a.j);D(w,4);a.I.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.I.add(p.contentType.toLowerCase());n=r(k);for(m=n.next();!m.done;m=n.next())t=m.value,a.I.add(t.contentType.toLowerCase());if(c.length){var x=
213
+ f.keySystem;var A=d.get(f.keySystem);var z=[],C=[],E=[],F=[],H=new Set;Qg(A,z,E,C,F,H);var J=a.M?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:z[0],distinctiveIdentifierRequired:A[0].distinctiveIdentifierRequired,persistentStateRequired:A[0].persistentStateRequired,sessionType:A[0].sessionType||J,audioRobustness:A[0].audioRobustness||"",videoRobustness:A[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:C[0],initData:F,keyIds:H};A=r(A);for(z=A.next();!z.done;z=
214
+ A.next())z=z.value,z.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(x.persistentStateRequired=z.persistentStateRequired);A=x}else A=f.keySystem,x=b.get(f.keySystem),z=[],C=[],E=[],F=[],H=new Set,Qg(x.drmInfos,z,E,C,F,H),A={keySystem:A,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
215
+ x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:C[0],initData:F,keyIds:H};a.g=A;if(!a.g.licenseServerUri)throw new M(2,6,6012,a.g.keySystem);return u(w,f.createMediaKeys(),6);case 6:return v=w.h,wf(a.j),a.C=v,a.X=!0,u(w,Hg(a),7);case 7:wf(a.j);ua(w,0);break;case 4:y=va(w);wf(a.j,y);a.g=null;a.I.clear();if(y instanceof M)throw y;throw new M(2,6,6002,y.message);}})}
216
216
  function Og(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Ag(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new M(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Xd:d.Xd},e=a.next())for(d.Xd=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
217
217
  l.Xd}}(d)))return e.keySystemAccess;a=r([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=r(b),e=f.next();!e.done;e=f.next()){var g=r(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=r(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
218
- function Pg(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w;return G(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new M(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){x.D(4);break}k=h.value;if(!b.has(k)){x.D(3);break}l=b.get(k);C(x,6);return u(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
219
- x.h,x.return(c);case 6:va(x);case 7:wf(a.j);case 3:h=g.next();x.D(2);break;case 4:m=r([!0,!1]),n=m.next();case 9:if(n.done){x.D(11);break}p=n.value;t=r(b.keys());h=t.next();case 12:if(h.done){n=m.next();x.D(9);break}v=h.value;y=b.get(v);w=y.drmInfos.some(function(A){return!!A.licenseServerUri});if(w!=p){x.D(13);break}C(x,15);return u(x,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=x.h,x.return(c);case 15:va(x);case 16:wf(a.j);case 13:h=t.next();x.D(12);break;case 11:return x.return(c)}})}
218
+ function Pg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w;return G(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new M(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){x.D(4);break}k=h.value;if(!b.has(k)){x.D(3);break}l=b.get(k);D(x,6);return u(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
219
+ x.h,x.return(c);case 6:va(x);case 7:wf(a.j);case 3:h=g.next();x.D(2);break;case 4:m=r([!0,!1]),p=m.next();case 9:if(p.done){x.D(11);break}n=p.value;t=r(b.keys());h=t.next();case 12:if(h.done){p=m.next();x.D(9);break}v=h.value;y=b.get(v);w=y.drmInfos.some(function(A){return!!A.licenseServerUri});if(w!=n){x.D(13);break}D(x,15);return u(x,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=x.h,x.return(c);case 15:va(x);case 16:wf(a.j);case 13:h=t.next();x.D(12);break;case 11:return x.return(c)}})}
220
220
  function yg(a){a=Cf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=id(kd(f),!1));f=e;22!=f.length&&(f=id(kd(e),!1));e={kty:"oct",kid:g,k:f};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Hc(ed(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
221
221
  videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
222
- function Jg(a,b){var c,d,e,f,g;return G(function(h){switch(h.g){case 1:try{c=a.C.createSession("persistent-license")}catch(k){return d=new M(2,6,6005,k.message),a.m(d),h.return(Promise.reject(d))}a.B.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.K.push(k):Fg(a,k)});a.B.o(c,"keystatuseschange",function(k){return Rg(a,k)});e={initData:null,initDataType:null,loaded:!1,ze:Infinity,bb:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);case 4:f=
222
+ function Jg(a,b){var c,d,e,f,g;return G(function(h){switch(h.g){case 1:try{c=a.C.createSession("persistent-license")}catch(k){return d=new M(2,6,6005,k.message),a.m(d),h.return(Promise.reject(d))}a.B.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.K.push(k):Fg(a,k)});a.B.o(c,"keystatuseschange",function(k){return Rg(a,k)});e={initData:null,initDataType:null,loaded:!1,ze:Infinity,bb:null,type:"persistent-license"};a.i.set(c,e);D(h,2);return u(h,c.load(b),4);case 4:f=
223
223
  h.h;wf(a.j);if(!f)return a.i.delete(c),a.m(new M(2,6,6013)),h.return(Promise.resolve());e.loaded=!0;Kg(a)&&a.s.resolve();return h.return(c);case 2:g=va(h),wf(a.j,g),a.i.delete(c),a.m(new M(2,6,6005,g.message));case 3:return h.return(Promise.resolve())}})}
224
224
  function Lg(a,b,c,d){try{var e=a.C.createSession(d)}catch(f){a.m(new M(2,6,6005,f.message));return}a.B.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.K.push(f):Fg(a,f)});a.B.o(e,"keystatuseschange",function(f){return Rg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,ze:Infinity,bb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof M||(b=new M(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&id(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
225
225
  var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new M(2,6,6006,f.message,f,h))}})}
226
- function Fg(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;G(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&id(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=of([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),
227
- Mg(a.g.keySystem)&&Sg(g),h=Date.now(),C(w,2),l=a.G.Ob.request(2,g),u(w,l.promise,4);case 4:k=w.h;ua(w,3);break;case 2:return m=va(w),n=new M(2,6,6007,m),a.m(n),d&&d.bb&&d.bb.reject(n),w.return();case 3:if(a.j.g)return w.return();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&id(k.data);C(w,5);return u(w,c.update(k.data),7);case 7:ua(w,6);break;case 5:return p=va(w),t=new M(2,6,6008,p.message),a.m(t),d&&d.bb&&d.bb.reject(t),w.return();case 6:if(a.j.g)return w.return();v=new L("drmsessionupdate");
226
+ function Fg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;G(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&id(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=of([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),
227
+ Mg(a.g.keySystem)&&Sg(g),h=Date.now(),D(w,2),l=a.G.Ob.request(2,g),u(w,l.promise,4);case 4:k=w.h;ua(w,3);break;case 2:return m=va(w),p=new M(2,6,6007,m),a.m(p),d&&d.bb&&d.bb.reject(p),w.return();case 3:if(a.j.g)return w.return();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&id(k.data);D(w,5);return u(w,c.update(k.data),7);case 7:ua(w,6);break;case 5:return n=va(w),t=new M(2,6,6008,n.message),a.m(t),d&&d.bb&&d.bb.reject(t),w.return();case 6:if(a.j.g)return w.return();v=new L("drmsessionupdate");
228
228
  a.G.onEvent(v);d&&(d.bb&&d.bb.resolve(),y=new O(function(){d.loaded=!0;Kg(a)&&a.s.resolve()}),y.R(Tg));B(w)}})}
229
229
  function Sg(a){var b=bd(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=lg(b,"PlayReadyKeyMessage");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=jd(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
230
230
  function Rg(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Mg(a.g.keySystem)&&16==g.byteLength&&(navigator.userAgent.match(/Edge?\//)||Wc())){h=Kc(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=ld(g).slice(0,32);a.aa.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.bb&&(a.i.delete(b),
231
231
  b.close().catch(function(){}));Kg(a)&&(a.s.resolve(),a.P.R(Ug))}function pg(a){var b=a.aa,c=a.Z;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new M(2,6,6014));a.G.Fd(Df(c))}
232
- function Vg(){var a,b,c,d,e,f,g,h;return G(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,
233
- p;return G(function(t){switch(t.g){case 1:C(t,2);if("org.w3.clearkey"===l&&Xc())throw Error("Unsupported keySystem");return u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Sc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(t,m.createMediaKeys(),5);case 5:ua(t,0);break;case 2:va(t),f.set(l,null),B(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k.return(Df(f))})}
234
- function Wg(a){var b;return G(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).R(Xg)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ua(c,0);va(c);B(c)})}
235
- function sg(a){var b;return G(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return G(function(g){if(1==g.g)return C(g,2),a.$||a.F.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Wg(e),5):u(g,e.remove(),5);if(2!=g.g)return ua(g,0);va(g);B(g)})})),0)})}
236
- function Yg(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={},f=r(b),g=f.next();!g.done;e={Sa:e.Sa},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Sa=[];e.Sa=e.Sa.concat(d.initData||[]);e.Sa=e.Sa.concat(g.initData||[]);e.Sa=e.Sa.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Sa.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(ia(d.keyIds),ia(g.keyIds))):
232
+ function Vg(){var a,b,c,d,e,f,g,h;return G(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,p,
233
+ n;return G(function(t){switch(t.g){case 1:D(t,2);if("org.w3.clearkey"===l&&Xc())throw Error("Unsupported keySystem");return u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,Sc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),u(t,m.createMediaKeys(),5);case 5:ua(t,0);break;case 2:va(t),f.set(l,null),B(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k.return(Df(f))})}
234
+ function Wg(a){var b;return G(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).R(Xg)}),D(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ua(c,0);va(c);B(c)})}
235
+ function sg(a){var b;return G(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return G(function(g){if(1==g.g)return D(g,2),a.$||a.F.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Wg(e),5):u(g,e.remove(),5);if(2!=g.g)return ua(g,0);va(g);B(g)})})),0)})}
236
+ function Yg(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={},f=r(b),g=f.next();!g.done;e={Ta:e.Ta},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Ta=[];e.Ta=e.Ta.concat(d.initData||[]);e.Ta=e.Ta.concat(g.initData||[]);e.Ta=e.Ta.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Ta.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(ia(d.keyIds),ia(g.keyIds))):
237
237
  d.keyIds||g.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||g.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||g.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||g.persistentStateRequired,videoRobustness:d.videoRobustness||g.videoRobustness,audioRobustness:d.audioRobustness||g.audioRobustness,serverCertificate:d.serverCertificate||g.serverCertificate,serverCertificateUri:d.serverCertificateUri||g.serverCertificateUri,
238
- initData:e.Sa,keyIds:f});break}}return c}function Ag(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function qg(a){a.i.forEach(function(b,c){var d=b.ze,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ze=e)})}function Kg(a){a=a.i.values();return hb(a,function(b){return b.loaded})}
238
+ initData:e.Ta,keyIds:f});break}}return c}function Ag(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function qg(a){a.i.forEach(function(b,c){var d=b.ze,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ze=e)})}function Kg(a){a=a.i.values();return hb(a,function(b){return b.loaded})}
239
239
  function zg(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)}
240
- function Qg(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Fa:g.Fa},h=a.next()){g.Fa=h.value;b.includes(g.Fa.licenseServerUri)||b.push(g.Fa.licenseServerUri);d.includes(g.Fa.serverCertificateUri)||d.push(g.Fa.serverCertificateUri);g.Fa.serverCertificate&&(c.some(function(m){return function(n){return Fc(n,m.Fa.serverCertificate)}}(g))||c.push(g.Fa.serverCertificate));if(g.Fa.initData){h={};for(var k=r(g.Fa.initData),l=k.next();!l.done;h={dd:h.dd},l=k.next())h.dd=l.value,e.some(function(m){return function(n){var p=
241
- m.dd;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Fc(n.initData,p.initData)}}(h))||e.push(h.dd)}if(g.Fa.keyIds)for(h=r(g.Fa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
240
+ function Qg(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Fa:g.Fa},h=a.next()){g.Fa=h.value;b.includes(g.Fa.licenseServerUri)||b.push(g.Fa.licenseServerUri);d.includes(g.Fa.serverCertificateUri)||d.push(g.Fa.serverCertificateUri);g.Fa.serverCertificate&&(c.some(function(m){return function(p){return Fc(p,m.Fa.serverCertificate)}}(g))||c.push(g.Fa.serverCertificate));if(g.Fa.initData){h={};for(var k=r(g.Fa.initData),l=k.next();!l.done;h={dd:h.dd},l=k.next())h.dd=l.value,e.some(function(m){return function(p){var n=
241
+ m.dd;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Fc(p.initData,n.initData)}}(h))||e.push(h.dd)}if(g.Fa.keyIds)for(h=r(g.Fa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
242
242
  function Bg(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
243
243
  c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var Xg=1,Tg=5,Ug=.5,Zg=new Mc(function(){return Ic(new Uint8Array([0]))});function $g(){}function ah(a,b,c,d){var e,f,g,h;return G(function(k){if(1==k.g){if(d&&(e=bh[d.toLowerCase()]))return k.return(e);if(f=ch(a))if(g=dh[f])return k.return(g);return d?k.D(2):u(k,eh(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=bh[d]))return k.return(h);throw new M(2,4,4E3,a);})}function eh(a,b,c){var d,e,f;return G(function(g){if(1==g.g)return d=of([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g.return(f?f.toLowerCase().split(";").shift():"")})}
244
- function ch(a){a=(new lb(a)).Ga.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}I("shaka.media.ManifestParser",$g);$g.unregisterParserByMime=function(a){delete bh[a]};$g.registerParserByMime=function(a,b){bh[a]=b};$g.registerParserByExtension=function(a,b){dh[a]=b};var bh={},dh={};function fh(a){function b(){d=!0}function c(l){f.push(l);Nf(l)}a=Hc(a);var d=!1,e,f=[],g=[];(new If).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).S("stsd",function(l){e=l;f.push(l);Pf(l)}).S("encv",b).S("enca",b).S("hev1",function(l){g.push({box:l,Pb:1701733238})}).S("hvc1",function(l){g.push({box:l,Pb:1701733238})}).S("avc1",function(l){g.push({box:l,Pb:1701733238})}).S("avc3",function(l){g.push({box:l,Pb:1701733238})}).S("ac-3",function(l){g.push({box:l,Pb:1701733217})}).S("ec-3",
244
+ function ch(a){a=(new lb(a)).Ha.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}I("shaka.media.ManifestParser",$g);$g.unregisterParserByMime=function(a){delete bh[a]};$g.registerParserByMime=function(a,b){bh[a]=b};$g.registerParserByExtension=function(a,b){dh[a]=b};var bh={},dh={};function fh(a){function b(){d=!0}function c(l){f.push(l);Nf(l)}a=Hc(a);var d=!1,e,f=[],g=[];(new If).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).S("stsd",function(l){e=l;f.push(l);Pf(l)}).S("encv",b).S("enca",b).S("hev1",function(l){g.push({box:l,Pb:1701733238})}).S("hvc1",function(l){g.push({box:l,Pb:1701733238})}).S("avc1",function(l){g.push({box:l,Pb:1701733238})}).S("avc3",function(l){g.push({box:l,Pb:1701733238})}).S("ac-3",function(l){g.push({box:l,Pb:1701733217})}).S("ec-3",
245
245
  function(l){g.push({box:l,Pb:1701733217})}).S("mp4a",function(l){g.push({box:l,Pb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw $a(ld(a)),new M(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=gh(a,e,k.box,f,k.Pb);return a}
246
246
  function gh(a,b,c,d,e){var f=hh.value(),g=a.subarray(c.start,c.start+c.size),h=Kc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Kc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);ih(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Rc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,ih(e,d.start,d.size+k.byteLength);k=Kc(e,b.start);b=Of(b);a=k.getUint32(b);
247
- k.setUint32(b,a+1);return e}function ih(a,b,c){a=Kc(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var hh=new Mc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function jh(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(D){return null!=D&&""!=D.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(D){return null!=D&&""!=D.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=kh(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){t=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
248
- t||-1===v)p=lh(d,e),a.nestedCues.push(p);else{for(;t<=v;t++)if(y=p[t]){var w=y.l,x=y.i,A=y.j,z=y.h;if(w!=h||x!=k||A!=l||z!=m)n.payload&&a.nestedCues.push(n),n=kh(d,e,w,x,A,z),h=w,k=x,l=A,m=z;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=lh(d,e),a.nestedCues.push(n));n=kh(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
247
+ k.setUint32(b,a+1);return e}function ih(a,b,c){a=Kc(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var hh=new Mc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function jh(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(C){return null!=C&&""!=C.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(C){return null!=C&&""!=C.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",p=kh(d,e,h,k,l,m);f<=g;f++){for(var n=c[f],t=-1,v=-1,y=0;y<n.length;y++)if(null!=n[y]&&""!==n[y].g.trim()){t=y;break}for(y=n.length-1;0<=y;y--)if(null!=n[y]&&""!==n[y].g.trim()){v=y;break}if(-1===
248
+ t||-1===v)n=lh(d,e),a.nestedCues.push(n);else{for(;t<=v;t++)if(y=n[t]){var w=y.l,x=y.i,A=y.j,z=y.h;if(w!=h||x!=k||A!=l||z!=m)p.payload&&a.nestedCues.push(p),p=kh(d,e,w,x,A,z),h=w,k=x,l=A,m=z;p.payload+=y.g}else p.payload+=" ";p.payload&&a.nestedCues.push(p);f!==g&&(p=lh(d,e),a.nestedCues.push(p));p=kh(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
249
249
  function kh(a,b,c,d,e,f){a=new kc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function lh(a,b){a=new kc(a,b,"");a.lineBreak=!0;return a}function mh(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function nh(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.B=b;this.j=this.m=!1;this.l="white";this.s="black";oh(this)}function ph(a,b,c){return jh(new kc(b,c,""),"CC"+(a.C<<1|a.B+1),a.i,b,c)}function oh(a){qh(a,0,15);a.g=1}function rh(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case sh:d=th.has(c)?th.get(c):String.fromCharCode(c);break;case uh:d=vh.get(c);break;case wh:a.i[a.g].pop();d=xh.get(c);break;case yh:a.i[a.g].pop(),d=zh.get(c)}d&&a.i[a.g].push(new mh(d,a.m,a.j,a.s,a.l))}}
250
250
  function Ah(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function qh(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
251
251
  var sh=0,uh=1,wh=2,yh=3,th=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"]]),vh=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),xh=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
@@ -259,24 +259,24 @@ b.skip(1),d=Xh(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&
259
259
  function ai(a,b,c){var d=null;b=r($h(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Rh(f,c,a.i));a.h[e]=null}return d}function bi(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ci(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return di[a<<2|b<<1|c]}
260
260
  var ei=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"]]),di="black blue green cyan red magenta yellow white".split(" ");function fi(){this.h=[];this.g=[];this.i=new Uh;this.l=0;this.B=new Map([["CC1",new Bh(0,0)],["CC2",new Bh(0,1)],["CC3",new Bh(1,0)],["CC4",new Bh(1,1)]]);this.s=this.m=0;this.j=new Map;gi(this)}function gi(a){a.m=0;a.s=0;a=r(a.B.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,oh(b.i),oh(b.l),oh(b.s)}
261
261
  function hi(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=r(a.h),e=d.next();!e.done;e=d.next())(e=ii(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())Vh(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=ji(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
262
- function ii(a,b){var c=b.type;if(16===(b.Ma&112)){var d=b.Ma>>3&1;0===c?a.m=d:a.s=d}c=a.B.get("CC"+(c<<1|(c?a.s:a.m)+1));if(255===b.Ma&&255===b.gb||!b.Ma&&!b.gb||!ki(b.Ma)||!ki(b.gb))return 45<=++a.l&&gi(a),null;a.l=0;b.Ma&=127;b.gb&=127;if(!b.Ma&&!b.gb)return null;a=null;if(16===(b.Ma&112))a:{d=b.Ma;a=b.gb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var e=(a&30)>>1;d="white";var f=!1;7>e?d=Kh[e]:7===e&&(f=!0);
262
+ function ii(a,b){var c=b.type;if(16===(b.Oa&112)){var d=b.Oa>>3&1;0===c?a.m=d:a.s=d}c=a.B.get("CC"+(c<<1|(c?a.s:a.m)+1));if(255===b.Oa&&255===b.hb||!b.Oa&&!b.hb||!ki(b.Oa)||!ki(b.hb))return 45<=++a.l&&gi(a),null;a.l=0;b.Oa&=127;b.hb&=127;if(!b.Oa&&!b.hb)return null;a=null;if(16===(b.Oa&112))a:{d=b.Oa;a=b.hb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var e=(a&30)>>1;d="white";var f=!1;7>e?d=Kh[e]:7===e&&(f=!0);
263
263
  a=1===(a&1);if(c.h!==Fh){e=c.g;if(c.h===Eh&&b!==e.g){var g=1+b-e.h;Ah(e,g,1+e.g-e.h,e.h);qh(e,0,g-1);qh(e,b+1,15-b)}e.g=b;c.g.m=a;c.g.j=f;c.g.l=d;c.g.s="black"}}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",rh(c.g,sh,32),d=!1,b=Kh[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Jh[(a&14)>>1]),c.g.s=b;else if(17===(d&247)&&48===(a&240))rh(c.g,uh,a);else if(18===
264
- (d&246)&&32===(a&224))rh(c.g,d&1?yh:wh,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.gb){case 32:Gh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Dh(c,2,a);break;case 38:d=Dh(c,3,a);break;case 39:d=Dh(c,4,a);break;case 40:rh(c.g,sh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=a;break;case 42:oh(c.s);Ih(c);break;case 43:Ih(c);break;case 44:b=c.i;d=null;c.h!==Fh&&(d=ph(b,c.j,a));qh(b,0,15);break;case 45:b=c.g;c.h!==Eh?d=null:(d=ph(b,c.j,a),f=b.g-b.h+1,Ah(b,f-1,f,b.h),qh(b,0,
265
- f-1),qh(b,b.g,15-b.g),c.j=a);break;case 46:qh(c.l,0,15);break;case 47:b=null,c.h!==Fh&&(b=ph(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,Gh(c),c.j=a,d=b}a=d;break a}a=null}else d=b.gb,rh(c.g,sh,b.Ma),rh(c.g,sh,d);return a}
266
- function ji(a,b){var c=[];try{for(;b.wa();){var d=Xh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Xh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Yh(e));for(var g=a.j.get(e),h=b.ma();b.ma()-h<f;){e=b;var k=Xh(e),l=k.value,m=k.pts;if(16===l){var n=Xh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Qh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Rh(t,p,g.i));if(t.h+1>=t.H){p=t;for(var v=0,y=1;16>y;y++,
267
- v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=Oh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Rh(t,p,g.i));t.i[t.h]=Oh();t.g=0;break;case 12:t.isVisible()&&(e=Rh(t,p,g.i)),Nh(t),p=t,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Zh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Ph(g.g,"\u266a"):Ph(g.g,
264
+ (d&246)&&32===(a&224))rh(c.g,d&1?yh:wh,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.hb){case 32:Gh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Dh(c,2,a);break;case 38:d=Dh(c,3,a);break;case 39:d=Dh(c,4,a);break;case 40:rh(c.g,sh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=a;break;case 42:oh(c.s);Ih(c);break;case 43:Ih(c);break;case 44:b=c.i;d=null;c.h!==Fh&&(d=ph(b,c.j,a));qh(b,0,15);break;case 45:b=c.g;c.h!==Eh?d=null:(d=ph(b,c.j,a),f=b.g-b.h+1,Ah(b,f-1,f,b.h),qh(b,0,
265
+ f-1),qh(b,b.g,15-b.g),c.j=a);break;case 46:qh(c.l,0,15);break;case 47:b=null,c.h!==Fh&&(b=ph(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,Gh(c),c.j=a,d=b}a=d;break a}a=null}else d=b.hb,rh(c.g,sh,b.Oa),rh(c.g,sh,d);return a}
266
+ function ji(a,b){var c=[];try{for(;b.wa();){var d=Xh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Xh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Yh(e));for(var g=a.j.get(e),h=b.ma();b.ma()-h<f;){e=b;var k=Xh(e),l=k.value,m=k.pts;if(16===l){var p=Xh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Qh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Rh(t,n,g.i));if(t.h+1>=t.H){n=t;for(var v=0,y=1;16>y;y++,
267
+ v++)n.i[v]=n.i[y];for(y=0;1>y;y++,v++)n.i[v]=Oh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Rh(t,n,g.i));t.i[t.h]=Oh();t.g=0;break;case 12:t.isVisible()&&(e=Rh(t,n,g.i)),Nh(t),n=t,n.h=0,n.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Zh(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Ph(g.g,"\u266a"):Ph(g.g,
268
268
  String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Ph(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(ei.has(e)){var x=ei.get(e);Ph(g.g,x)}else Ph(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Ph(g.g,"_"):Ph(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(A){if(A instanceof M&&3E3===A.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw A;}return c}function ki(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function li(){}li.prototype.init=function(){};li.prototype.parse=function(){return[]};function mi(a,b){var c=null,d=null,e=null,f=a.N();b&1&&(e=a.Cb());b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:f,zf:c,ug:d,pj:e}}function ni(a,b){return{nf:1==b?a.Cb():a.N()}}function oi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
269
269
  function pi(a,b,c){var d=a.N(),e=[],f=null;c&1&&(f=a.N());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Ee:null,sampleSize:null,Ld:null};c&256&&(h.Ee=a.N());c&512&&(h.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(h.Ld=0==b?a.N():a.Pf());e.push(h)}return{uj:d,Rf:e,sg:f}};function qi(){this.j=new Map;this.i=this.h=0;this.g=ri}
270
270
  qi.prototype.init=function(a){function b(f){f=f.name;f in si&&(c.g=si[f])}var c=this,d=[],e=[];(new If).box("moov",Nf).box("mvex",Nf).S("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.N();g=g.N();c.h=f;c.i=g}).box("trak",Nf).S("tkhd",function(f){var g=f.reader;1==f.version?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));f=g.N();d.push(f)}).box("mdia",Nf).S("mdhd",function(f){f=oi(f.reader,f.version);e.push(f.timescale)}).box("minf",Nf).box("stbl",Nf).S("stsd",Pf).box("avc1",b).box("avc3",b).box("hev1",
271
271
  b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("encv",Qf).box("sinf",Nf).box("frma",function(f){f=f.reader.N();f=Mf(f);f in si&&(c.g=si[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new M(2,2,2010);this.g==ri&&Ta("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
272
- qi.prototype.parse=function(a){var b=this;if(this.g==ri)return[];var c=[],d=this.h,e=this.i,f=[],g=null,h=null,k=null,l=9E4;(new If).box("moof",function(m){g=m.start;Nf(m)}).box("traf",Nf).S("trun",function(m){m=pi(m.reader,m.version,m.flags);f=m.Rf;h=m.sg}).S("tfhd",function(m){m=mi(m.reader,m.flags);d=m.zf||b.h;e=m.ug||b.i;m=m.trackId;b.j.has(m)&&(l=b.j.get(m))}).S("tfdt",function(m){k=ni(m.reader,m.version).nf}).box("mdat",function(m){if(null===k)throw new M(2,2,2010);a:{var n=m.reader,p=k,t=l,
273
- v=d,y=e,w=f,x=0,A=y;w.length&&(A=w[0].sampleSize||y);for(n.skip((g||0)+(h||0)-m.start-8);n.wa();){m=n.N();var z=n.mb();switch(b.g){case ti:z&=31;z=6==z;break;case ui:z=z>>1&63;z=39==z||40==z;break;default:break a}if(z){z=0;w.length>x&&(z=w[x].Ld||0);z=(p+z)/t;for(var D=[],E,F=n.Bb(m-1),H=E=0;H<F.length;)2==E&&3==F[H]?(E=0,F=[].concat(ia(F)),F.splice(H,1),F=new Uint8Array(F)):0==F[H]?E++:E=0,H++;E=F;for(H=0;H<E.length;){for(F=0;255==E[H];)F+=255,H++;F+=E[H++];for(var J=0;255==E[H];)J+=255,H++;J+=E[H++];
274
- 4==F&&D.push(E.subarray(H,H+J));H+=J}D=r(D);for(E=D.next();!E.done;E=D.next())c.push({ph:E.value,pts:z})}else try{n.skip(m-1)}catch(K){break}A-=m+4;0==A&&(p=w.length>x?p+(w[x].Ee||v):p+v,x++,A=w.length>x?w[x].sampleSize||y:y)}}}).parse(a,!1);return c};var ri=0,ti=1,ui=2,si={avc1:ti,avc3:ti,hev1:ui,hvc1:ui,dvh1:ui,dvhe:ui};function vi(a){this.h=new li;a.includes("video/mp4")&&(this.h=new qi);this.g=new fi}vi.prototype.init=function(a){this.h.init(a)};
275
- function wi(a,b){b=a.h.parse(b);b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Hc(d.ph);if(0<e.length&&(c=a.g,d=d.pts,e=new Ff(e,0),181===e.mb()&&49===e.Be()&&1195456820===e.N()&&3===e.mb())){var f=e.mb();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.mb(),k=(h&4)>>2,l=e.mb(),m=e.mb();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,Ma:l,gb:m,order:c.h.length}):(c.g.push({pts:d,type:h,value:l,order:c.g.length}),c.g.push({pts:d,type:2,value:m,order:c.g.length})))}}}}return hi(a.g)}
276
- ;function xi(a,b,c,d,e){this.Na=a;this.Ra=b;this.Ba=c;this.ve=void 0===d?null:d;this.timescale=e}xi.prototype.Jc=function(){return this.Ra};xi.prototype.Fc=function(){return this.Ba};function yi(a,b){return a&&b?a.Jc()==b.Jc()&&a.Fc()==b.Fc()&&ic(a.Na(),b.Na()):a==b}I("shaka.media.InitSegmentReference",xi);xi.prototype.getEndByte=xi.prototype.Fc;xi.prototype.getStartByte=xi.prototype.Jc;
277
- function zi(a,b,c,d,e,f,g,h,k,l,m,n,p,t,v){l=void 0===l?[]:l;t=void 0===t?Ai:t;this.startTime=a;this.j=this.endTime=b;this.B=c;this.Ra=d;this.Ba=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.i=l;this.tilesLayout=void 0===m?"":m;this.s=void 0===n?null:n;this.g=void 0===p?null:p;this.status=t;this.l=void 0===v?null:v;this.m=null}q=zi.prototype;q.Na=function(){return this.B()};q.getStartTime=function(){return this.startTime};q.Gg=function(){return this.endTime};
278
- q.Jc=function(){return this.Ra};q.Fc=function(){return this.Ba};q.Zg=function(){return this.tilesLayout};q.Yg=function(){return this.s};q.ec=function(){return this.status};q.ih=function(){this.status=Bi};q.Yf=function(a){this.m=a};q.Wg=function(){return this.m};I("shaka.media.SegmentReference",zi);zi.prototype.getThumbnailSprite=zi.prototype.Wg;zi.prototype.setThumbnailSprite=zi.prototype.Yf;zi.prototype.markAsUnavailable=zi.prototype.ih;zi.prototype.getStatus=zi.prototype.ec;
279
- zi.prototype.getTileDuration=zi.prototype.Yg;zi.prototype.getTilesLayout=zi.prototype.Zg;zi.prototype.getEndByte=zi.prototype.Fc;zi.prototype.getStartByte=zi.prototype.Jc;zi.prototype.getEndTime=zi.prototype.Gg;zi.prototype.getStartTime=zi.prototype.getStartTime;zi.prototype.getUris=zi.prototype.Na;var Ai=0,Bi=1;zi.Status={Th:Ai,ij:Bi,xi:2};function Ci(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function Di(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Ei(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
272
+ qi.prototype.parse=function(a){var b=this;if(this.g==ri)return[];var c=[],d=this.h,e=this.i,f=[],g=null,h=null,k=null,l=9E4;(new If).box("moof",function(m){g=m.start;Nf(m)}).box("traf",Nf).S("trun",function(m){m=pi(m.reader,m.version,m.flags);f=m.Rf;h=m.sg}).S("tfhd",function(m){m=mi(m.reader,m.flags);d=m.zf||b.h;e=m.ug||b.i;m=m.trackId;b.j.has(m)&&(l=b.j.get(m))}).S("tfdt",function(m){k=ni(m.reader,m.version).nf}).box("mdat",function(m){if(null===k)throw new M(2,2,2010);a:{var p=m.reader,n=k,t=l,
273
+ v=d,y=e,w=f,x=0,A=y;w.length&&(A=w[0].sampleSize||y);for(p.skip((g||0)+(h||0)-m.start-8);p.wa();){m=p.N();var z=p.ob();switch(b.g){case ti:z&=31;z=6==z;break;case ui:z=z>>1&63;z=39==z||40==z;break;default:break a}if(z){z=0;w.length>x&&(z=w[x].Ld||0);z=(n+z)/t;for(var C=[],E,F=p.Bb(m-1),H=E=0;H<F.length;)2==E&&3==F[H]?(E=0,F=[].concat(ia(F)),F.splice(H,1),F=new Uint8Array(F)):0==F[H]?E++:E=0,H++;E=F;for(H=0;H<E.length;){for(F=0;255==E[H];)F+=255,H++;F+=E[H++];for(var J=0;255==E[H];)J+=255,H++;J+=E[H++];
274
+ 4==F&&C.push(E.subarray(H,H+J));H+=J}C=r(C);for(E=C.next();!E.done;E=C.next())c.push({ph:E.value,pts:z})}else try{p.skip(m-1)}catch(K){break}A-=m+4;0==A&&(n=w.length>x?n+(w[x].Ee||v):n+v,x++,A=w.length>x?w[x].sampleSize||y:y)}}}).parse(a,!1);return c};var ri=0,ti=1,ui=2,si={avc1:ti,avc3:ti,hev1:ui,hvc1:ui,dvh1:ui,dvhe:ui};function vi(a){this.h=new li;a.includes("video/mp4")&&(this.h=new qi);this.g=new fi}vi.prototype.init=function(a){this.h.init(a)};
275
+ function wi(a,b){b=a.h.parse(b);b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Hc(d.ph);if(0<e.length&&(c=a.g,d=d.pts,e=new Ff(e,0),181===e.ob()&&49===e.Be()&&1195456820===e.N()&&3===e.ob())){var f=e.ob();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.ob(),k=(h&4)>>2,l=e.ob(),m=e.ob();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,Oa:l,hb:m,order:c.h.length}):(c.g.push({pts:d,type:h,value:l,order:c.g.length}),c.g.push({pts:d,type:2,value:m,order:c.g.length})))}}}}return hi(a.g)}
276
+ ;function xi(a,b,c,d,e){this.Pa=a;this.Sa=b;this.Ba=c;this.ve=void 0===d?null:d;this.timescale=e}xi.prototype.Jc=function(){return this.Sa};xi.prototype.Fc=function(){return this.Ba};function yi(a,b){return a&&b?a.Jc()==b.Jc()&&a.Fc()==b.Fc()&&ic(a.Pa(),b.Pa()):a==b}I("shaka.media.InitSegmentReference",xi);xi.prototype.getEndByte=xi.prototype.Fc;xi.prototype.getStartByte=xi.prototype.Jc;
277
+ function zi(a,b,c,d,e,f,g,h,k,l,m,p,n,t,v){l=void 0===l?[]:l;t=void 0===t?Ai:t;this.startTime=a;this.j=this.endTime=b;this.C=c;this.Sa=d;this.Ba=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.i=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===p?null:p;this.g=void 0===n?null:n;this.status=t;this.l=void 0===v?null:v;this.s=null;this.m=0}q=zi.prototype;q.Pa=function(){return this.C()};q.getStartTime=function(){return this.startTime};q.Gg=function(){return this.endTime};
278
+ q.Jc=function(){return this.Sa};q.Fc=function(){return this.Ba};q.Zg=function(){return this.tilesLayout};q.Yg=function(){return this.B};q.ec=function(){return this.status};q.ih=function(){this.status=Bi};q.Yf=function(a){this.s=a};q.Wg=function(){return this.s};I("shaka.media.SegmentReference",zi);zi.prototype.getThumbnailSprite=zi.prototype.Wg;zi.prototype.setThumbnailSprite=zi.prototype.Yf;zi.prototype.markAsUnavailable=zi.prototype.ih;zi.prototype.getStatus=zi.prototype.ec;
279
+ zi.prototype.getTileDuration=zi.prototype.Yg;zi.prototype.getTilesLayout=zi.prototype.Zg;zi.prototype.getEndByte=zi.prototype.Fc;zi.prototype.getStartByte=zi.prototype.Jc;zi.prototype.getEndTime=zi.prototype.Gg;zi.prototype.getStartTime=zi.prototype.getStartTime;zi.prototype.getUris=zi.prototype.Pa;var Ai=0,Bi=1;zi.Status={Th:Ai,ij:Bi,xi:2};function Ci(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function Di(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Ei(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
280
280
  function Fi(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=r(Gi(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 Hi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Gi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}
281
281
  function Gi(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};/*
282
282
  @license
@@ -294,678 +294,679 @@ Mi.prototype.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,
294
294
  a.subarray(h,e+188);null==this.m&&(h=Oi(f))&&null!=h.pts&&(this.m=h.pts/9E4);this.F.push(f);break;case this.g:f=a.subarray(h,e+188);null==this.h&&(h=Oi(f))&&null!=h.pts&&(this.h=h.pts/9E4);this.C.push(f);break;case this.j:this.i.push(a.subarray(h,e+188));break;default:d=!0}}return this};
295
295
  function Oi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),tj:6+(a[4]<<8|a[5]),pts:null,dts:null},c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));b.data=a.subarray(9+a[8]);return b}
296
296
  function Pi(a){for(var b=[],c=new Uint8Array(0),d=a.i.length-1;0<=d;d--){c=md(a.i[d],c);var e=Oi(c);e&&(b.unshift({cueTime:e.pts?e.pts/9E4:null,data:e.data,frames:Li(e.data),dts:e.dts,pts:e.pts}),c=new Uint8Array(0))}return b}Mi.prototype.getStartTime=function(){return{audio:this.h,video:this.m}};function Ni(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71===a[c]&&71===a[c+188]&&71===a[c+376])return c;c++}return-1}I("shaka.util.TsParser",Mi);function Qi(a,b,c){this.g=null;this.i=-1;this.j=a;this.h=b;this.l=c;"undefined"===typeof libDPIModule&&Ta("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?Ta("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||Ta(LcevcDil.SupportObject.SupportError);"undefined"!==typeof LcevcDil&&"undefined"!==typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&
297
- (this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}Qi.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Ri(a,b){var c=Si;switch(b.mimeType){case "video/webm":c=Ti;break;case "video/mp4":c=Ui}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}I("shaka.lcevc.Dil",Qi);Qi.prototype.release=Qi.prototype.release;var Si=0,Ti=1,Ui=2;function Vi(a,b,c,d){var e=this;this.j=a;this.H=null;this.m=b;this.h={};this.M={};this.P={};this.g=null;this.J=!1;this.U=c||function(){};this.G=d||null;this.i={};this.C=new xf;this.s={};this.B=null;this.K=new Lc;this.l=Wi(this,this.K);this.I=new vf(function(){return Xi(e)});this.O="";this.F=!1;this.X=new Lc}function Wi(a,b){var c=new MediaSource;a.C.Da(c,"sourceopen",function(){URL.revokeObjectURL(a.O);b.resolve()});a.O=Yi(c);a.j.src=a.O;return c}q=Vi.prototype;q.destroy=function(){return this.I.destroy()};
297
+ (this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}Qi.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Ri(a,b){var c=Si;switch(b.mimeType){case "video/webm":c=Ti;break;case "video/mp4":c=Ui}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}I("shaka.lcevc.Dil",Qi);Qi.prototype.release=Qi.prototype.release;var Si=0,Ti=1,Ui=2;function Vi(a,b,c,d){var e=this;this.j=a;this.H=null;this.m=b;this.h={};this.M={};this.P={};this.g=null;this.J=!1;this.V=c||function(){};this.G=d||null;this.i={};this.C=new xf;this.s={};this.B=null;this.K=new Lc;this.l=Wi(this,this.K);this.I=new vf(function(){return Xi(e)});this.O="";this.F=!1;this.X=new Lc}function Wi(a,b){var c=new MediaSource;a.C.Da(c,"sourceopen",function(){URL.revokeObjectURL(a.O);b.resolve()});a.O=Yi(c);a.j.src=a.O;return c}q=Vi.prototype;q.destroy=function(){return this.I.destroy()};
298
298
  function Xi(a){var b,c,d,e,f,g,h,k;return G(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p.catch(Bb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new M(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.s)b.push(a.s[k].destroy());return u(l,Promise.all(b),2)}a.C&&(a.C.release(),a.C=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.H=null;a.l=null;a.g=null;a.m=null;a.h={};a.s={};a.B=null;
299
299
  a.i={};a.G=null;B(l)})}
300
- q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n;return G(function(p){if(1==p.g)return e=Jb,u(p,d.K,2);d.F=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={Ea:f.Ea},h=g.next())f.Ea=h.value,k=a.get(f.Ea),l=xd(k.mimeType,k.codecs),f.Ea==e.ka?Zi(d,l,c):(!b&&dc(l)||!rd(l,f.Ea)||(d.s[f.Ea]=new qd(l),l=ud(f.Ea,l)),m=l+d.H.sourceBufferExtraFeatures,n=d.l.addSourceBuffer(m),d.C.o(n,"error",function(t){return function(){d.i[t.Ea][0].p.reject(new M(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),
301
- d.C.o(n,"updateend",function(t){return function(){return $i(d,t.Ea)}}(f)),d.h[f.Ea]=n,d.M[f.Ea]=l,d.i[f.Ea]=[],d.P[f.Ea]=!!k.drmInfos.length);B(p)})};q.configure=function(a){this.H=a};function Zi(a,b,c){a.g||(a.g=new Cd(a.m));var d=a.g;a=a.J;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,Ed[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Ta('Text parsers should have a "setSequenceMode" method!'),d.C=a)}function aj(a){return a.l?"ended"==a.l.readyState:!0}
302
- function bj(a,b){return b==Ib?a.g.g:Ci(cj(a,b))}function dj(a,b){return b==Ib?a.g.h:Di(cj(a,b))}function ej(a,b,c){if(b==Ib)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=cj(a,b);return Fi(a,c)}q.hb=function(){var a={total:Gi(this.j.buffered),audio:Gi(cj(this,"audio")),video:Gi(cj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function cj(a,b){try{return a.h[b].buffered}catch(c){return null}}
303
- function fj(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,n,p,t,v,y,w,x,A,z,D,E,F,H,J,K,N,V,U;return G(function(P){switch(P.g){case 1:h=Jb;if(b!=h.ka){P.D(2);break}if(!a.F){P.D(3);break}return u(P,a.X,4);case 4:k=P.h,a.g.B=k;case 3:return u(P,Fd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return P.return();case 2:l=Hc(c);m=a.M[b];a.s[b]&&(m=a.s[b].s);0>Ni(l)?gj.includes(m)&&(v=Li(l),v.length&&d&&(y={cueTime:d.startTime,data:l,frames:v,dts:d.startTime,pts:d.startTime},a.U([y],
304
- 0,d.endTime))):(n=(new Mi).parse(l),p=d.startTime-(n.getStartTime()[b]||0),t=Pi(n),t.length&&a.U(t,p,d?d.endTime:null));if(!a.s[b]){e&&b==h.Ka&&(a.g||Zi(a,"text/vtt",a.F),a.B||(a.B=new vi(m)),d?(w=wi(a.B,c),w.length&&(x=a.h[h.Ka].timestampOffset,Kd(a.g,w,d.startTime,d.endTime,x))):a.B.init(c));P.D(6);break}f&&a.s[b].g.resetCaptions();return u(P,vd(a.s[b],c),7);case 7:A=P.h,a.g||Zi(a,"text/vtt",a.F),A.captions&&A.captions.length&&(z=a.h[h.Ka].timestampOffset,D=Id(A.captions),Kd(a.g,D,d?d.startTime:
305
- null,d?d.endTime:null,z)),c=A.data;case 6:c=hj(a,c,d?d.startTime:null,b);E=a.h[b];F=ij;if(!a.F||E.mode==F||!d){P.D(8);break}H=b==h.Ka||!(h.Ka in a.h);if(!H){P.D(9);break}J=[E.appendWindowStart,E.appendWindowEnd];E.appendWindowStart=0;E.appendWindowEnd=Infinity;K=E.timestampOffset;E.timestampOffset=0;return u(P,jj(a,b,function(){return kj(a,b,c)}),10);case 10:return u(P,jj(a,b,function(){return lj(a,b)}),11);case 11:return E.timestampOffset=K,E.appendWindowStart=J[0],E.appendWindowEnd=J[1],N=Ci(cj(a,
306
- b)),V=(d.startTime||0)-(N||0),a.X.resolve(V),u(P,jj(a,b,function(){return mj(a,b,0,a.l.duration)}),12);case 12:if(b!=h.Ka){P.D(9);break}return u(P,jj(a,b,function(){a.j.currentTime-=.001;$i(a,b)}),9);case 9:E.mode=F;case 8:return d&&a.F&&b!=h.ka&&(f||g)&&(U=d.startTime,jj(a,b,function(){return lj(a,b)}),jj(a,b,function(){var ca=U;0>ca&&(ca+=.001);a.h[b].timestampOffset=ca;$i(a,b)})),u(P,jj(a,b,function(){kj(a,b,c)}),15);case 15:B(P)}})}function nj(a,b){var c=dj(a,"video")||0;Hd(a.g,b,c)}
307
- function oj(a){a.g&&Hd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return G(function(f){e=Jb;return a==e.ka?u(f,d.g.remove(b,c),0):u(f,jj(d,a,function(){return mj(d,a,b,c)}),0)})};function pj(a,b){var c;return G(function(d){c=Jb;return b==c.ka?a.g?u(d,a.g.remove(0,Infinity),0):d.return():u(d,jj(a,b,function(){return mj(a,b,0,a.l.duration)}),0)})}q.flush=function(a){var b=this,c;return G(function(d){c=Jb;return a==c.ka?d.return():u(d,jj(b,a,function(){b.j.currentTime-=.001;$i(b,a)}),0)})};
308
- function qj(a,b,c,d,e,f){var g;return G(function(h){g=Jb;return b==g.ka?(f||(a.g.B=c),Gd(a.g,d,e),h.return()):u(h,Promise.all([jj(a,b,function(){return lj(a,b)}),f?Promise.resolve():jj(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;$i(a,b)}),jj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;$i(a,b)})]),0)})}
309
- q.endOfStream=function(a){var b=this;return G(function(c){return u(c,rj(b,function(){aj(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.ab=function(a){var b=this;return G(function(c){return u(c,rj(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Lc};b.i[d].unshift(e)}b.l.duration=a}),0)})};q.getDuration=function(){return this.l.duration};function kj(a,b,c){if("video"==b&&a.G){var d=a.G;d.g&&d.g.appendBuffer(c,"video",d.i)}a.h[b].appendBuffer(c)}
310
- function mj(a,b,c,d){d<=c?$i(a,b):a.h[b].remove(c,d)}function lj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;$i(a,b)}function $i(a,b){var c=a.i[b][0];c&&(c.p.resolve(),sj(a,b))}function jj(a,b,c){wf(a.I);c={start:c,p:new Lc};a.i[b].push(c);1==a.i[b].length&&tj(a,b);return c.p}
311
- function rj(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.g){case 1:wf(a.I);c=[];d={};for(e in a.h)d.yc=new Lc,f={start:function(l){return function(){return l.yc.resolve()}}(d),p:d.yc},a.i[e].push(f),c.push(d.yc),1==a.i[e].length&&f.start(),d={yc:d.yc};C(k,2);return u(k,Promise.all(c),4);case 4:ua(k,3);break;case 2:throw g=va(k),g;case 3:try{b()}catch(l){throw new M(2,3,3015,l);}finally{for(h in a.h)sj(a,h)}B(k)}})}function sj(a,b){a.i[b].shift();tj(a,b)}
312
- function tj(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new M(2,3,3017,b)):c.p.reject(new M(2,3,3015,d)),sj(a,b)}}function hj(a,b,c,d){var e=a.P[d];null==c&&e&&(Tc()||Rc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=fh(b));return b}var Yi=window.URL.createObjectURL,ij="sequence",gj=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Q(a,b,c){this.i=a;this.m=b;this.s=this.j=Infinity;this.g=1;this.h=this.l=null;this.B=0;this.C=!0;this.F=0;this.G=void 0===c?!0:c;this.H=0;this.I=!1}q=Q.prototype;q.getDuration=function(){return this.j};q.Og=function(){return this.g};q.Xf=function(a){this.i=a};q.ab=function(a){this.j=a};q.Sg=function(){return this.i};q.Tf=function(a){this.B=a};q.Zc=function(a){this.C=a};q.Pe=function(a){this.s=a};q.Uf=function(a){this.m=a};q.Fg=function(){return this.m};
300
+ q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,p;return G(function(n){if(1==n.g)return e=Jb,u(n,d.K,2);d.F=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={Ea:f.Ea},h=g.next())f.Ea=h.value,k=a.get(f.Ea),l=xd(k.mimeType,k.codecs),f.Ea==e.ka?Zi(d,l,c):(!b&&dc(l)||!rd(l,f.Ea)||(d.s[f.Ea]=new qd(l),l=ud(f.Ea,l)),m=l+d.H.sourceBufferExtraFeatures,p=d.l.addSourceBuffer(m),d.C.o(p,"error",function(t){return function(){d.i[t.Ea][0].p.reject(new M(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),
301
+ d.C.o(p,"updateend",function(t){return function(){return $i(d,t.Ea)}}(f)),d.h[f.Ea]=p,d.M[f.Ea]=l,d.i[f.Ea]=[],d.P[f.Ea]=!!k.drmInfos.length);B(n)})};q.configure=function(a){this.H=a};function Zi(a,b,c){a.g||(a.g=new Cd(a.m));var d=a.g;a=a.J;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,Ed[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Ta('Text parsers should have a "setSequenceMode" method!'),d.C=a)}function aj(a){return a.l?"ended"==a.l.readyState:!0}
302
+ function bj(a,b){return b==Ib?a.g.g:Ci(cj(a,b))}function dj(a,b){return b==Ib?a.g.h:Di(cj(a,b))}function ej(a,b,c){if(b==Ib)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=cj(a,b);return Fi(a,c)}q.ib=function(){var a={total:Gi(this.j.buffered),audio:Gi(cj(this,"audio")),video:Gi(cj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function cj(a,b){try{return a.h[b].buffered}catch(c){return null}}
303
+ function fj(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,p,n,t,v,y,w,x,A,z,C,E,F,H,J,K,N,V,U;return G(function(P){switch(P.g){case 1:h=Jb;if(b!=h.ka){P.D(2);break}if(!a.F){P.D(3);break}return u(P,a.X,4);case 4:k=P.h,a.g.B=k;case 3:return u(P,Fd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return P.return();case 2:l=Hc(c);m=a.M[b];a.s[b]&&(m=a.s[b].s);0>Ni(l)?gj.includes(m)&&(v=Li(l),v.length&&d&&(y={cueTime:d.startTime,data:l,frames:v,dts:d.startTime,pts:d.startTime},a.V([y],
304
+ 0,d.endTime))):(p=(new Mi).parse(l),n=d.startTime-(p.getStartTime()[b]||0),t=Pi(p),t.length&&a.V(t,n,d?d.endTime:null));if(!a.s[b]){e&&b==h.Ma&&(a.g||Zi(a,"text/vtt",a.F),a.B||(a.B=new vi(m)),d?(w=wi(a.B,c),w.length&&(x=a.h[h.Ma].timestampOffset,Kd(a.g,w,d.startTime,d.endTime,x))):a.B.init(c));P.D(6);break}f&&a.s[b].g.resetCaptions();return u(P,vd(a.s[b],c),7);case 7:A=P.h,a.g||Zi(a,"text/vtt",a.F),A.captions&&A.captions.length&&(z=a.h[h.Ma].timestampOffset,C=Id(A.captions),Kd(a.g,C,d?d.startTime:
305
+ null,d?d.endTime:null,z)),c=A.data;case 6:c=hj(a,c,d?d.startTime:null,b);E=a.h[b];F=ij;if(!a.F||E.mode==F||!d){P.D(8);break}H=b==h.Ma||!(h.Ma in a.h);if(!H){P.D(9);break}J=[E.appendWindowStart,E.appendWindowEnd];E.appendWindowStart=0;E.appendWindowEnd=Infinity;K=E.timestampOffset;E.timestampOffset=0;return u(P,jj(a,b,function(){return kj(a,b,c)}),10);case 10:return u(P,jj(a,b,function(){return lj(a,b)}),11);case 11:return E.timestampOffset=K,E.appendWindowStart=J[0],E.appendWindowEnd=J[1],N=Ci(cj(a,
306
+ b)),V=(d.startTime||0)-(N||0),a.X.resolve(V),u(P,jj(a,b,function(){return mj(a,b,0,a.l.duration)}),12);case 12:if(b!=h.Ma){P.D(9);break}return u(P,jj(a,b,function(){a.j.currentTime-=.001;$i(a,b)}),9);case 9:E.mode=F;case 8:return d&&a.F&&b!=h.ka&&(f||g)&&(U=d.startTime,jj(a,b,function(){return lj(a,b)}),jj(a,b,function(){return nj(a,b,U)})),u(P,jj(a,b,function(){kj(a,b,c)}),15);case 15:B(P)}})}function oj(a,b){var c=dj(a,"video")||0;Hd(a.g,b,c)}function pj(a){a.g&&Hd(a.g,"",0)}
307
+ q.remove=function(a,b,c){var d=this,e;return G(function(f){e=Jb;return a==e.ka?u(f,d.g.remove(b,c),0):u(f,jj(d,a,function(){return mj(d,a,b,c)}),0)})};function qj(a,b){var c;return G(function(d){c=Jb;return b==c.ka?a.g?u(d,a.g.remove(0,Infinity),0):d.return():u(d,jj(a,b,function(){return mj(a,b,0,a.l.duration)}),0)})}q.flush=function(a){var b=this,c;return G(function(d){c=Jb;return a==c.ka?d.return():u(d,jj(b,a,function(){b.j.currentTime-=.001;$i(b,a)}),0)})};
308
+ function rj(a,b,c,d,e,f){var g;return G(function(h){g=Jb;return b==g.ka?(f||(a.g.B=c),Gd(a.g,d,e),h.return()):u(h,Promise.all([jj(a,b,function(){return lj(a,b)}),f?Promise.resolve():jj(a,b,function(){return nj(a,b,c)}),jj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;$i(a,b)})]),0)})}function sj(a,b,c){return G(function(d){return u(d,jj(a,b,function(){return nj(a,b,c)}),0)})}
309
+ q.endOfStream=function(a){var b=this;return G(function(c){return u(c,tj(b,function(){aj(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.ab=function(a){var b=this;return G(function(c){return u(c,tj(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Lc};b.i[d].unshift(e)}b.l.duration=a}),0)})};q.getDuration=function(){return this.l.duration};function kj(a,b,c){if("video"==b&&a.G){var d=a.G;d.g&&d.g.appendBuffer(c,"video",d.i)}a.h[b].appendBuffer(c)}
310
+ function mj(a,b,c,d){d<=c?$i(a,b):a.h[b].remove(c,d)}function lj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;$i(a,b)}function nj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;$i(a,b)}function $i(a,b){var c=a.i[b][0];c&&(c.p.resolve(),uj(a,b))}function jj(a,b,c){wf(a.I);c={start:c,p:new Lc};a.i[b].push(c);1==a.i[b].length&&vj(a,b);return c.p}
311
+ function tj(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.g){case 1:wf(a.I);c=[];d={};for(e in a.h)d.yc=new Lc,f={start:function(l){return function(){return l.yc.resolve()}}(d),p:d.yc},a.i[e].push(f),c.push(d.yc),1==a.i[e].length&&f.start(),d={yc:d.yc};D(k,2);return u(k,Promise.all(c),4);case 4:ua(k,3);break;case 2:throw g=va(k),g;case 3:try{b()}catch(l){throw new M(2,3,3015,l);}finally{for(h in a.h)uj(a,h)}B(k)}})}function uj(a,b){a.i[b].shift();vj(a,b)}
312
+ function vj(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new M(2,3,3017,b)):c.p.reject(new M(2,3,3015,d)),uj(a,b)}}function hj(a,b,c,d){var e=a.P[d];null==c&&e&&(Tc()||Rc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=fh(b));return b}var Yi=window.URL.createObjectURL,ij="sequence",gj=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Q(a,b,c){this.i=a;this.m=b;this.s=this.j=Infinity;this.g=1;this.h=this.l=null;this.B=0;this.C=!0;this.F=0;this.G=void 0===c?!0:c;this.H=0;this.I=!1}q=Q.prototype;q.getDuration=function(){return this.j};q.Og=function(){return this.g};q.Xf=function(a){this.i=a};q.ab=function(a){this.j=a};q.Sg=function(){return this.i};q.Tf=function(a){this.B=a};q.Zc=function(a){this.C=a};q.Pe=function(a){this.s=a};q.Uf=function(a){this.m=a};q.Fg=function(){return this.m};
313
313
  q.lc=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime;a=r(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b=Math.min(b,d.startTime),c=Math.max(c,d.endTime),this.g=Math.max(this.g,d.endTime-d.startTime);this.ye(b);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.I&&(this.i=(Date.now()+this.B)/1E3-this.h-this.g)}};q.ue=function(){this.I=!0};q.ye=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.xe=function(a){this.g=Math.max(this.g,a)};
314
- q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.T=function(){return Infinity==this.j&&!this.C};q.Lb=function(){return Infinity!=this.j&&!this.C};q.jb=function(){return Math.max(this.F,this.Ib()-this.s)};q.Zf=function(a){this.F=a};q.Ib=function(){return this.T()||this.Lb()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};
315
- q.Ic=function(a){var b=Math.max(this.l,this.F);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Ib()-this.s+a,this.ib()))};q.dc=function(){return this.Ic(0)};q.ib=function(){return Math.max(0,this.Ib()-(this.T()||this.Lb()?this.m:0))};q.dg=function(){return null==this.i||null!=this.h&&this.G?!1:!0};q.Sf=function(a){this.H=a};I("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.Sf;Q.prototype.usingPresentationStartTime=Q.prototype.dg;
316
- Q.prototype.getSeekRangeEnd=Q.prototype.ib;Q.prototype.getSeekRangeStart=Q.prototype.dc;Q.prototype.getSafeSeekRangeStart=Q.prototype.Ic;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Ib;Q.prototype.setUserSeekStart=Q.prototype.Zf;Q.prototype.getSegmentAvailabilityStart=Q.prototype.jb;Q.prototype.isInProgress=Q.prototype.Lb;Q.prototype.isLive=Q.prototype.T;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.xe;Q.prototype.notifyMinSegmentStartTime=Q.prototype.ye;
314
+ q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.T=function(){return Infinity==this.j&&!this.C};q.Lb=function(){return Infinity!=this.j&&!this.C};q.kb=function(){return Math.max(this.F,this.Ib()-this.s)};q.Zf=function(a){this.F=a};q.Ib=function(){return this.T()||this.Lb()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};
315
+ q.Ic=function(a){var b=Math.max(this.l,this.F);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Ib()-this.s+a,this.jb()))};q.dc=function(){return this.Ic(0)};q.jb=function(){return Math.max(0,this.Ib()-(this.T()||this.Lb()?this.m:0))};q.dg=function(){return null==this.i||null!=this.h&&this.G?!1:!0};q.Sf=function(a){this.H=a};I("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.Sf;Q.prototype.usingPresentationStartTime=Q.prototype.dg;
316
+ Q.prototype.getSeekRangeEnd=Q.prototype.jb;Q.prototype.getSeekRangeStart=Q.prototype.dc;Q.prototype.getSafeSeekRangeStart=Q.prototype.Ic;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Ib;Q.prototype.setUserSeekStart=Q.prototype.Zf;Q.prototype.getSegmentAvailabilityStart=Q.prototype.kb;Q.prototype.isInProgress=Q.prototype.Lb;Q.prototype.isLive=Q.prototype.T;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.xe;Q.prototype.notifyMinSegmentStartTime=Q.prototype.ye;
317
317
  Q.prototype.lockStartTime=Q.prototype.ue;Q.prototype.notifySegments=Q.prototype.lc;Q.prototype.getDelay=Q.prototype.Fg;Q.prototype.setDelay=Q.prototype.Uf;Q.prototype.setSegmentAvailabilityDuration=Q.prototype.Pe;Q.prototype.setStatic=Q.prototype.Zc;Q.prototype.setClockOffset=Q.prototype.Tf;Q.prototype.getPresentationStartTime=Q.prototype.Sg;Q.prototype.setDuration=Q.prototype.ab;Q.prototype.setPresentationStartTime=Q.prototype.Xf;Q.prototype.getMaxSegmentDuration=Q.prototype.Og;
318
- Q.prototype.getDuration=Q.prototype.getDuration;function uj(a,b,c){this.l=c;this.j=a;this.B=vj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.C=b;this.i=function(){}}uj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function wj(a,b){a.i=b}function xj(a){this.g=a}function vj(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Gi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function yj(a,b,c,d,e){var f=this;this.s=e;this.g=a;this.B=b;this.G=c;this.i=new xf;this.m=!1;this.F=a.readyState;this.C=0;this.h=d;this.l=!1;this.i.o(a,"waiting",function(){return zj(f)});this.j=(new O(function(){zj(f)})).ea(.25)}yj.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.s=null};yj.prototype.Ae=function(){this.l=!0;zj(this)};
319
- function zj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=vj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.B!=d)b.m=f,b.g=e,b.B=d,b.h=!1;e=f-b.m;if(d=e>=b.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.l(new L("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Hi(c,b,a.G.gapDetectionThreshold),null==
320
- d||0==d&&!a.l||(e=c.start(d),e>=a.B.ib()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.C++,a.s(new L("gapjumped")))))}}};function Aj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Bj.value().get(b),c.Da(a,b,d))}var Bj=new Mc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Cj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new xf;this.i=new Dj(a);Aj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ej(d,d.j)})}Cj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Fj(a){return a.m?a.g.currentTime:a.j}function Gj(a,b){0<a.g.readyState?Hj(a.i,b):Aj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ej(a,a.j)})}
321
- function Ej(a,b){.001>Math.abs(a.g.currentTime-b)?Ij(a):(a.h.Da(a.g,"seeking",function(){Ij(a)}),Hj(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Ij(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Dj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Dj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
322
- function Hj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ea(.1)};function Jj(a){this.g=a;this.j=!1;this.h=null;this.i=new xf}q=Jj.prototype;q.ge=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.Da(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Aj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.ie=function(a){this.h=this.j?this.h:a};q.jd=function(){return(this.j?this.g.currentTime:this.h)||0};q.kf=function(){return 0};
318
+ Q.prototype.getDuration=Q.prototype.getDuration;function wj(a,b,c){this.l=c;this.j=a;this.B=xj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.C=b;this.i=function(){}}wj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function yj(a,b){a.i=b}function zj(a){this.g=a}function xj(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Gi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Aj(a,b,c,d,e){var f=this;this.s=e;this.g=a;this.B=b;this.G=c;this.i=new xf;this.m=!1;this.F=a.readyState;this.C=0;this.h=d;this.l=!1;this.i.o(a,"waiting",function(){return Bj(f)});this.j=(new O(function(){Bj(f)})).ea(.25)}Aj.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.s=null};Aj.prototype.Ae=function(){this.l=!0;Bj(this)};
319
+ function Bj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=xj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.B!=d)b.m=f,b.g=e,b.B=d,b.h=!1;e=f-b.m;if(d=e>=b.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.l(new L("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Hi(c,b,a.G.gapDetectionThreshold),null==
320
+ d||0==d&&!a.l||(e=c.start(d),e>=a.B.jb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.C++,a.s(new L("gapjumped")))))}}};function Cj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Dj.value().get(b),c.Da(a,b,d))}var Dj=new Mc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ej(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new xf;this.i=new Fj(a);Cj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Gj(d,d.j)})}Ej.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Hj(a){return a.m?a.g.currentTime:a.j}function Ij(a,b){0<a.g.readyState?Jj(a.i,b):Cj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Gj(a,a.j)})}
321
+ function Gj(a,b){.001>Math.abs(a.g.currentTime-b)?Kj(a):(a.h.Da(a.g,"seeking",function(){Kj(a)}),Jj(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Kj(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Fj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Fj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
322
+ function Jj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ea(.1)};function Lj(a){this.g=a;this.j=!1;this.h=null;this.i=new xf}q=Lj.prototype;q.ge=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.Da(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Cj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.ie=function(a){this.h=this.j?this.h:a};q.jd=function(){return(this.j?this.g.currentTime:this.h)||0};q.kf=function(){return 0};
323
323
  q.jf=function(){return 0};q.Nf=function(){};
324
- function Kj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.C=e;this.B=null;this.s=Lj(a,c,f);this.j=new yj(a,b.presentationTimeline,c,this.s,f);this.h=new Cj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=Fj(g.h);h=Mj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;Gj(g.h,h);h=void 0;break a}g.C();h=void 0}return h},Nj(this,d));this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Fj(g.h),k=g.g.dc(),l=g.g.ib();3>
325
- l-k&&(k=l-3);h<k&&(h=Mj(g,h),g.i.currentTime=h)}})}q=Kj.prototype;q.ge=function(){this.m.ea(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.C=function(){}};q.ie=function(a){Gj(this.h,a)};q.jd=function(){var a=Fj(this.h);return 0<this.i.readyState&&!this.i.paused?Oj(this,a):a};q.kf=function(){return this.s?this.s.s:0};q.jf=function(){return this.j.C};
326
- function Nj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.dc():a.g.ib():0>b&&(b=a.g.ib()+b);return Pj(a,Oj(a,b))}q.Nf=function(){this.j.Ae()};function Pj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Mj(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.dc(),f=a.g.ib(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ic(c),k=a.g.Ic(d);c=a.g.Ic(c+d);return b>=g?Pj(a,b):b>f?f:b<e?Ei(a.i.buffered,k)?k:c:b>=h||Ei(a.i.buffered,b)?b:c}
327
- function Oj(a,b){var c=a.g.dc();if(b<c)return c;a=a.g.ib();return b>a?a:b}function Lj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new uj(new xj(a),b.stallThreshold,c);wj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Qj(a){this.g=a;this.h=null;this.i=0;this.j=!1}q=Qj.prototype;q.release=function(){this.j||(this.g=[],this.h&&this.h.stop(),this.h=null)};q.jh=function(){this.j=!0};function Rj(a,b){a=r(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};
324
+ function Mj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.C=e;this.B=null;this.s=Nj(a,c,f);this.j=new Aj(a,b.presentationTimeline,c,this.s,f);this.h=new Ej(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=Hj(g.h);h=Oj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;Ij(g.h,h);h=void 0;break a}g.C();h=void 0}return h},Pj(this,d));this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Hj(g.h),k=g.g.dc(),l=g.g.jb();3>
325
+ l-k&&(k=l-3);h<k&&(h=Oj(g,h),g.i.currentTime=h)}})}q=Mj.prototype;q.ge=function(){this.m.ea(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.C=function(){}};q.ie=function(a){Ij(this.h,a)};q.jd=function(){var a=Hj(this.h);return 0<this.i.readyState&&!this.i.paused?Qj(this,a):a};q.kf=function(){return this.s?this.s.s:0};q.jf=function(){return this.j.C};
326
+ function Pj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.dc():a.g.jb():0>b&&(b=a.g.jb()+b);return Rj(a,Qj(a,b))}q.Nf=function(){this.j.Ae()};function Rj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Oj(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.dc(),f=a.g.jb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ic(c),k=a.g.Ic(d);c=a.g.Ic(c+d);return b>=g?Rj(a,b):b>f?f:b<e?Ei(a.i.buffered,k)?k:c:b>=h||Ei(a.i.buffered,b)?b:c}
327
+ function Qj(a,b){var c=a.g.dc();if(b<c)return c;a=a.g.jb();return b>a?a:b}function Nj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new wj(new zj(a),b.stallThreshold,c);yj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Sj(a){this.g=a;this.h=null;this.i=0;this.j=!1}q=Sj.prototype;q.release=function(){this.j||(this.g=[],this.h&&this.h.stop(),this.h=null)};q.jh=function(){this.j=!0};function Tj(a,b){a=r(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};
328
328
  q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.j)for(var b=r(this.g),c=b.next();!c.done;c=b.next()){c=c.value;c.startTime+=a;c.endTime+=a;c.j+=a;c=r(c.i);for(var d=c.next();!d.done;d=c.next())d=d.value,d.startTime+=a,d.endTime+=a,d.j+=a}};q.Rc=function(a){!this.j&&a.length&&(this.g=this.g.filter(function(b){return b.startTime<a[0].startTime}),this.g.push.apply(this.g,ia(a)))};
329
329
  q.kc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Rc(a);this.Gb(b)};q.Gb=function(a){if(!this.j){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
330
- q.wb=function(a,b,c){c=void 0===c?!1:c;if(!this.j){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new zi(a.startTime,b,a.B,a.Ra,a.Ba,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.i,a.tilesLayout,a.s,a.g,a.status,a.l))}};
331
- q.Nd=function(a,b){var c=this;this.j||(this.h&&this.h.stop(),this.h=new O(function(){var d=b();d?c.g.push.apply(c.g,ia(d)):(c.h.stop(),c.h=null)}),this.h.ea(a))};Qj.prototype[Symbol.iterator]=function(){return this.bc(0)};Qj.prototype.bc=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.i.length)for(var e=c.i.length-1;0<=e;--e){var f=c.i[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Sj(this,b,d)};
332
- function Tj(a,b,c){return new Qj([new zi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}I("shaka.media.SegmentIndex",Qj);Qj.forSingleSegment=Tj;Qj.prototype.getIteratorForTime=Qj.prototype.bc;Qj.prototype.updateEvery=Qj.prototype.Nd;Qj.prototype.fit=Qj.prototype.wb;Qj.prototype.evict=Qj.prototype.Gb;Qj.prototype.mergeAndEvict=Qj.prototype.kc;Qj.prototype.offset=Qj.prototype.offset;Qj.prototype.get=Qj.prototype.get;Qj.prototype.find=Qj.prototype.find;Qj.prototype.markImmutable=Qj.prototype.jh;
333
- Qj.prototype.release=Qj.prototype.release;function Sj(a,b,c){this.i=a;this.g=b;this.h=c}Sj.prototype.rg=function(){return this.g};Sj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.i.length&&a.Na().length&&this.h>=a.i.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.i.length?a.i[this.h]:a};
334
- Sj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.i.length?(this.h++,a.Na().length&&this.h==a.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};I("shaka.media.SegmentIterator",Sj);Sj.prototype.next=Sj.prototype.next;Sj.prototype.current=Sj.prototype.current;Sj.prototype.currentPosition=Sj.prototype.rg;function Uj(){Qj.call(this,[]);this.l=[]}pa(Uj,Qj);q=Uj.prototype;q.clone=function(){var a=new Uj;a.l=this.l.slice();return a};
330
+ q.wb=function(a,b,c){c=void 0===c?!1:c;if(!this.j){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new zi(a.startTime,b,a.C,a.Sa,a.Ba,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.i,a.tilesLayout,a.B,a.g,a.status,a.l))}};
331
+ q.Nd=function(a,b){var c=this;this.j||(this.h&&this.h.stop(),this.h=new O(function(){var d=b();d?c.g.push.apply(c.g,ia(d)):(c.h.stop(),c.h=null)}),this.h.ea(a))};Sj.prototype[Symbol.iterator]=function(){return this.bc(0)};Sj.prototype.bc=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.i.length)for(var e=c.i.length-1;0<=e;--e){var f=c.i[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Uj(this,b,d)};
332
+ function Vj(a,b,c){return new Sj([new zi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}I("shaka.media.SegmentIndex",Sj);Sj.forSingleSegment=Vj;Sj.prototype.getIteratorForTime=Sj.prototype.bc;Sj.prototype.updateEvery=Sj.prototype.Nd;Sj.prototype.fit=Sj.prototype.wb;Sj.prototype.evict=Sj.prototype.Gb;Sj.prototype.mergeAndEvict=Sj.prototype.kc;Sj.prototype.offset=Sj.prototype.offset;Sj.prototype.get=Sj.prototype.get;Sj.prototype.find=Sj.prototype.find;Sj.prototype.markImmutable=Sj.prototype.jh;
333
+ Sj.prototype.release=Sj.prototype.release;function Uj(a,b,c){this.i=a;this.g=b;this.h=c}Uj.prototype.rg=function(){return this.g};Uj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.i.length&&a.Pa().length&&this.h>=a.i.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.i.length?a.i[this.h]:a};
334
+ Uj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.i.length?(this.h++,a.Pa().length&&this.h==a.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};I("shaka.media.SegmentIterator",Uj);Uj.prototype.next=Uj.prototype.next;Uj.prototype.current=Uj.prototype.current;Uj.prototype.currentPosition=Uj.prototype.rg;function Wj(){Sj.call(this,[]);this.l=[]}pa(Wj,Sj);q=Wj.prototype;q.clone=function(){var a=new Wj;a.l=this.l.slice();return a};
335
335
  q.release=function(){for(var a=r(this.l),b=a.next();!b.done;b=a.next())b.value.release();this.l=[]};q.find=function(a){for(var b=0,c=r(this.l),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.i+d.g.length}return null};q.get=function(a){for(var b=0,c=r(this.l),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.i+d.g.length}return null};q.offset=function(){};q.Rc=function(){};q.Gb=function(){};q.kc=function(){};q.wb=function(){};q.Nd=function(){};
336
- I("shaka.media.MetaSegmentIndex",Uj);Uj.prototype.updateEvery=Uj.prototype.Nd;Uj.prototype.fit=Uj.prototype.wb;Uj.prototype.mergeAndEvict=Uj.prototype.kc;Uj.prototype.evict=Uj.prototype.Gb;Uj.prototype.merge=Uj.prototype.Rc;Uj.prototype.offset=Uj.prototype.offset;Uj.prototype.get=Uj.prototype.get;Uj.prototype.find=Uj.prototype.find;Uj.prototype.release=Uj.prototype.release;function Vj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.vd();this.h=new O(function(){b.g.Mf(.25*b.i)})}Vj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Vj.prototype.set=function(a){this.i=a;Wj(this)};Vj.prototype.sd=function(){return this.g.sd()};function Wj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.vd()!=b&&a.g.Ne(b);return}catch(c){}a.h.ea(.25);0!=a.g.vd()&&a.g.Ne(0)};function Xj(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){Yj(b,!1)})).ea(.25)}Xj.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Yj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Zj(a){fb.call(this);this.g=new Map;this.h=a}pa(Zj,fb);Zj.prototype.release=function(){this.g.clear();fb.prototype.release.call(this)};function ak(a,b){var c=a.g.get(b);c||(c={Tc:[],xf:null,contentType:b},a.g.set(b,c));return c}function bk(a,b,c){var d=ak(a,b.contentType);ck(a,d);a={ve:b,position:c};d=d.Tc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
337
- Zj.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Tc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.ve;break a}}d=null}if(e=d)e=c.xf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
338
- if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.xf=d,JSON.stringify(d),c=new L("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function ck(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Tc;b.Tc=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.Tc=[]};function dk(a){fb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new L("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ea(2)}pa(dk,fb);dk.prototype.release=function(){this.g.clear();this.h.stop();fb.prototype.release.call(this)};function ek(a){fb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Vb:null,Ub:fk,Kb:function(c,d){return gk(b,"enter",c,d)}},{Vb:hk,Ub:fk,Kb:function(c,d){return gk(b,"enter",c,d)}},{Vb:ik,Ub:fk,Kb:function(c,d){return gk(b,"enter",c,d)}},{Vb:fk,Ub:hk,Kb:function(c,d){return gk(b,"exit",c,d)}},{Vb:fk,Ub:ik,Kb:function(c,d){return gk(b,"exit",c,d)}},{Vb:hk,Ub:ik,Kb:function(c,d){return gk(b,"skip",c,d)}},{Vb:ik,Ub:hk,Kb:function(c,d){return gk(b,"skip",c,d)}}];this.h=new xf;this.h.o(this.i,"regionremove",
339
- function(c){b.g.delete(c.region)})}pa(ek,fb);ek.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;fb.prototype.release.call(this)};ek.prototype.j=function(a,b){for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?hk:a>d.endTime?ik:fk;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Vb==e&&h.Ub==f&&h.Kb(d,b)}};
340
- function gk(a,b,c,d){b=new L(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var hk=1,fk=2,ik=3;function jk(a,b,c,d,e){a=of(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function kk(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.C=1;this.s=this.l=null;this.G=!1;this.j=new Map;this.F=!1;this.H=null;this.B=!1;this.h=new vf(function(){return lk(c)})}q=kk.prototype;q.destroy=function(){return this.h.destroy()};function lk(a){var b,c,d,e;return G(function(f){if(1==f.g){b=[];c=r(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,mk(e),b.push(nk(e));return u(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.i=null;B(f)})}
341
- q.configure=function(a){this.i=a;this.H=new We({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)};q.start=function(){var a=this;return G(function(b){if(1==b.g)return u(b,ok(a),2);wf(a.h);a.F=!0;B(b)})};
342
- function pk(a,b){var c,d,e,f,g,h;G(function(k){switch(k.g){case 1:return c=Jb,C(k,2),u(k,pj(a.g.V,c.ka),4);case 4:ua(k,3);break;case 2:if(d=va(k),a.g)a.g.onError(d);case 3:e=xd(b.mimeType,b.codecs);Zi(a.g.V,e,a.m.sequenceMode);f=a.g.V.m;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=qk(b),a.j.set(c.ka,h),rk(a,h,0);B(k)}})}function sk(a){var b=a.j.get(Ib);b&&(mk(b),nk(b).catch(function(){}),a.j.delete(Ib));a.s=null}
343
- function tk(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Sb&&(uk(a,b,!1,0,!1),c.Sb=d);else if(d=c.Sb)c.Sb=null,uk(a,d,!0,0,!1)}}function vk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.F&&(b.video&&uk(a,b.video,c,d,e,f),b.audio&&uk(a,b.audio,c,d,e,f))}function wk(a,b){a.s=b;a.F&&uk(a,b,!0,0,!1)}
344
- function uk(a,b,c,d,e,f){var g=a.j.get(b.type);g||b.type!=Ib?g&&(g.Sb&&(b.trickModeVideo?(g.Sb=b,b=b.trickModeVideo):g.Sb=null),g.stream!=b||e)&&(b.type==Ib&&Zi(a.g.V,xd(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.qa=null,g.lf=!!f,c&&(g.Cc?g.Pd=!0:g.$a?(g.Eb=!0,g.pd=d,g.Pd=!0):(mk(g),xk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),yk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):pk(a,b)}
345
- function yk(a,b){var c,d;return G(function(e){if(1==e.g){if(!b.Ia)return e.return();c=b.stream;d=b.Ia;return c.segmentIndex?e.D(2):u(e,c.createSegmentIndex(),2)}if(b.Ia!=d||b.stream!=c)return e.return();var f=a.g.ud();var g=dj(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Pa?b.Pa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ba?k.Ba-k.Ra:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.Ba?k.Ba-k.Ra:null)||0),k=a.g.getBandwidthEstimate(),
346
- f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.Ia.h.g>h?!0:!1):f=!1;f&&b.Ia.abort();B(e)})}
347
- q.Wc=function(){for(var a=this.g.ud(),b=r(this.j.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.j.get(d);c.qa=null;var e=this.g.V;d==Ib?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=cj(e,d),e=Ei(e,a));if(!e){(null!=dj(this.g.V,d)||c.$a)&&zk(this,c);c.Ia&&(c.Ia.abort(),c.Ia=null);if(d===Ib&&(d=this.g.V,d.B))for(d=d.B.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,gi(d),d=r(d.j.values()),e=d.next();!e.done;e=d.next())bi(e.value);c.Wc=!0}}};
348
- function zk(a,b){b.Cc||b.Eb||(b.$a?(b.Eb=!0,b.pd=0):null==bj(a.g.V,b.type)?null==b.pb&&rk(a,b,0):(mk(b),xk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
349
- function ok(a){var b,c,d,e,f,g,h,k,l,m;return G(function(n){if(1==n.g){b=Jb;if(!a.l)throw new M(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.hd,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Ka,a.l.video),d.add(a.l.video));a.s&&(c.set(b.ka,a.s),d.add(a.s));e=a.g.V;f=a.i.forceTransmux;return u(n,e.init(c,f,a.m.sequenceMode),2)}wf(a.h);a.updateDuration();g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||(m=qk(l),a.j.set(k,m),rk(a,m,0));B(n)})}
350
- function qk(a){return{stream:a,type:a.type,qa:null,Pa:null,xd:null,re:null,qe:null,pe:null,Sb:null,endOfStream:!1,$a:!1,pb:null,Eb:!1,pd:0,Pd:!1,Cc:!1,Wc:!0,Ce:!1,Mc:!1,Ia:null}}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.V.ab(a):this.g.V.ab(Math.pow(2,32))};
351
- function Ak(a,b){var c,d,e,f,g;return G(function(h){switch(h.g){case 1:wf(a.h);if(b.$a||null==b.pb||b.Cc)return h.return();b.pb=null;if(!b.Eb){h.D(2);break}return u(h,xk(a,b,b.Pd,b.pd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.pb&&rk(a,b,0),h.return();case 4:C(h,6);d=Bk(a,b);null!=d&&(rk(a,b,d),b.Mc=!1);ua(h,7);break;case 6:return e=
352
- va(h),u(h,Ck(a,e),8);case 8:return h.return();case 7:f=Array.from(a.j.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return u(h,a.g.V.endOfStream(),10);case 10:wf(a.h),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.ab(g),B(h)}})}
353
- function Bk(a,b){if(Dk(b))return nj(a.g.V,b.stream.originalId||""),null;b.type==Ib&&oj(a.g.V);var c=a.g.ud(),d=b.Pa?b.Pa.endTime:c,e=ej(a.g.V,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=dj(a.g.V,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.j.get(Ib))&&Dk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=Ek(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;
354
- f=Infinity;g=Array.from(a.j.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,Dk(h)||h.qa&&!h.qa.current()||(f=Math.min(f,h.Pa?h.Pa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;Fk(a,b,c,e).catch(function(){});return null}
355
- function Ek(a,b,c,d){if(b.qa)return b.qa.current();if(b.Pa||d)return b.qa=b.stream.segmentIndex.bc(b.Pa?b.Pa.endTime:d),b.qa&&b.qa.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.qa=b.stream.segmentIndex.bc(d),e=b.qa&&b.qa.next().value);e||(b.qa=b.stream.segmentIndex.bc(c),e=b.qa&&b.qa.next().value);return e}
356
- function Fk(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,y,w,x,A;return G(function(z){switch(z.g){case 1:e=Jb;f=b.stream;g=b.qa;b.$a=!0;C(z,2);if(2==d.ec())throw new M(1,1,1011);return u(z,Gk(a,b,d),4);case 4:wf(a.h);if(a.B)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&!d.l)return n=new Uint8Array(0),t=p=!1,v=function(D){var E,F,H;return G(function(J){if(p)return J.return();t=!0;wf(a.h);if(a.B)return J.return();n=Hk(n,D);E=!1;F=0;(new If).box("mdat",
357
- function(K){F=K.size+K.start;E=!0}).parse(n,!1,!0);if(!E)return J.D(0);H=n.subarray(0,F);n=n.subarray(F);return u(J,Ik(a,b,c,f,d,H),0)})},u(z,Jk(a,b,d,v),11);l=Jk(a,b,d);return u(z,l,7);case 7:m=z.h;wf(a.h);if(a.B)return z.return();if(!d.l){z.D(8);break}return u(z,Kk(m,d,g),9);case 9:m=z.h;case 8:return wf(a.h),b.Eb?(b.$a=!1,rk(a,b,0),z.return()):u(z,Ik(a,b,c,f,d,m),6);case 11:y=z.h;if(t){z.D(6);break}p=!0;wf(a.h);return a.B?z.return():b.Eb?(b.$a=!1,rk(a,b,0),z.return()):u(z,Ik(a,b,c,f,d,y),6);case 6:wf(a.h);
358
- if(a.B)return z.return();b.Pa=d;g.next();b.$a=!1;b.Ce=!1;w=a.g.V.hb();x=w[b.type];Za(JSON.stringify(x));b.Eb||a.g.Ae(d.startTime,d.endTime,b.type);rk(a,b,0);ua(z,0);break;case 2:A=va(z);wf(a.h,A);if(a.B)return z.return();b.$a=!1;if(7001==A.code)b.$a=!1,b.pb=null,rk(a,b,0),z.D(0);else if(b.type==e.ka&&a.i.ignoreTextStreamFailures)a.j.delete(e.ka),z.D(0);else if(3017==A.code)Lk(a,b,A),z.D(0);else return b.Mc=!0,A.severity=2,u(z,Ck(a,A),0)}})}
359
- function Kk(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g)return d=b.l,d.cryptoKey?h.D(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Hc(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function Hk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
360
- function Lk(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.Ce})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Mc=!0;a.B=!0;a.g.onError(c);return}b.Ce=!0}rk(a,b,4)}
361
- function Gk(a,b,c){var d,e,f,g,h,k,l;return G(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.re||e!=b.qe||f!=b.pe)h=function(){var n;return G(function(p){if(1==p.g)return C(p,2),b.qe=e,b.pe=f,b.re=g,u(p,qj(a.g.V,b.type,g,e,f,a.m.sequenceMode),4);if(2!=p.g)return ua(p,0);n=va(p);b.qe=null;b.pe=null;b.re=null;throw n;})},d.push(h());!yi(c.h,b.xd)&&(b.xd=c.h)&&(k=Jk(a,b,c.h),l=function(){var n,p,t,v;return G(function(y){switch(y.g){case 1:return C(y,
362
- 2),u(y,k,4);case 4:return n=y.h,wf(a.h),p=new If,p.box("moov",Nf).box("trak",Nf).box("mdia",Nf).S("mdhd",function(w){w=oi(w.reader||0,w.version||0);c.h.timescale=w.timescale}).parse(n),t=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(y,a.g.pf(b.type,n),5);case 5:return u(y,fj(a.g.V,b.type,n,null,t),6);case 6:ua(y,0);break;case 2:throw v=va(y),b.xd=null,v;}})},a.g.mh(c.startTime,c.h),d.push(l()));return u(m,Promise.all(d),0)})}
363
- function Ik(a,b,c,d,e,f){var g,h,k,l,m,n;return G(function(p){switch(p.g){case 1:g=d.closedCaptions&&0<d.closedCaptions.size;k=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;l=a.i.parsePrftBox&&!a.G;if(k||l)h=new If;k&&h.S("emsg",function(t){var v=d.emsgSchemeIdUris;if(0===t.version){var y=t.reader.Uc();var w=t.reader.Uc();var x=t.reader.N();var A=t.reader.N();var z=t.reader.N();var D=t.reader.N();var E=e.startTime+A/x}else x=t.reader.N(),E=t.reader.Cb()/x+e.timestampOffset,
364
- A=E-e.startTime,z=t.reader.N(),D=t.reader.N(),y=t.reader.Uc(),w=t.reader.Uc();t=t.reader.Bb(t.reader.W.byteLength-t.reader.ma());if(v&&v.includes(y)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==y?a.g.nh():"https://aomedia.org/emsg/ID3"==y?(v=Li(t),v.length&&e&&a.g.oh([{cueTime:e.startTime,data:t,frames:v,dts:e.startTime,pts:e.startTime}],0,e.endTime)):(v=(new Map).set("detail",{startTime:E,endTime:E+z/x,schemeIdUri:y,value:w,timescale:x,presentationTimeDelta:A,eventDuration:z,id:D,messageData:t}),
336
+ I("shaka.media.MetaSegmentIndex",Wj);Wj.prototype.updateEvery=Wj.prototype.Nd;Wj.prototype.fit=Wj.prototype.wb;Wj.prototype.mergeAndEvict=Wj.prototype.kc;Wj.prototype.evict=Wj.prototype.Gb;Wj.prototype.merge=Wj.prototype.Rc;Wj.prototype.offset=Wj.prototype.offset;Wj.prototype.get=Wj.prototype.get;Wj.prototype.find=Wj.prototype.find;Wj.prototype.release=Wj.prototype.release;function Xj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.vd();this.h=new O(function(){b.g.Mf(.25*b.i)})}Xj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Xj.prototype.set=function(a){this.i=a;Yj(this)};Xj.prototype.sd=function(){return this.g.sd()};function Yj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.vd()!=b&&a.g.Ne(b);return}catch(c){}a.h.ea(.25);0!=a.g.vd()&&a.g.Ne(0)};function Zj(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){ak(b,!1)})).ea(.25)}Zj.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function ak(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function bk(a){fb.call(this);this.g=new Map;this.h=a}pa(bk,fb);bk.prototype.release=function(){this.g.clear();fb.prototype.release.call(this)};function ck(a,b){var c=a.g.get(b);c||(c={Tc:[],xf:null,contentType:b},a.g.set(b,c));return c}function dk(a,b,c){var d=ck(a,b.contentType);ek(a,d);a={ve:b,position:c};d=d.Tc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
337
+ bk.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Tc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.ve;break a}}d=null}if(e=d)e=c.xf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
338
+ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.xf=d,JSON.stringify(d),c=new L("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function ek(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Tc;b.Tc=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.Tc=[]};function fk(a){fb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new L("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ea(2)}pa(fk,fb);fk.prototype.release=function(){this.g.clear();this.h.stop();fb.prototype.release.call(this)};function gk(a){fb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Vb:null,Ub:hk,Kb:function(c,d){return ik(b,"enter",c,d)}},{Vb:jk,Ub:hk,Kb:function(c,d){return ik(b,"enter",c,d)}},{Vb:kk,Ub:hk,Kb:function(c,d){return ik(b,"enter",c,d)}},{Vb:hk,Ub:jk,Kb:function(c,d){return ik(b,"exit",c,d)}},{Vb:hk,Ub:kk,Kb:function(c,d){return ik(b,"exit",c,d)}},{Vb:jk,Ub:kk,Kb:function(c,d){return ik(b,"skip",c,d)}},{Vb:kk,Ub:jk,Kb:function(c,d){return ik(b,"skip",c,d)}}];this.h=new xf;this.h.o(this.i,"regionremove",
339
+ function(c){b.g.delete(c.region)})}pa(gk,fb);gk.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;fb.prototype.release.call(this)};gk.prototype.j=function(a,b){for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?jk:a>d.endTime?kk:hk;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Vb==e&&h.Ub==f&&h.Kb(d,b)}};
340
+ function ik(a,b,c,d){b=new L(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var jk=1,hk=2,kk=3;function lk(a,b,c,d,e){a=of(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function mk(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.C=1;this.s=this.l=null;this.G=!1;this.j=new Map;this.F=!1;this.H=null;this.B=!1;this.h=new vf(function(){return nk(c)})}q=mk.prototype;q.destroy=function(){return this.h.destroy()};function nk(a){var b,c,d,e;return G(function(f){if(1==f.g){b=[];c=r(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,ok(e),b.push(pk(e));return u(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.i=null;B(f)})}
341
+ q.configure=function(a){this.i=a;this.H=new We({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)};q.start=function(){var a=this;return G(function(b){if(1==b.g)return u(b,qk(a),2);wf(a.h);a.F=!0;B(b)})};
342
+ function rk(a,b){var c,d,e,f,g,h;G(function(k){switch(k.g){case 1:return c=Jb,D(k,2),u(k,qj(a.g.U,c.ka),4);case 4:ua(k,3);break;case 2:if(d=va(k),a.g)a.g.onError(d);case 3:e=xd(b.mimeType,b.codecs);Zi(a.g.U,e,a.m.sequenceMode);f=a.g.U.m;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=sk(b),a.j.set(c.ka,h),tk(a,h,0);B(k)}})}function uk(a){var b=a.j.get(Ib);b&&(ok(b),pk(b).catch(function(){}),a.j.delete(Ib));a.s=null}
343
+ function vk(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Sb&&(wk(a,b,!1,0,!1),c.Sb=d);else if(d=c.Sb)c.Sb=null,wk(a,d,!0,0,!1)}}function xk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.F&&(b.video&&wk(a,b.video,c,d,e,f),b.audio&&wk(a,b.audio,c,d,e,f))}function yk(a,b){a.s=b;a.F&&wk(a,b,!0,0,!1)}
344
+ function wk(a,b,c,d,e,f){var g=a.j.get(b.type);g||b.type!=Ib?g&&(g.Sb&&(b.trickModeVideo?(g.Sb=b,b=b.trickModeVideo):g.Sb=null),g.stream!=b||e)&&(b.type==Ib&&Zi(a.g.U,xd(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.qa=null,g.lf=!!f,c&&(g.Cc?g.Pd=!0:g.Ia?(g.Eb=!0,g.pd=d,g.Pd=!0):(ok(g),zk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Ak(a,g).catch(function(h){if(a.g)a.g.onError(h)})):rk(a,b)}
345
+ function Ak(a,b){var c,d;return G(function(e){if(1==e.g){if(!b.Ka)return e.return();c=b.stream;d=b.Ka;return c.segmentIndex?e.D(2):u(e,c.createSegmentIndex(),2)}if(b.Ka!=d||b.stream!=c)return e.return();var f=a.g.ud();var g=dj(a.g.U,b.type),h=b.stream.segmentIndex.find(b.Ga?b.Ga.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ba?k.Ba-k.Sa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.Ba?k.Ba-k.Sa:null)||0),k=a.g.getBandwidthEstimate(),
346
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.Ka.h.g>h?!0:!1):f=!1;f&&b.Ka.abort();B(e)})}
347
+ q.Wc=function(){if(this.g)for(var a=this.g.ud(),b=r(this.j.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.j.get(d);c.qa=null;var e=this.g.U;d==Ib?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=cj(e,d),e=Ei(e,a));if(!e){(null!=dj(this.g.U,d)||c.Ia)&&Bk(this,c);c.Ka&&(c.Ka.abort(),c.Ka=null);if(d===Ib&&(d=this.g.U,d.B))for(d=d.B.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,gi(d),d=r(d.j.values()),e=d.next();!e.done;e=d.next())bi(e.value);c.Wc=!0}}};
348
+ function Bk(a,b){b.Cc||b.Eb||(b.Ia?(b.Eb=!0,b.pd=0):null==bj(a.g.U,b.type)?null==b.cb&&tk(a,b,0):(ok(b),zk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
349
+ function qk(a){var b,c,d,e,f,g,h,k,l,m;return G(function(p){if(1==p.g){b=Jb;if(!a.l)throw new M(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.hd,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Ma,a.l.video),d.add(a.l.video));a.s&&(c.set(b.ka,a.s),d.add(a.s));e=a.g.U;f=a.i.forceTransmux;return u(p,e.init(c,f,a.m.sequenceMode),2)}wf(a.h);a.updateDuration();g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||(m=sk(l),a.j.set(k,m),tk(a,m,0));B(p)})}
350
+ function sk(a){return{stream:a,type:a.type,qa:null,Ga:null,xd:null,re:null,qe:null,pe:null,Sb:null,endOfStream:!1,Ia:!1,cb:null,Eb:!1,pd:0,Pd:!1,Cc:!1,Wc:!0,Ce:!1,Mc:!1,Ka:null}}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.U.ab(a):this.g.U.ab(Math.pow(2,32))};
351
+ function Ck(a,b){var c,d,e,f,g;return G(function(h){switch(h.g){case 1:wf(a.h);if(b.Ia||null==b.cb||b.Cc)return h.return();b.cb=null;if(!b.Eb){h.D(2);break}return u(h,zk(a,b,b.Pd,b.pd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ia||b.cb||tk(a,b,0),h.return();case 4:D(h,6);d=Dk(a,b);null!=d&&(tk(a,b,d),b.Mc=!1);ua(h,7);break;case 6:return e=
352
+ va(h),u(h,Ek(a,e),8);case 8:return h.return();case 7:f=Array.from(a.j.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return u(h,a.g.U.endOfStream(),10);case 10:wf(a.h),g=a.g.U.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.ab(g),B(h)}})}
353
+ function Dk(a,b){if(Fk(b))return oj(a.g.U,b.stream.originalId||""),null;b.type==Ib&&pj(a.g.U);var c=a.g.ud(),d=b.Ga?b.Ga.endTime:c,e=ej(a.g.U,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=dj(a.g.U,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.j.get(Ib))&&Fk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=Gk(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;
354
+ f=Infinity;g=Array.from(a.j.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,Fk(h)||h.qa&&!h.qa.current()||(f=Math.min(f,h.Ga?h.Ga.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;Hk(a,b,c,e).catch(function(){});return null}
355
+ function Gk(a,b,c,d){if(b.qa)return b.qa.current();if(b.Ga||d)return b.qa=b.stream.segmentIndex.bc(b.Ga?b.Ga.endTime:d),b.qa&&b.qa.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.qa=b.stream.segmentIndex.bc(d),e=b.qa&&b.qa.next().value);e||(b.qa=b.stream.segmentIndex.bc(c),e=b.qa&&b.qa.next().value);return e}
356
+ function Hk(a,b,c,d){var e,f,g,h,k,l,m,p,n,t,v,y,w,x,A;return G(function(z){switch(z.g){case 1:e=Jb;f=b.stream;g=b.qa;b.Ia=!0;D(z,2);if(2==d.ec())throw new M(1,1,1011);return u(z,Ik(a,b,d),4);case 4:wf(a.h);if(a.B)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&!d.l)return p=new Uint8Array(0),t=n=!1,v=function(C){var E,F,H;return G(function(J){if(n)return J.return();t=!0;wf(a.h);if(a.B)return J.return();p=Jk(p,C);E=!1;F=0;(new If).box("mdat",
357
+ function(K){F=K.size+K.start;E=!0}).parse(p,!1,!0);if(!E)return J.D(0);H=p.subarray(0,F);p=p.subarray(F);return u(J,Kk(a,b,c,f,d,H),0)})},u(z,Lk(a,b,d,v),11);l=Lk(a,b,d);return u(z,l,7);case 7:m=z.h;wf(a.h);if(a.B)return z.return();if(!d.l){z.D(8);break}return u(z,Mk(m,d,g),9);case 9:m=z.h;case 8:return wf(a.h),b.Eb?(b.Ia=!1,tk(a,b,0),z.return()):u(z,Kk(a,b,c,f,d,m),6);case 11:y=z.h;if(t){z.D(6);break}n=!0;wf(a.h);return a.B?z.return():b.Eb?(b.Ia=!1,tk(a,b,0),z.return()):u(z,Kk(a,b,c,f,d,y),6);case 6:wf(a.h);
358
+ if(a.B)return z.return();b.Ga=d;g.next();b.Ia=!1;b.Ce=!1;w=a.g.U.ib();x=w[b.type];Za(JSON.stringify(x));b.Eb||a.g.Ae(d.startTime,d.endTime,b.type);tk(a,b,0);ua(z,0);break;case 2:A=va(z);wf(a.h,A);if(a.B)return z.return();b.Ia=!1;if(7001==A.code)b.Ia=!1,ok(b),tk(a,b,0),z.D(0);else if(b.type==e.ka&&a.i.ignoreTextStreamFailures)a.j.delete(e.ka),z.D(0);else if(3017==A.code)Nk(a,b,A),z.D(0);else return b.Mc=!0,A.severity=2,u(z,Ek(a,A),0)}})}
359
+ function Mk(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g)return d=b.l,d.cryptoKey?h.D(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Hc(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function Jk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
360
+ function Nk(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.Ce})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Mc=!0;a.B=!0;a.g.onError(c);return}b.Ce=!0}tk(a,b,4)}
361
+ function Ik(a,b,c){var d,e,f,g,h,k,l,m;return G(function(p){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.re||e!=b.qe||f!=b.pe)h=function(){var n;return G(function(t){if(1==t.g)return D(t,2),b.qe=e,b.pe=f,b.re=g,u(t,rj(a.g.U,b.type,g,e,f,a.m.sequenceMode),4);if(2!=t.g)return ua(t,0);n=va(t);b.qe=null;b.pe=null;b.re=null;throw n;})},d.push(h());!yi(c.h,b.xd)&&(b.xd=c.h)&&(k=Lk(a,b,c.h),l=function(){var n,t,v,y;return G(function(w){switch(w.g){case 1:return D(w,
362
+ 2),u(w,k,4);case 4:return n=w.h,wf(a.h),t=new If,t.box("moov",Nf).box("trak",Nf).box("mdia",Nf).S("mdhd",function(x){x=oi(x.reader||0,x.version||0);c.h.timescale=x.timescale}).parse(n),v=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(w,a.g.pf(b.type,n),5);case 5:return u(w,fj(a.g.U,b.type,n,null,v),6);case 6:ua(w,0);break;case 2:throw y=va(w),b.xd=null,y;}})},a.g.mh(c.startTime,c.h),d.push(l()));a.m.sequenceMode&&(m=b.Ga?b.Ga.m:null,c.m!=m&&d.push(sj(a.g.U,b.type,c.startTime)));return u(p,
363
+ Promise.all(d),0)})}
364
+ function Kk(a,b,c,d,e,f){var g,h,k,l,m,p;return G(function(n){switch(n.g){case 1:g=d.closedCaptions&&0<d.closedCaptions.size;k=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;l=a.i.parsePrftBox&&!a.G;if(k||l)h=new If;k&&h.S("emsg",function(t){var v=d.emsgSchemeIdUris;if(0===t.version){var y=t.reader.Uc();var w=t.reader.Uc();var x=t.reader.N();var A=t.reader.N();var z=t.reader.N();var C=t.reader.N();var E=e.startTime+A/x}else x=t.reader.N(),E=t.reader.Cb()/x+e.timestampOffset,
365
+ A=E-e.startTime,z=t.reader.N(),C=t.reader.N(),y=t.reader.Uc(),w=t.reader.Uc();t=t.reader.Bb(t.reader.W.byteLength-t.reader.ma());if(v&&v.includes(y)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==y?a.g.nh():"https://aomedia.org/emsg/ID3"==y?(v=Li(t),v.length&&e&&a.g.oh([{cueTime:e.startTime,data:t,frames:v,dts:e.startTime,pts:e.startTime}],0,e.endTime)):(v=(new Map).set("detail",{startTime:E,endTime:E+z/x,schemeIdUri:y,value:w,timescale:x,presentationTimeDelta:A,eventDuration:z,id:C,messageData:t}),
365
366
  v=new L("emsg",v),a.g.onEvent(v))});l&&h.S("prft",function(t){a:{if(!a.G&&e.h.timescale){t.reader.N();var v=t.reader.N(),y=t.reader.N();v=1E3*v+y/Math.pow(2,32)*1E3;if(0===t.version)var w=t.reader.N();else try{w=t.reader.Cb()}catch(x){a.G=!0;w=void 0;break a}t=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+v)).getTime();w=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-w/e.h.timescale*1E3)});w=new L("prft",w);a.g.onEvent(w);a.G=!0}w=void 0}return w});(k||l)&&h.parse(f);
366
- return u(p,Mk(a,b,c),2);case 2:return wf(a.h),m=b.Wc,b.Wc=!1,n=b.lf,b.lf=!1,u(p,a.g.pf(b.type,f),3);case 3:return u(p,fj(a.g.V,b.type,f,e,g,m,n),4);case 4:wf(a.h),B(p)}})}function Mk(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=bj(a.g.V,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():u(h,a.g.V.remove(b.type,e,e+g),2)}wf(a.h);B(h)})}
367
- function Dk(a){return a&&a.type==Ib&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}function Jk(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=uf,f=jk(c.Na(),c.Ra,c.Ba,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof xi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Ob.request(e,f),b.Ia=h,u(l,h.promise,2);k=l.h;b.Ia=null;return l.return(k.data)})}
368
- function xk(a,b,c,d){var e,f;return G(function(g){if(1==g.g)return b.Eb=!1,b.Pd=!1,b.pd=0,b.Cc=!0,b.Pa=null,b.xd=null,b.qa=null,d?(e=a.g.ud(),f=a.g.V.getDuration(),u(g,a.g.V.remove(b.type,e+d,f),3)):u(g,pj(a.g.V,b.type),4);if(3!=g.g)return wf(a.h),c?u(g,a.g.V.flush(b.type),3):g.D(3);wf(a.h);b.Cc=!1;b.endOfStream=!1;rk(a,b,0);B(g)})}
369
- function rk(a,b,c){var d=b.type;if(d!=Ib||a.j.has(d))b.pb=(new Nc(function(){var e;return G(function(f){if(1==f.g)return C(f,2),u(f,Ak(a,b),4);if(2!=f.g)return ua(f,0);e=va(f);if(a.g)a.g.onError(e);B(f)})})).R(c)}function mk(a){null!=a.pb&&(a.pb.stop(),a.pb=null)}function nk(a){return G(function(b){return a.Ia?u(b,a.Ia.abort(),0):b.D(0)})}function Ck(a,b){return G(function(c){if(1==c.g)return u(c,Ye(a.H),2);wf(a.h);a.g.onError(b);b.handled||a.i.failureCallback(b);B(c)})};function Nk(a,b){var c=Ok(),d=this;this.j=b;this.i=a;this.l=c;this.s=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Pk(d)});this.B=new vf(function(){return Qk(d)})}Nk.prototype.destroy=function(){return this.B.destroy()};function Qk(a){var b,c,d;return G(function(e){if(1==e.g)return a.h&&a.h.abort(),Rk(a),u(e,a.C,2);a.g&&a.g.Za.Qb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Za.Qb();a.g=null;a.m=[];a.j=null;B(e)})}
370
- function Sk(a,b){var c={mc:function(){},Ed:function(){},Qb:function(){},onError:function(){},Gd:function(){},sj:function(){}};a.m.push({create:b,Za:c});a.h&&a.h.abort();Rk(a);return c}
371
- function Pk(a){return G(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Jb)var c=!1;else{a.g&&(a.g.Za.Qb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Za.mc(),a.g={node:d.node,payload:d.payload,Jb:d.Jb,Za:c.Za}):c.Za.Gd();c=!0}c?c=Promise.resolve():a.g?c=Tk(a):(a.j.lh(a.i),a.s=new Lc,c=a.s);b=u(b,c,1)}return b})}
372
- function Tk(a){var b,c;return G(function(d){switch(d.g){case 1:return a.i=a.j.Qg(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.vg(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Za.Ed(),a.g=null);ua(d,0);break;case 2:b=va(d);if(7001==b.code)a.g.Za.Qb();else a.g.Za.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,B(d)}})}function Rk(a){a.s&&(a.s.resolve(),a.s=null)};function Uk(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Uk.prototype;q.remove=function(a,b){if(!this.g)return!1;Vk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
373
- q.append=function(a){function b(h,k){h=r(h);for(var l=h.next();!l.done;l=h.next())if(l=l.value,l.isContainer)b(l.nestedCues,k);else{var m=l.clone();m.nestedCues=[];m.payload=c(l);k.push(m)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},"");k=k.reduceRight(function(p,t){return p+"</"+t+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(c).join(""):
374
- l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=r(d);for(var g=d.next();!g.done;f={Wb:f.Wb},g=d.next())f.Wb=g.value,a.some(function(h){return function(k){return k.startTime==h.Wb.startTime&&k.endTime==h.Wb.endTime&&k.text==h.Wb.payload?!0:!1}}(f))||(g=Wk(f.Wb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-
375
- e.indexOf(k)});a=r(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};q.destroy=function(){this.g&&(Vk(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
376
- function Wk(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
377
- function Vk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}I("shaka.text.SimpleTextDisplayer",Uk);Uk.prototype.setTextVisibility=Uk.prototype.setTextVisibility;Uk.prototype.isTextVisible=Uk.prototype.isTextVisible;Uk.prototype.destroy=Uk.prototype.destroy;Uk.prototype.append=Uk.prototype.append;Uk.prototype.remove=Uk.prototype.remove;function Xk(){}function R(a){return document.createElement(a)}function Yk(){return document.createElement("button")}function Zk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}I("shaka.util.Dom",Xk);Xk.removeAllChildren=Zk;function $k(a,b){var c=this;this.j=!1;this.i=[];this.F=a;this.m=b;this.g=R("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.m.appendChild(this.g);this.C=(new O(function(){al(c)})).ea(.25);this.h=new Map;this.B=new xf;this.B.o(document,"fullscreenchange",function(){al(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){al(c,
378
- !0)}),this.l.observe(this.g));this.s=new Map}q=$k.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={cd:c.cd},d=a.next())c.cd=d.value,b.some(function(e){return function(f){return vc(f,e.cd)}}(c))||this.i.push(c.cd);al(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.C&&this.C.stop();this.h.clear();this.B&&(this.B.release(),this.B=null);this.l&&(this.l.disconnect(),this.l=null)};
379
- q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});al(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};function bl(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
380
- function cl(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.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.eg:null;l&&(g.push(l.je),l.Vc&&g.push(l.Vc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?bl(a,n)||(f=!0):(dl(a,k,e),l=a.h.get(k),n=l.eg,f=!0));0<k.nestedCues.length&&n&&cl(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(p,t){return p.startTime!=
381
- t.startTime?p.startTime-t.startTime:p.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Vc?(c.appendChild(d.Vc),d.Vc.appendChild(d.je)):c.appendChild(d.je)}}function al(a,b){if(a.g){var c=a.F.currentTime;if(!a.j||(void 0===b?0:b)){b=r(a.s.values());for(var d=b.next();!d.done;d=b.next())Zk(d.value);Zk(a.g);a.h.clear();a.s.clear()}if(a.j){b=new Map;d=r(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));cl(a,a.i,a.g,c,[])}}}
382
- function dl(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=R(e);"br"!=e&&el(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.s.has(c.id))c=a.s.get(c.id);else{e=R("span");var g=c.heightUnits==Cc?"%":"px",h=c.widthUnits==Cc?"%":"px",k=c.viewportAnchorUnits==Cc?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+g;e.style.width=c.width+h;e.style.position="absolute";e.style.top=c.viewportAnchorY+
367
+ return u(n,Ok(a,b,c),2);case 2:return wf(a.h),m=b.Wc,b.Wc=!1,p=b.lf,b.lf=!1,u(n,a.g.pf(b.type,f),3);case 3:return u(n,fj(a.g.U,b.type,f,e,g,m,p),4);case 4:wf(a.h),B(n)}})}function Ok(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=bj(a.g.U,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():u(h,a.g.U.remove(b.type,e,e+g),2)}wf(a.h);B(h)})}
368
+ function Fk(a){return a&&a.type==Ib&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}function Lk(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=uf,f=lk(c.Pa(),c.Sa,c.Ba,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof xi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Ob.request(e,f),b.Ka=h,u(l,h.promise,2);k=l.h;b.Ka=null;return l.return(k.data)})}
369
+ function zk(a,b,c,d){var e,f;return G(function(g){if(1==g.g)return b.Eb=!1,b.Pd=!1,b.pd=0,b.Cc=!0,b.Ga=null,b.xd=null,b.qa=null,d?(e=a.g.ud(),f=a.g.U.getDuration(),u(g,a.g.U.remove(b.type,e+d,f),3)):u(g,qj(a.g.U,b.type),4);if(3!=g.g)return wf(a.h),c?u(g,a.g.U.flush(b.type),3):g.D(3);wf(a.h);b.Cc=!1;b.endOfStream=!1;b.Ia||b.cb||tk(a,b,0);B(g)})}
370
+ function tk(a,b,c){var d=b.type;if(d!=Ib||a.j.has(d))b.cb=(new Nc(function(){var e;return G(function(f){if(1==f.g)return D(f,2),u(f,Ck(a,b),4);if(2!=f.g)return ua(f,0);e=va(f);if(a.g)a.g.onError(e);B(f)})})).R(c)}function ok(a){null!=a.cb&&(a.cb.stop(),a.cb=null)}function pk(a){return G(function(b){return a.Ka?u(b,a.Ka.abort(),0):b.D(0)})}function Ek(a,b){return G(function(c){if(1==c.g)return u(c,Ye(a.H),2);wf(a.h);a.g.onError(b);b.handled||a.i.failureCallback(b);B(c)})};function Pk(a,b){var c=Qk(),d=this;this.j=b;this.i=a;this.l=c;this.s=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Rk(d)});this.B=new vf(function(){return Sk(d)})}Pk.prototype.destroy=function(){return this.B.destroy()};function Sk(a){var b,c,d;return G(function(e){if(1==e.g)return a.h&&a.h.abort(),Tk(a),u(e,a.C,2);a.g&&a.g.$a.Qb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.$a.Qb();a.g=null;a.m=[];a.j=null;B(e)})}
371
+ function Uk(a,b){var c={mc:function(){},Ed:function(){},Qb:function(){},onError:function(){},Gd:function(){},sj:function(){}};a.m.push({create:b,$a:c});a.h&&a.h.abort();Tk(a);return c}
372
+ function Rk(a){return G(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Jb)var c=!1;else{a.g&&(a.g.$a.Qb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.$a.mc(),a.g={node:d.node,payload:d.payload,Jb:d.Jb,$a:c.$a}):c.$a.Gd();c=!0}c?c=Promise.resolve():a.g?c=Vk(a):(a.j.lh(a.i),a.s=new Lc,c=a.s);b=u(b,c,1)}return b})}
373
+ function Vk(a){var b,c;return G(function(d){switch(d.g){case 1:return a.i=a.j.Qg(a.i,a.l,a.g.node,a.g.payload),D(d,2),a.h=a.j.vg(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.$a.Ed(),a.g=null);ua(d,0);break;case 2:b=va(d);if(7001==b.code)a.g.$a.Qb();else a.g.$a.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,B(d)}})}function Tk(a){a.s&&(a.s.resolve(),a.s=null)};function Wk(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Wk.prototype;q.remove=function(a,b){if(!this.g)return!1;Xk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
374
+ q.append=function(a){function b(h,k){h=r(h);for(var l=h.next();!l.done;l=h.next())if(l=l.value,l.isContainer)b(l.nestedCues,k);else{var m=l.clone();m.nestedCues=[];m.payload=c(l);k.push(m)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,p=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");p&&k.push("u");l=k.reduce(function(n,t){return n+"<"+t+">"},"");k=k.reduceRight(function(n,t){return n+"</"+t+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(c).join(""):
375
+ l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=r(d);for(var g=d.next();!g.done;f={Wb:f.Wb},g=d.next())f.Wb=g.value,a.some(function(h){return function(k){return k.startTime==h.Wb.startTime&&k.endTime==h.Wb.endTime&&k.text==h.Wb.payload?!0:!1}}(f))||(g=Yk(f.Wb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-
376
+ e.indexOf(k)});a=r(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};q.destroy=function(){this.g&&(Xk(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
377
+ function Yk(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
378
+ function Xk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}I("shaka.text.SimpleTextDisplayer",Wk);Wk.prototype.setTextVisibility=Wk.prototype.setTextVisibility;Wk.prototype.isTextVisible=Wk.prototype.isTextVisible;Wk.prototype.destroy=Wk.prototype.destroy;Wk.prototype.append=Wk.prototype.append;Wk.prototype.remove=Wk.prototype.remove;function Zk(){}function R(a){return document.createElement(a)}function $k(){return document.createElement("button")}function al(a){for(;a.firstChild;)a.removeChild(a.firstChild)}I("shaka.util.Dom",Zk);Zk.removeAllChildren=al;function bl(a,b){var c=this;this.j=!1;this.i=[];this.F=a;this.m=b;this.g=R("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.m.appendChild(this.g);this.C=(new O(function(){cl(c)})).ea(.25);this.h=new Map;this.B=new xf;this.B.o(document,"fullscreenchange",function(){cl(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){cl(c,
379
+ !0)}),this.l.observe(this.g));this.s=new Map}q=bl.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={cd:c.cd},d=a.next())c.cd=d.value,b.some(function(e){return function(f){return vc(f,e.cd)}}(c))||this.i.push(c.cd);cl(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.C&&this.C.stop();this.h.clear();this.B&&(this.B.release(),this.B=null);this.l&&(this.l.disconnect(),this.l=null)};
380
+ q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});cl(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};function dl(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
381
+ function el(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.h.get(k),m=k.startTime<=d&&k.endTime>d,p=l?l.eg:null;l&&(g.push(l.je),l.Vc&&g.push(l.Vc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?dl(a,p)||(f=!0):(fl(a,k,e),l=a.h.get(k),p=l.eg,f=!0));0<k.nestedCues.length&&p&&el(a,k.nestedCues,p,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(n,t){return n.startTime!=
382
+ t.startTime?n.startTime-t.startTime:n.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Vc?(c.appendChild(d.Vc),d.Vc.appendChild(d.je)):c.appendChild(d.je)}}function cl(a,b){if(a.g){var c=a.F.currentTime;if(!a.j||(void 0===b?0:b)){b=r(a.s.values());for(var d=b.next();!d.done;d=b.next())al(d.value);al(a.g);a.h.clear();a.s.clear()}if(a.j){b=new Map;d=r(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));el(a,a.i,a.g,c,[])}}}
383
+ function fl(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=R(e);"br"!=e&&gl(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.s.has(c.id))c=a.s.get(c.id);else{e=R("span");var g=c.heightUnits==Cc?"%":"px",h=c.widthUnits==Cc?"%":"px",k=c.viewportAnchorUnits==Cc?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+g;e.style.width=c.width+h;e.style.position="absolute";e.style.top=c.viewportAnchorY+
383
384
  k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.s.set(c.id,e);c=e}e=f;d&&(e=R("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{je:f,eg:e,Vc:c})}
384
- function el(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=fl(c.linePadding,c,a.m);f.paddingRight=fl(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
385
- "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=R("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=gl(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?
386
- "flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=fl(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==pc?(f.width="100%",c.lineAlign==rc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==rc?f.left=c.line+
385
+ function gl(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=hl(c.linePadding,c,a.m);f.paddingRight=hl(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
386
+ "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=R("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=il(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?
387
+ "flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=hl(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==pc?(f.width="100%",c.lineAlign==rc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==rc?f.left=c.line+
387
388
  "%":"end"==c.lineAlign&&(f.right=100-c.line+"%")):(f.height="100%",c.lineAlign==rc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%")));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==pc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&
388
- f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==pc?f.width=c.size+"%":f.height=c.size+"%")}function fl(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}
389
- function gl(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}I("shaka.text.UITextDisplayer",$k);$k.prototype.setTextVisibility=$k.prototype.setTextVisibility;$k.prototype.isTextVisible=$k.prototype.isTextVisible;$k.prototype.remove=$k.prototype.remove;$k.prototype.destroy=$k.prototype.destroy;$k.prototype.append=$k.prototype.append;function hl(a,b){function c(g){for(var h=g,k=r(b),l=k.next();!l.done;l=k.next())l=l.value,l.end&&l.start<g&&(h+=l.end-l.start);g=Math.floor(h/3600);k=Math.floor(h/60%60);l=Math.floor(h%60);h=Math.floor(1E3*h%1E3);return(10>g?"0":"")+g+":"+(10>k?"0":"")+k+":"+(10>l?"0":"")+l+"."+(100>h?10>h?"00":"0":"")+h}function d(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n,p){return n+"<"+p+">"},
390
- "");h=h.reduceRight(function(n,p){return n+"</"+p+">"},"");return g.lineBreak?"\n":g.nestedCues.length?g.nestedCues.map(d).join(""):k+g.payload+h}var e=a.map(function(g){if(g.nestedCues.length){var h=g.clone();h.nestedCues=[];h.payload=d(g);return h}return g});a="WEBVTT\n\n";e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,a+=c(f.startTime)+" --\x3e "+c(f.endTime)+function(g){var h=[];switch(g.textAlign){case "left":h.push("align:left");break;case "right":h.push("align:right");break;case oc:h.push("align:middle");
391
- break;case "start":h.push("align:start");break;case "end":h.push("align:end")}switch(g.writingMode){case "vertical-lr":h.push("vertical:lr");break;case "vertical-rl":h.push("vertical:rl")}return h.length?" "+h.join(" "):""}(f)+"\n",a+=f.payload+"\n\n";return a}I("shaka.text.WebVttGenerator",function(){});function il(a,b){this.h=a;this.g=b;this.j="";this.s=void 0;this.i=!1;this.m=!0;this.l=!1}function jl(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?kl:ll};d.ot=ml(c);var e=d.ot===nl||d.ot===ol||d.ot===pl||d.ot===ql;e&&(d.bl=rl(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==ql&&(d.tb=sl(a,d.ot)/1E3);tl(a,b,d)}}catch(f){Va("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
392
- function ul(a,b,c){try{if(!a.g.enabled)return b;var d=vl(a);a:{switch(c){case "video/webm":case "video/mp4":var e=pl;break a;case "application/x-mpegurl":e=wl;break a}e=void 0}d.ot=e;d.su=!0;var f=xl(d);return yl(b,f)}catch(g){return Va("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function vl(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.s,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
393
- function tl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,vl(a));c.pr=a.h.xb();var e=c.ot===nl||c.ot===pl;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=zl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=xl(c);f&&(b.uris=b.uris.map(function(g){return yl(g,f)}))}}}
394
- function ml(a){var b=a.type;if(a.init)return Al;if("video"==b)return a.codecs.includes(",")?pl:nl;if("audio"==b)return ol;if("text"==b)return"application/mp4"===a.mimeType?ql:Bl}function rl(a,b){b=a.h.hb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
395
- function sl(a,b){var c=a.h.Oa();if(!c.length)return NaN;a=c[0];c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case nl:return a.videoBandwidth||NaN;case ol:return a.audioBandwidth||NaN;default:return a.bandwidth}}
396
- function xl(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
397
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function zl(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=xl(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
398
- function yl(a,b){if(!b||a.includes("offline:"))return a;a=new lb(a);a.g.set("CMCD",b);return a.toString()}var wl="m",ol="a",nl="v",pl="av",Al="i",Bl="c",ql="tt",ll="v",kl="l";I("shaka.util.CmcdManager.StreamingFormat",{Zh:"d",pi:"h",Xi:"s",Hi:"o"});function Cl(){}
399
- function Dl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=ff(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=ff(l)),k=Dl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Sa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ta("Unexpected number of arguments for "+k),a[h]=b[h]):(Sa("Invalid config, unrecognized key "+
400
- k),g=!1)}return g}function El(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Fl(a,b){return a&&b}I("shaka.util.ConfigUtils",Cl);Cl.convertToConfigObject=El;Cl.mergeConfigObjects=Dl;function Gl(){}function Hl(a){a=dd(a);return(new lb(a)).Ya}function Il(a,b,c){function d(h){Kc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Hc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new M(2,6,6015);var e;"string"==typeof b?e=fd(b,!0):e=b;a=dd(a);a=fd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}I("shaka.util.FairPlayUtils",Gl);
401
- Gl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=ad(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Ic(jd(c)))}};Gl.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};Gl.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
402
- Gl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Hc(b.body),a=id(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=ed("spc="+a))};Gl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=dd(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Il(a,d,b)};
403
- Gl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=dd(a).split(";").pop();return Il(a,c,b)};Gl.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=dd(a).split("skd://").pop();return Il(a,c,b)};Gl.initDataTransform=Il;Gl.defaultGetContentId=Hl;
404
- Gl.isFairPlaySupported=function(){var a;return G(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},C(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);va(b);return b.return(!1)})};function Jl(){}
405
- function Kl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Xe(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=Hl(g),g=Il(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Rc()},c={retryParameters:Xe(),availabilityWindowOverride:NaN,disableAudio:!1,
389
+ f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==pc?f.width=c.size+"%":f.height=c.size+"%")}function hl(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}
390
+ function il(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}I("shaka.text.UITextDisplayer",bl);bl.prototype.setTextVisibility=bl.prototype.setTextVisibility;bl.prototype.isTextVisible=bl.prototype.isTextVisible;bl.prototype.remove=bl.prototype.remove;bl.prototype.destroy=bl.prototype.destroy;bl.prototype.append=bl.prototype.append;function jl(a,b){function c(g){for(var h=g,k=r(b),l=k.next();!l.done;l=k.next())l=l.value,l.end&&l.start<g&&(h+=l.end-l.start);g=Math.floor(h/3600);k=Math.floor(h/60%60);l=Math.floor(h%60);h=Math.floor(1E3*h%1E3);return(10>g?"0":"")+g+":"+(10>k?"0":"")+k+":"+(10>l?"0":"")+l+"."+(100>h?10>h?"00":"0":"")+h}function d(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(p,n){return p+"<"+n+">"},
391
+ "");h=h.reduceRight(function(p,n){return p+"</"+n+">"},"");return g.lineBreak?"\n":g.nestedCues.length?g.nestedCues.map(d).join(""):k+g.payload+h}var e=a.map(function(g){if(g.nestedCues.length){var h=g.clone();h.nestedCues=[];h.payload=d(g);return h}return g});a="WEBVTT\n\n";e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,a+=c(f.startTime)+" --\x3e "+c(f.endTime)+function(g){var h=[];switch(g.textAlign){case "left":h.push("align:left");break;case "right":h.push("align:right");break;case oc:h.push("align:middle");
392
+ break;case "start":h.push("align:start");break;case "end":h.push("align:end")}switch(g.writingMode){case "vertical-lr":h.push("vertical:lr");break;case "vertical-rl":h.push("vertical:rl")}return h.length?" "+h.join(" "):""}(f)+"\n",a+=f.payload+"\n\n";return a}I("shaka.text.WebVttGenerator",function(){});function kl(a,b){this.h=a;this.g=b;this.j="";this.s=void 0;this.i=!1;this.m=!0;this.l=!1}function ll(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?ml:nl};d.ot=ol(c);var e=d.ot===pl||d.ot===ql||d.ot===rl||d.ot===sl;e&&(d.bl=tl(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==sl&&(d.tb=ul(a,d.ot)/1E3);vl(a,b,d)}}catch(f){Va("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
393
+ function wl(a,b,c){try{if(!a.g.enabled)return b;var d=xl(a);a:{switch(c){case "video/webm":case "video/mp4":var e=rl;break a;case "application/x-mpegurl":e=yl;break a}e=void 0}d.ot=e;d.su=!0;var f=zl(d);return Al(b,f)}catch(g){return Va("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function xl(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.s,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
394
+ function vl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,xl(a));c.pr=a.h.xb();var e=c.ot===pl||c.ot===rl;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Bl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=zl(c);f&&(b.uris=b.uris.map(function(g){return Al(g,f)}))}}}
395
+ function ol(a){var b=a.type;if(a.init)return Cl;if("video"==b)return a.codecs.includes(",")?rl:pl;if("audio"==b)return ql;if("text"==b)return"application/mp4"===a.mimeType?sl:Dl}function tl(a,b){b=a.h.ib()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
396
+ function ul(a,b){var c=a.h.Qa();if(!c.length)return NaN;a=c[0];c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case pl:return a.videoBandwidth||NaN;case ql:return a.audioBandwidth||NaN;default:return a.bandwidth}}
397
+ function zl(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},rtp:b,tb: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)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
398
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Bl(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=zl(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
399
+ function Al(a,b){if(!b||a.includes("offline:"))return a;a=new lb(a);a.g.set("CMCD",b);return a.toString()}var yl="m",ql="a",pl="v",rl="av",Cl="i",Dl="c",sl="tt",nl="v",ml="l";I("shaka.util.CmcdManager.StreamingFormat",{Zh:"d",pi:"h",Xi:"s",Hi:"o"});function El(){}
400
+ function Fl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=ff(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=ff(l)),k=Fl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Sa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ta("Unexpected number of arguments for "+k),a[h]=b[h]):(Sa("Invalid config, unrecognized key "+
401
+ k),g=!1)}return g}function Gl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Hl(a,b){return a&&b}I("shaka.util.ConfigUtils",El);El.convertToConfigObject=Gl;El.mergeConfigObjects=Fl;function Il(){}function Jl(a){a=dd(a);return(new lb(a)).Za}function Kl(a,b,c){function d(h){Kc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Hc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new M(2,6,6015);var e;"string"==typeof b?e=fd(b,!0):e=b;a=dd(a);a=fd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}I("shaka.util.FairPlayUtils",Il);
402
+ Il.commonFairPlayResponse=function(a,b){if(2===a){try{var c=ad(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Ic(jd(c)))}};Il.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};Il.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
403
+ Il.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Hc(b.body),a=id(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=ed("spc="+a))};Il.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=dd(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Kl(a,d,b)};
404
+ Il.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=dd(a).split(";").pop();return Kl(a,c,b)};Il.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=dd(a).split("skd://").pop();return Kl(a,c,b)};Il.initDataTransform=Kl;Il.defaultGetContentId=Jl;
405
+ Il.isFairPlaySupported=function(){var a;return G(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},D(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);va(b);return b.return(!1)})};function Ll(){}
406
+ function Ml(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Xe(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=Jl(g),g=Kl(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Rc()},c={retryParameters:Xe(),availabilityWindowOverride:NaN,disableAudio:!1,
406
407
  disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey",
407
- "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:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return Fl([g],g)},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,
408
- mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3}},d={retryParameters:Xe(),failureCallback:function(g){return Fl([g])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmux:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
408
+ "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:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return Hl([g],g)},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,
409
+ mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3}},d={retryParameters:Xe(),failureCallback:function(g){return Hl([g])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmux:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
409
410
  autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1};if(Sc("Web0S")||Tc()||Sc("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return G(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return G(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k.return(!0);h=k.h;return k.return(h.usage+g<
410
- .95*h.quota)})},progressCallback:function(g,h){return Fl([g,h])},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,mediaSource:{sourceBufferExtraFeatures:""},offline:e,abrFactory:function(){return new Ae},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,
411
+ .95*h.quota)})},progressCallback:function(g,h){return Hl([g,h])},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,mediaSource:{sourceBufferExtraFeatures:""},offline:e,abrFactory:function(){return new Ae},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,
411
412
  minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1},autoShowText:3,preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,
412
- minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1}};e.trackSelectionCallback=function(g){return G(function(h){return h.return(Ll(g,f.preferredAudioLanguage))})};return f}
413
- function Ml(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:""}};return Dl(a,b,c||Kl(),d,"")}
414
- function Ll(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=Vb(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return Mb(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
415
- 2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=Ib&&"image"!=d.type||b.push(d);return b}I("shaka.util.PlayerConfiguration",Jl);Jl.mergeConfigObjects=Ml;Jl.createDefault=Kl;function Nl(){this.g=null;this.h=[]}function Ol(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Pl(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}
416
- function Ql(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 Rl(){this.i=this.h=null;this.g=[]}function Sl(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 Tl(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.O=this.P=this.J=this.K=this.M=this.l=this.s=NaN;this.g=new Nl;this.h=new Rl};function S(a,b){fb.call(this);var c=this;this.l=Ul;this.yd=this.g=null;this.aa=!1;this.Hd=new xf;this.cb=new xf;this.B=new xf;this.eb=this.i=this.Id=this.K=this.j=this.ia=this.M=this.hf=this.U=this.Kd=this.O=this.Bd=this.J=this.Wa=this.F=this.I=this.m=this.H=null;this.Kc=!1;this.Xe=this.C=null;this.df=1E9;this.h=Vl(this);this.Nc={width:Infinity,height:Infinity};this.s=null;this.za=new Oe(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ja=this.h.preferredTextLanguage;
417
- this.Ec=this.h.preferredTextRole;this.ub=this.h.preferForcedSubs;this.fb=[];this.Qc=null;b&&b(this);this.H=Wl(this);this.H.Le(this.h.streaming.forceHTTPS);this.G=null;Xl&&(this.G=Xl());this.Hd.o(window,"online",function(){c.De()});this.P={name:"detach"};this.X={name:"attach"};this.$={name:"unload"};this.ef={name:"manifest-parser"};this.cf={name:"manifest"};this.Va={name:"media-source"};this.$e={name:"drm-engine"};this.Z={name:"load"};this.fe={name:"src-equals-drm-engine"};this.Xa={name:"src-equals"};
418
- var d=new Map;d.set(this.X,function(e,f){return cf(Yl(c,e,f))});d.set(this.P,function(e){e.mediaElement&&(c.cb.Rb(),e.mediaElement=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return cf(e)});d.set(this.$,function(e){return cf(Zl(c,e))});d.set(this.Va,function(e){e=$l(c,e);return cf(e)});d.set(this.ef,function(e,f){e=am(c,e,f);return cf(e)});d.set(this.cf,function(e){return bm(c,e)});d.set(this.$e,function(e){e=cm(c,e);return cf(e)});d.set(this.Z,function(e,f){return cf(dm(c,e,f))});d.set(this.fe,
419
- function(e,f){e=em(c,e,f);return cf(e)});d.set(this.Xa,function(e,f){return fm(c,e,f)});this.sa=new Nk(this.P,{Qg:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.X);e==c.X&&(k=g==c.P||f.mediaElement!=h.mediaElement?c.P:g==c.X?c.X:g==c.Va||g==c.Z?c.Va:g==c.Xa?c.fe:null);e==c.Va&&(k=g==c.Z&&f.mediaElement==h.mediaElement?c.ef:c.$);e==c.ef&&(k=gm(c.Z,c.cf,c.$,g,f,h));e==c.cf&&(k=gm(c.Z,c.$e,c.$,g,f,h));e==c.$e&&(k=gm(c.Z,c.Z,c.$,g,f,h));e==c.fe&&(k=g==c.Xa&&f.mediaElement==h.mediaElement?c.Xa:c.$);
420
- if(e==c.Z||e==c.Xa)k=c.$;e==c.$&&(k=h.mediaElement&&f.mediaElement==h.mediaElement?c.X:c.P);return k},vg:function(e,f,g){c.dispatchEvent(hm("onstatechange",(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return G(function(f){return 1==f.g?u(f,Zl(c,e),2):f.return(e.mediaElement?c.X:c.P)})},lh:function(e){c.dispatchEvent(hm("onstateidle",(new Map).set("state",e.name)))}});this.gf=new O(function(){Zd(c.i.variants,c.h.restrictions,c.Nc)&&im(c)});a&&this.Bc(a,!0)}pa(S,fb);
421
- function jm(a){null!=a.M&&(a.M.release(),a.M=null)}function km(a,b){if(b.lcevc.enabled){var c=a.Oa();c&&c[0]&&c[0].videoMimeType==lm.ts&&(navigator.userAgent.match(/Edge?\//)||navigator.userAgent.match(/Edge\//))&&(b.streaming.forceTransmux||Ta("LCEVC Warning: For MPEG-2 TS decoding the config.streaming.forceTransmux must be enabled."));jm(a);null==a.M&&(a.M=new Qi(a.g,a.hf,b.lcevc),a.I&&(a.I.G=a.M))}else jm(a)}function hm(a,b){return new L(a,b)}q=S.prototype;
422
- q.destroy=function(){var a=this,b;return G(function(c){switch(c.g){case 1:if(a.l==mm)return c.return();jm(a);a.l=mm;b=Sk(a.sa,function(){return{node:a.P,payload:Ok(),Jb:!1}});return u(c,new Promise(function(d){b.mc=function(){};b.Ed=function(){d()};b.Qb=function(){d()};b.onError=function(){d()};b.Gd=function(){d()}}),2);case 2:return u(c,a.sa.destroy(),3);case 3:a.Hd&&(a.Hd.release(),a.Hd=null);a.cb&&(a.cb.release(),a.cb=null);a.B&&(a.B.release(),a.B=null);a.Xe=null;a.C=null;a.h=null;a.s=null;a.yd=
423
- null;a.U=null;if(!a.H){c.D(4);break}return u(c,a.H.destroy(),5);case 5:a.H=null;case 4:fb.prototype.release.call(a),B(c)}})};
424
- function nm(){window.Promise||Ta("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Sc("Trident/"))return!1;var a=Xc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Oc()?!0:Pc("application/x-mpegurl")}
425
- q.Bc=function(a,b){b=void 0===b?!0:b;if(this.l==mm)return Promise.reject(om());var c=Ok();c.mediaElement=a;Oc()||(b=!1);var d=b?this.Va:this.X;a=Sk(this.sa,function(){return{node:d,payload:c,Jb:!1}});a.mc=function(){};return pm(a)};q.mf=function(a){this.hf=a};q.detach=function(){var a=this;if(this.l==mm)return Promise.reject(om());var b=Sk(this.sa,function(){return{node:a.P,payload:Ok(),Jb:!1}});b.mc=function(){};return pm(b)};
426
- q.Ye=function(a){var b=this;a=void 0===a?!0:a;if(this.l==mm)return Promise.reject(om());this.Kc=!1;Oc()||(a=!1);jm(this);var c=Ok(),d=Sk(this.sa,function(e){var f=e.mediaElement&&a?b.Va:e.mediaElement?b.X:b.P;c.mediaElement=e.mediaElement;return{node:f,payload:c,Jb:!1}});d.mc=function(){};return pm(d)};q.Nh=function(a){this.Qc=a};
427
- q.load=function(a,b,c){var d=this;this.Qc=null;this.Kc=!1;if(this.l==mm)return Promise.reject(om());this.dispatchEvent(hm("loading"));var e=Ok();e.uri=a;e.Se=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=qm(this,e)?this.Xa:this.Z,g=Sk(this.sa,function(h){if(null==h.mediaElement)return null;e.mediaElement=h.mediaElement;return{node:f,payload:e,Jb:!0}});this.s=new Tl;this.U=rm(this);g.mc=function(){};return new Promise(function(h,k){g.Gd=function(){return k(new M(2,7,7002))};g.Ed=
428
- function(){h();d.dispatchEvent(hm("loaded"))};g.Qb=function(){return k(om())};g.onError=function(l){return k(l)}})};function qm(a,b){if(!Oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=ch(d),c=lm[c]);if(c){if(""==(b.mediaElement||Qc()).canPlayType(c))return!1;if(!Oc()||!(c in bh||ch(d)in dh)||a.h.streaming.preferNativeHls)return!0;if(Vc())return a.h.streaming.useNativeHlsOnSafari}return!1}
429
- function Yl(a,b,c){null==b.mediaElement&&(b.mediaElement=c.mediaElement,a.cb.o(b.mediaElement,"error",function(){var d=sm(a);d&&tm(a,d)}));a.g=b.mediaElement;return Promise.resolve()}
430
- function Zl(a,b){var c,d,e,f,g,h,k,l,m;return G(function(n){switch(n.g){case 1:return a.l!=mm&&(a.l=Ul),c=a.fb.map(function(p){return p()}),a.fb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(hm("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;b.mediaElement&&a.B.Rb();a.gf.stop();a.Wa&&(a.Wa.release(),a.Wa=null);a.Bd&&(a.Bd.stop(),a.Bd=null);if(!a.K){n.D(3);break}return u(n,a.K.stop(),4);case 4:a.K=null,a.Id=null;case 3:if(!a.C){n.D(5);break}return u(n,a.C.stop(),5);case 5:if(!a.j){n.D(7);
431
- break}return u(n,a.j.destroy(),8);case 8:a.j=null;case 7:a.J&&(a.J.release(),a.J=null);a.F&&(a.F.release(),a.F=null);if(!a.I){n.D(9);break}return u(n,a.I.destroy(),10);case 10:a.I=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.mediaElement||!b.mediaElement.src){n.D(11);break}return u(n,new Promise(function(p){return(new O(p)).R(.1)}),12);case 12:for(b.mediaElement.removeAttribute("src"),b.mediaElement.load();b.mediaElement.lastChild;)b.mediaElement.removeChild(b.mediaElement.firstChild);case 11:if(!a.m){n.D(13);
432
- break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.eb=null;a.O=null;if(a.i){d=r(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.s=new Tl;a.bf=null;um(a);B(n)}})}
433
- function $l(a,b){var c,d,e,f,g;return G(function(h){if(1==h.g)return c=a.h.textDisplayFactory,d=c(),a.bf=c,e=vm(b.mediaElement,d,function(k,l,m){wm(a,k,l,m)},a.M),e.configure(a.h.mediaSource),f=a.h.manifest,g=f.segmentRelativeVttTiming,e.J=g,u(h,e.K,2);a.I=e;B(h)})}
434
- function am(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.eb=d,f=a,u(h,ah(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Id=h.h;a.K=a.Id();g=ff(a.h.manifest);c.mediaElement&&"AUDIO"===c.mediaElement.nodeName&&(g.disableVideo=!0);a.K.configure(g);B(h)})}
435
- function bm(a,b){var c=b.uri;b=a.H;a.Kd=new dk(function(){return a.Ha()});a.Kd.addEventListener("regionadd",function(f){f=f.region;xm(a,"timelineregionadded",f);if(a.G)a.G.onDashTimedMetadata(f)});a.ia=null;a.h.streaming.observeQualityChanges&&(a.ia=new Zj(function(){return a.hb()}),a.ia.addEventListener("qualitychange",function(f){var g=f.quality;f=f.position;g=(new Map).set("mediaQuality",{bandwidth:g.bandwidth,audioSamplingRate:g.audioSamplingRate,codecs:g.codecs,contentType:g.contentType,frameRate:g.frameRate,
436
- height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(hm("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.U;try{h.g.enabled&&(h.s=g.format,tl(h,f,{ot:wl,su:!h.i}))}catch(k){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){jl(a.U,f,g)},filter:function(f){return ym(a,f)},makeTextStreamsForClosedCaptions:function(f){return zm(a,
437
- f)},onTimelineRegionAdded:function(f){var g=a.Kd;a:{var h=r(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new L("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return tm(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
438
- enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(f){var g=a.m?a.m.g:null;g&&a.m.C&&Am(a,g.keySystem,f)}},e=Date.now()/1E3;return new Ze(function(){var f,g,h,k;return G(function(l){if(1==l.g)return f=a,u(l,a.K.start(c,d),2);f.i=l.h;g=hm("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new M(2,4,4036);Bm(a.i);h=Date.now()/1E3;k=h-e;a.s.H=k;B(l)})}(),function(){return a.K.stop()})}
439
- function cm(a,b){var c,d;return G(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Cm(a,{Ob:a.H,onError:function(f){tm(a,f)},Fd:function(f){Dm(a,f)},onExpirationUpdated:function(f,g){Em(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.s.j=Date.now()/1E3-c,a.M&&(f=a.M,f.g&&f.h.classList.add("shaka-hidden")))}}),a.m.configure(a.h.drm),u(e,vg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Bc(b.mediaElement),3):u(e,ym(a,a.i),0)})}
440
- function dm(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,A,z;return G(function(D){switch(D.g){case 1:b.startTime=c.startTime;null!=a.Qc&&(b.startTime=a.Qc,a.Qc=null);d=b.mediaElement;e=b.uri;a.eb=e;a.J=new Vj({vd:function(){return d.playbackRate},sd:function(){return d.defaultPlaybackRate},Ne:function(E){d.playbackRate=E},Mf:function(E){d.currentTime+=E}});f=function(){return Fm(a)};g=function(){return Gm(a)};a.B.o(d,"playing",f);a.B.o(d,"pause",f);a.B.o(d,"ended",f);a.B.o(d,"ratechange",g);km(a,a.h);
441
- h=a.h.abrFactory;a.C&&a.Xe==h||(a.Xe=h,a.C=h(),"function"!=typeof a.C.setMediaElement&&(Fe("AbrManager","Please use an AbrManager with setMediaElement function."),a.C.setMediaElement=function(){}),a.C.configure(a.h.abr));a.za=new Oe(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ja=a.h.preferredTextLanguage;a.Ec=a.h.preferredTextRole;a.ub=a.h.preferForcedSubs;Hm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(E,F,H){a.j&&E!=a.j.l&&
442
- Im(a,E,!0,void 0===F?!1:F,void 0===H?0:H)});a.C.setMediaElement(d);Ld(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Jm(a);a.j.configure(a.h.streaming);a.l=Km;d.textTracks&&a.B.o(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Lm(a,E)}});a.dispatchEvent(hm("streaming"));k=null;(l=a.j.l)||(k=im(a));m=[];n=l||k;p=r([n.video,n.audio]);for(t=p.next();!t.done;t=p.next())(v=t.value)&&!v.segmentIndex&&
443
- m.push(v.createSegmentIndex());if(!(0<m.length)){D.D(2);break}return u(D,Promise.all(m),2);case 2:a.F=Mm(a,b.startTime);a.Wa=Nm(a);y=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Om(a,y);if(l){D.D(4);break}Im(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){D.D(5);break}w=a.F.jd();return u(D,Pm(k,w),6);case 6:x=D.h,a.F.ie(x);case 5:Qm(a,null,ne(k));case 4:return a.F.ge(),A=a.yb().find(function(E){return E.active}),A||((z=xe(a.i.textStreams,a.Ja,a.Ec,a.ub)[0]||null)&&Sl(a.s.h,z,!0),
444
- k&&(z?(k.audio&&Rm(a,k.audio,z)&&(a.aa=!0),a.aa&&a.I.m.setTextVisibility(!0),Sm(a)):a.aa=!1),z&&(a.h.streaming.alwaysStreamText||a.Nb())&&wk(a.j,z)),u(D,a.j.start(),7);case 7:a.h.abr.enabled&&(a.C.enable(),Tm(a)),be(a.j?a.j.l:null,a.i),Um(a.i),Vm(a),Wm(a),a.i.variants.some(function(E){return E.primary}),a.Kc=!0,a.B.Da(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Se}),B(D)}})}
445
- function em(a,b,c){var d,e,f,g,h,k,l;return G(function(m){return 1==m.g?(d=Jb,e=Date.now()/1E3,f=!0,a.m=Cm(a,{Ob:a.H,onError:function(n){tm(a,n)},Fd:function(n){Dm(a,n)},onExpirationUpdated:function(n,p){Em(a,n,p)},onEvent:function(n){a.dispatchEvent(n);"drmsessionupdate"==n.type&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=ch(g),k=lm[h],"application/x-mpegurl"==k&&Vc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
446
- primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Bd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ka,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
447
- a.m.U=!0,u(m,vg(a.m,[l],[]),2)):u(m,a.m.Bc(b.mediaElement),0)})}
448
- function fm(a,b,c){function d(){return Fm(a)}b.uri=c.uri;b.startTime=c.startTime;a.eb=b.uri;var e=b.mediaElement;a.F=new Jj(e);var f=!1;a.fb.push(function(){f=!0});null!=b.startTime&&a.F.ie(b.startTime);a.J=new Vj({vd:function(){return e.playbackRate},sd:function(){return e.defaultPlaybackRate},Ne:function(k){e.playbackRate=k},Mf:function(k){e.currentTime+=k}});Om(a,a.h.streaming.rebufferingGoal);a.B.o(e,"playing",d);a.B.o(e,"pause",d);a.B.o(e,"ended",d);a.B.o(e,"ratechange",function(){return Gm(a)});
449
- "none"!=e.preload&&a.B.Da(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Se});e.audioTracks&&(a.B.o(e.audioTracks,"addtrack",function(){return Vm(a)}),a.B.o(e.audioTracks,"removetrack",function(){return Vm(a)}),a.B.o(e.audioTracks,"change",function(){return Vm(a)}));e.textTracks&&(a.B.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Xm(a,k);break;case "chapters":Lm(a,k);break;default:Vm(a)}}),a.B.o(e.textTracks,"removetrack",function(){return Vm(a)}),
450
- a.B.o(e.textTracks,"change",function(){return Vm(a)}));var g=ch(b.uri);e.src=ul(a.U,b.uri,lm[g]);(Tc()||Sc("Web0S"))&&e.load();a.l=Ym;a.dispatchEvent(hm("streaming"));var h=new Lc;Aj(e,HTMLMediaElement.HAVE_METADATA,a.B,function(){a.F.ge();h.resolve()});Aj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.B,function(){var k;return G(function(l){if(1==l.g)return Zm(a),k=$m(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):u(l,new Promise(function(m){a.B.Da(e.textTracks,"change",m);(new O(m)).R(1)}),2);
451
- if(f)return l.return();an(a);B(l)})});e.error?h.reject(sm(a)):"none"==e.preload&&(Ta('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.'),h.resolve());a.B.Da(e,"error",function(){h.reject(sm(a))});return(new Ze(h,function(){h.reject(new M(2,7,7001));return Promise.resolve()})).ha(function(){a.Kc=!0})}
452
- function Zm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Md(b);var c=a.h.preferredVariantRole;""!=c&&a.Md(b,c)}}function an(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Ge(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Ge(b,d,c)}}
453
- function Xm(a,b){if("metadata"==b.kind){b.mode="hidden";a.B.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,bn(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new O(function(){var d=cn(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).ya().R(.5);a.fb.push(function(){c.stop()})}}
454
- function wm(a,b,c,d){b=r(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=r(e.frames),k=h.next();!k.done;k=h.next())bn(a,f,g,"org.id3",k.value);if(a.G)a.G.onHlsTimedMetadata(e,f)}}function bn(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(hm("metadata",b))}
455
- function Lm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).ya().R(.5);a.fb.push(function(){c.stop()})}}function Bm(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))}function Cm(a,b){return new og(b,a.h.drm.updateExpirationTime)}
456
- function Wl(a){return new kf(function(b,c){a.C&&a.C.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(hm("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(hm("downloadfailed",b))})}
457
- function Mm(a,b){return new Kj(a.g,a.i,a.h.streaming,b,function(){a.Wa&&Yj(a.Wa,!0);a.j&&a.j.Wc();a.O&&dn(a)},function(c){return a.dispatchEvent(c)})}
458
- function Nm(a){var b=new ek(a.Kd);b.addEventListener("enter",function(d){xm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){xm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(xm(a,"timelineregionenter",e),xm(a,"timelineregionexit",e))});var c=new Xj(a.g);c.g.add(b);a.ia&&c.g.add(a.ia);return c}function Om(a,b){a.O=new Se;a.O.g=Ue;Ve(a.O,b,Math.min(.5,b/2));um(a);a.Bd=(new O(function(){dn(a)})).ea(.25)}
459
- function dn(a){switch(a.l){case Ym:if(a.g.ended)var b=!0;else{var c=Di(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Km:a:if(a.g.ended||aj(a.I))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Ib();var d=Di(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Fi(a.g.buffered,a.g.currentTime);c=a.O;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Te:Ue;c.g=d;b!=d&&um(a)}function vm(a,b,c,d){return new Vi(a,b,c,d)}
460
- function rm(a){return new il({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},hb:function(){return a.hb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Oa:function(){return a.Oa()},xb:function(){return a.xb()},T:function(){return a.T()}},a.h.cmcd)}
461
- function Jm(a){return new kk(a.i,{ud:function(){return a.F?a.F.jd():0},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){jl(a.U,b,c)},V:a.I,Ob:a.H,onError:function(b){return tm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},nh:function(){a.K&&a.K.update&&a.K.update()},Ae:function(b,c,d){a.F&&a.F.Nf();dn(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(hm("segmentappended",b))},mh:function(b,c){(c=c.ve)&&a.ia&&
462
- bk(a.ia,c,b)},pf:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&["audio","video"].includes(b)){c=new Sf(Hc(c));var e=0,f=r(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=r(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Eg(d,"cenc",e);d=d.s}}else d=Promise.resolve();return d},oh:function(b,c,d){wm(a,b,c,d)}})}
463
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=El(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Fe("streaming.forceTransmuxTS configuration","Please Use streaming.forceTransmux instead."),a.streaming.forceTransmux=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=
464
- .01));var c=Ml(this.h,a,Vl(this));en(this);return c};
465
- function en(a){if(a.K){var b=ff(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.K.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{fn(a,a.i)}catch(f){tm(a,f)}a.C&&Wm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||gn(a)}a.H&&a.H.Le(a.h.streaming.forceHTTPS);if(a.I&&(a.I.configure(a.h.mediaSource),a.I.J=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.bf!=b)){var c=b(),d=a.I,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),
466
- e.destroy());d.g&&(d.g.i=c);a.bf=b;a.j&&(b=a.j,(c=b.j.get(Ib))&&uk(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),Tm(a));a.O&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ve(a.O,b,Math.min(.5,b/2)));a.i&&Hm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Vl(this);Ml(a,this.h,Vl(this));return a};
467
- q.yg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ha().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Ah=function(){for(var a in this.h)delete this.h[a];Ml(this.h,Vl(this),Vl(this));en(this)};q.Ff=function(){return this.l};q.Pg=function(){return this.g};q.Hc=function(){return this.H};q.le=function(){return this.eb};
413
+ minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1}};e.trackSelectionCallback=function(g){return G(function(h){return h.return(Nl(g,f.preferredAudioLanguage))})};return f}
414
+ function Ol(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:""}};return Fl(a,b,c||Ml(),d,"")}
415
+ function Nl(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=Vb(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return Mb(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
416
+ 2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=Ib&&"image"!=d.type||b.push(d);return b}I("shaka.util.PlayerConfiguration",Ll);Ll.mergeConfigObjects=Ol;Ll.createDefault=Ml;function Pl(){this.g=null;this.h=[]}function Ql(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Rl(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}
417
+ function Sl(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 Tl(){this.i=this.h=null;this.g=[]}function Ul(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 Vl(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.O=this.P=this.J=this.K=this.M=this.l=this.s=NaN;this.g=new Pl;this.h=new Tl};function S(a,b){fb.call(this);var c=this;this.l=Wl;this.yd=this.g=null;this.aa=!1;this.Hd=new xf;this.eb=new xf;this.B=new xf;this.fb=this.i=this.Id=this.K=this.j=this.ia=this.M=this.hf=this.V=this.Kd=this.O=this.Bd=this.J=this.Xa=this.F=this.I=this.m=this.H=null;this.Kc=!1;this.Xe=this.C=null;this.df=1E9;this.h=Xl(this);this.Nc={width:Infinity,height:Infinity};this.s=null;this.za=new Oe(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.La=this.h.preferredTextLanguage;
418
+ this.Ec=this.h.preferredTextRole;this.ub=this.h.preferForcedSubs;this.gb=[];this.Qc=null;b&&b(this);this.H=Yl(this);this.H.Le(this.h.streaming.forceHTTPS);this.G=null;Zl&&(this.G=Zl());this.Hd.o(window,"online",function(){c.De()});this.P={name:"detach"};this.X={name:"attach"};this.$={name:"unload"};this.ef={name:"manifest-parser"};this.cf={name:"manifest"};this.Wa={name:"media-source"};this.$e={name:"drm-engine"};this.Z={name:"load"};this.fe={name:"src-equals-drm-engine"};this.Ya={name:"src-equals"};
419
+ var d=new Map;d.set(this.X,function(e,f){return cf($l(c,e,f))});d.set(this.P,function(e){e.mediaElement&&(c.eb.Rb(),e.mediaElement=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return cf(e)});d.set(this.$,function(e){return cf(am(c,e))});d.set(this.Wa,function(e){e=bm(c,e);return cf(e)});d.set(this.ef,function(e,f){e=cm(c,e,f);return cf(e)});d.set(this.cf,function(e){return dm(c,e)});d.set(this.$e,function(e){e=em(c,e);return cf(e)});d.set(this.Z,function(e,f){return cf(fm(c,e,f))});d.set(this.fe,
420
+ function(e,f){e=gm(c,e,f);return cf(e)});d.set(this.Ya,function(e,f){return hm(c,e,f)});this.sa=new Pk(this.P,{Qg:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.X);e==c.X&&(k=g==c.P||f.mediaElement!=h.mediaElement?c.P:g==c.X?c.X:g==c.Wa||g==c.Z?c.Wa:g==c.Ya?c.fe:null);e==c.Wa&&(k=g==c.Z&&f.mediaElement==h.mediaElement?c.ef:c.$);e==c.ef&&(k=im(c.Z,c.cf,c.$,g,f,h));e==c.cf&&(k=im(c.Z,c.$e,c.$,g,f,h));e==c.$e&&(k=im(c.Z,c.Z,c.$,g,f,h));e==c.fe&&(k=g==c.Ya&&f.mediaElement==h.mediaElement?c.Ya:c.$);
421
+ if(e==c.Z||e==c.Ya)k=c.$;e==c.$&&(k=h.mediaElement&&f.mediaElement==h.mediaElement?c.X:c.P);return k},vg:function(e,f,g){c.dispatchEvent(jm("onstatechange",(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return G(function(f){return 1==f.g?u(f,am(c,e),2):f.return(e.mediaElement?c.X:c.P)})},lh:function(e){c.dispatchEvent(jm("onstateidle",(new Map).set("state",e.name)))}});this.gf=new O(function(){Zd(c.i.variants,c.h.restrictions,c.Nc)&&km(c)});a&&this.Bc(a,!0)}pa(S,fb);
422
+ function lm(a){null!=a.M&&(a.M.release(),a.M=null)}function mm(a,b){if(b.lcevc.enabled){var c=a.Qa();c&&c[0]&&c[0].videoMimeType==nm.ts&&(navigator.userAgent.match(/Edge?\//)||navigator.userAgent.match(/Edge\//))&&(b.streaming.forceTransmux||Ta("LCEVC Warning: For MPEG-2 TS decoding the config.streaming.forceTransmux must be enabled."));lm(a);null==a.M&&(a.M=new Qi(a.g,a.hf,b.lcevc),a.I&&(a.I.G=a.M))}else lm(a)}function jm(a,b){return new L(a,b)}q=S.prototype;
423
+ q.destroy=function(){var a=this,b;return G(function(c){switch(c.g){case 1:if(a.l==om)return c.return();lm(a);a.l=om;b=Uk(a.sa,function(){return{node:a.P,payload:Qk(),Jb:!1}});return u(c,new Promise(function(d){b.mc=function(){};b.Ed=function(){d()};b.Qb=function(){d()};b.onError=function(){d()};b.Gd=function(){d()}}),2);case 2:return u(c,a.sa.destroy(),3);case 3:a.Hd&&(a.Hd.release(),a.Hd=null);a.eb&&(a.eb.release(),a.eb=null);a.B&&(a.B.release(),a.B=null);a.Xe=null;a.C=null;a.h=null;a.s=null;a.yd=
424
+ null;a.V=null;if(!a.H){c.D(4);break}return u(c,a.H.destroy(),5);case 5:a.H=null;case 4:fb.prototype.release.call(a),B(c)}})};
425
+ function pm(){window.Promise||Ta("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Sc("Trident/"))return!1;var a=Xc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Oc()?!0:Pc("application/x-mpegurl")}
426
+ q.Bc=function(a,b){b=void 0===b?!0:b;if(this.l==om)return Promise.reject(qm());var c=Qk();c.mediaElement=a;Oc()||(b=!1);var d=b?this.Wa:this.X;a=Uk(this.sa,function(){return{node:d,payload:c,Jb:!1}});a.mc=function(){};return rm(a)};q.mf=function(a){this.hf=a};q.detach=function(){var a=this;if(this.l==om)return Promise.reject(qm());var b=Uk(this.sa,function(){return{node:a.P,payload:Qk(),Jb:!1}});b.mc=function(){};return rm(b)};
427
+ q.Ye=function(a){var b=this;a=void 0===a?!0:a;if(this.l==om)return Promise.reject(qm());this.Kc=!1;Oc()||(a=!1);lm(this);var c=Qk(),d=Uk(this.sa,function(e){var f=e.mediaElement&&a?b.Wa:e.mediaElement?b.X:b.P;c.mediaElement=e.mediaElement;return{node:f,payload:c,Jb:!1}});d.mc=function(){};return rm(d)};q.Nh=function(a){this.Qc=a};
428
+ q.load=function(a,b,c){var d=this;this.Qc=null;this.Kc=!1;if(this.l==om)return Promise.reject(qm());this.dispatchEvent(jm("loading"));var e=Qk();e.uri=a;e.Se=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=sm(this,e)?this.Ya:this.Z,g=Uk(this.sa,function(h){if(null==h.mediaElement)return null;e.mediaElement=h.mediaElement;return{node:f,payload:e,Jb:!0}});this.s=new Vl;this.V=tm(this);g.mc=function(){};return new Promise(function(h,k){g.Gd=function(){return k(new M(2,7,7002))};g.Ed=
429
+ function(){h();d.dispatchEvent(jm("loaded"))};g.Qb=function(){return k(qm())};g.onError=function(l){return k(l)}})};function sm(a,b){if(!Oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=ch(d),c=nm[c]);if(c){if(""==(b.mediaElement||Qc()).canPlayType(c))return!1;if(!Oc()||!(c in bh||ch(d)in dh)||a.h.streaming.preferNativeHls)return!0;if(Vc())return a.h.streaming.useNativeHlsOnSafari}return!1}
430
+ function $l(a,b,c){null==b.mediaElement&&(b.mediaElement=c.mediaElement,a.eb.o(b.mediaElement,"error",function(){var d=um(a);d&&vm(a,d)}));a.g=b.mediaElement;return Promise.resolve()}
431
+ function am(a,b){var c,d,e,f,g,h,k,l,m;return G(function(p){switch(p.g){case 1:return a.l!=om&&(a.l=Wl),c=a.gb.map(function(n){return n()}),a.gb=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent(jm("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;b.mediaElement&&a.B.Rb();a.gf.stop();a.Xa&&(a.Xa.release(),a.Xa=null);a.Bd&&(a.Bd.stop(),a.Bd=null);if(!a.K){p.D(3);break}return u(p,a.K.stop(),4);case 4:a.K=null,a.Id=null;case 3:if(!a.C){p.D(5);break}return u(p,a.C.stop(),5);case 5:if(!a.j){p.D(7);
432
+ break}return u(p,a.j.destroy(),8);case 8:a.j=null;case 7:a.J&&(a.J.release(),a.J=null);a.F&&(a.F.release(),a.F=null);if(!a.I){p.D(9);break}return u(p,a.I.destroy(),10);case 10:a.I=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.mediaElement||!b.mediaElement.src){p.D(11);break}return u(p,new Promise(function(n){return(new O(n)).R(.1)}),12);case 12:for(b.mediaElement.removeAttribute("src"),b.mediaElement.load();b.mediaElement.lastChild;)b.mediaElement.removeChild(b.mediaElement.firstChild);case 11:if(!a.m){p.D(13);
433
+ break}return u(p,a.m.destroy(),14);case 14:a.m=null;case 13:a.fb=null;a.O=null;if(a.i){d=r(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.s=new Vl;a.bf=null;wm(a);B(p)}})}
434
+ function bm(a,b){var c,d,e,f,g;return G(function(h){if(1==h.g)return c=a.h.textDisplayFactory,d=c(),a.bf=c,e=xm(b.mediaElement,d,function(k,l,m){ym(a,k,l,m)},a.M),e.configure(a.h.mediaSource),f=a.h.manifest,g=f.segmentRelativeVttTiming,e.J=g,u(h,e.K,2);a.I=e;B(h)})}
435
+ function cm(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.fb=d,f=a,u(h,ah(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Id=h.h;a.K=a.Id();g=ff(a.h.manifest);c.mediaElement&&"AUDIO"===c.mediaElement.nodeName&&(g.disableVideo=!0);a.K.configure(g);B(h)})}
436
+ function dm(a,b){var c=b.uri;b=a.H;a.Kd=new fk(function(){return a.Ja()});a.Kd.addEventListener("regionadd",function(f){f=f.region;zm(a,"timelineregionadded",f);if(a.G)a.G.onDashTimedMetadata(f)});a.ia=null;a.h.streaming.observeQualityChanges&&(a.ia=new bk(function(){return a.ib()}),a.ia.addEventListener("qualitychange",function(f){var g=f.quality;f=f.position;g=(new Map).set("mediaQuality",{bandwidth:g.bandwidth,audioSamplingRate:g.audioSamplingRate,codecs:g.codecs,contentType:g.contentType,frameRate:g.frameRate,
437
+ height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(jm("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.V;try{h.g.enabled&&(h.s=g.format,vl(h,f,{ot:yl,su:!h.i}))}catch(k){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){ll(a.V,f,g)},filter:function(f){return Am(a,f)},makeTextStreamsForClosedCaptions:function(f){return Bm(a,
438
+ f)},onTimelineRegionAdded:function(f){var g=a.Kd;a:{var h=r(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new L("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return vm(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
439
+ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(f){var g=a.m?a.m.g:null;g&&a.m.C&&Cm(a,g.keySystem,f)}},e=Date.now()/1E3;return new Ze(function(){var f,g,h,k;return G(function(l){if(1==l.g)return f=a,u(l,a.K.start(c,d),2);f.i=l.h;g=jm("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new M(2,4,4036);Dm(a.i);h=Date.now()/1E3;k=h-e;a.s.H=k;B(l)})}(),function(){return a.K.stop()})}
440
+ function em(a,b){var c,d;return G(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Em(a,{Ob:a.H,onError:function(f){vm(a,f)},Fd:function(f){Fm(a,f)},onExpirationUpdated:function(f,g){Gm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.s.j=Date.now()/1E3-c,a.M&&(f=a.M,f.g&&f.h.classList.add("shaka-hidden")))}}),a.m.configure(a.h.drm),u(e,vg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Bc(b.mediaElement),3):u(e,Am(a,a.i),0)})}
441
+ function fm(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,A,z;return G(function(C){switch(C.g){case 1:b.startTime=c.startTime;null!=a.Qc&&(b.startTime=a.Qc,a.Qc=null);d=b.mediaElement;e=b.uri;a.fb=e;a.J=new Xj({vd:function(){return d.playbackRate},sd:function(){return d.defaultPlaybackRate},Ne:function(E){d.playbackRate=E},Mf:function(E){d.currentTime+=E}});f=function(){return Hm(a)};g=function(){return Im(a)};a.B.o(d,"playing",f);a.B.o(d,"pause",f);a.B.o(d,"ended",f);a.B.o(d,"ratechange",g);mm(a,a.h);
442
+ h=a.h.abrFactory;a.C&&a.Xe==h||(a.Xe=h,a.C=h(),"function"!=typeof a.C.setMediaElement&&(Fe("AbrManager","Please use an AbrManager with setMediaElement function."),a.C.setMediaElement=function(){}),a.C.configure(a.h.abr));a.za=new Oe(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.La=a.h.preferredTextLanguage;a.Ec=a.h.preferredTextRole;a.ub=a.h.preferForcedSubs;Jm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(E,F,H){a.j&&E!=a.j.l&&
443
+ Km(a,E,!0,void 0===F?!1:F,void 0===H?0:H)});a.C.setMediaElement(d);Ld(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Lm(a);a.j.configure(a.h.streaming);a.l=Mm;d.textTracks&&a.B.o(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Nm(a,E)}});a.dispatchEvent(jm("streaming"));k=null;(l=a.j.l)||(k=km(a));m=[];p=l||k;n=r([p.video,p.audio]);for(t=n.next();!t.done;t=n.next())(v=t.value)&&!v.segmentIndex&&
444
+ m.push(v.createSegmentIndex());if(!(0<m.length)){C.D(2);break}return u(C,Promise.all(m),2);case 2:a.F=Om(a,b.startTime);a.Xa=Pm(a);y=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Qm(a,y);if(l){C.D(4);break}Km(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){C.D(5);break}w=a.F.jd();return u(C,Rm(k,w),6);case 6:x=C.h,a.F.ie(x);case 5:Sm(a,null,ne(k));case 4:return a.F.ge(),A=a.yb().find(function(E){return E.active}),A||((z=xe(a.i.textStreams,a.La,a.Ec,a.ub)[0]||null)&&Ul(a.s.h,z,!0),
445
+ k&&(z?(k.audio&&Tm(a,k.audio,z)&&(a.aa=!0),a.aa&&a.I.m.setTextVisibility(!0),Um(a)):a.aa=!1),z&&(a.h.streaming.alwaysStreamText||a.Nb())&&yk(a.j,z)),u(C,a.j.start(),7);case 7:a.h.abr.enabled&&(a.C.enable(),Vm(a)),be(a.j?a.j.l:null,a.i),Wm(a.i),Xm(a),Ym(a),a.i.variants.some(function(E){return E.primary}),a.Kc=!0,a.B.Da(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Se}),B(C)}})}
446
+ function gm(a,b,c){var d,e,f,g,h,k,l;return G(function(m){return 1==m.g?(d=Jb,e=Date.now()/1E3,f=!0,a.m=Em(a,{Ob:a.H,onError:function(p){vm(a,p)},Fd:function(p){Fm(a,p)},onExpirationUpdated:function(p,n){Gm(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=ch(g),k=nm[h],"application/x-mpegurl"==k&&Vc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
447
+ primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Bd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
448
+ a.m.V=!0,u(m,vg(a.m,[l],[]),2)):u(m,a.m.Bc(b.mediaElement),0)})}
449
+ function hm(a,b,c){function d(){return Hm(a)}b.uri=c.uri;b.startTime=c.startTime;a.fb=b.uri;var e=b.mediaElement;a.F=new Lj(e);var f=!1;a.gb.push(function(){f=!0});null!=b.startTime&&a.F.ie(b.startTime);a.J=new Xj({vd:function(){return e.playbackRate},sd:function(){return e.defaultPlaybackRate},Ne:function(k){e.playbackRate=k},Mf:function(k){e.currentTime+=k}});Qm(a,a.h.streaming.rebufferingGoal);a.B.o(e,"playing",d);a.B.o(e,"pause",d);a.B.o(e,"ended",d);a.B.o(e,"ratechange",function(){return Im(a)});
450
+ "none"!=e.preload&&a.B.Da(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Se});e.audioTracks&&(a.B.o(e.audioTracks,"addtrack",function(){return Xm(a)}),a.B.o(e.audioTracks,"removetrack",function(){return Xm(a)}),a.B.o(e.audioTracks,"change",function(){return Xm(a)}));e.textTracks&&(a.B.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Zm(a,k);break;case "chapters":Nm(a,k);break;default:Xm(a)}}),a.B.o(e.textTracks,"removetrack",function(){return Xm(a)}),
451
+ a.B.o(e.textTracks,"change",function(){return Xm(a)}));var g=ch(b.uri);e.src=wl(a.V,b.uri,nm[g]);(Tc()||Sc("Web0S"))&&e.load();a.l=$m;a.dispatchEvent(jm("streaming"));var h=new Lc;Cj(e,HTMLMediaElement.HAVE_METADATA,a.B,function(){a.F.ge();h.resolve()});Cj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.B,function(){var k;return G(function(l){if(1==l.g)return an(a),k=bn(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):u(l,new Promise(function(m){a.B.Da(e.textTracks,"change",m);(new O(m)).R(1)}),2);
452
+ if(f)return l.return();cn(a);B(l)})});e.error?h.reject(um(a)):"none"==e.preload&&(Ta('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.'),h.resolve());a.B.Da(e,"error",function(){h.reject(um(a))});return(new Ze(h,function(){h.reject(new M(2,7,7001));return Promise.resolve()})).ha(function(){a.Kc=!0})}
453
+ function an(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Md(b);var c=a.h.preferredVariantRole;""!=c&&a.Md(b,c)}}function cn(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Ge(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Ge(b,d,c)}}
454
+ function Zm(a,b){if("metadata"==b.kind){b.mode="hidden";a.B.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,dn(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new O(function(){var d=en(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).ya().R(.5);a.gb.push(function(){c.stop()})}}
455
+ function ym(a,b,c,d){b=r(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=r(e.frames),k=h.next();!k.done;k=h.next())dn(a,f,g,"org.id3",k.value);if(a.G)a.G.onHlsTimedMetadata(e,f)}}function dn(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(jm("metadata",b))}
456
+ function Nm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).ya().R(.5);a.gb.push(function(){c.stop()})}}function Dm(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))}function Em(a,b){return new og(b,a.h.drm.updateExpirationTime)}
457
+ function Yl(a){return new kf(function(b,c){a.C&&a.C.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(jm("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(jm("downloadfailed",b))})}
458
+ function Om(a,b){return new Mj(a.g,a.i,a.h.streaming,b,function(){a.Xa&&ak(a.Xa,!0);a.j&&a.j.Wc();a.O&&fn(a)},function(c){return a.dispatchEvent(c)})}
459
+ function Pm(a){var b=new gk(a.Kd);b.addEventListener("enter",function(d){zm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){zm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(zm(a,"timelineregionenter",e),zm(a,"timelineregionexit",e))});var c=new Zj(a.g);c.g.add(b);a.ia&&c.g.add(a.ia);return c}function Qm(a,b){a.O=new Se;a.O.g=Ue;Ve(a.O,b,Math.min(.5,b/2));wm(a);a.Bd=(new O(function(){fn(a)})).ea(.25)}
460
+ function fn(a){switch(a.l){case $m:if(a.g.ended)var b=!0;else{var c=Di(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Mm:a:if(a.g.ended||aj(a.I))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Ib();var d=Di(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Fi(a.g.buffered,a.g.currentTime);c=a.O;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Te:Ue;c.g=d;b!=d&&wm(a)}function xm(a,b,c,d){return new Vi(a,b,c,d)}
461
+ function tm(a){return new kl({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},ib:function(){return a.ib()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Qa:function(){return a.Qa()},xb:function(){return a.xb()},T:function(){return a.T()}},a.h.cmcd)}
462
+ function Lm(a){return new mk(a.i,{ud:function(){return a.F?a.F.jd():0},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){ll(a.V,b,c)},U:a.I,Ob:a.H,onError:function(b){return vm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},nh:function(){a.K&&a.K.update&&a.K.update()},Ae:function(b,c,d){a.F&&a.F.Nf();fn(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(jm("segmentappended",b))},mh:function(b,c){(c=c.ve)&&a.ia&&
463
+ dk(a.ia,c,b)},pf:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&["audio","video"].includes(b)){c=new Sf(Hc(c));var e=0,f=r(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=r(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Eg(d,"cenc",e);d=d.s}}else d=Promise.resolve();return d},oh:function(b,c,d){ym(a,b,c,d)}})}
464
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Gl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Fe("streaming.forceTransmuxTS configuration","Please Use streaming.forceTransmux instead."),a.streaming.forceTransmux=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=
465
+ .01));var c=Ol(this.h,a,Xl(this));gn(this);return c};
466
+ function gn(a){if(a.K){var b=ff(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.K.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{hn(a,a.i)}catch(f){vm(a,f)}a.C&&Ym(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||jn(a)}a.H&&a.H.Le(a.h.streaming.forceHTTPS);if(a.I&&(a.I.configure(a.h.mediaSource),a.I.J=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.bf!=b)){var c=b(),d=a.I,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),
467
+ e.destroy());d.g&&(d.g.i=c);a.bf=b;a.j&&(b=a.j,(c=b.j.get(Ib))&&wk(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),Vm(a));a.O&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ve(a.O,b,Math.min(.5,b/2)));a.i&&Jm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Xl(this);Ol(a,this.h,Xl(this));return a};
468
+ q.yg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ja().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Ah=function(){for(var a in this.h)delete this.h[a];Ol(this.h,Xl(this),Xl(this));gn(this)};q.Ff=function(){return this.l};q.Pg=function(){return this.g};q.Hc=function(){return this.H};q.le=function(){return this.fb};
468
469
  q.rd=function(){return this.G?this.G:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Lb=function(){return this.i?this.i.presentationTimeline.Lb():!1};q.hc=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
469
- q.Ha=function(){if(!this.Kc)return{start:0,end:0};if(this.i){var a=this.i.presentationTimeline;return{start:a.dc(),end:a.ib()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.ah=function(){this.T()&&(this.g.currentTime=this.Ha().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Gc=function(){return this.m?this.m.Gc():Infinity};
470
- q.td=function(){return this.m?this.m.td():{}};q.Pc=function(){return this.O?this.O.g==Ue:!1};q.xb=function(){return this.g?this.J?this.J.i:1:0};q.We=function(a){0==a?Ta("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.J.set(a),this.l==Km&&(this.C.playbackRateChanged(a),tk(this.j,1<Math.abs(a))))};q.rf=function(){var a=this.J.sd();this.l==Ym&&this.J.set(a);this.l==Km&&(this.J.set(a),this.C.playbackRateChanged(a),tk(this.j,!1))};
471
- q.Oa=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,ve(e)){var f=ne(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return ue(g)}):[]};
472
- q.yb=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=oe(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?$m(this).map(function(f){return se(f)}):[]};q.Hg=function(){return this.i?this.i.imageStreams.map(function(a){return pe(a)}):[]};
473
- q.Xg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,A,z,D,E,F;return G(function(H){if(1==H.g)return c.i?(d=c.i.imageStreams.find(function(J){return J.id==a}))?d.segmentIndex?H.D(3):u(H,d.createSegmentIndex(),3):H.return(null):H.D(2);if(2!=H.g){e=d.segmentIndex.find(b);if(null==e)return H.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return H.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;t=l/n;v=m*n;
474
- y=f.j-f.startTime;w=f.s||y/v;x=f.startTime;z=A=0;1<v&&(D=Math.floor((b-f.startTime)/w),x=f.startTime+D*w,A=D%m*p,z=Math.floor(D/m)*t);E=!1;if(F=f.m)E=!0,t=F.height,A=F.positionX,z=F.positionY,p=F.width;return H.return({imageHeight:l,imageWidth:k,height:t,positionX:A,positionY:z,startTime:x,duration:w,uris:f.Na(),width:p,sprite:E})}return H.return(null)})};
475
- q.He=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Sl(this.s.h,b,!1),wk(this.j,b),hn(this),this.Ja=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=$m(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,qe(c)==a.id?c.mode=this.aa?"showing":"hidden":c.mode="disabled";hn(this)}};
476
- q.Ie=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ta("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&ve(d)&&(Im(this,d,!1,b,c),this.za=new Ne(d),Wm(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
477
- qe(c)==a.id){jn(this,c);break}};q.xg=function(){return kn(this.Oa())};q.Vg=function(){return kn(this.yb())};q.wg=function(){return Array.from(ln(this.Oa()))};q.Ug=function(){return Array.from(ln(this.yb()))};
478
- q.Md=function(a,b,c){c=void 0===c?0:c;if(this.i&&this.F){this.za=new Oe(a,b||"",c,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var d=this.za.create(this.i.variants);c=null;d=r(d.values());for(var e=d.next();!e.done;e=d.next())if(e=e.value,!c||b(c,a)>b(e,a))c=e;c?(b=ne(c),this.Ie(b,!0)):gn(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
479
- a=Mb(a);d=c=null;e=r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=ue(f);Mb(g.language)==a&&(c=f,b?g.roles.includes(b)&&(d=f):0==g.roles.length&&(d=f))}d?jn(this,d):c&&jn(this,c)}};
480
- q.Ge=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Ja=a,this.Ec=b||"",this.ub=c,(a=xe(this.i.textStreams,this.Ja,this.Ec,this.ub)[0]||null)&&a!=this.j.s&&(Sl(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.Nb()))wk(this.j,a),hn(this)}else{var d=Mb(a);(a=this.yb().find(function(e){return Mb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.He(a)}};
481
- q.Dh=function(a){if(this.i&&this.F){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.za=new Oe(b.language,"",0,a),gn(this))}};q.Nb=function(){var a=this.aa;return this.I?this.I.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?$m(this).some(function(b){return"showing"==b.mode}):a};q.Df=function(){return this.g&&this.g.src&&this.g.textTracks?mn(this).map(function(a){return se(a)}):[]};
482
- q.Ag=function(a){var b=Mb(a),c=mn(this).filter(function(g){return Mb(g.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.id;f&&""!=f||(f=e.startTime+"-"+e.endTime+"-"+e.text);a.push({id:f,title:e.text,startTime:e.startTime,endTime:e.endTime})}}return a};
483
- function $m(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function cn(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function mn(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
484
- q.Qe=function(a){a=!!a;if(this.aa!=a){this.aa=a;if(this.l==Km)this.I.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=xe(this.i.textStreams,this.Ja,this.Ec,this.ub),0<a.length&&(wk(this.j,a[0]),hn(this))):sk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=$m(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Sm(this)}};
470
+ q.Ja=function(){if(!this.Kc)return{start:0,end:0};if(this.i){var a=this.i.presentationTimeline;return{start:a.dc(),end:a.jb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.ah=function(){this.T()&&(this.g.currentTime=this.Ja().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Gc=function(){return this.m?this.m.Gc():Infinity};
471
+ q.td=function(){return this.m?this.m.td():{}};q.Pc=function(){return this.O?this.O.g==Ue:!1};q.xb=function(){return this.g?this.J?this.J.i:1:0};q.We=function(a){0==a?Ta("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.J.set(a),this.l==Mm&&(this.C.playbackRateChanged(a),vk(this.j,1<Math.abs(a))))};q.rf=function(){var a=this.J.sd();this.l==$m&&this.J.set(a);this.l==Mm&&(this.J.set(a),this.C.playbackRateChanged(a),vk(this.j,!1))};
472
+ q.Qa=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,ve(e)){var f=ne(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return ue(g)}):[]};
473
+ q.yb=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=oe(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?bn(this).map(function(f){return se(f)}):[]};q.Hg=function(){return this.i?this.i.imageStreams.map(function(a){return pe(a)}):[]};
474
+ q.Xg=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,A,z,C,E,F;return G(function(H){if(1==H.g)return c.i?(d=c.i.imageStreams.find(function(J){return J.id==a}))?d.segmentIndex?H.D(3):u(H,d.createSegmentIndex(),3):H.return(null):H.D(2);if(2!=H.g){e=d.segmentIndex.find(b);if(null==e)return H.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return H.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;t=l/p;v=m*p;
475
+ y=f.j-f.startTime;w=f.B||y/v;x=f.startTime;z=A=0;1<v&&(C=Math.floor((b-f.startTime)/w),x=f.startTime+C*w,A=C%m*n,z=Math.floor(C/m)*t);E=!1;if(F=f.s)E=!0,t=F.height,A=F.positionX,z=F.positionY,n=F.width;return H.return({imageHeight:l,imageWidth:k,height:t,positionX:A,positionY:z,startTime:x,duration:w,uris:f.Pa(),width:n,sprite:E})}return H.return(null)})};
476
+ q.He=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Ul(this.s.h,b,!1),yk(this.j,b),kn(this),this.La=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=bn(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,qe(c)==a.id?c.mode=this.aa?"showing":"hidden":c.mode="disabled";kn(this)}};
477
+ q.Ie=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ta("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&ve(d)&&(Km(this,d,!1,b,c),this.za=new Ne(d),Ym(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
478
+ qe(c)==a.id){ln(this,c);break}};q.xg=function(){return mn(this.Qa())};q.Vg=function(){return mn(this.yb())};q.wg=function(){return Array.from(nn(this.Qa()))};q.Ug=function(){return Array.from(nn(this.yb()))};
479
+ q.Md=function(a,b,c){c=void 0===c?0:c;if(this.i&&this.F){this.za=new Oe(a,b||"",c,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var d=this.za.create(this.i.variants);c=null;d=r(d.values());for(var e=d.next();!e.done;e=d.next())if(e=e.value,!c||b(c,a)>b(e,a))c=e;c?(b=ne(c),this.Ie(b,!0)):jn(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
480
+ a=Mb(a);d=c=null;e=r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=ue(f);Mb(g.language)==a&&(c=f,b?g.roles.includes(b)&&(d=f):0==g.roles.length&&(d=f))}d?ln(this,d):c&&ln(this,c)}};
481
+ q.Ge=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.La=a,this.Ec=b||"",this.ub=c,(a=xe(this.i.textStreams,this.La,this.Ec,this.ub)[0]||null)&&a!=this.j.s&&(Ul(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.Nb()))yk(this.j,a),kn(this)}else{var d=Mb(a);(a=this.yb().find(function(e){return Mb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.He(a)}};
482
+ q.Dh=function(a){if(this.i&&this.F){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.za=new Oe(b.language,"",0,a),jn(this))}};q.Nb=function(){var a=this.aa;return this.I?this.I.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?bn(this).some(function(b){return"showing"==b.mode}):a};q.Df=function(){return this.g&&this.g.src&&this.g.textTracks?on(this).map(function(a){return se(a)}):[]};
483
+ q.Ag=function(a){var b=Mb(a),c=on(this).filter(function(h){return Mb(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=r(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=r(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
484
+ function bn(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function en(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function on(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
485
+ q.Qe=function(a){a=!!a;if(this.aa!=a){this.aa=a;if(this.l==Mm)this.I.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=xe(this.i.textStreams,this.La,this.Ec,this.ub),0<a.length&&(yk(this.j,a[0]),kn(this))):uk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=bn(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Um(this)}};
485
486
  q.Rg=function(){if(!this.T())return null;var a=this.sa.l,b=0;if(this.F)b=this.F.jd();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.i+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
486
- q.Gf=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.hb=function(){if(this.l==Km)return this.I.hb();var a={total:[],audio:[],video:[],text:[]};this.l==Ym&&(a.total=Gi(this.g.buffered));return a};
487
- q.getStats=function(){if(this.l!=Km&&this.l!=Ym)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Fm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=
488
- Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.s.O=this.F.jf(),this.s.P=this.F.kf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.K=d;this.s.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.J?c.J:NaN):c=NaN;this.s.B=c;if(this.l==Km){if(c=this.j.l)this.s.F=(this.J?this.J.i:1)*c.bandwidth;c&&c.video&&(b=this.s,d=c.video.height||NaN,b.s=c.video.width||NaN,b.l=d);this.T()&&(c=this.Gf().valueOf()+
489
- 1E3*this.Ha().end,this.s.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.I=this.i.presentationTimeline.g);c=this.C.getBandwidthEstimate();this.s.C=c}this.l==Ym&&(c=this.s,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var e=this.s;a=e.s;c=e.l;b=e.F;d=e.K;var f=e.M,g=e.J,h=e.P,k=e.O,l=e.C,m=e.i,n=e.m,p=e.H,t=e.j,v=Pl(e.g,"playing"),y=Pl(e.g,"paused"),w=Pl(e.g,"buffering"),x=e.B,A=e.G,z=e.I,D=Ql(e.g),E=[];e=r(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,E.push({timestamp:F.timestamp,
490
- id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:t,playTime:v,pauseTime:y,bufferingTime:w,licenseTime:x,liveLatency:A,maxSegmentDuration:z,stateHistory:D,switchHistory:E}};
491
- q.jg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,y,w,x,A;return G(function(z){switch(z.g){case 1:if(h.l!=Km&&h.l!=Ym)throw new M(1,7,7004);if(d){z.D(2);break}return u(z,nn(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(D){}if(h.l!=Ym){z.D(4);break}g&&(c="forced");return u(z,on(h,a,b,c,d,f||"",k),5);case 5:l=h.yb();if(m=l.find(function(D){return D.language==b&&D.label==(f||"")&&D.kind==c}))return Vm(h),z.return(m);throw new M(1,2,2012);case 4:n=
492
- Jb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new M(1,4,4033);if(!k.length){z.D(6);break}return u(z,pn(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,v=qn(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=Yi(y),d="text/vtt";case 6:w={id:h.df++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Tj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.ka,primary:!1,trickModeVideo:null,
493
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=xd(w.mimeType,w.codecs);A=Dd(x);if(!A)throw new M(2,2,2014,d);h.i.textStreams.push(w);Vm(h);return z.return(oe(w))}})};
494
- q.kg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,A;return G(function(z){switch(z.g){case 1:if(c.l!=Km&&c.l!=Ym)throw new M(1,7,7004);if(c.l==Ym)throw new M(1,2,2016);if(b){z.D(2);break}return u(z,nn(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new M(1,2,2017,a);d=Jb;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new M(1,4,4045);return u(z,pn(c,a,c.H,c.h.streaming.retryParameters),4);case 4:f=z.h;g=Ed[b];if(!g)throw new M(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
495
- segmentEnd:e,vttOffset:0};l=Hc(f);m=h.parseMedia(l,k);n=[];p={};t=r(m);for(v=t.next();!v.done;p={uc:p.uc},v=t.next())y=v.value,p.uc=Db([a],[y.payload])[0],w=new zi(y.startTime,y.endTime,function(D){return function(){return[D.uc]}}(p),0,null,null,0,0,Infinity),p.uc.includes("#xywh")&&(x=p.uc.split("#xywh=")[1].split(","),4===x.length&&w.Yf({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],10)})),n.push(w);A={id:c.df++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},
496
- segmentIndex:new Qj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ac,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1"};c.i.imageStreams.push(A);Vm(c);return z.return(pe(A))}})};
497
- q.ig=function(a,b,c){var d=this,e,f,g,h;return G(function(k){switch(k.g){case 1:if(d.l!=Km&&d.l!=Ym)throw new M(1,7,7004);if(c){k.D(2);break}return u(k,nn(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return u(k,on(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Df();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return u(k,new Promise(function(l,m){d.B.Da(f,"load",l);d.B.Da(f,"error",function(){m(new M(1,2,2015))})}),6);case 6:return k.return(h);
498
- case 5:throw new M(1,2,2012);}})};function nn(a,b){var c,d;return G(function(e){switch(e.g){case 1:c=ch(b);if(d=rn[c])return e.return(d);C(e,2);return u(e,eh(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;ua(e,3);break;case 2:va(e);case 3:if(d)return e.return(d);throw new M(1,2,2011,c);}})}
499
- function on(a,b,c,d,e,f,g){var h,k,l,m;return G(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,pn(a,b,a.H,a.h.streaming.retryParameters),3):n.D(2);2!=n.g&&(h=n.h,k=qn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Yi(l),e="text/vtt");m=document.createElement("track");var p=a.U,t=b;try{if(p.g.enabled){var v=vl(p);v.ot=Bl;v.su=!0;var y=xl(v);var w=yl(t,y)}else w=t}catch(x){Va("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),w=t}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
500
- a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function pn(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){e=uf;f=of([b],d);f.method="GET";var k=a.U;try{k.g.enabled&&tl(k,f,{ot:Bl,su:!0})}catch(l){Va("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
501
- function qn(a,b,c,d){var e=Ed[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Hc(b),b=c.parseMedia(b,a),hl(b,d);throw new M(2,2,2014,c);}q.Me=function(a,b){this.Nc.width=a;this.Nc.height=b};q.De=function(a){if(this.l==Km){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Mc&&(d.Mc=!1,rk(b,d,a));b=!0}}else b=!1;return b};
487
+ q.Gf=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.ib=function(){if(this.l==Mm)return this.I.ib();var a={total:[],audio:[],video:[],text:[]};this.l==$m&&(a.total=Gi(this.g.buffered));return a};
488
+ q.getStats=function(){if(this.l!=Mm&&this.l!=$m)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Hm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=
489
+ Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.s.O=this.F.jf(),this.s.P=this.F.kf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.K=d;this.s.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.J?c.J:NaN):c=NaN;this.s.B=c;if(this.l==Mm){if(c=this.j.l)this.s.F=(this.J?this.J.i:1)*c.bandwidth;c&&c.video&&(b=this.s,d=c.video.height||NaN,b.s=c.video.width||NaN,b.l=d);this.T()&&(c=this.Gf().valueOf()+
490
+ 1E3*this.Ja().end,this.s.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.I=this.i.presentationTimeline.g);c=this.C.getBandwidthEstimate();this.s.C=c}this.l==$m&&(c=this.s,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var e=this.s;a=e.s;c=e.l;b=e.F;d=e.K;var f=e.M,g=e.J,h=e.P,k=e.O,l=e.C,m=e.i,p=e.m,n=e.H,t=e.j,v=Rl(e.g,"playing"),y=Rl(e.g,"paused"),w=Rl(e.g,"buffering"),x=e.B,A=e.G,z=e.I,C=Sl(e.g),E=[];e=r(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,E.push({timestamp:F.timestamp,
491
+ id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:p,manifestTimeSeconds:n,drmTimeSeconds:t,playTime:v,pauseTime:y,bufferingTime:w,licenseTime:x,liveLatency:A,maxSegmentDuration:z,stateHistory:C,switchHistory:E}};
492
+ q.jg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,v,y,w,x,A;return G(function(z){switch(z.g){case 1:if(h.l!=Mm&&h.l!=$m)throw new M(1,7,7004);if(d){z.D(2);break}return u(z,pn(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(C){}if(h.l!=$m){z.D(4);break}g&&(c="forced");return u(z,qn(h,a,b,c,d,f||"",k),5);case 5:l=h.yb();if(m=l.find(function(C){return C.language==b&&C.label==(f||"")&&C.kind==c}))return Xm(h),z.return(m);throw new M(1,2,2012);case 4:p=
493
+ Jb;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new M(1,4,4033);if(!k.length){z.D(6);break}return u(z,rn(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,v=sn(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=Yi(y),d="text/vtt";case 6:w={id:h.df++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Vj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.ka,primary:!1,trickModeVideo:null,
494
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=xd(w.mimeType,w.codecs);A=Dd(x);if(!A)throw new M(2,2,2014,d);h.i.textStreams.push(w);Xm(h);return z.return(oe(w))}})};
495
+ q.kg=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,A;return G(function(z){switch(z.g){case 1:if(c.l!=Mm&&c.l!=$m)throw new M(1,7,7004);if(c.l==$m)throw new M(1,2,2016);if(b){z.D(2);break}return u(z,pn(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new M(1,2,2017,a);d=Jb;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new M(1,4,4045);return u(z,rn(c,a,c.H,c.h.streaming.retryParameters),4);case 4:f=z.h;g=Ed[b];if(!g)throw new M(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
496
+ segmentEnd:e,vttOffset:0};l=Hc(f);m=h.parseMedia(l,k);p=[];n={};t=r(m);for(v=t.next();!v.done;n={uc:n.uc},v=t.next())y=v.value,n.uc=Db([a],[y.payload])[0],w=new zi(y.startTime,y.endTime,function(C){return function(){return[C.uc]}}(n),0,null,null,0,0,Infinity),n.uc.includes("#xywh")&&(x=n.uc.split("#xywh=")[1].split(","),4===x.length&&w.Yf({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],10)})),p.push(w);A={id:c.df++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},
497
+ segmentIndex:new Sj(p),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ac,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1"};c.i.imageStreams.push(A);Xm(c);return z.return(pe(A))}})};
498
+ q.ig=function(a,b,c){var d=this,e,f,g,h;return G(function(k){switch(k.g){case 1:if(d.l!=Mm&&d.l!=$m)throw new M(1,7,7004);if(c){k.D(2);break}return u(k,pn(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return u(k,qn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Df();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return u(k,new Promise(function(l,m){d.B.Da(f,"load",l);d.B.Da(f,"error",function(){m(new M(1,2,2015))})}),6);case 6:return k.return(h);
499
+ case 5:throw new M(1,2,2012);}})};function pn(a,b){var c,d;return G(function(e){switch(e.g){case 1:c=ch(b);if(d=tn[c])return e.return(d);D(e,2);return u(e,eh(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;ua(e,3);break;case 2:va(e);case 3:if(d)return e.return(d);throw new M(1,2,2011,c);}})}
500
+ function qn(a,b,c,d,e,f,g){var h,k,l,m;return G(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,rn(a,b,a.H,a.h.streaming.retryParameters),3):p.D(2);2!=p.g&&(h=p.h,k=sn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Yi(l),e="text/vtt");m=document.createElement("track");var n=a.V,t=b;try{if(n.g.enabled){var v=xl(n);v.ot=Dl;v.su=!0;var y=zl(v);var w=Al(t,y)}else w=t}catch(x){Va("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),w=t}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
501
+ a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function rn(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){e=uf;f=of([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&vl(k,f,{ot:Dl,su:!0})}catch(l){Va("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
502
+ function sn(a,b,c,d){var e=Ed[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Hc(b),b=c.parseMedia(b,a),jl(b,d);throw new M(2,2,2014,c);}q.Me=function(a,b){this.Nc.width=a;this.Nc.height=b};q.De=function(a){if(this.l==Mm){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Mc||d.Ia||d.cb||(d.Mc=!1,tk(b,d,a));b=!0}}else b=!1;return b};
502
503
  q.Mg=function(){Ta("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};q.Ng=function(){return this.Id};
503
- function Vl(a){var b=Kl();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.De(d))}};b.textDisplayFactory=function(){return a.yd?new $k(a.g,a.yd):new Uk(a.g)};return b}q.Re=function(a){this.yd=a};
504
- function zm(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=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 Uj;h={id:a.df++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
505
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Ib,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function ym(a,b){return G(function(c){if(1==c.g)return u(c,sn(a,b),2);fn(a,b);B(c)})}
506
- function sn(a,b){var c;return G(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,$d(c,b),2);Um(b);B(d)})}function fn(a,b){if(a.l!=mm){Zd(b.variants,a.h.restrictions,a.Nc)&&a.j&&Vm(a);var c=a.m?a.m.g:null;if(c&&a.m.C)for(var d=r(b.variants),e=d.next();!e.done;e=d.next())e=e.value,Am(a,c.keySystem,e.video),Am(a,c.keySystem,e.audio);tn(a,b)}}
507
- function Am(a,b,c){if(c){c=r(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=r(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Eg(a.m,e.initDataType,e.initData)}}}
508
- function Pm(a,b){var c,d,e,f,g;return G(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return G(function(t){if(1==t.g)return k?u(t,k.createSegmentIndex(),2):t.return(null);n=(m=k.segmentIndex.bc(l))?m.next().value:null;if(!n)return t.return(null);p=n.startTime;return t.return(p)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
509
- function um(a){var b=a.Pc();if(a.s&&a.O&&a.F){var c=a.J;c.j=b;Wj(c);a.U&&(c=a.U,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Fm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(hm("buffering",b))}function Gm(a){var b=a.g.playbackRate;0!=b&&(a.J&&a.J.set(b),b=hm("ratechange"),a.dispatchEvent(b))}function Fm(a){if(a.s&&a.O){var b=a.s.g;a.O.g==Ue?Ol(b,"buffering"):a.g.paused?Ol(b,"paused"):a.g.ended?Ol(b,"ended"):Ol(b,"playing")}}
510
- function Wm(a){try{tn(a,a.i)}catch(c){return tm(a,c),!1}var b=a.i.variants.filter(function(c){return ve(c)});b=a.za.create(b);a.C.setVariants(Array.from(b.values()));return!0}function im(a){return Wm(a)?a.C.chooseVariant():null}function gn(a){var b=im(a);b&&Im(a,b,!0,!0,0)}
511
- function Im(a,b,c,d,e){var f=a.j.l;if(b==f)d&&vk(a.j,b,d,e,!0);else{var g=a.s.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));vk(a.j,b,d,e,void 0,c);d=null;f&&(d=ne(f));b=ne(b);c?Qm(a,d,b):un(a,d,b)}}function jn(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=ue(c);b=ue(b);un(a,c,b)}
512
- function Rm(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=Mb(a.h.preferredTextLanguage);c=Mb(c.language);if(2==a.h.autoShowText)return Lb(c,d);if(3==a.h.autoShowText)return a=Mb(b.language),Lb(c,d)&&!Lb(a,c);Ta("Invalid autoShowText setting!");return!1}function Qm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Ri(a.M,c);c=hm("adaptation",b);vn(a,c)}function Vm(a){var b=hm("trackschanged");vn(a,b)}
513
- function un(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Ri(a.M,c);c=hm("variantchanged",b);vn(a,c)}function hn(a){var b=hm("textchanged");vn(a,b)}function Sm(a){var b=hm("texttrackvisibility");vn(a,b)}function Tm(a){var b=(new Map).set("newStatus",a.h.abr.enabled);vn(a,hm("abrstatuschanged",b))}
514
- function wn(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;b=a.Oa().find(function(g){return g.active});for(var d=a.i,e=r(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);Zd(d.variants,a.h.restrictions,a.Nc);b=im(a);if(!b)return!1;d=a.hb().video.reduce(function(g,h){return g+h.end-h.start},0);Im(a,b,!1,!0,d);a.gf.R(c);return!0}
515
- function tm(a,b){if(a.l!=mm)if(wn(a,b))b.handled=!0;else{var c=hm("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function xm(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(hm(b,c))}
516
- function sm(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new M(2,3,3016,b,c,a.g.error.message)}
517
- function Dm(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!xn.includes(l)}h!=f.allowedByKeySystem&&
518
- (e=!0)}}}if(!e||Wm(a))(b=a.j.l)&&!b.allowedByKeySystem&&gn(a),e&&Vm(a)}}function Em(a,b,c){if(a.K&&a.K.onExpirationUpdated)a.K.onExpirationUpdated(b,c);b=hm("expirationupdated");a.dispatchEvent(b)}function Hm(a,b,c){0<b&&(a.T()||a.Zf(b));b=a.getDuration();c<b&&(a.T()||a.ab(c))}
519
- function tn(a,b){a=a.m?a.m.td():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=r(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=r(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=r(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?xn.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
520
- missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new M(2,4,4012,a);}function Um(a){if(!a.variants.some(ve))throw new M(2,4,4032);}function vn(a,b){G(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=mm&&a.dispatchEvent(b);B(c)})}function ln(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(Mb(c.language)):b.add("und");return b}
521
- function kn(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Mb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=r(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
522
- h.push({language:l,role:m,label:n})}});return h}function om(){return new M(2,7,7E3)}function gm(a,b,c,d,e,f){return d==a&&e.mediaElement==f.mediaElement&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Ok(){return{mediaElement:null,mimeType:null,startTime:null,Se:NaN,uri:null}}function pm(a){return new Promise(function(b,c){a.Qb=function(){return c(om())};a.Ed=function(){return b()};a.onError=function(d){return c(d)};a.Gd=function(){return c(om())}})}I("shaka.Player",S);
523
- S.prototype.setVideoContainer=S.prototype.Re;S.prototype.getManifestParserFactory=S.prototype.Ng;S.prototype.getManifest=S.prototype.Mg;S.prototype.retryStreaming=S.prototype.De;S.prototype.setMaxHardwareResolution=S.prototype.Me;S.prototype.addChaptersTrack=S.prototype.ig;S.prototype.addThumbnailsTrack=S.prototype.kg;S.prototype.addTextTrackAsync=S.prototype.jg;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.hb;S.prototype.getPresentationStartTimeAsDate=S.prototype.Gf;
504
+ function Xl(a){var b=Ml();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.De(d))}};b.textDisplayFactory=function(){return a.yd?new bl(a.g,a.yd):new Wk(a.g)};return b}q.Re=function(a){this.yd=a};
505
+ function Bm(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=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 Wj;h={id:a.df++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
506
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Ib,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function Am(a,b){return G(function(c){if(1==c.g)return u(c,un(a,b),2);hn(a,b);B(c)})}
507
+ function un(a,b){var c;return G(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,$d(c,b),2);Wm(b);B(d)})}function hn(a,b){if(a.l!=om){Zd(b.variants,a.h.restrictions,a.Nc)&&a.j&&Xm(a);var c=a.m?a.m.g:null;if(c&&a.m.C)for(var d=r(b.variants),e=d.next();!e.done;e=d.next())e=e.value,Cm(a,c.keySystem,e.video),Cm(a,c.keySystem,e.audio);vn(a,b)}}
508
+ function Cm(a,b,c){if(c){c=r(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=r(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Eg(a.m,e.initDataType,e.initData)}}}
509
+ function Rm(a,b){var c,d,e,f,g;return G(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return G(function(t){if(1==t.g)return k?u(t,k.createSegmentIndex(),2):t.return(null);p=(m=k.segmentIndex.bc(l))?m.next().value:null;if(!p)return t.return(null);n=p.startTime;return t.return(n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
510
+ function wm(a){var b=a.Pc();if(a.s&&a.O&&a.F){var c=a.J;c.j=b;Yj(c);a.V&&(c=a.V,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Hm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(jm("buffering",b))}function Im(a){var b=a.g.playbackRate;0!=b&&(a.J&&a.J.set(b),b=jm("ratechange"),a.dispatchEvent(b))}function Hm(a){if(a.s&&a.O){var b=a.s.g;a.O.g==Ue?Ql(b,"buffering"):a.g.paused?Ql(b,"paused"):a.g.ended?Ql(b,"ended"):Ql(b,"playing")}}
511
+ function Ym(a){try{vn(a,a.i)}catch(c){return vm(a,c),!1}var b=a.i.variants.filter(function(c){return ve(c)});b=a.za.create(b);a.C.setVariants(Array.from(b.values()));return!0}function km(a){return Ym(a)?a.C.chooseVariant():null}function jn(a){var b=km(a);b&&Km(a,b,!0,!0,0)}
512
+ function Km(a,b,c,d,e){var f=a.j.l;if(b==f)d&&xk(a.j,b,d,e,!0);else{var g=a.s.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));xk(a.j,b,d,e,void 0,c);d=null;f&&(d=ne(f));b=ne(b);c?Sm(a,d,b):wn(a,d,b)}}function ln(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=ue(c);b=ue(b);wn(a,c,b)}
513
+ function Tm(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=Mb(a.h.preferredTextLanguage);c=Mb(c.language);if(2==a.h.autoShowText)return Lb(c,d);if(3==a.h.autoShowText)return a=Mb(b.language),Lb(c,d)&&!Lb(a,c);Ta("Invalid autoShowText setting!");return!1}function Sm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Ri(a.M,c);c=jm("adaptation",b);xn(a,c)}function Xm(a){var b=jm("trackschanged");xn(a,b)}
514
+ function wn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Ri(a.M,c);c=jm("variantchanged",b);xn(a,c)}function kn(a){var b=jm("textchanged");xn(a,b)}function Um(a){var b=jm("texttrackvisibility");xn(a,b)}function Vm(a){var b=(new Map).set("newStatus",a.h.abr.enabled);xn(a,jm("abrstatuschanged",b))}
515
+ function yn(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;b=a.Qa().find(function(g){return g.active});for(var d=a.i,e=r(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);Zd(d.variants,a.h.restrictions,a.Nc);b=km(a);if(!b)return!1;d=a.ib().video.reduce(function(g,h){return g+h.end-h.start},0);Km(a,b,!1,!0,d);a.gf.R(c);return!0}
516
+ function vm(a,b){if(a.l!=om)if(yn(a,b))b.handled=!0;else{var c=jm("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function zm(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(jm(b,c))}
517
+ function um(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new M(2,3,3016,b,c,a.g.error.message)}
518
+ function Fm(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!zn.includes(l)}h!=f.allowedByKeySystem&&
519
+ (e=!0)}}}if(!e||Ym(a))(b=a.j.l)&&!b.allowedByKeySystem&&jn(a),e&&Xm(a)}}function Gm(a,b,c){if(a.K&&a.K.onExpirationUpdated)a.K.onExpirationUpdated(b,c);b=jm("expirationupdated");a.dispatchEvent(b)}function Jm(a,b,c){0<b&&(a.T()||a.Zf(b));b=a.getDuration();c<b&&(a.T()||a.ab(c))}
520
+ function vn(a,b){a=a.m?a.m.td():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=r(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=r(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=r(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var p=a[c?"00":m];p?zn.includes(p)&&g.add(p):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
521
+ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new M(2,4,4012,a);}function Wm(a){if(!a.variants.some(ve))throw new M(2,4,4032);}function xn(a,b){G(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=om&&a.dispatchEvent(b);B(c)})}function nn(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(Mb(c.language)):b.add("und");return b}
522
+ function mn(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Mb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=r(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var p=null;c.has(l)&&c.get(l).has(m)&&(p=c.get(l).get(m));
523
+ h.push({language:l,role:m,label:p})}});return h}function qm(){return new M(2,7,7E3)}function im(a,b,c,d,e,f){return d==a&&e.mediaElement==f.mediaElement&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Qk(){return{mediaElement:null,mimeType:null,startTime:null,Se:NaN,uri:null}}function rm(a){return new Promise(function(b,c){a.Qb=function(){return c(qm())};a.Ed=function(){return b()};a.onError=function(d){return c(d)};a.Gd=function(){return c(qm())}})}I("shaka.Player",S);
524
+ S.prototype.setVideoContainer=S.prototype.Re;S.prototype.getManifestParserFactory=S.prototype.Ng;S.prototype.getManifest=S.prototype.Mg;S.prototype.retryStreaming=S.prototype.De;S.prototype.setMaxHardwareResolution=S.prototype.Me;S.prototype.addChaptersTrack=S.prototype.ig;S.prototype.addThumbnailsTrack=S.prototype.kg;S.prototype.addTextTrackAsync=S.prototype.jg;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.ib;S.prototype.getPresentationStartTimeAsDate=S.prototype.Gf;
524
525
  S.prototype.getPlayheadTimeAsDate=S.prototype.Rg;S.prototype.setTextTrackVisibility=S.prototype.Qe;S.prototype.getChapters=S.prototype.Ag;S.prototype.getChaptersTracks=S.prototype.Df;S.prototype.isTextTrackVisible=S.prototype.Nb;S.prototype.selectVariantsByLabel=S.prototype.Dh;S.prototype.selectTextLanguage=S.prototype.Ge;S.prototype.selectAudioLanguage=S.prototype.Md;S.prototype.getTextLanguages=S.prototype.Ug;S.prototype.getAudioLanguages=S.prototype.wg;S.prototype.getTextLanguagesAndRoles=S.prototype.Vg;
525
- S.prototype.getAudioLanguagesAndRoles=S.prototype.xg;S.prototype.selectVariantTrack=S.prototype.Ie;S.prototype.selectTextTrack=S.prototype.He;S.prototype.getThumbnails=S.prototype.Xg;S.prototype.getImageTracks=S.prototype.Hg;S.prototype.getTextTracks=S.prototype.yb;S.prototype.getVariantTracks=S.prototype.Oa;S.prototype.cancelTrickPlay=S.prototype.rf;S.prototype.trickPlay=S.prototype.We;S.prototype.getPlaybackRate=S.prototype.xb;S.prototype.isBuffering=S.prototype.Pc;S.prototype.getKeyStatuses=S.prototype.td;
526
- S.prototype.getExpiration=S.prototype.Gc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.ah;S.prototype.seekRange=S.prototype.Ha;S.prototype.isAudioOnly=S.prototype.hc;S.prototype.isInProgress=S.prototype.Lb;S.prototype.isLive=S.prototype.T;S.prototype.getAdManager=S.prototype.rd;S.prototype.getAssetUri=S.prototype.le;S.prototype.getNetworkingEngine=S.prototype.Hc;S.prototype.getMediaElement=S.prototype.Pg;
526
+ S.prototype.getAudioLanguagesAndRoles=S.prototype.xg;S.prototype.selectVariantTrack=S.prototype.Ie;S.prototype.selectTextTrack=S.prototype.He;S.prototype.getThumbnails=S.prototype.Xg;S.prototype.getImageTracks=S.prototype.Hg;S.prototype.getTextTracks=S.prototype.yb;S.prototype.getVariantTracks=S.prototype.Qa;S.prototype.cancelTrickPlay=S.prototype.rf;S.prototype.trickPlay=S.prototype.We;S.prototype.getPlaybackRate=S.prototype.xb;S.prototype.isBuffering=S.prototype.Pc;S.prototype.getKeyStatuses=S.prototype.td;
527
+ S.prototype.getExpiration=S.prototype.Gc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.ah;S.prototype.seekRange=S.prototype.Ja;S.prototype.isAudioOnly=S.prototype.hc;S.prototype.isInProgress=S.prototype.Lb;S.prototype.isLive=S.prototype.T;S.prototype.getAdManager=S.prototype.rd;S.prototype.getAssetUri=S.prototype.le;S.prototype.getNetworkingEngine=S.prototype.Hc;S.prototype.getMediaElement=S.prototype.Pg;
527
528
  S.prototype.getLoadMode=S.prototype.Ff;S.prototype.resetConfiguration=S.prototype.Ah;S.prototype.getBufferFullness=S.prototype.yg;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.updateStartTime=S.prototype.Nh;S.prototype.unload=S.prototype.Ye;S.prototype.detach=S.prototype.detach;S.prototype.attachCanvas=S.prototype.mf;S.prototype.attach=S.prototype.Bc;
528
- S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return G(function(h){if(1==h.g)return b={},a?u(h,Vg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Oc()){for(var l in bh)k[l]=!0;for(var m in dh)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=Oc()?!!bh[n]:Pc(n);for(var p in l)k[p]=
529
- Oc()?!!dh[p]:Pc(l[p]);c=k;p='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",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(ia(gj));
530
- k={};p=r(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Oc()?Dd(l)?!0:dc(l)||rd(l):Pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=yn;for(g in f)e[g]=f[g]();return h.return(e)})};S.isBrowserSupported=nm;S.setAdManagerFactory=function(a){Xl=a};S.registerSupportPlugin=function(a,b){yn[a]=b};S.prototype.destroy=S.prototype.destroy;var mm=0,Ul=1,Km=2,Ym=3;S.LoadMode={DESTROYED:mm,NOT_LOADED:Ul,MEDIA_SOURCE:Km,SRC_EQUALS:Ym};S.version="v4.3.1";var zn=["4","3"];
531
- Ge=new function(a){this.g=a;this.i=He;this.h=Ie}(new Ee(Number(zn[0]),Number(zn[1])));
532
- var xn=["output-restricted","internal-error"],yn={},Xl=null,lm={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},rn={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
533
- ssa:"text/x-ssa",ass:"text/x-ssa"};function An(){this.h=[];this.j=this.i=this.g=0};function Bn(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new xf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Bn.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
529
+ S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return G(function(h){if(1==h.g)return b={},a?u(h,Vg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Oc()){for(var l in bh)k[l]=!0;for(var m in dh)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var p=m.next();!p.done;p=m.next())p=p.value,k[p]=Oc()?!!bh[p]:Pc(p);for(var n in l)k[n]=
530
+ Oc()?!!dh[n]:Pc(l[n]);c=k;n='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",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(ia(gj));
531
+ k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Oc()?Dd(l)?!0:dc(l)||rd(l):Pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=An;for(g in f)e[g]=f[g]();return h.return(e)})};S.isBrowserSupported=pm;S.setAdManagerFactory=function(a){Zl=a};S.registerSupportPlugin=function(a,b){An[a]=b};S.prototype.destroy=S.prototype.destroy;var om=0,Wl=1,Mm=2,$m=3;S.LoadMode={DESTROYED:om,NOT_LOADED:Wl,MEDIA_SOURCE:Mm,SRC_EQUALS:$m};S.version="v4.3.2";var Bn=["4","3"];
532
+ Ge=new function(a){this.g=a;this.i=He;this.h=Ie}(new Ee(Number(Bn[0]),Number(Bn[1])));
533
+ var zn=["output-restricted","internal-error"],An={},Zl=null,nm={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},tn={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
534
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function Cn(){this.h=[];this.j=this.i=this.g=0};function Dn(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new xf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Dn.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
534
535
  q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
535
536
  q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
536
- q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.h.getTitle()};q.getDescription=function(){return this.h.getDescription()};q.release=function(){this.g=this.h=null};I("shaka.ads.ClientSideAd",Bn);Bn.prototype.release=Bn.prototype.release;Bn.prototype.getDescription=Bn.prototype.getDescription;Bn.prototype.getTitle=Bn.prototype.getTitle;Bn.prototype.getPositionInSequence=Bn.prototype.getPositionInSequence;
537
- Bn.prototype.getSequenceLength=Bn.prototype.getSequenceLength;Bn.prototype.setMuted=Bn.prototype.setMuted;Bn.prototype.resize=Bn.prototype.resize;Bn.prototype.isLinear=Bn.prototype.isLinear;Bn.prototype.isMuted=Bn.prototype.isMuted;Bn.prototype.setVolume=Bn.prototype.setVolume;Bn.prototype.getVolume=Bn.prototype.getVolume;Bn.prototype.play=Bn.prototype.play;Bn.prototype.pause=Bn.prototype.pause;Bn.prototype.skip=Bn.prototype.skip;Bn.prototype.canSkipNow=Bn.prototype.canSkipNow;
538
- Bn.prototype.getTimeUntilSkippable=Bn.prototype.getTimeUntilSkippable;Bn.prototype.isSkippable=Bn.prototype.isSkippable;Bn.prototype.isPaused=Bn.prototype.isPaused;Bn.prototype.getRemainingTime=Bn.prototype.getRemainingTime;Bn.prototype.getMinSuggestedDuration=Bn.prototype.getMinSuggestedDuration;Bn.prototype.getDuration=Bn.prototype.getDuration;function Cn(a,b,c,d){var e=this;this.s=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new xf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.3.1");this.g=null;this.h.Da(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Dn(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
539
- function(f){En(e,f)});this.i.onended=function(){e.m.contentComplete()}}Cn.prototype.stop=function(){this.g&&this.g.stop();this.s&&Zk(this.s)};Cn.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function En(a,b){b.getError();Fn(a,null);a.l(new L("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
540
- function Dn(a,b){a.l(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new L("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new L("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Gn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Hn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
541
- function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Hn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Hn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Hn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
542
- {once:!0})}catch(e){Fn(a,null)}}function Hn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
543
- function Gn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new L(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){En(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){In(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){In(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
544
- function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Fn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Fn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
537
+ q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.h.getTitle()};q.getDescription=function(){return this.h.getDescription()};q.release=function(){this.g=this.h=null};I("shaka.ads.ClientSideAd",Dn);Dn.prototype.release=Dn.prototype.release;Dn.prototype.getDescription=Dn.prototype.getDescription;Dn.prototype.getTitle=Dn.prototype.getTitle;Dn.prototype.getPositionInSequence=Dn.prototype.getPositionInSequence;
538
+ Dn.prototype.getSequenceLength=Dn.prototype.getSequenceLength;Dn.prototype.setMuted=Dn.prototype.setMuted;Dn.prototype.resize=Dn.prototype.resize;Dn.prototype.isLinear=Dn.prototype.isLinear;Dn.prototype.isMuted=Dn.prototype.isMuted;Dn.prototype.setVolume=Dn.prototype.setVolume;Dn.prototype.getVolume=Dn.prototype.getVolume;Dn.prototype.play=Dn.prototype.play;Dn.prototype.pause=Dn.prototype.pause;Dn.prototype.skip=Dn.prototype.skip;Dn.prototype.canSkipNow=Dn.prototype.canSkipNow;
539
+ Dn.prototype.getTimeUntilSkippable=Dn.prototype.getTimeUntilSkippable;Dn.prototype.isSkippable=Dn.prototype.isSkippable;Dn.prototype.isPaused=Dn.prototype.isPaused;Dn.prototype.getRemainingTime=Dn.prototype.getRemainingTime;Dn.prototype.getMinSuggestedDuration=Dn.prototype.getMinSuggestedDuration;Dn.prototype.getDuration=Dn.prototype.getDuration;function En(a,b,c,d){var e=this;this.s=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new xf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.3.2");this.g=null;this.h.Da(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Fn(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
540
+ function(f){Gn(e,f)});this.i.onended=function(){e.m.contentComplete()}}En.prototype.stop=function(){this.g&&this.g.stop();this.s&&al(this.s)};En.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Gn(a,b){b.getError();Hn(a,null);a.l(new L("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
541
+ function Fn(a,b){a.l(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new L("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new L("ad-cue-points-changed",(new Map).set("cuepoints",b)))}In(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Jn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
542
+ function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Jn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Jn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Jn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
543
+ {once:!0})}catch(e){Hn(a,null)}}function Jn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
544
+ function In(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new L(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Gn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Kn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Kn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
545
+ function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Hn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Hn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
545
546
  a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
546
547
  a.h.o(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,
547
548
  google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
548
- function In(a,b){var c=b.getAd();c?(a.j=new Bn(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new L("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.i.pause())):Ta("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}function Fn(a,b){a.l(new L("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.i.play())};function Jn(a,b){this.i=a;this.h=null;this.g=b}q=Jn.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
549
+ function Kn(a,b){var c=b.getAd();c?(a.j=new Dn(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new L("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.i.pause())):Ta("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}function Hn(a,b){a.l(new L("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.i.play())};function Ln(a,b){this.i=a;this.h=null;this.g=b}q=Ln.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
549
550
  q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
550
- q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.i.getTitle()};q.getDescription=function(){return this.i.getDescription()};q.release=function(){this.g=this.h=this.i=null};I("shaka.ads.ServerSideAd",Jn);Jn.prototype.release=Jn.prototype.release;Jn.prototype.getDescription=Jn.prototype.getDescription;Jn.prototype.getTitle=Jn.prototype.getTitle;
551
- Jn.prototype.getPositionInSequence=Jn.prototype.getPositionInSequence;Jn.prototype.getSequenceLength=Jn.prototype.getSequenceLength;Jn.prototype.setMuted=Jn.prototype.setMuted;Jn.prototype.resize=Jn.prototype.resize;Jn.prototype.isLinear=Jn.prototype.isLinear;Jn.prototype.isMuted=Jn.prototype.isMuted;Jn.prototype.setVolume=Jn.prototype.setVolume;Jn.prototype.getVolume=Jn.prototype.getVolume;Jn.prototype.play=Jn.prototype.play;Jn.prototype.pause=Jn.prototype.pause;Jn.prototype.skip=Jn.prototype.skip;
552
- Jn.prototype.canSkipNow=Jn.prototype.canSkipNow;Jn.prototype.getTimeUntilSkippable=Jn.prototype.getTimeUntilSkippable;Jn.prototype.isSkippable=Jn.prototype.isSkippable;Jn.prototype.isPaused=Jn.prototype.isPaused;Jn.prototype.getRemainingTime=Jn.prototype.getRemainingTime;Jn.prototype.getMinSuggestedDuration=Jn.prototype.getMinSuggestedDuration;Jn.prototype.getDuration=Jn.prototype.getDuration;function Kn(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.s=null;this.F="";this.G=[];this.h=new xf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new L("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Ln(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
553
- e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Jn(f,e.l);e.C&&(e.m.h=e.C);e.i(new L("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
551
+ q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.i.getTitle()};q.getDescription=function(){return this.i.getDescription()};q.release=function(){this.g=this.h=this.i=null};I("shaka.ads.ServerSideAd",Ln);Ln.prototype.release=Ln.prototype.release;Ln.prototype.getDescription=Ln.prototype.getDescription;Ln.prototype.getTitle=Ln.prototype.getTitle;
552
+ Ln.prototype.getPositionInSequence=Ln.prototype.getPositionInSequence;Ln.prototype.getSequenceLength=Ln.prototype.getSequenceLength;Ln.prototype.setMuted=Ln.prototype.setMuted;Ln.prototype.resize=Ln.prototype.resize;Ln.prototype.isLinear=Ln.prototype.isLinear;Ln.prototype.isMuted=Ln.prototype.isMuted;Ln.prototype.setVolume=Ln.prototype.setVolume;Ln.prototype.getVolume=Ln.prototype.getVolume;Ln.prototype.play=Ln.prototype.play;Ln.prototype.pause=Ln.prototype.pause;Ln.prototype.skip=Ln.prototype.skip;
553
+ Ln.prototype.canSkipNow=Ln.prototype.canSkipNow;Ln.prototype.getTimeUntilSkippable=Ln.prototype.getTimeUntilSkippable;Ln.prototype.isSkippable=Ln.prototype.isSkippable;Ln.prototype.isPaused=Ln.prototype.isPaused;Ln.prototype.getRemainingTime=Ln.prototype.getRemainingTime;Ln.prototype.getMinSuggestedDuration=Ln.prototype.getMinSuggestedDuration;Ln.prototype.getDuration=Ln.prototype.getDuration;function Mn(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.s=null;this.F="";this.G=[];this.h=new xf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new L("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Nn(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
554
+ e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Ln(f,e.l);e.C&&(e.m.h=e.C);e.i(new L("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
554
555
  var f=e.l.currentTime;e.s&&e.s>f&&(e.l.currentTime=e.s,e.s=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.h=e.C)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new L("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new L("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new L("ad-third-quartile"))});
555
556
  this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new L("ad-complete"));e.i(new L("ad-stopped"));e.B.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new L("ad-skipped"));e.i(new L("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G=
556
- f;e.i(new L("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Kn.prototype.stop=function(){this.F="";this.s=null;this.G=[]};Kn.prototype.release=function(){this.stop();this.h&&this.h.release()};Kn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
557
- function Ln(a,b){a.i(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function T(){fb.call(this);this.g=this.i=null;this.h=new An;this.j=navigator.language}pa(T,fb);q=T.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new M(2,10,1E4);this.i&&this.i.release();this.i=new Cn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
558
- q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);fb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new L("ad-stopped"));this.h=new An};q.requestClientSideAds=function(a){if(!this.i)throw new M(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
559
- q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.g&&this.g.release();this.g=new Kn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
560
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ta('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.3.1";c=this.g;c.j?a=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
561
- (c.H=!0),c.j=new Lc,c.g.requestStream(a),c.F=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(1,10,10003);(a.mpt||a.mpv)&&Ta('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.3.1";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new M(1,10,10003);return this.g.G};
557
+ f;e.i(new L("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Mn.prototype.stop=function(){this.F="";this.s=null;this.G=[]};Mn.prototype.release=function(){this.stop();this.h&&this.h.release()};Mn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
558
+ function Nn(a,b){a.i(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function T(){fb.call(this);this.g=this.i=null;this.h=new Cn;this.j=navigator.language}pa(T,fb);q=T.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new M(2,10,1E4);this.i&&this.i.release();this.i=new En(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
559
+ q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);fb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new L("ad-stopped"));this.h=new Cn};q.requestClientSideAds=function(a){if(!this.i)throw new M(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
560
+ q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.g&&this.g.release();this.g=new Mn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
561
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ta('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.3.2";c=this.g;c.j?a=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
562
+ (c.H=!0),c.j=new Lc,c.g.requestStream(a),c.F=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(1,10,10003);(a.mpt||a.mpv)&&Ta('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.3.2";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new M(1,10,10003);return this.g.G};
562
563
  q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};I("shaka.ads.AdManager",T);
563
564
  T.prototype.onCueMetadataChange=T.prototype.onCueMetadataChange;T.prototype.onHlsTimedMetadata=T.prototype.onHlsTimedMetadata;T.prototype.onDashTimedMetadata=T.prototype.onDashTimedMetadata;T.prototype.getStats=T.prototype.getStats;T.prototype.getServerSideCuePoints=T.prototype.getServerSideCuePoints;T.prototype.replaceServerSideAdTagParameters=T.prototype.replaceServerSideAdTagParameters;T.prototype.requestServerSideStream=T.prototype.requestServerSideStream;T.prototype.initServerSide=T.prototype.initServerSide;
564
565
  T.prototype.requestClientSideAds=T.prototype.requestClientSideAds;T.prototype.onAssetUnload=T.prototype.onAssetUnload;T.prototype.release=T.prototype.release;T.prototype.initClientSide=T.prototype.initClientSide;T.prototype.setLocale=T.prototype.setLocale;T.ADS_LOADED="ads-loaded";T.AD_STARTED="ad-started";T.AD_FIRST_QUARTILE="ad-first-quartile";T.AD_MIDPOINT="ad-midpoint";T.AD_THIRD_QUARTILE="ad-third-quartile";T.AD_COMPLETE="ad-complete";T.AD_STOPPED="ad-stopped";T.AD_SKIPPED="ad-skipped";
565
566
  T.AD_VOLUME_CHANGED="ad-volume-changed";T.AD_MUTED="ad-muted";T.AD_PAUSED="ad-paused";T.AD_RESUMED="ad-resumed";T.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";T.CUEPOINTS_CHANGED="ad-cue-points-changed";T.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";T.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";T.AD_CLICKED="ad-clicked";T.AD_PROGRESS="ad-progress";T.AD_BUFFERING="ad-buffering";T.AD_IMPRESSION="ad-impression";T.AD_DURATION_CHANGED="ad-duration-changed";T.AD_CLOSED="ad-closed";
566
- T.AD_LOADED="ad-loaded";T.ALL_ADS_COMPLETED="all-ads-completed";T.AD_LINEAR_CHANGED="ad-linear-changed";T.AD_METADATA="ad-metadata";T.AD_RECOVERABLE_ERROR="ad-recoverable-error";T.AD_BREAK_READY="ad-break-ready";T.AD_INTERACTION="ad-interaction";Xl=function(){return new T};function Mn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof L){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=r(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=r(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
567
+ T.AD_LOADED="ad-loaded";T.ALL_ADS_COMPLETED="all-ads-completed";T.AD_LINEAR_CHANGED="ad-linear-changed";T.AD_METADATA="ad-metadata";T.AD_RECOVERABLE_ERROR="ad-recoverable-error";T.AD_BREAK_READY="ad-break-ready";T.AD_INTERACTION="ad-interaction";Zl=function(){return new T};function On(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof L){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=r(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=r(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
567
568
  TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=r(Gi(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
568
- function Nn(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=On(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
569
- function On(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
570
- var Pn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Qn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Rn=["loop","playbackRate"],Sn=["pause","play"],Tn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
571
- isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Un={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Vn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Wn=[["getConfiguration","configure"]],Xn=[["isTextTrackVisible","setTextTrackVisibility"]],Yn="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
572
- Zn=["attach","attachCanvas","detach","load","unload"];function $n(a,b,c,d,e,f,g){var h=this;this.I=a;this.O=g;this.j=new O(b);this.P=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.M="";this.s=null;this.F=function(){return ao(h)};this.G=function(k,l){k=Nn(l);switch(k.type){case "event":var m=k.targetName,n=Oa(k.event);h.B(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.C&&(h.P(),h.C=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new M(p.severity,p.category,
573
- p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;bo.add(this)}q=$n.prototype;q.destroy=function(){bo.delete(this);co(this);eo&&fo(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.s=null;return Promise.resolve()};q.na=function(){return this.h};q.Jd=function(){return this.M};
574
- q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.ya();var a=new chrome.cast.SessionRequest(this.I,[],null,this.O,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(bo),d=c.next();!d.done;d=c.next())go(d.value,b)},function(b){for(var c=r(bo),d=c.next();!d.done;d=c.next())d=d.value,ho="available"==b,d.j.ya()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});ho&&this.j.R(io);(a=eo)&&a.status!=chrome.cast.SessionStatus.STOPPED?
575
- go(this,a):eo=null}else window.__onGCastApiAvailable!==jo&&(ko=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=jo)};q.Je=function(a){this.s=a;this.h&&lo(this,{type:"appData",appData:this.s})};q.cast=function(a){var b=this;return G(function(c){if(!b.m)throw new M(1,8,8E3);if(!ho)throw new M(1,8,8001);if(b.h)throw new M(1,8,8002);b.l=new Lc;chrome.cast.requestSession(function(d){return mo(b,a,d)},function(d){return no(b,d)});return u(c,b.l,0)})};
576
- function oo(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return mo(a,b,c)},function(c){return no(a,c)})}}q.$b=function(){if(this.h){co(this);if(eo){fo(this);try{eo.stop(function(){},function(){})}catch(a){}eo=null}ao(this)}};
577
- q.get=function(a,b){var c=this;if("video"==a){if(Sn.includes(b))return function(){return c.Qf.apply(c,[a,b].concat(ia(Ga.apply(0,arguments))))}}else if("player"==a){if(Vn[b]&&!this.get("player","isLive")())return function(){};if(Yn.includes(b))return function(){return c.Qf.apply(c,[a,b].concat(ia(Ga.apply(0,arguments))))};if(Zn.includes(b))return function(){return c.wh.apply(c,[a,b].concat(ia(Ga.apply(0,arguments))))};if(Tn[b]||Un[b])return function(){return c.g[a][b]}}return this.g[a][b]};
578
- q.set=function(a,b,c){this.g[a][b]=c;lo(this,{type:"set",targetName:a,property:b,value:c})};function mo(a,b,c){eo=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);ao(a);lo(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}function no(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new M(2,8,c,b))}
579
- q.Qf=function(a,b){lo(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};q.wh=function(a,b){var c=Ga.apply(2,arguments),d=new Lc,e=this.J.toString();this.J++;this.i[e]=d;try{lo(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function go(a,b){var c=a.K();a.l=new Lc;a.C=!0;mo(a,c,b)}function fo(a){var b=eo;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
580
- function ao(a){var b=eo?"connected"==eo.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};co(a)}a.h=b;a.M=b?eo.receiver.friendlyName:"";a.j.ya()}function co(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new M(1,7,7E3))}}function lo(a,b){b=Mn(b);var c=eo;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Xa)}catch(d){throw b=new M(2,8,8005,d),c=new L("error",(new Map).set("detail",b)),a.B("player",c),a.$b(),b;}}var io=.02,ho=!1,eo=null,ko=null,bo=new Set;
581
- function jo(a){ko?window.__onGCastApiAvailable=ko:delete window.__onGCastApiAvailable;ko=null;if(a)for(var b=r(bo),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function po(a,b,c,d){d=void 0===d?!1:d;fb.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.B=this.l=null;this.G=c;this.F=d;this.C=new Map;this.g=new $n(c,function(){return qo(e)},function(){return ro(e)},function(f,g){return so(e,f,g)},function(){return to(e)},function(){return uo(e)},d);vo(this)}pa(po,fb);q=po.prototype;
582
- q.destroy=function(a){a&&this.g.$b();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.l=this.i=null;fb.prototype.release.call(this);return Promise.all(a)};q.zb=function(){return this.l};q.cc=function(){return this.B};q.qf=function(){return this.g.m&&ho};q.na=function(){return this.g.na()};q.Jd=function(){return this.g.Jd()};
583
- q.cast=function(){var a=this,b;return G(function(c){return 1==c.g?(b=uo(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Ye(),0):c.return()})};q.Je=function(a){this.g.Je(a)};q.ag=function(){oo(this.g)};q.$b=function(){this.g.$b()};
584
- q.vf=function(a,b){b=void 0===b?!1:b;var c=this;return G(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.$b();return u(d,c.g.destroy(),2)}c.g=null;c.g=new $n(a,function(){return qo(c)},function(){return ro(c)},function(e,f){return so(c,e,f)},function(){return to(c)},function(){return uo(c)},b);c.g.init();B(d)})};
585
- function vo(a){a.g.init();a.m=new xf;for(var b=r(Pn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.na()||(f=Oa(f),a.j.dispatchEvent(f))});for(var d in Pa)a.m.o(a.h,Pa[d],function(f){a.g.na()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.vc=e,Object.defineProperty(a.l,b.vc,{configurable:!1,enumerable:!0,get:function(f){return function(){return wo(a,f.vc)}}(b),set:function(f){return function(g){var h=f.vc;a.g.na()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={vc:b.vc};a.B={};xo(a,
586
- function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return yo(a,f)}})});zo(a);a.j=new fb;a.j.Dd=a.l;a.s=new fb;a.s.Dd=a.B}function zo(a){var b=new Map;xo(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.C.set(c,d):a.C.set(d,c)):b.set(d,c)})}
587
- function xo(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=r(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
588
- function uo(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.le(),startTime:null};a.i.pause();for(var c=r(Rn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=r(Wn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=r(Xn);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function qo(a){var b=new L("caststatuschanged");a.dispatchEvent(b)}
589
- function ro(a){var b=new L(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
590
- function to(a){for(var b=r(Wn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(Rn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(Rn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(Xn);for(k=
569
+ function Pn(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Qn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
570
+ function Qn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
571
+ var Rn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Sn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Tn=["loop","playbackRate"],Un=["pause","play"],Vn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
572
+ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Wn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Xn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Yn=[["getConfiguration","configure"]],Zn=[["isTextTrackVisible","setTextTrackVisibility"]],$n="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
573
+ ao=["attach","attachCanvas","detach","load","unload"];function bo(a,b,c,d,e,f,g){var h=this;this.I=a;this.O=g;this.j=new O(b);this.P=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.M="";this.s=null;this.F=function(){return co(h)};this.G=function(k,l){k=Pn(l);switch(k.type){case "event":var m=k.targetName,p=Oa(k.event);h.B(m,p);break;case "update":m=k.update;for(p in m){k=h.g[p]||{};for(var n in m[p])k[n]=m[p][n]}h.C&&(h.P(),h.C=!1);break;case "asyncComplete":if(p=k.id,n=k.error,k=h.i[p],delete h.i[p],k)if(n){p=new M(n.severity,n.category,
574
+ n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;eo.add(this)}q=bo.prototype;q.destroy=function(){eo.delete(this);fo(this);go&&ho(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.s=null;return Promise.resolve()};q.na=function(){return this.h};q.Jd=function(){return this.M};
575
+ q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.ya();var a=new chrome.cast.SessionRequest(this.I,[],null,this.O,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(eo),d=c.next();!d.done;d=c.next())io(d.value,b)},function(b){for(var c=r(eo),d=c.next();!d.done;d=c.next())d=d.value,jo="available"==b,d.j.ya()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});jo&&this.j.R(ko);(a=go)&&a.status!=chrome.cast.SessionStatus.STOPPED?
576
+ io(this,a):go=null}else window.__onGCastApiAvailable!==lo&&(mo=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=lo)};q.Je=function(a){this.s=a;this.h&&no(this,{type:"appData",appData:this.s})};q.cast=function(a){var b=this;return G(function(c){if(!b.m)throw new M(1,8,8E3);if(!jo)throw new M(1,8,8001);if(b.h)throw new M(1,8,8002);b.l=new Lc;chrome.cast.requestSession(function(d){return oo(b,a,d)},function(d){return po(b,d)});return u(c,b.l,0)})};
577
+ function qo(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return oo(a,b,c)},function(c){return po(a,c)})}}q.$b=function(){if(this.h){fo(this);if(go){ho(this);try{go.stop(function(){},function(){})}catch(a){}go=null}co(this)}};
578
+ q.get=function(a,b){var c=this;if("video"==a){if(Un.includes(b))return function(){return c.Qf.apply(c,[a,b].concat(ia(Ga.apply(0,arguments))))}}else if("player"==a){if(Xn[b]&&!this.get("player","isLive")())return function(){};if($n.includes(b))return function(){return c.Qf.apply(c,[a,b].concat(ia(Ga.apply(0,arguments))))};if(ao.includes(b))return function(){return c.wh.apply(c,[a,b].concat(ia(Ga.apply(0,arguments))))};if(Vn[b]||Wn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
579
+ q.set=function(a,b,c){this.g[a][b]=c;no(this,{type:"set",targetName:a,property:b,value:c})};function oo(a,b,c){go=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);co(a);no(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}function po(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new M(2,8,c,b))}
580
+ q.Qf=function(a,b){no(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};q.wh=function(a,b){var c=Ga.apply(2,arguments),d=new Lc,e=this.J.toString();this.J++;this.i[e]=d;try{no(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function io(a,b){var c=a.K();a.l=new Lc;a.C=!0;oo(a,c,b)}function ho(a){var b=go;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
581
+ function co(a){var b=go?"connected"==go.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};fo(a)}a.h=b;a.M=b?go.receiver.friendlyName:"";a.j.ya()}function fo(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new M(1,7,7E3))}}function no(a,b){b=On(b);var c=go;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Xa)}catch(d){throw b=new M(2,8,8005,d),c=new L("error",(new Map).set("detail",b)),a.B("player",c),a.$b(),b;}}var ko=.02,jo=!1,go=null,mo=null,eo=new Set;
582
+ function lo(a){mo?window.__onGCastApiAvailable=mo:delete window.__onGCastApiAvailable;mo=null;if(a)for(var b=r(eo),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function ro(a,b,c,d){d=void 0===d?!1:d;fb.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.B=this.l=null;this.G=c;this.F=d;this.C=new Map;this.g=new bo(c,function(){return so(e)},function(){return to(e)},function(f,g){return uo(e,f,g)},function(){return vo(e)},function(){return wo(e)},d);xo(this)}pa(ro,fb);q=ro.prototype;
583
+ q.destroy=function(a){a&&this.g.$b();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.l=this.i=null;fb.prototype.release.call(this);return Promise.all(a)};q.zb=function(){return this.l};q.cc=function(){return this.B};q.qf=function(){return this.g.m&&jo};q.na=function(){return this.g.na()};q.Jd=function(){return this.g.Jd()};
584
+ q.cast=function(){var a=this,b;return G(function(c){return 1==c.g?(b=wo(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Ye(),0):c.return()})};q.Je=function(a){this.g.Je(a)};q.ag=function(){qo(this.g)};q.$b=function(){this.g.$b()};
585
+ q.vf=function(a,b){b=void 0===b?!1:b;var c=this;return G(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.$b();return u(d,c.g.destroy(),2)}c.g=null;c.g=new bo(a,function(){return so(c)},function(){return to(c)},function(e,f){return uo(c,e,f)},function(){return vo(c)},function(){return wo(c)},b);c.g.init();B(d)})};
586
+ function xo(a){a.g.init();a.m=new xf;for(var b=r(Rn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.na()||(f=Oa(f),a.j.dispatchEvent(f))});for(var d in Pa)a.m.o(a.h,Pa[d],function(f){a.g.na()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.vc=e,Object.defineProperty(a.l,b.vc,{configurable:!1,enumerable:!0,get:function(f){return function(){return yo(a,f.vc)}}(b),set:function(f){return function(g){var h=f.vc;a.g.na()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={vc:b.vc};a.B={};zo(a,
587
+ function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return Ao(a,f)}})});Bo(a);a.j=new fb;a.j.Dd=a.l;a.s=new fb;a.s.Dd=a.B}function Bo(a){var b=new Map;zo(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.C.set(c,d):a.C.set(d,c)):b.set(d,c)})}
588
+ function zo(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=r(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
589
+ function wo(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.le(),startTime:null};a.i.pause();for(var c=r(Tn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=r(Yn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=r(Zn);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function so(a){var b=new L("caststatuschanged");a.dispatchEvent(b)}
590
+ function to(a){var b=new L(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
591
+ function vo(a){for(var b=r(Yn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(Tn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(Tn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(Zn);for(k=
591
592
  h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new L("error",h);a.h.dispatchEvent(h)})}
592
- function wo(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.na()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.na()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
593
- function yo(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Hc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.rd()};
594
- if("setVideoContainer"==b)return function(c){return a.h.Re(c)};if(a.g.na()){if("getManifest"==b||"drmInfo"==b)return function(){Ta(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ta(b+"() does not work while casting!");return Promise.resolve()}}return a.g.na()&&0==Object.keys(a.g.g.video).length&&(Tn[b]||Un[b])||!a.g.na()?a.h[b].bind(a.h):a.g.get("player",b)}
595
- function so(a,b,c){a.g.na()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}I("shaka.cast.CastProxy",po);po.prototype.changeReceiverId=po.prototype.vf;po.prototype.forceDisconnect=po.prototype.$b;po.prototype.suggestDisconnect=po.prototype.ag;po.prototype.setAppData=po.prototype.Je;po.prototype.cast=po.prototype.cast;po.prototype.receiverName=po.prototype.Jd;po.prototype.isCasting=po.prototype.na;po.prototype.canCast=po.prototype.qf;po.prototype.getPlayer=po.prototype.cc;
596
- po.prototype.getVideo=po.prototype.zb;po.prototype.destroy=po.prototype.destroy;function Ao(a,b,c,d){fb.call(this);var e=this;this.g=a;this.h=b;this.j=new xf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new O(function(){Bo(e)});Co(this)}pa(Ao,fb);q=Ao.prototype;q.isConnected=function(){return this.H};q.eh=function(){return this.s};q.Gh=function(a){this.i=a};q.qg=function(){this.i=null};
593
+ function yo(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.na()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.na()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
594
+ function Ao(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Hc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.rd()};
595
+ if("setVideoContainer"==b)return function(c){return a.h.Re(c)};if(a.g.na()){if("getManifest"==b||"drmInfo"==b)return function(){Ta(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ta(b+"() does not work while casting!");return Promise.resolve()}}return a.g.na()&&0==Object.keys(a.g.g.video).length&&(Vn[b]||Wn[b])||!a.g.na()?a.h[b].bind(a.h):a.g.get("player",b)}
596
+ function uo(a,b,c){a.g.na()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}I("shaka.cast.CastProxy",ro);ro.prototype.changeReceiverId=ro.prototype.vf;ro.prototype.forceDisconnect=ro.prototype.$b;ro.prototype.suggestDisconnect=ro.prototype.ag;ro.prototype.setAppData=ro.prototype.Je;ro.prototype.cast=ro.prototype.cast;ro.prototype.receiverName=ro.prototype.Jd;ro.prototype.isCasting=ro.prototype.na;ro.prototype.canCast=ro.prototype.qf;ro.prototype.getPlayer=ro.prototype.cc;
597
+ ro.prototype.getVideo=ro.prototype.zb;ro.prototype.destroy=ro.prototype.destroy;function Co(a,b,c,d){fb.call(this);var e=this;this.g=a;this.h=b;this.j=new xf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new O(function(){Do(e)});Eo(this)}pa(Co,fb);q=Co.prototype;q.isConnected=function(){return this.H};q.eh=function(){return this.s};q.Gh=function(a){this.i=a};q.qg=function(){this.i=null};
597
598
  q.Hh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Fh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Eh=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
598
599
  q.destroy=function(){var a=this,b,c;return G(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.s=!0,a.l=null,a.B=null,fb.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();B(d)})};
599
- function Co(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Do(a)};b.onSenderDisconnected=function(){return Do(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Eo(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Eo(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return Fo(a,
600
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Go(a,e)};b.start();b=r(Pn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Ho(a,"video",e)});for(var d in Pa)a.j.o(a.h,Pa[d],function(e){return Ho(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Me(3840,2160):a.h.Me(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.s=
601
- !1;Io(a)});a.j.o(a.g,"playing",function(){a.s=!1;Io(a)});a.j.o(a.g,"pause",function(){Io(a)});a.j.o(a.h,"unloading",function(){a.s=!0;Io(a)});a.j.o(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.s=!0,Io(a))})).R(Jo)})}function Do(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Io(a)}
602
- function Io(a){var b;G(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c.return();b=new L("caststatuschanged");a.dispatchEvent(b);Ko(a)||Lo(a);B(c)})}
603
- function Mo(a,b,c){var d,e,f,g,h,k,l,m,n,p;G(function(t){switch(t.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,C(t,5),u(t,a.h.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:ua(t,3);break;case 5:return g=va(t),h=(new Map).set("detail",g),k=new L("error",h),a.h&&a.h.dispatchEvent(k),t.return();case 3:if(!a.h)return t.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
604
- a.g.autoplay=f;b.manifest&&(a.g.play(),Lo(a));B(t)}})}function Ho(a,b,c){a.h&&(Bo(a),Eo(a,{type:"event",targetName:b,event:c},a.l))}
605
- function Bo(a){a.I.R(No);for(var b={video:{},player:{}},c=r(Qn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in Vn)0==a.m%Vn[e]&&(b.player[e]=a.h[e]());for(var f in Tn)0==a.m%Tn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Eo(a,{type:"update",update:b},a.l);for(var g in Un)0==a.m%Un[g]&&(b={player:{}},b.player[g]=a.h[g](),Eo(a,{type:"update",update:b},a.l));a.F&&(a.m+=
606
- 1);Ko(a)}function Ko(a){return a.C&&(a.g.duration||a.h.T())?(Oo(a),a.C=!1,!0):!1}function Oo(a,b){var c={contentId:a.h.le(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Lo(a,void 0===b?0:b,c)}
607
- function Go(a,b){var c=Nn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;Mo(a,c.initState,c.appData);Bo(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
608
- "player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return Po(a,g,f,null)},function(h){return Po(a,g,f,h)})}}
609
- function Fo(a,b){var c=Nn(b.data);switch(c.type){case "PLAY":a.g.play();Lo(a);break;case "PAUSE":a.g.pause();Lo(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Lo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Lo(a));break;case "STOP":a.h.Ye().then(function(){a.h&&Lo(a)});break;case "GET_STATUS":Oo(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
610
- null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Lo(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Oo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Eo(a,{requestId:Number(c.requestId),type:h},a.B)});break;default:Eo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
611
- function Po(a,b,c,d){a.h&&Eo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Eo(a,b,c,d){a.H&&(a=Mn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Lo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?Qo:a.h.Pc()?Ro:a.g.paused?So:To,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Eo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
612
- I("shaka.cast.CastReceiver",Ao);Ao.prototype.destroy=Ao.prototype.destroy;Ao.prototype.setContentArtist=Ao.prototype.Eh;Ao.prototype.setContentImage=Ao.prototype.Fh;Ao.prototype.setContentTitle=Ao.prototype.Hh;Ao.prototype.clearContentMetadata=Ao.prototype.qg;Ao.prototype.setContentMetadata=Ao.prototype.Gh;Ao.prototype.isIdle=Ao.prototype.eh;Ao.prototype.isConnected=Ao.prototype.isConnected;var No=.5,Jo=5,Qo="IDLE",To="PLAYING",Ro="BUFFERING",So="PAUSED";function Uo(a,b,c){var d=Vo(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g.delete(null);if(1<g.size)throw new M(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Fe?(e=h.init||e,!1):!0}),f.length&&(a=Wo(e,f,c,g),0==a.length&&(a=[Eb("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Eb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
613
- r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{yf:g,qj:e,drmInfos:a,Cf:!0}}function Xo(a,b,c,d){var e=Uo(a,c,d);if(b.Cf){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Cf=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new M(2,4,4008);return e.yf||b.yf}
614
- function Yo(a){var b=0,c=Kc(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Hc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
615
- function Zo(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function $o(a){a=Wf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=jd(a.textContent);a=Yo(a).filter(function(b){return b.type===ap})[0];if(!a)return"";a=bd(a.value,!0);return(a=lg(a,"WRMHEADER"))?Zo(a):""}
616
- function Wo(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Fe];if(g){var h;if(h=Wf(f.node,"urn:microsoft:playready","pro")){h=jd(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Tf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Fe)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
617
- 226,251,75]),m=new Uint8Array([]);k=[{initData:Tf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Eb(g,f.init||a||h||k);if(g=bp.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Vo(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=cp(c.value))&&b.push(c);return b}
618
- function cp(a){var b=a.getAttribute("schemeIdUri"),c=Zf(a,"urn:mpeg:cenc:2013","default_KID"),d=Xf(a,"urn:mpeg:cenc:2013","pssh").map(ag);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new M(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:jd(f),keyId:null}})}catch(f){throw new M(2,4,4007);}return{node:a,Fe:b,keyId:c,init:0<e.length?e:null}}
619
- var ap=1,bp=(new Map).set("com.widevine.alpha",function(a){return(a=Wf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",$o).set("com.microsoft.playready.recommendation",$o).set("com.microsoft.playready.software",$o).set("com.microsoft.playready.hardware",$o).set("org.w3.clearkey",function(a){return(a=Wf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function dp(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
600
+ function Eo(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Fo(a)};b.onSenderDisconnected=function(){return Fo(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Go(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Go(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return Ho(a,
601
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Io(a,e)};b.start();b=r(Rn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Jo(a,"video",e)});for(var d in Pa)a.j.o(a.h,Pa[d],function(e){return Jo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Me(3840,2160):a.h.Me(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.s=
602
+ !1;Ko(a)});a.j.o(a.g,"playing",function(){a.s=!1;Ko(a)});a.j.o(a.g,"pause",function(){Ko(a)});a.j.o(a.h,"unloading",function(){a.s=!0;Ko(a)});a.j.o(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.s=!0,Ko(a))})).R(Lo)})}function Fo(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Ko(a)}
603
+ function Ko(a){var b;G(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c.return();b=new L("caststatuschanged");a.dispatchEvent(b);Mo(a)||No(a);B(c)})}
604
+ function Oo(a,b,c){var d,e,f,g,h,k,l,m,p,n;G(function(t){switch(t.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,D(t,5),u(t,a.h.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:ua(t,3);break;case 5:return g=va(t),h=(new Map).set("detail",g),k=new L("error",h),a.h&&a.h.dispatchEvent(k),t.return();case 3:if(!a.h)return t.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(p in b.playerAfterLoad)n=b.playerAfterLoad[p],a.h[p](n);
605
+ a.g.autoplay=f;b.manifest&&(a.g.play(),No(a));B(t)}})}function Jo(a,b,c){a.h&&(Do(a),Go(a,{type:"event",targetName:b,event:c},a.l))}
606
+ function Do(a){a.I.R(Po);for(var b={video:{},player:{}},c=r(Sn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in Xn)0==a.m%Xn[e]&&(b.player[e]=a.h[e]());for(var f in Vn)0==a.m%Vn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Go(a,{type:"update",update:b},a.l);for(var g in Wn)0==a.m%Wn[g]&&(b={player:{}},b.player[g]=a.h[g](),Go(a,{type:"update",update:b},a.l));a.F&&(a.m+=
607
+ 1);Mo(a)}function Mo(a){return a.C&&(a.g.duration||a.h.T())?(Qo(a),a.C=!1,!0):!1}function Qo(a,b){var c={contentId:a.h.le(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);No(a,void 0===b?0:b,c)}
608
+ function Io(a,b){var c=Pn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;Oo(a,c.initState,c.appData);Do(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
609
+ "player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return Ro(a,g,f,null)},function(h){return Ro(a,g,f,h)})}}
610
+ function Ho(a,b){var c=Pn(b.data);switch(c.type){case "PLAY":a.g.play();No(a);break;case "PAUSE":a.g.pause();No(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),No(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),No(a));break;case "STOP":a.h.Ye().then(function(){a.h&&No(a)});break;case "GET_STATUS":Qo(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
611
+ null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||No(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Qo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Go(a,{requestId:Number(c.requestId),type:h},a.B)});break;default:Go(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
612
+ function Ro(a,b,c,d){a.h&&Go(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Go(a,b,c,d){a.H&&(a=On(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function No(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?So:a.h.Pc()?To:a.g.paused?Uo:Vo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Go(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
613
+ I("shaka.cast.CastReceiver",Co);Co.prototype.destroy=Co.prototype.destroy;Co.prototype.setContentArtist=Co.prototype.Eh;Co.prototype.setContentImage=Co.prototype.Fh;Co.prototype.setContentTitle=Co.prototype.Hh;Co.prototype.clearContentMetadata=Co.prototype.qg;Co.prototype.setContentMetadata=Co.prototype.Gh;Co.prototype.isIdle=Co.prototype.eh;Co.prototype.isConnected=Co.prototype.isConnected;var Po=.5,Lo=5,So="IDLE",Vo="PLAYING",To="BUFFERING",Uo="PAUSED";function Wo(a,b,c){var d=Xo(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g.delete(null);if(1<g.size)throw new M(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Fe?(e=h.init||e,!1):!0}),f.length&&(a=Yo(e,f,c,g),0==a.length&&(a=[Eb("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Eb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
614
+ r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{yf:g,qj:e,drmInfos:a,Cf:!0}}function Zo(a,b,c,d){var e=Wo(a,c,d);if(b.Cf){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Cf=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new M(2,4,4008);return e.yf||b.yf}
615
+ function $o(a){var b=0,c=Kc(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Hc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
616
+ function ap(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function bp(a){a=Wf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=jd(a.textContent);a=$o(a).filter(function(b){return b.type===cp})[0];if(!a)return"";a=bd(a.value,!0);return(a=lg(a,"WRMHEADER"))?ap(a):""}
617
+ function Yo(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Fe];if(g){var h;if(h=Wf(f.node,"urn:microsoft:playready","pro")){h=jd(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Tf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Fe)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
618
+ 226,251,75]),m=new Uint8Array([]);k=[{initData:Tf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Eb(g,f.init||a||h||k);if(g=dp.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Xo(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=ep(c.value))&&b.push(c);return b}
619
+ function ep(a){var b=a.getAttribute("schemeIdUri"),c=Zf(a,"urn:mpeg:cenc:2013","default_KID"),d=Xf(a,"urn:mpeg:cenc:2013","pssh").map(ag);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new M(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:jd(f),keyId:null}})}catch(f){throw new M(2,4,4007);}return{node:a,Fe:b,keyId:c,init:0<e.length?e:null}}
620
+ var cp=1,dp=(new Map).set("com.widevine.alpha",function(a){return(a=Wf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",bp).set("com.microsoft.playready.recommendation",bp).set("com.microsoft.playready.software",bp).set("com.microsoft.playready.hardware",bp).set("org.w3.clearkey",function(a){return(a=Wf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function fp(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
620
621
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
621
- function ep(a,b){var c=fp(a,b,"timescale"),d=1;c&&(d=hg(c)||1);var e=fp(a,b,"duration");c=hg(e||"");"image"==a.L.contentType&&(c=jg(e||""));c&&(c/=d);var f=fp(a,b,"startNumber");e=Number(fp(a,b,"presentationTimeOffset"))||0;var g=ig(f||"");if(null==f||null==g)g=1;f=gp(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.Y.duration||Infinity;f=Vf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],n=f[l+1],p=cg(m,"t",ig),t=cg(m,"d",ig);m=cg(m,"r",gg);null!=p&&(p-=e);if(!t)break;p=null!=p?p:k;m=m||0;if(0>
622
- m)if(n){n=cg(n,"t",ig);if(null==n)break;else if(p>=n)break;m=Math.ceil((n-p)/t)-1}else{if(Infinity==a)break;else if(p/b>=a)break;m=Math.ceil((a*b-p)/t)-1}0<h.length&&p!=k&&(h[h.length-1].end=p/b);for(n=0;n<=m;++n)k=p+t,h.push({start:p/b,end:k/b,Lh:p}),p=k}b=h}return{timescale:d,xa:c,pc:g,ob:e/d||0,Ze:e,timeline:b}}function fp(a,b,c){return[b(a.L),b(a.ua),b(a.oa)].filter(Cb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
623
- function gp(a,b,c){return[b(a.L),b(a.ua),b(a.oa)].filter(Cb).map(function(d){return Uf(d,c)}).reduce(function(d,e){return d||e})}
624
- function hp(a,b,c,d,e,f){for(var g=Zf(a,"http://www.w3.org/1999/xlink","href"),h=Zf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return $e(new M(2,4,4028));if("onLoad"!=h)return $e(new M(2,4,4027));var m=Db([d],[g]);return e.request(0,of(m,b)).ha(function(n){n=ng(n.data,a.tagName);if(!n)return $e(new M(2,4,4001,g));
625
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return ip(a,b,c,m[0],e,f+1)})}
626
- function ip(a,b,c,d,e,f){f=void 0===f?0:f;if(Zf(a,"http://www.w3.org/1999/xlink","href")){var g=hp(a,b,c,d,e,f);c&&(g=g.ha(void 0,function(){return ip(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Zf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(ip(k,b,c,d,e,f)));return df(g).ha(function(){return a})};function jp(a,b,c,d,e,f,g){var h,k=(new If).S("sidx",function(l){h=kp(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new M(2,3,3004);}
627
- function kp(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new M(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Cb(),m=g.reader.Cb();g.reader.skip(2);var n=g.reader.Be();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.N(),t=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.N();g.reader.skip(4);if(1==t)throw new M(2,3,3006);h.push(new zi(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function lp(a){this.h=Kc(a);this.g=new Ff(this.h,0)}lp.prototype.wa=function(){return this.g.wa()};
628
- function mp(a){var b=np(a);if(7<b.length)throw new M(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=np(a);a:{d=r(op);for(var e=d.next();!e.done;e=d.next())if(Fc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ma();else{if(8==b.length&&b[1]&224)throw new M(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.ma()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ma();d=Kc(a.h,a.g.ma(),b);a.g.skip(b);return new pp(c,
629
- d)}function np(a){var b=a.g.ma(),c=a.g.mb();if(0==c)throw new M(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Hc(a.h,b,c)}var op=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function pp(a,b){this.id=a;this.g=b}
630
- function qp(a){if(8<a.g.byteLength)throw new M(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new M(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function rp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new lp(a.g);for(var n=null,p=null;a.wa();){var t=mp(a);if(187==t.id){var v=sp(t);v&&(t=c*v.Mh,v=b+v.vh,null!=n&&m.push(new zi(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new zi(n+g,d+g,l,p,null,f,g,h,k));return m}
631
- function sp(a){var b=new lp(a.g);a=mp(b);if(179!=a.id)throw new M(2,3,3013);a=qp(a);b=mp(b);if(183!=b.id)throw new M(2,3,3012);b=new lp(b.g);for(var c=0;b.wa();){var d=mp(b);if(241==d.id){c=qp(d);break}}return{Mh:a,vh:c}};function tp(a,b){b=gp(a,b,"Initialization");if(!b)return null;var c=a.L.La,d=b.getAttribute("sourceURL");d&&(c=Db(a.L.La,[d]));d=0;var e=null;if(b=cg(b,"range",fg))d=b.start,e=b.end;return new xi(function(){return c},d,e,up(a))}
632
- function vp(a,b){var c=Number(fp(a,wp,"presentationTimeOffset"))||0,d=fp(a,wp,"timescale"),e=1;d&&(e=hg(d)||1);var f=c/e||0,g=tp(a,wp);xp(a,g);var h=gf(a);return{ac:function(){var k=gp(h,wp,"RepresentationIndex");var l=h.L.La;k&&(k=k.getAttribute("sourceURL"))&&(l=Db(h.L.La,[k]));k=yp(h);return zp(h,b,g,l,k.start,k.end,f)}}}
633
- function zp(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,w,x,A,z,D,E;return G(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.vb||!a.Y.Lf,l=a.Y.start,m=a.Y.duration,n=a.L.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Na(),c.Ra,c.Ba):null],p=null,u(F,Promise.all(v),2);y=F.h;w=y[0];x=y[1]||null;A=null;z=l-g;D=l;E=m?l+m:Infinity;if("mp4"==n)var H=jp(w,e,d,c,z,D,E);else{H=new lp(x);if(440786851!=mp(H).id)throw new M(2,3,3008);var J=mp(H);if(408125543!=J.id)throw new M(2,3,3009);H=J.g.byteOffset;
634
- J=new lp(J.g);for(var K=null;J.wa();){var N=mp(J);if(357149030==N.id){K=N;break}}if(!K)throw new M(2,3,3010);K=new lp(K.g);N=1E6;for(J=null;K.wa();){var V=mp(K);if(2807729==V.id)N=qp(V);else if(17545==V.id)if(4==V.g.byteLength)J=V.g.getFloat32(0);else if(8==V.g.byteLength)J=V.g.getFloat64(0);else throw new M(2,3,3003);}if(null==J)throw new M(2,3,3011);K=N/1E9;J*=K;N=mp(new lp(w));if(475249515!=N.id)throw new M(2,3,3007);H=rp(N,H,K,J,d,c,z,D,E)}A=H;h.lc(A);t=new Qj(A);k&&t.wb(D,E,!0);return F.return(t)})}
635
- function wp(a){return a.Xc}function yp(a){var b=gp(a,wp,"RepresentationIndex");a=fp(a,wp,"indexRange");a=fg(a||"");b&&(a=cg(b,"range",fg,a));return a}function xp(a,b){Ap(a,b);if(!yp(a))throw new M(2,4,4002);}function Ap(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Ib&&"mp4"!=c&&"webm"!=c)throw new M(2,4,4006);if("webm"==c&&!b)throw new M(2,4,4005);}
636
- function up(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Cd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Bp(a,b){var c=tp(a,Cp),d=Dp(a);if(!d.xa&&!d.timeline&&1<d.jc.length)throw new M(2,4,4002);if(!d.xa&&!a.Y.duration&&!d.timeline&&1==d.jc.length)throw new M(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new M(2,4,4002);var e=null,f=null;a.oa.id&&a.L.id&&(f=b[a.oa.id+","+a.L.id])&&(e=f.segmentIndex);var g=Ep(a.Y.start,a.Y.duration,a.L.La,d,c);b=!e;e?e.kc(g,a.presentationTimeline.jb()):e=new Qj(g);a.presentationTimeline.lc(g);a.vb&&a.Y.Lf||e.wb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
637
- Infinity,b);f&&(f.segmentIndex=e);return{ac:function(){e&&0!=e.g.length||e.Rc(g);return Promise.resolve(e)}}}function Cp(a){return a.Db}function Dp(a){var b=Fp(a);a=ep(a,Cp);var c=a.pc;0==c&&(c=1);var d=0;a.xa?d=a.xa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{xa:a.xa,startTime:d,pc:c,ob:a.ob,timeline:a.timeline,jc:b}}
638
- function Ep(a,b,c,d,e){var f=d.jc.length;d.timeline&&d.timeline.length!=d.jc.length&&(f=Math.min(d.timeline.length,d.jc.length));for(var g=a-d.ob,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Vd:m.Vd},n++){var p=d.jc[n];m.Vd=Db(c,[p.kh]);var t=void 0;t=null!=d.xa?l+d.xa:d.timeline?d.timeline[n].end:l+b;k.push(new zi(a+l,a+t,function(v){return function(){return v.Vd}}(m),p.start,p.end,e,g,a,h));l=t}return k}
639
- function Fp(a){return[a.L.Db,a.ua.Db,a.oa.Db].filter(Cb).map(function(b){return Vf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Jf&&(a.Jf=!0);var c=b.getAttribute("media");b=cg(b,"mediaRange",fg,{start:0,end:null});return{kh:c,start:b.start,end:b.end}})};function Gp(a,b,c,d,e,f){var g=Ip(a),h=Jp(a);Kp(h);var k=gf(a);if(h.Oc)return Ap(a,g),{ac:function(){var t=dp(h.Oc,k.L.id,null,k.bandwidth||null,null);t=Db(k.L.La,[t]);return zp(k,b,g,t,0,null,h.ob)}};if(h.xa)return d||"image"===a.ua.contentType||(a.presentationTimeline.xe(h.xa),a.presentationTimeline.ye(a.Y.start)),{ac:function(){return Lp(k,h,e,g,f)}};var l=null;d=d=null;a.oa.id&&a.L.id&&(d=a.oa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Mp(k,h,g);c=a.Y.start;var n=a.Y.duration?a.Y.start+a.Y.duration:
640
- Infinity,p=Infinity!=n;l?(p&&(new Qj(m)).wb(c,n,!0),l.kc(m,a.presentationTimeline.jb())):l=new Qj(m);a.presentationTimeline.lc(m);p&&l.wb(c,n);d&&a.vb&&(d.segmentIndex=l);return{ac:function(){l&&0!=l.g.length||l.Rc(m);return Promise.resolve(l)}}}function Np(a){return a.Yc}function Jp(a){var b=ep(a,Np),c=fp(a,Np,"media");a=fp(a,Np,"index");return{xa:b.xa,timescale:b.timescale,pc:b.pc,ob:b.ob,Ze:b.Ze,timeline:b.timeline,we:c,Oc:a}}
641
- function Kp(a){var b=a.Oc?1:0;b+=a.timeline?1:0;b+=a.xa?1:0;if(0==b)throw new M(2,4,4002);1!=b&&(a.Oc&&(a.timeline=null),a.xa=null);if(!a.Oc&&!a.we)throw new M(2,4,4002);}
642
- function Lp(a,b,c,d,e){function f(K){var N=(K-t)*p,V=N+b.ob,U=N+l;N=U+p;var P=Math.min(N,h());U=new zi(U,P,function(){var ca=dp(y,x,K,w,V*v);return Db(A,[ca])},0,null,d,z,l,h());U.j=N;return U}function g(){var K=[Math.max(k.jb(),l),Math.min(k.Ib(),h())].map(function(N){return N-l});return[Math.ceil(K[0]/p),Math.ceil(K[1]/p)-1].map(function(N){return N+t})}function h(){var K=null!=m&&e[m]||n;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.oa.id,n=a.Y.duration,p=b.xa,t=b.pc,v=b.timescale,
643
- y=b.we,w=a.bandwidth||null,x=a.L.id,A=a.L.La,z=l-b.ob,D=g();a=a.vb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var E=a;E<=D;++E){var F=f(E);c.push(F)}var H=new Qj(c);c=k.Ib()<h();E=k.T();if(c||E){var J=Math.max(a,D+1);H.Nd(p,function(){var K=k.jb();H.Gb(K);var N=r(g());N.next();N=N.next().value;for(var V=[];J<=N;){var U=f(J);V.push(U);J++}return K>h()&&!V.length?null:V})}return Promise.resolve(H)}
644
- function Mp(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.ob;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Ud:h.Ud,Yd:h.Yd,ae:h.ae,Rd:h.Rd,ce:h.ce,Sd:h.Sd},k++){var l=b.timeline[k],m=l.start,n=l.Lh;l=l.end;h.ae=k+b.pc;h.ce=n+b.Ze;h.Yd=a.L.id;h.Rd=a.bandwidth||null;h.Ud=b.we;h.Sd=a.L.La;g.push(new zi(d+m,d+l,function(p){return function(){var t=dp(p.Ud,p.Yd,p.ae,p.Rd||null,p.ce);return Db(p.Sd,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
645
- function Ip(a){var b=fp(a,Np,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.La;return new xi(function(){var f=dp(b,c,null,d,null);return Db(e,[f])},0,null,up(a))};function Op(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Op.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
646
- function Pp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,A,z,D,E,F,H,J,K,N,V,U,P,ca,Aa,za;return G(function(Ua){switch(Ua.g){case 1:d=Jb;Qp(b);Rp(b);Sp(b);Tp(b);if(!c&&1==b.length){e=b[0];a.g=e.md;a.h=e.Od;a.j=e.textStreams;a.i=e.imageStreams;Ua.D(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ua.return();k=b.map(function(ab){return ab.md});l=b.map(function(ab){return ab.Od});m=b.map(function(ab){return ab.textStreams});n=b.map(function(ab){return ab.imageStreams});
647
- p=r(m);for(t=p.next();!t.done;t=p.next())v=t.value,v.push(Up(d.ka));y=r(n);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(Up(d.Ac));return u(Ua,Vp(a.g,k,f,Wp,Xp),3);case 3:return u(Ua,Vp(a.h,l,f,Wp,Xp),4);case 4:return u(Ua,Vp(a.j,m,f,Wp,Xp),5);case 5:return u(Ua,Vp(a.i,n,f,Wp,Xp),2);case 2:A=0;z=[];if(a.h.length&&a.g.length)for(K=r(a.g),N=K.next();!N.done;N=K.next())for(V=N.value,U=r(a.h),P=U.next();!P.done;P=U.next())ca=P.value,Aa=Yg(V.drmInfos,ca.drmInfos),V.drmInfos.length&&ca.drmInfos.length&&
648
- !Aa.length||(za=A++,z.push({id:za,language:V.language,primary:V.primary,audio:V,video:ca,bandwidth:(V.bandwidth||0)+(ca.bandwidth||0),drmInfos:Aa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(D=a.h.concat(a.g),E=r(D),F=E.next();!F.done;F=E.next())H=F.value,J=A++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.hd?H:null,video:H.type==d.Ka?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
649
- a.l=z;B(Ua)}})}function Qp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.md),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&hc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.md=c}}
650
- function Sp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&hc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
651
- function Rp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Od),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&hc(e.roles,h.roles)&&Ef(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Od=c}}
652
- function Tp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
653
- function Yp(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,A,z,D,E,F,H,J,K,N,V;return G(function(U){switch(U.g){case 1:b=Jb;if(1==a.length)return U.return(a[0]);c=a.map(function(P){return P.filter(function(ca){return ca.type==b.hd})});d=a.map(function(P){return P.filter(function(ca){return ca.type==b.Ka})});e=a.map(function(P){return P.filter(function(ca){return ca.type==b.ka})});f=a.map(function(P){return P.filter(function(ca){return ca.type==b.Ac})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,
654
- k.push(Zp(b.ka));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Zp(b.Ac));return u(U,Vp([],c,0,$p,aq),2);case 2:return p=U.h,u(U,Vp([],d,0,$p,aq),3);case 3:return t=U.h,u(U,Vp([],e,0,$p,aq),4);case 4:return v=U.h,u(U,Vp([],f,0,$p,aq),5);case 5:y=U.h;w=0;if(t.length&&p.length)for(E=r(p),F=E.next();!F.done;F=E.next())for(H=F.value,J=r(t),K=J.next();!K.done;K=J.next())N=K.value,V=w++,N.variantIds.push(V),H.variantIds.push(V);else for(x=t.concat(p),A=r(x),z=A.next();!z.done;z=A.next())D=z.value,
655
- D.variantIds=[w++];return U.return(t.concat(p).concat(v).concat(y))}})}
656
- function Vp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y,w,x,A,z,D,E,F,H,J,K;return G(function(N){switch(N.g){case 1:f=Jb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){N.D(4);break}m=l.value;return u(N,bq(m,b,c,e,g),5);case 5:n=N.h;if(!n)throw new M(2,4,4037);l=k.next();N.D(2);break;case 4:p=r(g);for(t=p.next();!t.done;t=p.next())for(v=t.value,y=r(v),w=y.next();!w.done;w=y.next())x=w.value,(A=cq(x,b,d,e,g))&&a.push(A);z=r(g);for(t=z.next();!t.done;t=
657
- z.next())for(D=t.value,E={},F=r(D),w=F.next();!w.done;E={sb:E.sb},w=F.next())if(E.sb=w.value,H=E.sb.type==f.ka&&!E.sb.language,J=E.sb.type==f.Ac&&!E.sb.tilesLayout,!H&&!J&&(K=a.some(function(V){return function(U){return U.mimeType==V.sb.mimeType&&zd(U.codecs)==zd(V.sb.codecs)}}(E))))throw new M(2,4,4037);return N.return(a)}})}function bq(a,b,c,d,e){return G(function(f){if(1==f.g)return dq(b,a),a.matchedStreams?a.segmentIndex?u(f,eq(a,c),2):f.D(2):f.return(!1);fq(a,c,d,e);return f.return(!0)})}
658
- function eq(a,b){var c,d,e,f,g,h,k;return G(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Uj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.l.push(k.segmentIndex);B(l)})}
659
- function cq(a,b,c,d,e){var f=c(a);dq(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return G(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Uj;return u(g,eq(f,0),0)})});if(!f.matchedStreams)return null;fq(f,0,d,e);return f}function fq(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==Sb(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
660
- function Wp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
661
- function $p(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
662
- function Xp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Yg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new M(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
663
- (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Wp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Xp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Xp(a.trickModeVideo,b)}
664
- function aq(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=r(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
665
- function dq(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:gq,video:gq,text:hq,image:iq}[e.type],g={audio:jq,video:kq,text:lq,image:mq}[e.type],h=null;d=r(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function gq(a,b){var c;!(c=b.mimeType!=a.mimeType||zd(b.codecs)!=zd(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<Yg(a,b).length:1));return c?!1:!0}
666
- function hq(a,b){return a.language?b.language?0==Sb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function iq(a){return a.tilesLayout?!0:!1}
667
- function jq(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
668
- d=nq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==oq)return!0;if(d==pq)return!1;d=nq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==oq?!0:d==pq?!1:a.bandwidth&&qq(a.bandwidth,b.bandwidth,c.bandwidth)==oq?!0:!1}
669
- function kq(a,b,c){if(a.id==c.id)return!0;var d=nq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==oq)return!0;if(d==pq)return!1;if(a.frameRate){d=nq(a.frameRate,b.frameRate,c.frameRate);if(d==oq)return!0;if(d==pq)return!1}return a.bandwidth&&qq(a.bandwidth,b.bandwidth,c.bandwidth)==oq?!0:!1}
670
- function lq(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(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(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!=
671
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function mq(a,b,c){return a.id==c.id?!0:nq(a.width*a.height,b.width*b.height,c.width*c.height)==oq?!0:!1}function Zp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
672
- function Up(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Qj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
673
- function nq(a,b,c){if(b==a&&a!=c)return pq;if(c==a&&a!=b)return oq;if(b>a){if(c<=a||c-a<b-a)return oq;if(c-a>b-a)return pq}else{if(c>a)return pq;if(a-c<a-b)return oq;if(a-c>a-b)return pq}return rq}function qq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?oq:b<a?pq:rq}var oq=1,rq=0,pq=-1;function sq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.M={};this.j=new Op;this.H=0;this.J=new ac(5);this.G=new O(function(){tq(a)});this.s=new hf;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=sq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return G(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,uq(c),2);d=e.h;c.h&&vq(c,d);if(!c.h)throw new M(2,7,7001);return e.return(c.i)})};
674
- q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.s.destroy()};q.update=function(){var a=this,b;return G(function(c){if(1==c.g)return C(c,2),u(c,uq(a),4);if(2!=c.g)return ua(c,0);b=va(c);if(!a.h||!b)return c.return();a.h.onError(b);B(c)})};q.onExpirationUpdated=function(){};
675
- function uq(a){var b,c,d,e,f,g,h;return G(function(k){if(1==k.g)return b=of(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),jf(a.s,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,wq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k.return(h)})}
676
- function wq(a,b,c){var d,e,f,g,h;return G(function(k){if(1==k.g){d=ng(b,"MPD");if(!d)throw new M(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(xq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=ip(d,a.g.retryParameters,f,c,a.h.networkingEngine);jf(a.s,g);return u(k,g.promise,2)}h=k.h;return k.return(xq(a,h,c))})}
677
- function xq(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,A,z,D,E,F,H,J,K,N,V,U,P,ca,Aa,za,Ua,ab;return G(function(Na){switch(Na.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Vf(b,"Location").map(ag).filter(Cb);0<f.length&&(g=Db(e,f),e=a.m=g);h=Vf(b,"BaseURL");k=h.map(ag);l=Db(e,k);m=0;h&&h.length&&(m=cg(h[0],"availabilityTimeOffset",jg)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=cg(b,"minBufferTime",eg)||0);a.H=cg(b,"minimumUpdatePeriod",eg,-1);t=cg(b,"availabilityStartTime",dg);v=cg(b,
678
- "timeShiftBufferDepth",eg);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=cg(b,"suggestedPresentationDelay",eg));x=a.g.dash.ignoreMaxSegmentDuration;A=null;x||(A=cg(b,"maxSegmentDuration",eg));z=b.getAttribute("type")||"static";if(a.i)for(D=a.i.presentationTimeline,E=r(Object.values(a.l)),F=E.next();!F.done;F=E.next())H=F.value,H.segmentIndex&&H.segmentIndex.Gb(D.jb());else J=a.g.defaultPresentationDelay||1.5*p,K=null!=w?w:J,D=new Q(t,K,a.g.dash.autoCorrectDrift);D.Zc("static"==z);(N=D.T())&&
679
- !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);D.Pe(v);V=b.getAttribute("profiles")||"";U={vb:"static"!=z,presentationTimeline:D,oa:null,Y:null,ua:null,L:null,bandwidth:0,Jf:!1,Zb:m,profiles:V.split(",")};P=yq(a,U,l,b);ca=P.duration;Aa=P.periods;"static"!=z&&P.Af||D.ab(ca||Infinity);a.C&&!a.F&&(za=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?D.Sf(a.C):a.C&&Ta("Low-latency DASH 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.");
680
- D.xe(A||1);return u(Na,Pp(a.j,Aa,U.vb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Na.D(3);break}a.i={presentationTimeline:D,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0,sequenceMode:a.g.dash.sequenceMode};if(!D.dg()){Na.D(4);break}Ua=Vf(b,"UTCTiming");return u(Na,zq(a,l,Ua),5);case 5:ab=Na.h;if(!a.h)return Na.return();D.Tf(ab);case 4:D.ue();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),
622
+ function gp(a,b){var c=hp(a,b,"timescale"),d=1;c&&(d=hg(c)||1);var e=hp(a,b,"duration");c=hg(e||"");"image"==a.L.contentType&&(c=jg(e||""));c&&(c/=d);var f=hp(a,b,"startNumber");e=Number(hp(a,b,"presentationTimeOffset"))||0;var g=ig(f||"");if(null==f||null==g)g=1;f=ip(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.Y.duration||Infinity;f=Vf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=cg(m,"t",ig),t=cg(m,"d",ig);m=cg(m,"r",gg);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
623
+ m)if(p){p=cg(p,"t",ig);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,Lh:n}),n=k}b=h}return{timescale:d,xa:c,pc:g,pb:e/d||0,Ze:e,timeline:b}}function hp(a,b,c){return[b(a.L),b(a.ua),b(a.oa)].filter(Cb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
624
+ function ip(a,b,c){return[b(a.L),b(a.ua),b(a.oa)].filter(Cb).map(function(d){return Uf(d,c)}).reduce(function(d,e){return d||e})}
625
+ function jp(a,b,c,d,e,f){for(var g=Zf(a,"http://www.w3.org/1999/xlink","href"),h=Zf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return $e(new M(2,4,4028));if("onLoad"!=h)return $e(new M(2,4,4027));var m=Db([d],[g]);return e.request(0,of(m,b)).ha(function(p){p=ng(p.data,a.tagName);if(!p)return $e(new M(2,4,4001,g));
626
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return kp(a,b,c,m[0],e,f+1)})}
627
+ function kp(a,b,c,d,e,f){f=void 0===f?0:f;if(Zf(a,"http://www.w3.org/1999/xlink","href")){var g=jp(a,b,c,d,e,f);c&&(g=g.ha(void 0,function(){return kp(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Zf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(kp(k,b,c,d,e,f)));return df(g).ha(function(){return a})};function lp(a,b,c,d,e,f,g){var h,k=(new If).S("sidx",function(l){h=mp(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new M(2,3,3004);}
628
+ function mp(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new M(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Cb(),m=g.reader.Cb();g.reader.skip(2);var p=g.reader.Be();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.N(),t=(n&2147483648)>>>31;n&=2147483647;var v=g.reader.N();g.reader.skip(4);if(1==t)throw new M(2,3,3006);h.push(new zi(l/k+c,(l+v)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=v;a+=n}g.parser.stop();return h};function np(a){this.h=Kc(a);this.g=new Ff(this.h,0)}np.prototype.wa=function(){return this.g.wa()};
629
+ function op(a){var b=pp(a);if(7<b.length)throw new M(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=pp(a);a:{d=r(qp);for(var e=d.next();!e.done;e=d.next())if(Fc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ma();else{if(8==b.length&&b[1]&224)throw new M(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.ma()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ma();d=Kc(a.h,a.g.ma(),b);a.g.skip(b);return new rp(c,
630
+ d)}function pp(a){var b=a.g.ma(),c=a.g.ob();if(0==c)throw new M(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Hc(a.h,b,c)}var qp=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function rp(a,b){this.id=a;this.g=b}
631
+ function sp(a){if(8<a.g.byteLength)throw new M(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new M(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function tp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new np(a.g);for(var p=null,n=null;a.wa();){var t=op(a);if(187==t.id){var v=up(t);v&&(t=c*v.Mh,v=b+v.vh,null!=p&&m.push(new zi(p+g,t+g,l,n,v-1,f,g,h,k)),p=t,n=v)}}null!=p&&m.push(new zi(p+g,d+g,l,n,null,f,g,h,k));return m}
632
+ function up(a){var b=new np(a.g);a=op(b);if(179!=a.id)throw new M(2,3,3013);a=sp(a);b=op(b);if(183!=b.id)throw new M(2,3,3012);b=new np(b.g);for(var c=0;b.wa();){var d=op(b);if(241==d.id){c=sp(d);break}}return{Mh:a,vh:c}};function vp(a,b){b=ip(a,b,"Initialization");if(!b)return null;var c=a.L.Na,d=b.getAttribute("sourceURL");d&&(c=Db(a.L.Na,[d]));d=0;var e=null;if(b=cg(b,"range",fg))d=b.start,e=b.end;return new xi(function(){return c},d,e,wp(a))}
633
+ function xp(a,b){var c=Number(hp(a,yp,"presentationTimeOffset"))||0,d=hp(a,yp,"timescale"),e=1;d&&(e=hg(d)||1);var f=c/e||0,g=vp(a,yp);zp(a,g);var h=gf(a);return{ac:function(){var k=ip(h,yp,"RepresentationIndex");var l=h.L.Na;k&&(k=k.getAttribute("sourceURL"))&&(l=Db(h.L.Na,[k]));k=Ap(h);return Bp(h,b,g,l,k.start,k.end,f)}}}
634
+ function Bp(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,w,x,A,z,C,E;return G(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.vb||!a.Y.Lf,l=a.Y.start,m=a.Y.duration,p=a.L.mimeType.split("/")[1],n=b,t=null,v=[n(d,e,f),"webm"==p?n(c.Pa(),c.Sa,c.Ba):null],n=null,u(F,Promise.all(v),2);y=F.h;w=y[0];x=y[1]||null;A=null;z=l-g;C=l;E=m?l+m:Infinity;if("mp4"==p)var H=lp(w,e,d,c,z,C,E);else{H=new np(x);if(440786851!=op(H).id)throw new M(2,3,3008);var J=op(H);if(408125543!=J.id)throw new M(2,3,3009);H=J.g.byteOffset;
635
+ J=new np(J.g);for(var K=null;J.wa();){var N=op(J);if(357149030==N.id){K=N;break}}if(!K)throw new M(2,3,3010);K=new np(K.g);N=1E6;for(J=null;K.wa();){var V=op(K);if(2807729==V.id)N=sp(V);else if(17545==V.id)if(4==V.g.byteLength)J=V.g.getFloat32(0);else if(8==V.g.byteLength)J=V.g.getFloat64(0);else throw new M(2,3,3003);}if(null==J)throw new M(2,3,3011);K=N/1E9;J*=K;N=op(new np(w));if(475249515!=N.id)throw new M(2,3,3007);H=tp(N,H,K,J,d,c,z,C,E)}A=H;h.lc(A);t=new Sj(A);k&&t.wb(C,E,!0);return F.return(t)})}
636
+ function yp(a){return a.Xc}function Ap(a){var b=ip(a,yp,"RepresentationIndex");a=hp(a,yp,"indexRange");a=fg(a||"");b&&(a=cg(b,"range",fg,a));return a}function zp(a,b){Cp(a,b);if(!Ap(a))throw new M(2,4,4002);}function Cp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Ib&&"mp4"!=c&&"webm"!=c)throw new M(2,4,4006);if("webm"==c&&!b)throw new M(2,4,4005);}
637
+ function wp(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Cd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Dp(a,b){var c=vp(a,Ep),d=Fp(a);if(!d.xa&&!d.timeline&&1<d.jc.length)throw new M(2,4,4002);if(!d.xa&&!a.Y.duration&&!d.timeline&&1==d.jc.length)throw new M(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new M(2,4,4002);var e=null,f=null;a.oa.id&&a.L.id&&(f=b[a.oa.id+","+a.L.id])&&(e=f.segmentIndex);var g=Gp(a.Y.start,a.Y.duration,a.L.Na,d,c);b=!e;e?e.kc(g,a.presentationTimeline.kb()):e=new Sj(g);a.presentationTimeline.lc(g);a.vb&&a.Y.Lf||e.wb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
638
+ Infinity,b);f&&(f.segmentIndex=e);return{ac:function(){e&&0!=e.g.length||e.Rc(g);return Promise.resolve(e)}}}function Ep(a){return a.Db}function Fp(a){var b=Hp(a);a=gp(a,Ep);var c=a.pc;0==c&&(c=1);var d=0;a.xa?d=a.xa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{xa:a.xa,startTime:d,pc:c,pb:a.pb,timeline:a.timeline,jc:b}}
639
+ function Gp(a,b,c,d,e){var f=d.jc.length;d.timeline&&d.timeline.length!=d.jc.length&&(f=Math.min(d.timeline.length,d.jc.length));for(var g=a-d.pb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={Vd:m.Vd},p++){var n=d.jc[p];m.Vd=Db(c,[n.kh]);var t=void 0;t=null!=d.xa?l+d.xa:d.timeline?d.timeline[p].end:l+b;k.push(new zi(a+l,a+t,function(v){return function(){return v.Vd}}(m),n.start,n.end,e,g,a,h));l=t}return k}
640
+ function Hp(a){return[a.L.Db,a.ua.Db,a.oa.Db].filter(Cb).map(function(b){return Vf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Jf&&(a.Jf=!0);var c=b.getAttribute("media");b=cg(b,"mediaRange",fg,{start:0,end:null});return{kh:c,start:b.start,end:b.end}})};function Jp(a,b,c,d,e,f){var g=Kp(a),h=Lp(a);Mp(h);var k=gf(a);if(h.Oc)return Cp(a,g),{ac:function(){var t=fp(h.Oc,k.L.id,null,k.bandwidth||null,null);t=Db(k.L.Na,[t]);return Bp(k,b,g,t,0,null,h.pb)}};if(h.xa)return d||"image"===a.ua.contentType||(a.presentationTimeline.xe(h.xa),a.presentationTimeline.ye(a.Y.start)),{ac:function(){return Np(k,h,e,g,f)}};var l=null;d=d=null;a.oa.id&&a.L.id&&(d=a.oa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Op(k,h,g);c=a.Y.start;var p=a.Y.duration?a.Y.start+a.Y.duration:
641
+ Infinity,n=Infinity!=p;l?(n&&(new Sj(m)).wb(c,p,!0),l.kc(m,a.presentationTimeline.kb())):l=new Sj(m);a.presentationTimeline.lc(m);n&&l.wb(c,p);d&&a.vb&&(d.segmentIndex=l);return{ac:function(){l&&0!=l.g.length||l.Rc(m);return Promise.resolve(l)}}}function Pp(a){return a.Yc}function Lp(a){var b=gp(a,Pp),c=hp(a,Pp,"media");a=hp(a,Pp,"index");return{xa:b.xa,timescale:b.timescale,pc:b.pc,pb:b.pb,Ze:b.Ze,timeline:b.timeline,we:c,Oc:a}}
642
+ function Mp(a){var b=a.Oc?1:0;b+=a.timeline?1:0;b+=a.xa?1:0;if(0==b)throw new M(2,4,4002);1!=b&&(a.Oc&&(a.timeline=null),a.xa=null);if(!a.Oc&&!a.we)throw new M(2,4,4002);}
643
+ function Np(a,b,c,d,e){function f(K){var N=(K-t)*n,V=N+b.pb,U=N+l;N=U+n;var P=Math.min(N,h());U=new zi(U,P,function(){var ha=fp(y,x,K,w,V*v);return Db(A,[ha])},0,null,d,z,l,h());U.j=N;return U}function g(){var K=[Math.max(k.kb(),l),Math.min(k.Ib(),h())].map(function(N){return N-l});return[Math.ceil(K[0]/n),Math.ceil(K[1]/n)-1].map(function(N){return N+t})}function h(){var K=null!=m&&e[m]||p;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.oa.id,p=a.Y.duration,n=b.xa,t=b.pc,v=b.timescale,
644
+ y=b.we,w=a.bandwidth||null,x=a.L.id,A=a.L.Na,z=l-b.pb,C=g();a=a.vb?Math.max(C[0],C[1]-c+1):C[0];C=C[1];c=[];for(var E=a;E<=C;++E){var F=f(E);c.push(F)}var H=new Sj(c);c=k.Ib()<h();E=k.T();if(c||E){var J=Math.max(a,C+1);H.Nd(n,function(){var K=k.kb();H.Gb(K);var N=r(g());N.next();N=N.next().value;for(var V=[];J<=N;){var U=f(J);V.push(U);J++}return K>h()&&!V.length?null:V})}return Promise.resolve(H)}
645
+ function Op(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.pb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Ud:h.Ud,Yd:h.Yd,ae:h.ae,Rd:h.Rd,ce:h.ce,Sd:h.Sd},k++){var l=b.timeline[k],m=l.start,p=l.Lh;l=l.end;h.ae=k+b.pc;h.ce=p+b.Ze;h.Yd=a.L.id;h.Rd=a.bandwidth||null;h.Ud=b.we;h.Sd=a.L.Na;g.push(new zi(d+m,d+l,function(n){return function(){var t=fp(n.Ud,n.Yd,n.ae,n.Rd||null,n.ce);return Db(n.Sd,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
646
+ function Kp(a){var b=hp(a,Pp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Na;return new xi(function(){var f=fp(b,c,null,d,null);return Db(e,[f])},0,null,wp(a))};function Qp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Qp.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
647
+ function Rp(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,A,z,C,E,F,H,J,K,N,V,U,P,ha,Aa,za;return G(function(Ua){switch(Ua.g){case 1:d=Jb;Sp(b);Tp(b);Up(b);Vp(b);if(!c&&1==b.length){e=b[0];a.g=e.md;a.h=e.Od;a.j=e.textStreams;a.i=e.imageStreams;Ua.D(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ua.return();k=b.map(function(ab){return ab.md});l=b.map(function(ab){return ab.Od});m=b.map(function(ab){return ab.textStreams});p=b.map(function(ab){return ab.imageStreams});
648
+ n=r(m);for(t=n.next();!t.done;t=n.next())v=t.value,v.push(Wp(d.ka));y=r(p);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(Wp(d.Ac));return u(Ua,Xp(a.g,k,f,Yp,Zp),3);case 3:return u(Ua,Xp(a.h,l,f,Yp,Zp),4);case 4:return u(Ua,Xp(a.j,m,f,Yp,Zp),5);case 5:return u(Ua,Xp(a.i,p,f,Yp,Zp),2);case 2:A=0;z=[];if(a.h.length&&a.g.length)for(K=r(a.g),N=K.next();!N.done;N=K.next())for(V=N.value,U=r(a.h),P=U.next();!P.done;P=U.next())ha=P.value,Aa=Yg(V.drmInfos,ha.drmInfos),V.drmInfos.length&&ha.drmInfos.length&&
649
+ !Aa.length||(za=A++,z.push({id:za,language:V.language,primary:V.primary,audio:V,video:ha,bandwidth:(V.bandwidth||0)+(ha.bandwidth||0),drmInfos:Aa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(C=a.h.concat(a.g),E=r(C),F=E.next();!F.done;F=E.next())H=F.value,J=A++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.hd?H:null,video:H.type==d.Ma?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
650
+ a.l=z;B(Ua)}})}function Sp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.md),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&hc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.md=c}}
651
+ function Up(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&hc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
652
+ function Tp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Od),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&hc(e.roles,h.roles)&&Ef(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Od=c}}
653
+ function Vp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
654
+ function $p(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,A,z,C,E,F,H,J,K,N,V;return G(function(U){switch(U.g){case 1:b=Jb;if(1==a.length)return U.return(a[0]);c=a.map(function(P){return P.filter(function(ha){return ha.type==b.hd})});d=a.map(function(P){return P.filter(function(ha){return ha.type==b.Ma})});e=a.map(function(P){return P.filter(function(ha){return ha.type==b.ka})});f=a.map(function(P){return P.filter(function(ha){return ha.type==b.Ac})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,
655
+ k.push(aq(b.ka));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(aq(b.Ac));return u(U,Xp([],c,0,bq,cq),2);case 2:return n=U.h,u(U,Xp([],d,0,bq,cq),3);case 3:return t=U.h,u(U,Xp([],e,0,bq,cq),4);case 4:return v=U.h,u(U,Xp([],f,0,bq,cq),5);case 5:y=U.h;w=0;if(t.length&&n.length)for(E=r(n),F=E.next();!F.done;F=E.next())for(H=F.value,J=r(t),K=J.next();!K.done;K=J.next())N=K.value,V=w++,N.variantIds.push(V),H.variantIds.push(V);else for(x=t.concat(n),A=r(x),z=A.next();!z.done;z=A.next())C=z.value,
656
+ C.variantIds=[w++];return U.return(t.concat(n).concat(v).concat(y))}})}
657
+ function Xp(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v,y,w,x,A,z,C,E,F,H,J,K;return G(function(N){switch(N.g){case 1:f=Jb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){N.D(4);break}m=l.value;return u(N,dq(m,b,c,e,g),5);case 5:p=N.h;if(!p)throw new M(2,4,4037);l=k.next();N.D(2);break;case 4:n=r(g);for(t=n.next();!t.done;t=n.next())for(v=t.value,y=r(v),w=y.next();!w.done;w=y.next())x=w.value,(A=eq(x,b,d,e,g))&&a.push(A);z=r(g);for(t=z.next();!t.done;t=
658
+ z.next())for(C=t.value,E={},F=r(C),w=F.next();!w.done;E={sb:E.sb},w=F.next())if(E.sb=w.value,H=E.sb.type==f.ka&&!E.sb.language,J=E.sb.type==f.Ac&&!E.sb.tilesLayout,!H&&!J&&(K=a.some(function(V){return function(U){return U.mimeType==V.sb.mimeType&&zd(U.codecs)==zd(V.sb.codecs)}}(E))))throw new M(2,4,4037);return N.return(a)}})}function dq(a,b,c,d,e){return G(function(f){if(1==f.g)return fq(b,a),a.matchedStreams?a.segmentIndex?u(f,gq(a,c),2):f.D(2):f.return(!1);hq(a,c,d,e);return f.return(!0)})}
659
+ function gq(a,b){var c,d,e,f,g,h,k;return G(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Wj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.l.push(k.segmentIndex);B(l)})}
660
+ function eq(a,b,c,d,e){var f=c(a);fq(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return G(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Wj;return u(g,gq(f,0),0)})});if(!f.matchedStreams)return null;hq(f,0,d,e);return f}function hq(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==Sb(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
661
+ function Yp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
662
+ function bq(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
663
+ function Zp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Yg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new M(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
664
+ (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Yp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Zp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Zp(a.trickModeVideo,b)}
665
+ function cq(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=r(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
666
+ function fq(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:iq,video:iq,text:jq,image:kq}[e.type],g={audio:lq,video:mq,text:nq,image:oq}[e.type],h=null;d=r(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function iq(a,b){var c;!(c=b.mimeType!=a.mimeType||zd(b.codecs)!=zd(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<Yg(a,b).length:1));return c?!1:!0}
667
+ function jq(a,b){return a.language?b.language?0==Sb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function kq(a){return a.tilesLayout?!0:!1}
668
+ function lq(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
669
+ d=pq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==qq)return!0;if(d==rq)return!1;d=pq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==qq?!0:d==rq?!1:a.bandwidth&&sq(a.bandwidth,b.bandwidth,c.bandwidth)==qq?!0:!1}
670
+ function mq(a,b,c){if(a.id==c.id)return!0;var d=pq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==qq)return!0;if(d==rq)return!1;if(a.frameRate){d=pq(a.frameRate,b.frameRate,c.frameRate);if(d==qq)return!0;if(d==rq)return!1}return a.bandwidth&&sq(a.bandwidth,b.bandwidth,c.bandwidth)==qq?!0:!1}
671
+ function nq(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(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(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!=
672
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function oq(a,b,c){return a.id==c.id?!0:pq(a.width*a.height,b.width*b.height,c.width*c.height)==qq?!0:!1}function aq(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
673
+ function Wp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Sj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
674
+ function pq(a,b,c){if(b==a&&a!=c)return rq;if(c==a&&a!=b)return qq;if(b>a){if(c<=a||c-a<b-a)return qq;if(c-a>b-a)return rq}else{if(c>a)return rq;if(a-c<a-b)return qq;if(a-c>a-b)return rq}return tq}function sq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?qq:b<a?rq:tq}var qq=1,tq=0,rq=-1;function uq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.M={};this.j=new Qp;this.H=0;this.J=new ac(5);this.G=new O(function(){vq(a)});this.s=new hf;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=uq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return G(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,wq(c),2);d=e.h;c.h&&xq(c,d);if(!c.h)throw new M(2,7,7001);return e.return(c.i)})};
675
+ q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.s.destroy()};q.update=function(){var a=this,b;return G(function(c){if(1==c.g)return D(c,2),u(c,wq(a),4);if(2!=c.g)return ua(c,0);b=va(c);if(!a.h||!b)return c.return();a.h.onError(b);B(c)})};q.onExpirationUpdated=function(){};
676
+ function wq(a){var b,c,d,e,f,g,h;return G(function(k){if(1==k.g)return b=of(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),jf(a.s,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,yq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k.return(h)})}
677
+ function yq(a,b,c){var d,e,f,g,h;return G(function(k){if(1==k.g){d=ng(b,"MPD");if(!d)throw new M(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(zq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=kp(d,a.g.retryParameters,f,c,a.h.networkingEngine);jf(a.s,g);return u(k,g.promise,2)}h=k.h;return k.return(zq(a,h,c))})}
678
+ function zq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,A,z,C,E,F,H,J,K,N,V,U,P,ha,Aa,za,Ua,ab;return G(function(Na){switch(Na.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Vf(b,"Location").map(ag).filter(Cb);0<f.length&&(g=Db(e,f),e=a.m=g);h=Vf(b,"BaseURL");k=h.map(ag);l=Db(e,k);m=0;h&&h.length&&(m=cg(h[0],"availabilityTimeOffset",jg)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=cg(b,"minBufferTime",eg)||0);a.H=cg(b,"minimumUpdatePeriod",eg,-1);t=cg(b,"availabilityStartTime",dg);v=cg(b,
679
+ "timeShiftBufferDepth",eg);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=cg(b,"suggestedPresentationDelay",eg));x=a.g.dash.ignoreMaxSegmentDuration;A=null;x||(A=cg(b,"maxSegmentDuration",eg));z=b.getAttribute("type")||"static";if(a.i)for(C=a.i.presentationTimeline,E=r(Object.values(a.l)),F=E.next();!F.done;F=E.next())H=F.value,H.segmentIndex&&H.segmentIndex.Gb(C.kb());else J=a.g.defaultPresentationDelay||1.5*n,K=null!=w?w:J,C=new Q(t,K,a.g.dash.autoCorrectDrift);C.Zc("static"==z);(N=C.T())&&
680
+ !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);C.Pe(v);V=b.getAttribute("profiles")||"";U={vb:"static"!=z,presentationTimeline:C,oa:null,Y:null,ua:null,L:null,bandwidth:0,Jf:!1,Zb:m,profiles:V.split(",")};P=Aq(a,U,l,b);ha=P.duration;Aa=P.periods;"static"!=z&&P.Af||C.ab(ha||Infinity);a.C&&!a.F&&(za=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?C.Sf(a.C):a.C&&Ta("Low-latency DASH 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.");
681
+ C.xe(A||1);return u(Na,Rp(a.j,Aa,U.vb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Na.D(3);break}a.i={presentationTimeline:C,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:a.g.dash.sequenceMode};if(!C.dg()){Na.D(4);break}Ua=Vf(b,"UTCTiming");return u(Na,Bq(a,l,Ua),5);case 5:ab=Na.h;if(!a.h)return Na.return();C.Tf(ab);case 4:C.ue();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),
681
682
  B(Na)}})}
682
- function yq(a,b,c,d){var e=cg(d,"mediaPresentationDuration",eg),f=[],g=0;d=Vf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=cg(k,"start",eg,g),n=k.id,p=cg(k,"duration",eg),t=null;if(l){var v=cg(l,"start",eg);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=Aq(a,b,c,{start:m,duration:t,node:k,Lf:null==t||!l});f.push(g);b.oa.id&&t&&(a.M[b.oa.id]=t);if(null==t){g=
683
+ function Aq(a,b,c,d){var e=cg(d,"mediaPresentationDuration",eg),f=[],g=0;d=Vf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=cg(k,"start",eg,g),p=k.id,n=cg(k,"duration",eg),t=null;if(l){var v=cg(l,"start",eg);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.B&&null!==p&&null!==m&&m<a.B)||a.K.includes(p)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=Cq(a,b,c,{start:m,duration:t,node:k,Lf:null==t||!l});f.push(g);b.oa.id&&t&&(a.M[b.oa.id]=t);if(null==t){g=
683
684
  null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Af:!1}:{periods:f,duration:g,Af:!0}}
684
- function Aq(a,b,c,d){b.oa=Bq(d.node,null,c);b.Y=d;b.oa.Zb=b.Zb;b.oa.id||(b.oa.id="__shaka_period_"+d.start);var e=Vf(d.node,"EventStream");c=b.presentationTimeline.jb();e=r(e);for(var f=e.next();!f.done;f=e.next())Cq(a,d.start,d.duration,f.value,c);c=Vf(d.node,"AdaptationSet").map(function(m){return Dq(a,b,m)}).filter(Cb);if(b.vb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.yh);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new M(2,4,4018);
685
- }d=c.filter(function(m){return!m.Ve});c=c.filter(function(m){return m.Ve});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ve.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={gd:h.gd},l=k.next())h.gd=l.value,h.gd.trickModeVideo=e.streams.find(function(m){return function(n){return zd(m.gd.codecs)==zd(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Eq(d,"audio");g=a.g.disableVideo?[]:Eq(d,"video");f=a.g.disableText?
686
- []:Eq(d,Ib);c=a.g.disableThumbnails?[]:Eq(d,"image");if(!g.length&&!e.length)throw new M(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.oa.id,md:d,Od:e,textStreams:g,imageStreams:f}}
687
- function Eq(a,b){return a.filter(function(c){return c.contentType==b})}
688
- function Dq(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ua=Bq(c,b.oa,null);var e=!1,f=Vf(c,"Role"),g=f.map(function(F){return F.getAttribute("value")}).filter(Cb),h=void 0,k=b.ua.contentType==Ib;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
689
- l}}var n;m=Vf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Vf(c,"SupplementalProperty");m=r(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
690
- 10)));m=Vf(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var y=r(t),w=y.next();!w.done;w=y.next()){var x=w.value,A=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],A=x[1]||"und"):(w="CC"+p,2==t.length?p+=2:p++,A=x);v.set(w,Mb(A))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
691
- 1,null!=t)for(t=r(t.split(";")),w=t.next();!w.done;w=t.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,x=w),v.set(y,Mb(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Vf(c,"ContentProtection");var z=Uo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),D=Mb(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=Vf(c,"Label"))&&l.length&&
692
- (l=l[0],l.textContent&&(E=l.textContent));l=Vf(c,"Representation");c=l.map(function(F){if(F=Fq(a,b,z,h,D,E,e,g,v,F))F.hdr=F.hdr||n;return F}).filter(function(F){return!!F});if(0==c.length){f="image"==b.ua.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new M(2,4,4003);}if(!b.ua.contentType||"application"==b.ua.contentType)for(b.ua.contentType=Gq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.ua.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
693
- m.value,p=r(z.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(F){return F.getAttribute("id")}).filter(Cb);return{id:b.ua.id||"__fake__"+a.I++,contentType:b.ua.contentType,language:D,rj:e,streams:c,drmInfos:z.drmInfos,Ve:f,yh:k}}
694
- function Fq(a,b,c,d,e,f,g,h,k,l){b.L=Bq(l,b.ua,null);a.C=Math.min(a.C,b.L.Zb);if(!Hq(b.L))return null;var m=b.Y.start;b.bandwidth=cg(l,"bandwidth",hg)||0;var n=b.L.contentType,p=n==Ib||"application"==n;n="image"==n;try{var t=function(H,J,K){return Iq(a,H,J,K)};if(b.L.Xc)var v=vp(b,t);else if(b.L.Db)v=Bp(b,a.l);else if(b.L.Yc)v=Gp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.L.La,w=b.Y.duration||0;v={ac:function(){return Promise.resolve(Tj(m,w,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
695
- throw H;}t=Vf(l,"ContentProtection");t=Xo(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var x=!1;Vf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var A=!1;p&&(A=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=Vf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
696
- (z=l.getAttribute("value")),!z))return null;var D;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(D="PQ");var E=b.L.id?b.oa.id+","+b.L.id:"",F={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,J,K;return G(function(N){if(1==N.g){J=(H=E&&b.vb&&a.l[E])?a.l[E]:F;if(J.segmentIndex)return N.D(0);K=J;return u(N,v.ac(),3)}K.segmentIndex=N.h;B(N)})},closeSegmentIndex:function(){F.segmentIndex&&
685
+ function Cq(a,b,c,d){b.oa=Dq(d.node,null,c);b.Y=d;b.oa.Zb=b.Zb;b.oa.id||(b.oa.id="__shaka_period_"+d.start);var e=Vf(d.node,"EventStream");c=b.presentationTimeline.kb();e=r(e);for(var f=e.next();!f.done;f=e.next())Eq(a,d.start,d.duration,f.value,c);c=Vf(d.node,"AdaptationSet").map(function(m){return Fq(a,b,m)}).filter(Cb);if(b.vb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.yh);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new M(2,4,4018);
686
+ }d=c.filter(function(m){return!m.Ve});c=c.filter(function(m){return m.Ve});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ve.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={gd:h.gd},l=k.next())h.gd=l.value,h.gd.trickModeVideo=e.streams.find(function(m){return function(p){return zd(m.gd.codecs)==zd(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:Gq(d,"audio");g=a.g.disableVideo?[]:Gq(d,"video");f=a.g.disableText?
687
+ []:Gq(d,Ib);c=a.g.disableThumbnails?[]:Gq(d,"image");if(!g.length&&!e.length)throw new M(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.oa.id,md:d,Od:e,textStreams:g,imageStreams:f}}
688
+ function Gq(a,b){return a.filter(function(c){return c.contentType==b})}
689
+ function Fq(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ua=Dq(c,b.oa,null);var e=!1,f=Vf(c,"Role"),g=f.map(function(F){return F.getAttribute("value")}).filter(Cb),h=void 0,k=b.ua.contentType==Ib;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
690
+ l}}var p;m=Vf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):l=!0}m=Vf(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),
691
+ 10)));m=Vf(c,"Accessibility");var v=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var y=r(t),w=y.next();!w.done;w=y.next()){var x=w.value,A=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],A=x[1]||"und"):(w="CC"+n,2==t.length?n+=2:n++,A=x);v.set(w,Mb(A))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
692
+ 1,null!=t)for(t=r(t.split(";")),w=t.next();!w.done;w=t.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+n,n++,x=w),v.set(y,Mb(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Vf(c,"ContentProtection");var z=Wo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),C=Mb(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=Vf(c,"Label"))&&l.length&&
693
+ (l=l[0],l.textContent&&(E=l.textContent));l=Vf(c,"Representation");c=l.map(function(F){if(F=Hq(a,b,z,h,C,E,e,g,v,F))F.hdr=F.hdr||p;return F}).filter(function(F){return!!F});if(0==c.length){f="image"==b.ua.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new M(2,4,4003);}if(!b.ua.contentType||"application"==b.ua.contentType)for(b.ua.contentType=Iq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.ua.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
694
+ m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(F){return F.getAttribute("id")}).filter(Cb);return{id:b.ua.id||"__fake__"+a.I++,contentType:b.ua.contentType,language:C,rj:e,streams:c,drmInfos:z.drmInfos,Ve:f,yh:k}}
695
+ function Hq(a,b,c,d,e,f,g,h,k,l){b.L=Dq(l,b.ua,null);a.C=Math.min(a.C,b.L.Zb);if(!Jq(b.L))return null;var m=b.Y.start;b.bandwidth=cg(l,"bandwidth",hg)||0;var p=b.L.contentType,n=p==Ib||"application"==p;p="image"==p;try{var t=function(H,J,K){return Kq(a,H,J,K)};if(b.L.Xc)var v=xp(b,t);else if(b.L.Db)v=Dp(b,a.l);else if(b.L.Yc)v=Jp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.L.Na,w=b.Y.duration||0;v={ac:function(){return Promise.resolve(Vj(m,w,y))}}}}catch(H){if((n||p)&&4002==H.code)return null;
696
+ throw H;}t=Vf(l,"ContentProtection");t=Zo(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var x=!1;Vf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var A=!1;n&&(A=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Vf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
697
+ (z=l.getAttribute("value")),!z))return null;var C;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(C="PQ");var E=b.L.id?b.oa.id+","+b.L.id:"",F={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,J,K;return G(function(N){if(1==N.g){J=(H=E&&b.vb&&a.l[E])?a.l[E]:F;if(J.segmentIndex)return N.D(0);K=J;return u(N,v.ac(),3)}K.segmentIndex=N.h;B(N)})},closeSegmentIndex:function(){F.segmentIndex&&
697
698
  (F.segmentIndex.release(),F.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.ua.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:A,channelsCount:b.L.Cd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:x,closedCaptions:k,
698
- hdr:D,tilesLayout:z,matchedStreams:[]};E&&b.vb&&!a.l[E]&&(a.l[E]=F);return F}function tq(a){var b,c;G(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,uq(a),4);case 4:b=d.h;ua(d,3);break;case 2:c=va(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();vq(a,b);B(d)}})}function vq(a,b){0>a.H||a.G.R(Math.max(3,a.H-b,bc(a.J)))}
699
- function Bq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Cd:null,audioSamplingRate:null,Zb:0};c=c||b.La;var d=Vf(a,"BaseURL"),e=d.map(ag),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=cg(a,"frameRate",kg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Vf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
700
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Vf(a,"AudioChannelConfiguration");m=Jq(m)||b.Cd;p=cg(a,"audioSamplingRate",ig)||b.audioSamplingRate;f||(f=Gq(g,h));var t=Uf(a,"SegmentBase"),v=Uf(a,"SegmentTemplate"),y=t?cg(t,"availabilityTimeOffset",jg)||0:0,w=v?cg(v,"availabilityTimeOffset",jg)||0:0;d=d&&d.length?cg(d[0],"availabilityTimeOffset",jg)||0:0;d=b.Zb+d+y+w;return{La:Db(c,e),Xc:t||b.Xc,Db:Uf(a,"SegmentList")||b.Db,Yc:v||b.Yc,width:cg(a,"width",ig)||b.width,height:cg(a,
701
- "height",ig)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Cd:m,audioSamplingRate:p,Zb:d}}
702
- function Jq(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
703
- parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function Hq(a){var b=a.Xc?1:0;b+=a.Db?1:0;b+=a.Yc?1:0;if(0==b)return a.contentType==Ib||"application"==a.contentType?!0:!1;1!=b&&(a.Xc&&(a.Db=null),a.Yc=null);return!0}
704
- function Kq(a,b,c,d){var e,f,g,h,k,l;return G(function(m){if(1==m.g)return e=Db(b,[c]),f=of(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),jf(a.s,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=ad(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
705
- function zq(a,b,c){var d,e,f,g,h,k,l,m;return G(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.D(4);break}h=g.value;C(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.D(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.D(8);
706
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ta("NTP UTCTiming scheme is not supported");break;default:Ta("Unrecognized scheme in UTCTiming element",k)}n.D(9);break;case 7:return u(n,Kq(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return u(n,Kq(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ua(n,
707
- 3);break;case 5:va(n);case 3:g=f.next();n.D(2);break;case 4:return Ta("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
708
- function Cq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=cg(d,"timescale",ig)||1;d=r(Vf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=cg(k,"presentationTime",ig)||0,m=cg(k,"duration",ig)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
709
- function Iq(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=uf,f=jk(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),jf(a.s,h),u(l,h.promise,2);k=l.h;return l.return(k.data)})}function Gq(a,b){return Dd(xd(a,b))?Ib:a.split("/")[0]}I("shaka.dash.DashParser",sq);dh.mpd=function(){return new sq};bh["application/dash+xml"]=function(){return new sq};bh["video/vnd.mpeg.dash.mpd"]=function(){return new sq};function Lq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Mq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Mq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
710
- Mq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function W(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Nq(a,b){a=a.getAttribute(b);if(!a)throw new M(2,4,4023,b);return a.value}function Oq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function Pq(a,b){this.name=a;this.value=b};function Qq(a,b){return a.filter(function(c){return c.name==b})}function Rq(a,b){return a.filter(function(c){return Nq(c,"TYPE")==b})}function Sq(a,b){a=Qq(a,b);return a.length?a[0]:null}function Tq(a){var b=0;b=void 0===b?0:b;return(a=Sq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b}function Uq(a,b){return Db([a],[b])[0]};function Vq(a){this.h=a;this.g=0}function Wq(a){Xq(a,/[ \t]+/gm)}function Xq(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Yq(a){return a.g==a.h.length?null:(a=Xq(a,/[^ \t\n]*/gm))?a[0]:null};function Zq(){this.g=0}
711
- function $q(a,b,c){b=ad(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new M(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=ar(a,g),--a.g,br.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=ar(a,h);if(cr.includes(h.name)){if(1!=b)throw new M(2,4,4017);
712
- var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=ar(a,m),br.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==W(m,"TYPE")?k.push(m):"MAP"==W(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Uq(d,m.trim()),h&&g.push(h),e.push(new Oq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Oq("",g,k)));return new Lq(c,b,f,e)}f.push(h);
713
- "EXT-X-STREAM-INF"==h.name&&(h.g.push(new Pq("URI",k)),e=!0)}}return new Lq(c,b,f)}function ar(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new M(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Vq(d);var f;(f=Xq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Xq(d,g);)c.push(new Pq(f[1],f[2]||f[3])),Wq(d)}return new Mq(a,b,c,e)}
714
- var br="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".split(" "),cr="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function dr(){}function er(a){try{var b=fr(a);return bf({uri:a,Of:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return $e(c)}}function fr(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new M(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new M(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=jd(a):e=ed(a);return{data:e,contentType:c}}
715
- I("shaka.net.DataUriPlugin",dr);dr.parse=er;lf("data",er);function gr(){var a=this;this.g=this.i=null;this.sa=1;this.s=new Map;this.C=new Map;this.H=new Map;this.H.set("video",new Map);this.H.set("audio",new Map);this.H.set(Ib,new Map);this.H.set("image",new Map);this.ia=new Set;this.h=new Map;this.j=null;this.O="";this.X=new Zq;this.P=0;this.F=-1;this.M=Infinity;this.za=!1;this.m=new O(function(){hr(a)});this.aa=ir;this.G=null;this.ra=0;this.J=Infinity;this.U=this.$=0;this.I=new hf;this.K=new Map;this.B=new Map;this.Z=new Map;this.l=!1}q=gr.prototype;
716
- q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return G(function(e){return 1==e.g?(c.i=b,c.l=b.isLowLatencyMode(),u(e,jr(c,a),2)):3!=e.g?(d=e.h,c.O=d.uri,u(e,kr(c,d.data,a),3)):e.return(c.G)})};q.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.I&&(a.push(this.I.destroy()),this.I=null);this.g=this.i=null;this.ia.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.s.clear();return Promise.all(a)};
717
- q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return G(function(m){if(1==m.g){if(!lr(a))return m.return();b=[];c=Array.from(a.h.values());d=c.filter(function(n){return n.stream.segmentIndex});e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(mr(a,g));return u(m,Promise.all(b),2)}nr(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Lc});d.length&&!h&&(k=or,pr(a,k.hg),l=c.map(function(n){return n.Ab}),a.j.ab(Math.min.apply(Math,ia(l))),a.i.updateDuration());B(m)})};
718
- function qr(a,b){return lr(a)?a.H.get(b.type):b.zd}
719
- function mr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,A;return G(function(z){if(1==z.g)return c=b.kd,d=new lb(c),a.l&&b.od&&ob(d,new qb("_HLS_skip=YES")),u(z,jr(a,d.toString()),2);e=z.h;if(!b.stream.segmentIndex)return z.return();f=$q(a.X,e.data,e.uri);if(1!=f.type)throw new M(2,4,4017);g=Qq(f.g,"EXT-X-DEFINE");h=rr(a,g);k=b.stream;l=qr(a,b);m=sr(f,k.mimeType);n=m.keyIds;p=m.drmInfos;t=function(D,E){return D.size===E.size&&[].concat(ia(D)).every(function(F){return E.has(F)})};t(k.keyIds,n)||(k.keyIds=
720
- n,k.drmInfos=p,a.i.newDrmInfo(k));v=tr(a,f,k.type,l,h);k.segmentIndex.kc(v,a.j.jb());v.length&&(y=Tq(f.g),w=l.get(y),k.segmentIndex.Gb(w));x=v[v.length-1];if(A=Sq(f.g,"EXT-X-ENDLIST"))b.Lc=!0,b.Ab=x.endTime;B(z)})}q.onExpirationUpdated=function(){};
721
- function ur(a,b){for(var c=-1==a.F,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=qr(a,e);if(f=f.g[0]||null){g=r(g);for(var h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.F=Math.max(a.F,k));e.ke=k;break}}}}if(!(0>a.F))for(b=r(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)d.g.splice(0,a.F-c.ke),(d=d.g[0]||null)&&vr(a,c,-d.startTime)}
722
- function wr(a,b){if(Infinity==a.M){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.M=Math.min(a.M,d.g))}}b=a.M;if(Infinity!=b)for(d=r(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;null!=e&&(e=e.g[0]||null,null==e.g?Sa("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.$c,"Expect AV sync issues!"):vr(a,c,e.g-b-e.startTime))}}
723
- function vr(a,b,c){b.stream.segmentIndex.offset(c);b.Ab+=c;a=qr(a,b);b=r(a);for(var d=b.next();!d.done;d=b.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
724
- function kr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,A,z,D,E,F,H,J,K,N,V,U,P,ca,Aa,za,Ua,ab;return G(function(Na){switch(Na.g){case 1:d=$q(a.X,b,a.O);e=Qq(d.g,"EXT-X-DEFINE");for(var Tb=r(e),Ra=Tb.next();!Ra.done;Ra=Tb.next()){var bb=Ra.value;Ra=W(bb,"NAME");bb=W(bb,"VALUE");Ra&&bb&&(a.s.has(Ra)||a.s.set(Ra,bb))}f=[];g=[];h=[];if(1==d.type)return F=a.g.hls.mediaPlaylistFullMimeType,d.segments.length&&(H=new lb(d.segments[0].i),J=H.Ga.split(".").pop(),(K=xr[J])?F=K:"ts"!==J&&"mp4"!==J&&(yr[J]?(K=yr[J],
725
- N=a.g.hls.defaultAudioCodec,F=K+'; codecs="'+N+'"'):zr[J]&&(K=zr[J],V=a.g.hls.defaultVideoCodec,F=K+'; codecs="'+V+'"'))),U=F.split(";")[0],P=U.split("/")[0],ca=Bd(F),Aa=new Map,u(Na,Ar(a,d,c,c,ca,P,"",!0,"Media Playlist",null,Aa,null,!1,!1,U),5);k=Qq(d.g,"EXT-X-MEDIA");l=Qq(d.g,"EXT-X-STREAM-INF");m=Qq(d.g,"EXT-X-IMAGE-STREAM-INF");n=Qq(d.g,"EXT-X-SESSION-KEY");Tb=r(l);for(Ra=Tb.next();!Ra.done;Ra=Tb.next()){var jc=Ra.value;bb=W(jc,"AUDIO");Ra=W(jc,"VIDEO");var yb=W(jc,"SUBTITLES");jc=Br(a,jc);if(yb){var Hp=
726
- Gb(Ib,jc);a.B.set(yb,Hp);gc(jc,Hp)}bb&&(yb=Gb("audio",jc),yb||(yb=a.g.hls.defaultAudioCodec),a.B.set(bb,yb));Ra&&(bb=Gb("video",jc),bb||(bb=a.g.hls.defaultVideoCodec),a.B.set(Ra,bb))}p=Qq(d.g,"EXT-X-SESSION-DATA");t=r(p);for(v=t.next();!v.done;v=t.next())if(y=v.value,w=W(y,"DATA-ID"),x=W(y,"URI"),A=W(y,"LANGUAGE"),z=W(y,"VALUE"),D=(new Map).set("id",w),x&&D.set("uri",Uq(a.O,x)),A&&D.set("language",A),z&&D.set("value",z),E=new L("sessiondata",D),a.i)a.i.onEvent(E);Cr(a,k);Tb=Rq(k,"CLOSED-CAPTIONS");
727
- Tb=r(Tb);for(Ra=Tb.next();!Ra.done;Ra=Tb.next())yb=Ra.value,Ra=Dr(yb),bb=Nq(yb,"GROUP-ID"),yb=Nq(yb,"INSTREAM-ID"),a.K.get(bb)||a.K.set(bb,new Map),a.K.get(bb).set(yb,Ra);f=Er(a,l,n);g=Fr(a,k);return u(Na,Gr(a,m),4);case 4:h=Na.h;Na.D(3);break;case 5:za=Na.h,a.h.set(c,za),f.push({id:0,language:"und",disabledUntilTime:0,primary:!0,audio:"audio"==P?za.stream:null,video:"video"==P?za.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new M(2,
728
- 7,7001);a.j=new Q(null,0);a.j.Zc(!0);1==d.type&&(lr(a)&&(Hr(a),Ua=a.P,a.m.R(Ua)),ab=Array.from(a.h.values()),Ir(a,ab),Jr(a));a.G={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.G);B(Na)}})}
729
- function Jr(a){if(lr(a)){if(a.P=a.J,a.aa==Kr){var b=Lr(a);a.g.hls.useSafariBehaviorForLive&&(b=a.j.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.Pe(b)}}else a.j.ab(Lr(a));a.j.ue()}function rr(a,b){var c=new Map;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,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.s.get(e))&&c.set(e,d)}return c}
730
- function Fr(a,b){var c=Rq(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Mr(a,g).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=Nq(d.value,"GROUP-ID");if(d=a.B.get(e))if(e=a.C.get(e)){e=r(e);for(var f=e.next();!f.done;f=e.next())f.value.stream.codecs=d}}return b.filter(function(g){return g})}
731
- function Gr(a,b){var c,d;return G(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return G(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);C(l,2);return u(l,Nr(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=va(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
732
- function Cr(a,b){b=b.filter(function(d){var e=W(d,"URI")||"";return"SUBTITLES"!=W(d,"TYPE")&&""!=e});b=r(b);for(var c=b.next();!c.done;c=b.next())Mr(a,c.value)}
733
- function Er(a,b,c){var d=[],e=new Set;if(0<c.length){c=r(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=Nq(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=W(f,"KEYFORMAT")||"identity",f=(g=Or[g])?g(f,""):null)){if(f.keyIds){g=r(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=W(k,"FRAME-RATE"),m=Number(W(k,"AVERAGE-BANDWIDTH"))||Number(Nq(k,"BANDWIDTH")),n=W(k,"RESOLUTION");n=r(n?n.split("x"):[null,null]);var p=n.next().value,t=n.next().value,
734
- v=W(k,"VIDEO-RANGE");k=Pr(a,k);n=k.audio;k=k.video;for(var y=r(k),w=y.next();!w.done;w=y.next())if(w=w.value.stream)w.width=Number(p)||void 0,w.height=Number(t)||void 0,w.frameRate=Number(l)||void 0,w.hdr=v||void 0;l=a.g.disableAudio;if(!n.length||l)n=[null];l=a.g.disableVideo;if(!k.length||l)k=[null];l=[];n=r(n);for(p=n.next();!p.done;p=n.next())for(p=p.value,t=r(k),v=t.next();!v.done;v=t.next()){var x=v.value;if(v=p?p.stream:null)v.drmInfos=d,v.keyIds=e;if(y=x?x.stream:null)y.drmInfos=d,y.keyIds=
735
- e;w=p?p.stream.drmInfos:null;var A=x?x.stream.drmInfos:null;x=(x?x.$c:"")+" - "+(p?p.$c:"");v&&y&&w.length&&A.length&&!(0<Yg(w,A).length)||a.ia.has(x)||(v={id:a.sa++,language:v?v.language:"und",primary:!!v&&v.primary||!!y&&y.primary,audio:v,video:y,bandwidth:m,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},l.push(v),a.ia.add(x))}return l}).reduce(Ab,[]);return b=b.filter(function(k){return null!=k})}
736
- function Pr(a,b){var c=Br(a,b),d=W(b,"AUDIO"),e=W(b,"VIDEO"),f=d||e;f=f&&a.C.has(f)?a.C.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=Nq(b,"URI"),h=d.audio.find(function(m){return m&&m.$c==g}),k=Gb("video",c),l=Gb("audio",c);l&&!k?f="audio":!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length&&!d.audio.length?"audio":"video";e||(a=Qr(a,b,c,f),d[a.stream.type]=[a]);return d}
737
- function Br(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=W(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=Ad(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function Dr(a){a=W(a,"LANGUAGE")||"und";return Mb(a)}
738
- function Mr(a,b){var c=Nq(b,"GROUP-ID"),d="",e=Nq(b,"TYPE").toLowerCase();"subtitles"==e&&(e=Ib);var f=e;f!=Ib&&c&&a.B.has(c)&&(d=a.B.get(c));e=Rr(Nq(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);var g=Dr(b),h=W(b,"NAME"),k="YES"==W(b,"DEFAULT");var l="audio"==f?(l=W(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=W(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var n=W(b,"CHARACTERISTICS");b="YES"==W(b,"FORCED");d=Sr(a,e,d,f,g,k,h,l,null,n,b,m);a.C.has(c)?a.C.get(c).push(d):a.C.set(c,
699
+ hdr:C,tilesLayout:z,matchedStreams:[]};E&&b.vb&&!a.l[E]&&(a.l[E]=F);return F}function vq(a){var b,c;G(function(d){switch(d.g){case 1:return b=0,D(d,2),u(d,wq(a),4);case 4:b=d.h;ua(d,3);break;case 2:c=va(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();xq(a,b);B(d)}})}function xq(a,b){0>a.H||a.G.R(Math.max(3,a.H-b,bc(a.J)))}
700
+ function Dq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Cd:null,audioSamplingRate:null,Zb:0};c=c||b.Na;var d=Vf(a,"BaseURL"),e=d.map(ag),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=cg(a,"frameRate",kg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Vf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
701
+ m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Vf(a,"AudioChannelConfiguration");m=Lq(m)||b.Cd;n=cg(a,"audioSamplingRate",ig)||b.audioSamplingRate;f||(f=Iq(g,h));var t=Uf(a,"SegmentBase"),v=Uf(a,"SegmentTemplate"),y=t?cg(t,"availabilityTimeOffset",jg)||0:0,w=v?cg(v,"availabilityTimeOffset",jg)||0:0;d=d&&d.length?cg(d[0],"availabilityTimeOffset",jg)||0:0;d=b.Zb+d+y+w;return{Na:Db(c,e),Xc:t||b.Xc,Db:Uf(a,"SegmentList")||b.Db,Yc:v||b.Yc,width:cg(a,"width",ig)||b.width,height:cg(a,
702
+ "height",ig)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),Cd:m,audioSamplingRate:n,Zb:d}}
703
+ function Lq(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
704
+ parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function Jq(a){var b=a.Xc?1:0;b+=a.Db?1:0;b+=a.Yc?1:0;if(0==b)return a.contentType==Ib||"application"==a.contentType?!0:!1;1!=b&&(a.Xc&&(a.Db=null),a.Yc=null);return!0}
705
+ function Mq(a,b,c,d){var e,f,g,h,k,l;return G(function(m){if(1==m.g)return e=Db(b,[c]),f=of(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),jf(a.s,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=ad(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
706
+ function Bq(a,b,c){var d,e,f,g,h,k,l,m;return G(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){p.D(4);break}h=g.value;D(p,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return p.D(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return p.D(8);
707
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ta("NTP UTCTiming scheme is not supported");break;default:Ta("Unrecognized scheme in UTCTiming element",k)}p.D(9);break;case 7:return u(p,Mq(a,b,l,"HEAD"),10);case 10:return p.return(p.h);case 8:return u(p,Mq(a,b,l,"GET"),11);case 11:return p.return(p.h);case 9:ua(p,
708
+ 3);break;case 5:va(p);case 3:g=f.next();p.D(2);break;case 4:return Ta("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),p.return(0)}})}
709
+ function Eq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=cg(d,"timescale",ig)||1;d=r(Vf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=cg(k,"presentationTime",ig)||0,m=cg(k,"duration",ig)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
710
+ function Kq(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=uf,f=lk(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),jf(a.s,h),u(l,h.promise,2);k=l.h;return l.return(k.data)})}function Iq(a,b){return Dd(xd(a,b))?Ib:a.split("/")[0]}I("shaka.dash.DashParser",uq);dh.mpd=function(){return new uq};bh["application/dash+xml"]=function(){return new uq};bh["video/vnd.mpeg.dash.mpd"]=function(){return new uq};function Nq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Oq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Oq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
711
+ Oq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function W(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Pq(a,b){a=a.getAttribute(b);if(!a)throw new M(2,4,4023,b);return a.value}function Qq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function Rq(a,b){this.name=a;this.value=b};function Sq(a,b){return a.filter(function(c){return c.name==b})}function Tq(a,b){return a.filter(function(c){return Pq(c,"TYPE")==b})}function Uq(a,b){a=Sq(a,b);return a.length?a[0]:null}function Vq(a,b){var c=0;c=void 0===c?0:c;return(a=Uq(a,b))?Number(a.value):c}function Wq(a,b){return Db([a],[b])[0]};function Xq(a){this.h=a;this.g=0}function Yq(a){Zq(a,/[ \t]+/gm)}function Zq(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function $q(a){return a.g==a.h.length?null:(a=Zq(a,/[^ \t\n]*/gm))?a[0]:null};function ar(){this.g=0}
712
+ function br(a,b,c){b=ad(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new M(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=cr(a,g),--a.g,dr.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=cr(a,h);if(er.includes(h.name)){if(1!=b)throw new M(2,4,4017);
713
+ var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=cr(a,m),dr.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==W(m,"TYPE")?k.push(m):"MAP"==W(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Wq(d,m.trim()),h&&g.push(h),e.push(new Qq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Qq("",g,k)));return new Nq(c,b,f,e)}f.push(h);
714
+ "EXT-X-STREAM-INF"==h.name&&(h.g.push(new Rq("URI",k)),e=!0)}}return new Nq(c,b,f)}function cr(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new M(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Xq(d);var f;(f=Zq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Zq(d,g);)c.push(new Rq(f[1],f[2]||f[3])),Yq(d)}return new Oq(a,b,c,e)}
715
+ var dr="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".split(" "),er="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function fr(){}function gr(a){try{var b=hr(a);return bf({uri:a,Of:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return $e(c)}}function hr(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new M(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new M(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=jd(a):e=ed(a);return{data:e,contentType:c}}
716
+ I("shaka.net.DataUriPlugin",fr);fr.parse=gr;lf("data",gr);function ir(){var a=this;this.g=this.i=null;this.sa=1;this.s=new Map;this.C=new Map;this.H=new Map;this.H.set("video",new Map);this.H.set("audio",new Map);this.H.set(Ib,new Map);this.H.set("image",new Map);this.ia=new Set;this.h=new Map;this.j=null;this.O="";this.X=new ar;this.P=0;this.F=-1;this.M=Infinity;this.za=!1;this.m=new O(function(){jr(a)});this.aa=kr;this.G=null;this.ra=0;this.J=Infinity;this.V=this.$=0;this.I=new hf;this.K=new Map;this.B=new Map;this.Z=new Map;this.l=!1}q=ir.prototype;
717
+ q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return G(function(e){return 1==e.g?(c.i=b,c.l=b.isLowLatencyMode(),u(e,lr(c,a),2)):3!=e.g?(d=e.h,c.O=d.uri,u(e,mr(c,d.data,a),3)):e.return(c.G)})};q.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.I&&(a.push(this.I.destroy()),this.I=null);this.g=this.i=null;this.ia.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.s.clear();return Promise.all(a)};
718
+ q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return G(function(m){if(1==m.g){if(!nr(a))return m.return();b=[];c=Array.from(a.h.values());d=c.filter(function(p){return p.stream.segmentIndex});e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(or(a,g));return u(m,Promise.all(b),2)}pr(a,d.map(function(p){return p.stream}));h=d.some(function(p){return 0==p.Lc});d.length&&!h&&(k=qr,rr(a,k.hg),l=c.map(function(p){return p.Ab}),a.j.ab(Math.min.apply(Math,ia(l))),a.i.updateDuration());B(m)})};
719
+ function sr(a,b){return nr(a)?a.H.get(b.type):b.zd}
720
+ function or(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,A;return G(function(z){if(1==z.g)return c=b.kd,d=new lb(c),a.l&&b.od&&ob(d,new qb("_HLS_skip=YES")),u(z,lr(a,d.toString()),2);e=z.h;if(!b.stream.segmentIndex)return z.return();f=br(a.X,e.data,e.uri);if(1!=f.type)throw new M(2,4,4017);g=Sq(f.g,"EXT-X-DEFINE");h=tr(a,g);k=b.stream;l=sr(a,b);m=ur(f,k.mimeType);p=m.keyIds;n=m.drmInfos;t=function(C,E){return C.size===E.size&&[].concat(ia(C)).every(function(F){return E.has(F)})};t(k.keyIds,p)||(k.keyIds=
721
+ p,k.drmInfos=n,a.i.newDrmInfo(k));v=vr(a,f,k.type,l,h);k.segmentIndex.kc(v,a.j.kb());v.length&&(y=Vq(f.g,"EXT-X-MEDIA-SEQUENCE"),w=l.get(y),k.segmentIndex.Gb(w));x=v[v.length-1];if(A=Uq(f.g,"EXT-X-ENDLIST"))b.Lc=!0,b.Ab=x.endTime;B(z)})}q.onExpirationUpdated=function(){};
722
+ function wr(a,b){for(var c=-1==a.F,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=sr(a,e);if(f=f.g[0]||null){g=r(g);for(var h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.F=Math.max(a.F,k));e.ke=k;break}}}}if(!(0>a.F))for(b=r(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)d.g.splice(0,a.F-c.ke),(d=d.g[0]||null)&&xr(a,c,-d.startTime)}
723
+ function yr(a,b){if(Infinity==a.M){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.M=Math.min(a.M,d.g))}}b=a.M;if(Infinity!=b)for(d=r(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;null!=e&&(e=e.g[0]||null,null==e.g?Sa("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.$c,"Expect AV sync issues!"):xr(a,c,e.g-b-e.startTime))}}
724
+ function xr(a,b,c){b.stream.segmentIndex.offset(c);b.Ab+=c;a=sr(a,b);b=r(a);for(var d=b.next();!d.done;d=b.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
725
+ function mr(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,A,z,C,E,F,H,J,K,N,V,U,P,ha,Aa,za,Ua,ab;return G(function(Na){switch(Na.g){case 1:d=br(a.X,b,a.O);e=Sq(d.g,"EXT-X-DEFINE");for(var Tb=r(e),Ra=Tb.next();!Ra.done;Ra=Tb.next()){var cb=Ra.value;Ra=W(cb,"NAME");cb=W(cb,"VALUE");Ra&&cb&&(a.s.has(Ra)||a.s.set(Ra,cb))}f=[];g=[];h=[];if(1==d.type)return F=a.g.hls.mediaPlaylistFullMimeType,d.segments.length&&(H=new lb(d.segments[0].i),J=H.Ha.split(".").pop(),(K=zr[J])?F=K:"ts"!==J&&"mp4"!==J&&(Ar[J]?(K=Ar[J],
726
+ N=a.g.hls.defaultAudioCodec,F=K+'; codecs="'+N+'"'):Br[J]&&(K=Br[J],V=a.g.hls.defaultVideoCodec,F=K+'; codecs="'+V+'"'))),U=F.split(";")[0],P=U.split("/")[0],ha=Bd(F),Aa=new Map,u(Na,Cr(a,d,c,c,ha,P,"",!0,"Media Playlist",null,Aa,null,!1,!1,U),5);k=Sq(d.g,"EXT-X-MEDIA");l=Sq(d.g,"EXT-X-STREAM-INF");m=Sq(d.g,"EXT-X-IMAGE-STREAM-INF");p=Sq(d.g,"EXT-X-SESSION-KEY");Tb=r(l);for(Ra=Tb.next();!Ra.done;Ra=Tb.next()){var jc=Ra.value;cb=W(jc,"AUDIO");Ra=W(jc,"VIDEO");var yb=W(jc,"SUBTITLES");jc=Dr(a,jc);if(yb){var Ip=
727
+ Gb(Ib,jc);a.B.set(yb,Ip);gc(jc,Ip)}cb&&(yb=Gb("audio",jc),yb||(yb=a.g.hls.defaultAudioCodec),a.B.set(cb,yb));Ra&&(cb=Gb("video",jc),cb||(cb=a.g.hls.defaultVideoCodec),a.B.set(Ra,cb))}n=Sq(d.g,"EXT-X-SESSION-DATA");t=r(n);for(v=t.next();!v.done;v=t.next())if(y=v.value,w=W(y,"DATA-ID"),x=W(y,"URI"),A=W(y,"LANGUAGE"),z=W(y,"VALUE"),C=(new Map).set("id",w),x&&C.set("uri",Wq(a.O,x)),A&&C.set("language",A),z&&C.set("value",z),E=new L("sessiondata",C),a.i)a.i.onEvent(E);Er(a,k);Tb=Tq(k,"CLOSED-CAPTIONS");
728
+ Tb=r(Tb);for(Ra=Tb.next();!Ra.done;Ra=Tb.next())yb=Ra.value,Ra=Fr(yb),cb=Pq(yb,"GROUP-ID"),yb=Pq(yb,"INSTREAM-ID"),a.K.get(cb)||a.K.set(cb,new Map),a.K.get(cb).set(yb,Ra);f=Gr(a,l,p);g=Hr(a,k);return u(Na,Ir(a,m),4);case 4:h=Na.h;Na.D(3);break;case 5:za=Na.h,a.h.set(c,za),f.push({id:0,language:"und",disabledUntilTime:0,primary:!0,audio:"audio"==P?za.stream:null,video:"video"==P?za.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new M(2,
729
+ 7,7001);a.j=new Q(null,0);a.j.Zc(!0);1==d.type&&(nr(a)&&(Jr(a),Ua=a.P,a.m.R(Ua)),ab=Array.from(a.h.values()),Kr(a,ab),Lr(a));a.G={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.G);B(Na)}})}
730
+ function Lr(a){if(nr(a)){if(a.P=a.J,a.aa==Mr){var b=Nr(a);a.g.hls.useSafariBehaviorForLive&&(b=a.j.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.Pe(b)}}else a.j.ab(Nr(a));a.j.ue()}function tr(a,b){var c=new Map;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,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.s.get(e))&&c.set(e,d)}return c}
731
+ function Hr(a,b){var c=Tq(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Or(a,g).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=Pq(d.value,"GROUP-ID");if(d=a.B.get(e))if(e=a.C.get(e)){e=r(e);for(var f=e.next();!f.done;f=e.next())f.value.stream.codecs=d}}return b.filter(function(g){return g})}
732
+ function Ir(a,b){var c,d;return G(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return G(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);D(l,2);return u(l,Pr(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=va(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
733
+ function Er(a,b){b=b.filter(function(d){var e=W(d,"URI")||"";return"SUBTITLES"!=W(d,"TYPE")&&""!=e});b=r(b);for(var c=b.next();!c.done;c=b.next())Or(a,c.value)}
734
+ function Gr(a,b,c){var d=[],e=new Set;if(0<c.length){c=r(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=Pq(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=W(f,"KEYFORMAT")||"identity",f=(g=Qr[g])?g(f,""):null)){if(f.keyIds){g=r(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=W(k,"FRAME-RATE"),m=Number(W(k,"AVERAGE-BANDWIDTH"))||Number(Pq(k,"BANDWIDTH")),p=W(k,"RESOLUTION");p=r(p?p.split("x"):[null,null]);var n=p.next().value,t=p.next().value,
735
+ v=W(k,"VIDEO-RANGE");k=Rr(a,k);p=k.audio;k=k.video;for(var y=r(k),w=y.next();!w.done;w=y.next())if(w=w.value.stream)w.width=Number(n)||void 0,w.height=Number(t)||void 0,w.frameRate=Number(l)||void 0,w.hdr=v||void 0;l=a.g.disableAudio;if(!p.length||l)p=[null];l=a.g.disableVideo;if(!k.length||l)k=[null];l=[];p=r(p);for(n=p.next();!n.done;n=p.next())for(n=n.value,t=r(k),v=t.next();!v.done;v=t.next()){var x=v.value;if(v=n?n.stream:null)v.drmInfos=d,v.keyIds=e;if(y=x?x.stream:null)y.drmInfos=d,y.keyIds=
736
+ e;w=n?n.stream.drmInfos:null;var A=x?x.stream.drmInfos:null;x=(x?x.$c:"")+" - "+(n?n.$c:"");v&&y&&w.length&&A.length&&!(0<Yg(w,A).length)||a.ia.has(x)||(v={id:a.sa++,language:v?v.language:"und",primary:!!v&&v.primary||!!y&&y.primary,audio:v,video:y,bandwidth:m,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},l.push(v),a.ia.add(x))}return l}).reduce(Ab,[]);return b=b.filter(function(k){return null!=k})}
737
+ function Rr(a,b){var c=Dr(a,b),d=W(b,"AUDIO"),e=W(b,"VIDEO"),f=d||e;f=f&&a.C.has(f)?a.C.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=Pq(b,"URI"),h=d.audio.find(function(m){return m&&m.$c==g}),k=Gb("video",c),l=Gb("audio",c);l&&!k?f="audio":!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length&&!d.audio.length?"audio":"video";e||(a=Sr(a,b,c,f),d[a.stream.type]=[a]);return d}
738
+ function Dr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=W(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=Ad(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function Fr(a){a=W(a,"LANGUAGE")||"und";return Mb(a)}
739
+ function Or(a,b){var c=Pq(b,"GROUP-ID"),d="",e=Pq(b,"TYPE").toLowerCase();"subtitles"==e&&(e=Ib);var f=e;f!=Ib&&c&&a.B.has(c)&&(d=a.B.get(c));e=Tr(Pq(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);var g=Fr(b),h=W(b,"NAME"),k="YES"==W(b,"DEFAULT");var l="audio"==f?(l=W(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=W(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var p=W(b,"CHARACTERISTICS");b="YES"==W(b,"FORCED");d=Ur(a,e,d,f,g,k,h,l,null,p,b,m);a.C.has(c)?a.C.get(c).push(d):a.C.set(c,
739
740
  [d]);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
740
- function Nr(a,b){var c,d,e,f,g,h,k,l,m,n;return G(function(p){if(1==p.g){c=Rr(Nq(b,"URI"),a.s);d=W(b,"CODECS","jpeg")||"";if(a.h.has(c))return p.return(a.h.get(c));e=Dr(b);f=W(b,"NAME");g=W(b,"CHARACTERISTICS");h=Sr(a,c,d,"image",e,!1,f,null,null,g,!1,!1);return a.h.has(c)?p.return(a.h.get(c)):(k=W(b,"RESOLUTION"))?u(p,h.stream.createSegmentIndex(),3):p.D(2)}2!=p.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
741
- Number(m.split("x")[1]));if(n=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p.return(h)})}function Qr(a,b,c,d){var e=Rr(Nq(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);b=W(b,"CLOSED-CAPTIONS");b="video"==d&&b&&"NONE"!=b?a.K.get(b):null;c=Fb(d,c);d=Sr(a,e,c,d,"und",!1,null,null,b,null,!1,!1);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
742
- function Sr(a,b,c,d,e,f,g,h,k,l,m,n){function p(A){var z,D,E,F,H,J,K,N,V,U,P,ca,Aa;return G(function(za){if(1==za.g)return u(za,jr(a,y.kd),2);if(3!=za.g){z=za.h;if(A.aborted)return za.return();D=z.uri;E=$q(a.X,z.data,D);F=lr(a);return u(za,Ar(a,E,b,D,c,d,e,f,g,h,k,l,m,n),3)}H=za.h;if(A.aborted)return za.return();J=H.stream;lr(a)&&!F&&Hr(a);y.kd=D;y.Ab=H.Ab;y.od=H.od;y.Lc=H.Lc;y.zd=H.zd;y.se=!0;v.segmentIndex=J.segmentIndex;v.encrypted=J.encrypted;v.drmInfos=J.drmInfos;v.keyIds=J.keyIds;v.mimeType=
743
- J.mimeType;gj.includes(v.mimeType)&&(v.codecs="");v.drmInfos.length&&a.i.newDrmInfo(v);K=Jb;if(d==K.Ka||d==K.hd)for(N=r(a.h.values()),V=N.next();!V.done;V=N.next())U=V.value,U.se||U.type!=d||(U.stream.mimeType=J.mimeType,gj.includes(U.stream.mimeType)&&(U.stream.codecs=""));Tr(a)&&(a.za?Ir(a,[y]):(a.za=!0,P=Array.from(a.h.values()),ca=P.filter(function(Ua){return Ua.stream.segmentIndex}),Ir(a,ca),Jr(a),Aa=a.P,0<Aa&&a.m.R(Aa)));B(za)})}var t=Uq(a.O,b),v=Ur(a,c,d,e,f,g,h,k,l,m,n);gj.includes(v.mimeType)&&
744
- (v.codecs="");var y={stream:v,type:d,$c:b,kd:t,Ab:0,zd:new Map,od:!1,Lc:!1,ke:-1,se:!1},w=null,x=new AbortController;v.createSegmentIndex=function(){if(w)return w;x=new AbortController;return w=new Promise(function(A){A(p(x.signal))})};v.closeSegmentIndex=function(){w&&!v.segmentIndex&&x.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);w=null};return y}
745
- function Lr(a){var b=Infinity;a=r(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Ab));return b}function nr(a,b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Rj(d.segmentIndex,function(e){c.push(e)});a.j.lc(c)}
746
- function Ir(a,b){if(!lr(a))for(var c=Lr(a),d=r(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.wb(0,c);c=r(b);for(e=c.next();!e.done;e=c.next())e=e.value.stream,gj.includes(e.mimeType)&&(e.codecs="");nr(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?ur(a,b):wr(a,b)}
747
- function Tr(a){if(!a.G)return!1;var b=[],c=[];a=r(a.G.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
748
- function Ar(a,b,c,d,e,f,g,h,k,l,m,n,p,t,v){var y,w,x,A,z,D,E,F,H,J,K,N,V,U,P;return G(function(ca){if(1==ca.g){if(1!=b.type)throw new M(2,4,4017);y=Qq(b.g,"EXT-X-DEFINE");w=rr(a,y);Vr(a,b);return v?ca.D(2):u(ca,Wr(a,f,e,b,w),3)}2!=ca.g&&(v=ca.h);x=sr(b,v);A=x.drmInfos;z=x.keyIds;D=x.encrypted;E=x.lg;if(D&&!A.length&&!E)throw new M(2,4,4026);F=lr(a)?a.H.get(f):new Map;H=a.l;J=tr(a,b,f,F,w);H!=a.l&&Vr(a,b);K=J[J.length-1].endTime;N=new Qj(J);U=(V=Sq(b.g,"EXT-X-SERVER-CONTROL"))?null!=V.getAttribute("CAN-SKIP-UNTIL"):
749
- !1;P=Ur(a,e,f,g,h,k,l,m,n,p,t);P.segmentIndex=N;P.encrypted=D;P.drmInfos=A;P.keyIds=z;P.mimeType=v;return ca.return({stream:P,type:f,$c:c,kd:d,Ab:K,od:U,Lc:!1,ke:-1,zd:F,se:!1})})}
750
- function Ur(a,b,c,d,e,f,g,h,k,l,m){var n=Xr(c,b)||(c==Ib?"text/vtt":Yr[c].mp4);return{id:a.sa++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:n,codecs:b,kind:c==Ib?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:k?k.split(","):[],forced:l,channelsCount:g,audioSamplingRate:null,
741
+ function Pr(a,b){var c,d,e,f,g,h,k,l,m,p;return G(function(n){if(1==n.g){c=Tr(Pq(b,"URI"),a.s);d=W(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=Fr(b);f=W(b,"NAME");g=W(b,"CHARACTERISTICS");h=Ur(a,c,d,"image",e,!1,f,null,null,g,!1,!1);return a.h.has(c)?n.return(a.h.get(c)):(k=W(b,"RESOLUTION"))?u(n,h.stream.createSegmentIndex(),3):n.D(2)}2!=n.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
742
+ Number(m.split("x")[1]));if(p=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function Sr(a,b,c,d){var e=Tr(Pq(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);b=W(b,"CLOSED-CAPTIONS");b="video"==d&&b&&"NONE"!=b?a.K.get(b):null;c=Fb(d,c);d=Ur(a,e,c,d,"und",!1,null,null,b,null,!1,!1);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
743
+ function Ur(a,b,c,d,e,f,g,h,k,l,m,p){function n(A){var z,C,E,F,H,J,K,N,V,U,P,ha,Aa;return G(function(za){if(1==za.g)return u(za,lr(a,y.kd),2);if(3!=za.g){z=za.h;if(A.aborted)return za.return();C=z.uri;E=br(a.X,z.data,C);F=nr(a);return u(za,Cr(a,E,b,C,c,d,e,f,g,h,k,l,m,p),3)}H=za.h;if(A.aborted)return za.return();J=H.stream;nr(a)&&!F&&Jr(a);y.kd=C;y.Ab=H.Ab;y.od=H.od;y.Lc=H.Lc;y.zd=H.zd;y.se=!0;v.segmentIndex=J.segmentIndex;v.encrypted=J.encrypted;v.drmInfos=J.drmInfos;v.keyIds=J.keyIds;v.mimeType=
744
+ J.mimeType;gj.includes(v.mimeType)&&(v.codecs="");v.drmInfos.length&&a.i.newDrmInfo(v);K=Jb;if(d==K.Ma||d==K.hd)for(N=r(a.h.values()),V=N.next();!V.done;V=N.next())U=V.value,U.se||U.type!=d||(U.stream.mimeType=J.mimeType,gj.includes(U.stream.mimeType)&&(U.stream.codecs=""));Vr(a)&&(a.za?Kr(a,[y]):(a.za=!0,P=Array.from(a.h.values()),ha=P.filter(function(Ua){return Ua.stream.segmentIndex}),Kr(a,ha),Lr(a),Aa=a.P,0<Aa&&a.m.R(Aa)));B(za)})}var t=Wq(a.O,b),v=Wr(a,c,d,e,f,g,h,k,l,m,p);gj.includes(v.mimeType)&&
745
+ (v.codecs="");var y={stream:v,type:d,$c:b,kd:t,Ab:0,zd:new Map,od:!1,Lc:!1,ke:-1,se:!1},w=null,x=new AbortController;v.createSegmentIndex=function(){if(w)return w;x=new AbortController;return w=new Promise(function(A){A(n(x.signal))})};v.closeSegmentIndex=function(){w&&!v.segmentIndex&&x.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);w=null};return y}
746
+ function Nr(a){var b=Infinity;a=r(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Ab));return b}function pr(a,b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Tj(d.segmentIndex,function(e){c.push(e)});a.j.lc(c)}
747
+ function Kr(a,b){if(!nr(a))for(var c=Nr(a),d=r(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.wb(0,c);c=r(b);for(e=c.next();!e.done;e=c.next())e=e.value.stream,gj.includes(e.mimeType)&&(e.codecs="");pr(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?wr(a,b):yr(a,b)}
748
+ function Vr(a){if(!a.G)return!1;var b=[],c=[];a=r(a.G.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
749
+ function Cr(a,b,c,d,e,f,g,h,k,l,m,p,n,t,v){var y,w,x,A,z,C,E,F,H,J,K,N,V,U,P;return G(function(ha){if(1==ha.g){if(1!=b.type)throw new M(2,4,4017);y=Sq(b.g,"EXT-X-DEFINE");w=tr(a,y);Xr(a,b);return v?ha.D(2):u(ha,Yr(a,f,e,b,w),3)}2!=ha.g&&(v=ha.h);x=ur(b,v);A=x.drmInfos;z=x.keyIds;C=x.encrypted;E=x.lg;if(C&&!A.length&&!E)throw new M(2,4,4026);F=nr(a)?a.H.get(f):new Map;H=a.l;J=vr(a,b,f,F,w);H!=a.l&&Xr(a,b);K=J[J.length-1].endTime;N=new Sj(J);U=(V=Uq(b.g,"EXT-X-SERVER-CONTROL"))?null!=V.getAttribute("CAN-SKIP-UNTIL"):
750
+ !1;P=Wr(a,e,f,g,h,k,l,m,p,n,t);P.segmentIndex=N;P.encrypted=C;P.drmInfos=A;P.keyIds=z;P.mimeType=v;return ha.return({stream:P,type:f,$c:c,kd:d,Ab:K,od:U,Lc:!1,ke:-1,zd:F,se:!1})})}
751
+ function Wr(a,b,c,d,e,f,g,h,k,l,m){var p=Zr(c,b)||(c==Ib?"text/vtt":$r[c].mp4);return{id:a.sa++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:b,kind:c==Ib?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:k?k.split(","):[],forced:l,channelsCount:g,audioSamplingRate:null,
751
752
  spatialAudio:m,closedCaptions:h,hdr:void 0,tilesLayout:void 0}}
752
- function sr(a,b){var c=[];if(a.segments){a=r(a.segments);for(var d=a.next();!d.done;d=a.next())d=Qq(d.value.g,"EXT-X-KEY"),c.push.apply(c,ia(d))}d=a=!1;var e=[],f=new Set;c=r(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Nq(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=W(g,"KEYFORMAT")||"identity",g=(h=Or[h])?h(g,b):null){if(g.keyIds){h=r(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,lg:d}}
753
- function Zr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Ta("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new M(2,4,4042);var d=0,e=W(b,"IV","");if(e){var f=kd(e.substr(2));if(16!=f.byteLength)throw new M(2,4,4043);}else d=Tq(c.g);b=Uq(c.h,Nq(b,"URI"));var g=of([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return G(function(n){if(1==n.g)return u(n,$r(a,g,6),2);if(3!=
754
- n.g){k=n.h;if(!k.data||16!=k.data.byteLength)throw new M(2,4,4044);l={name:"AES-CBC"};m=h;return u(n,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=n.h;h.fetchKey=void 0;B(n)})}};return h}
755
- function Vr(a,b){var c=Sq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Sq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)pr(a,ir);else{c?pr(a,Kr):pr(a,as);d=Sq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new M(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Sq(b.g,"EXT-X-PART-INF");a.l&&c?(a.$=Number(Nq(c,"PART-TARGET")),a.J=Math.min(a.$,a.J),b=Sq(b.g,"EXT-X-SERVER-CONTROL"),a.U=b?Number(Nq(b,"PART-HOLD-BACK")):0):a.J=Math.min(d,a.J);a.ra=Math.max(d,a.ra)}}
756
- function Hr(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.U?a.U:a.ra*a.g.hls.liveSegmentsDelay;a.j.Xf(0);a.j.Uf(b);a.j.Zc(!1)}function bs(a,b,c,d){c=Sq(c,"EXT-X-MAP");if(!c)return null;var e=Nq(c,"URI");d=Rr(Uq(b,e),d);b=[d,W(c,"BYTERANGE","")].join("-");a.Z.has(b)||(c=cs(d,c),a.Z.set(b,c));return a.Z.get(b)}function cs(a,b){var c=0,d=null;if(b=W(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new xi(function(){return[a]},c,d)}
757
- function ds(a,b,c,d,e,f,g,h,k){var l=d.g,m=Rr(d.i,f),n=Sq(l,"EXTINF"),p=f=0,t=null;d.h.length&&!a.l&&Ta("Low-latency HLS 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.");var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var y=Sq(l,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(v=dg(y.value))}y=Ai;Sq(l,"EXT-X-GAP")&&(y=2);if(!n){if(0==d.h.length)throw new M(2,4,4024,"EXTINF");
758
- if(!a.l)return null}var w=[];if(a.l)for(var x={},A=0;A<d.h.length;x={Wd:x.Wd},A++){var z=d.h[A],D=0==A?c:w[w.length-1],E=0==A?e:D.endTime,F=Number(W(z,"DURATION"))||a.$;if(F){F=E+F;var H=0,J=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=W(z,"BYTERANGE-START"))?Number(H):0:(H=W(z,"BYTERANGE"),J=r(es(D,H)),H=J.next().value,J=J.next().value);if(D=W(z,"URI"))x.Wd=Uq(g,D),D=Ai,"YES"==W(z,"GAP")&&(D=2),w.push(new zi(E,F,function(K){return function(){return[K.Wd]}}(x),H,J,b,0,0,Infinity,[],"",null,null,D))}}n?
759
- f=e+Number(n.value.split(",")[0]):f=w[w.length-1].endTime;(a=Sq(l,"EXT-X-BYTERANGE"))?(t=r(es(c,a.value)),p=t.next().value,t=t.next().value):w.length&&(p=w[0].Ra,t=w[w.length-1].Ba);c="";a=null;"image"==h&&(c="1x1",h=Sq(l,"EXT-X-TILES"))&&(c=Nq(h,"LAYOUT"),(h=W(h,"DURATION"))&&(a=Number(h)));return new zi(e,f,function(){return m.length?[m]:[]},p,t,b,0,0,Infinity,w,c,a,v,y,k)}function es(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Ba+1,d=c+b-1);return[c,d]}
760
- function tr(a,b,c,d,e){var f=b.segments,g=void 0,h=Tq(b.g),k=Sq(b.g,"EXT-X-SKIP");k=k?Number(W(k,"SKIPPED-SEGMENTS")):0;var l=h+k,m=0;lr(a)&&d.has(l)&&(m=d.get(l));for(var n=[],p=null,t=0;t<f.length;t++){var v=f[t],y=0==t?m:p.endTime;l=h+k+t;var w=r(v.g);for(var x=w.next();!x.done;x=w.next())x=x.value,"EXT-X-KEY"==x.name&&"AES-128"==Nq(x,"METHOD")&&(g=Zr(a,x,b));d.set(l,y);w=bs(a,b.h,v.g,e);!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());(p=v=ds(a,w,p,v,y,
761
- e,b.h,c,g))&&(a.g.hls.ignoreManifestProgramDateTime&&null!=a.F&&l<a.F||n.push(v))}if(a=n.some(function(A){return null!=A.g}))for(b={},c=0;c<n.length;b={tc:b.tc,sc:b.sc,bd:b.bd,qb:b.qb,rc:b.rc},c++)if(b.qb=n[c],null==b.qb.g)for(b.sc=0,b.tc=c,d=function(A){return function(){var z=n[A.tc];if(z){if(null!=z.g)return z.g+A.sc;A.sc-=z.endTime-z.startTime;A.tc+=1}return null}}(b),b.rc=0,b.bd=c,e=function(A){return function(){var z=n[A.bd];if(z){z!=A.qb&&(A.rc+=z.endTime-z.startTime);if(null!=z.g)return z.g+
762
- A.rc;--A.bd}return null}}(b);null==b.qb.g;)b.qb.g=e(),null==b.qb.g&&(b.qb.g=d());if(a)for(a=r(n),b=a.next();!b.done;b=a.next())for(c=b.value,b=c.g,c=r(c.i),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return n}function Rr(a,b){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 M(2,4,4039,e);}}return a}
763
- function Xr(a,b){if(a==Ib){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
764
- function Wr(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v;return G(function(y){if(1==y.g){f=uf;g=Math.trunc((d.segments.length-1)/2);h=Rr(d.segments[g].i,e);k=new lb(h);l=k.Ga.split(".").pop();m=Yr[b];if((n=m[l])||(n=xr[l])||(n=Xr(b,c)))return y.return(n);p=of([h],a.g.retryParameters);p.method="HEAD";return u(y,$r(a,p,f),2)}t=y.h;return(v=t.headers["content-type"])?y.return(v.split(";")[0]):y.return(b==Ib?"text/vtt":Yr[b].mp4)})}
765
- function jr(a,b){b=of([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return $r(a,b,0)}function hr(a){var b,c;G(function(d){if(1==d.g){if(!a.i)return d.return();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return lr(a)&&(b=a.P,a.m.R(b)),ua(d,0);c=va(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.m.R(.1);B(d)})}function lr(a){return a.aa!=ir}function pr(a,b){a.aa=b;a.j&&a.j.Zc(!lr(a));lr(a)||a.m.stop()}
766
- function $r(a,b,c){if(!a.I)throw new M(2,7,7001);b=a.i.networkingEngine.request(c,b);jf(a.I,b);return b.promise}I("shaka.hls.HlsParser",gr);
767
- var xr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},yr={mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t"},zr={mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},Yr={audio:yr,video:zr,text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"txt/vtt",
768
- ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Or={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new M(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new M(2,4,4041);return Eb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Nq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
769
- b=Nq(a,"URI");b=fr(b);b=Hc(b.data);b=Eb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=W(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Nq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Nq(a,"URI");a=fr(a);a=Hc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Tf(a,b,new Set,0);return Eb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
770
- Nq(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?Eb("org.w3.clearkey",null):null}},ir="VOD",as="EVENT",Kr="LIVE",or={hg:ir,ei:as,fg:Kr};Sc("Tizen 3")||Sc("Tizen 2")||Uc()||(dh.m3u8=function(){return new gr},bh["application/x-mpegurl"]=function(){return new gr},bh["application/vnd.apple.mpegurl"]=function(){return new gr});function fs(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Of:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=dd(b)}catch(g){}throw new M(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function gs(){}function hs(a,b,c,d,e){var f=new is;Cf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new js,h={tf:!1,cg:!1};a=ks(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Ze(a,function(){h.tf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.cg=!0;g.abort()});k.R(b/1E3);a.finally(function(){k.stop()})}return a}
771
- function ks(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,w,x,A,z;return G(function(D){switch(D.g){case 1:return h=ls,k=ms,p=n=0,t=Date.now(),C(D,2),u(D,h(a,c),4);case 4:return l=D.h,f(ns(l.headers)),v=l.clone().body.getReader(),w=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,x=function(E){function F(){var H,J;return G(function(K){switch(K.g){case 1:return C(K,2),u(K,v.read(),4);case 4:H=K.h;ua(K,3);break;case 2:return va(K),K.return();case 3:if(H.done){K.D(5);break}n+=H.value.byteLength;if(!g){K.D(5);
772
- break}return u(K,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,n-p,w-n),p=n,t=J;H.done?E.close():(E.enqueue(H.value),F());B(K)}})}F()},new k({start:x}),u(D,l.arrayBuffer(),5);case 5:m=D.h;ua(D,3);break;case 2:A=va(D);if(d.tf)throw new M(1,1,7001,a,b);if(d.cg)throw new M(1,1,1003,a,b);throw new M(1,1,1002,a,A,b);case 3:return z=ns(l.headers),D.return(fs(z,m,l.status,a,l.url,b))}})}function ns(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
773
- function os(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}I("shaka.net.HttpFetchPlugin",gs);gs.isSupported=os;gs.parse=hs;var ls=window.fetch,js=window.AbortController,ms=window.ReadableStream,is=window.Headers;os()&&(lf("http",hs,2,!0),lf("https",hs,2,!0),lf("blob",hs,2,!0));function ps(){}
774
- function qs(a,b,c,d,e){var f=new rs,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new M(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var t=ss(f);e(t);n=!0}};f.onload=function(){var t=ss(f),v=f.response;try{var y=fs(t,v,f.status,a,f.responseURL,c);l(y)}catch(w){m(w)}};f.onerror=function(t){m(new M(1,1,1002,a,t,
775
- c))};f.ontimeout=function(){m(new M(1,1,1003,a,c))};f.onprogress=function(t){var v=Date.now();if(100<v-g||t.lengthComputable&&t.loaded==t.total)d(v-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Ze(k,function(){f.abort();return Promise.resolve()})}
776
- function ss(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}I("shaka.net.HttpXHRPlugin",ps);ps.parse=qs;var rs=window.XMLHttpRequest;lf("http",qs,1,!0);lf("https",qs,1,!0);lf("blob",qs,1,!0);function ts(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function us(a){return a.Na().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ra+":"+a.Ba}function vs(a,b){return jk(a.g.Na(),a.g.Ra,a.g.Ba,b.streaming.retryParameters)};function ws(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function xs(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}ws.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function ys(a){var b=this;this.s=a;this.j=new Map;this.i=new vf(function(){return zs(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new ws}ys.prototype.destroy=function(){return this.i.destroy()};function As(a,b,c){a.m=b;a.l=c}function zs(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
777
- function Bs(a,b,c,d,e,f){wf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return G(function(v){if(1==v.g)return u(v,Cs(a,c),2);h=v.h;if(a.i.g)throw new M(2,9,7001);if(e)for(m in k=Hc(h),l=new Sf(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.l(p,t);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v.return(f(h))})});a.j.set(b,g)}function Ds(a){return G(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
778
- function Cs(a,b){var c,d,e,f;return G(function(g){if(1==g.g)return c=uf,d=a.s.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;gc(a.h,e);return g.return(f.data)})};function Es(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Lc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Es.prototype.abort=function(){var a=this;return G(function(b){if(1==b.g){try{a.i.abort()}catch(c){}C(b,2);return u(b,a.g,4)}if(2!=b.g)return ua(b,0);va(b);B(b)})};
779
- function Fs(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return G(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return u(g,b(f.key,f.value,f),2)}f.continue();B(g)})}})}Es.prototype.store=function(){return this.h};Es.prototype.promise=function(){return this.g};function Gs(a){this.h=a;this.g=[]}Gs.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Hs(a,b){return Is(a,b,"readwrite")}function Is(a,b,c){c=a.h.transaction([b],c);var d=new Es(c,b);a.g.push(d);d.promise().then(function(){gc(a.g,d)},function(){gc(a.g,d)});return d};function Js(a,b,c){this.h=new Gs(a);this.i=b;this.g=c}q=Js.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Ks(this.i)};q.removeSegments=function(a,b){return Ls(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return G(function(d){if(1==d.g)return u(d,Ms(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.wf(e)}))})};q.addManifests=function(){return Ks(this.g)};
780
- q.updateManifest=function(){return Promise.reject(new M(2,9,9016,"Cannot modify values in "+this.g))};function Ns(a,b,c){a=Hs(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=Hs(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return Ls(this,this.g,a,b)};
781
- q.getManifests=function(a){var b=this,c;return G(function(d){if(1==d.g)return u(d,Ms(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Dc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return G(function(d){return 1==d.g?(b=Is(a.h,a.g,"readonly"),c=new Map,u(d,Fs(b,function(e,f){var g;return G(function(h){if(1==h.g)return u(h,a.Dc(f),2);g=h.h;c.set(e,g);B(h)})}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};q.wf=function(a){return a};q.Dc=function(a){return Promise.resolve(a)};
782
- function Ks(a){return Promise.reject(new M(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){if(1==m.g){d=Hs(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={fd:g.fd},k=h.next())l=k.value,g.fd=e.add(l),g.fd.onsuccess=function(n){return function(){f.push(n.fd.result)}}(g);return u(m,d.promise(),2)}return m.return(f)})};
783
- function Ls(a,b,c,d){a=Hs(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={ed:e.ed},f=c.next())e.ed=f.value,b.delete(e.ed).onsuccess=function(g){return function(){return d(g.ed)}}(e);return a.promise()}
784
- function Ms(a,b,c){var d,e,f,g,h,k,l;return G(function(m){if(1==m.g){d=Is(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={zc:h.zc,wc:h.wc},l=k.next())h.wc=l.value,h.zc=e.get(h.wc),h.zc.onsuccess=function(n){return function(){void 0==n.zc.result&&g.push(n.wc);f[n.wc]=n.zc.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new M(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Os(a){this.g=new Gs(a)}Os.prototype.destroy=function(){return this.g.destroy()};Os.prototype.getAll=function(){var a=this,b,c;return G(function(d){return 1==d.g?(b=Is(a.g,"session-ids","readonly"),c=[],u(d,Fs(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};Os.prototype.add=function(a){var b=Hs(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
785
- Os.prototype.remove=function(a){var b=this,c;return G(function(d){return 1==d.g?(c=Hs(b.g,"session-ids"),u(d,Fs(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):u(d,c.promise(),0)})};function Ps(){this.g=new Map}Ps.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Ps.prototype.init=function(){var a=this;Qs.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
786
- function Rs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Qa:d,Aa:f},Aa:e})})});if(b)return b;throw new M(2,9,9013,"Could not find a cell that supports add-operations");}function Ss(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Qa:d,Aa:f},e)})})}
787
- function Ts(a,b,c){a=a.g.get(b);if(!a)throw new M(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new M(2,9,9013,"Could not find cell with name "+c);return b}function Us(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Vs(a){var b=Array.from(a.g.keys());if(!b.length)throw new M(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
788
- function Ws(a){var b,c,d;return G(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Qs,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Xs(a,b){Qs.set(a,b)}I("shaka.offline.StorageMuxer",Ps);Ps.unregister=function(a){Qs.delete(a)};Ps.register=Xs;Ps.prototype.destroy=Ps.prototype.destroy;var Qs=new Map;function Ys(){Js.apply(this,arguments)}pa(Ys,Js);Ys.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return G(function(g){d=Hs(c.h,c.g);e=d.store();f=new Lc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new M(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
789
- Ys.prototype.Dc=function(a){var b,c,d,e,f,g;return G(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Zs(a.periods[c],e),b.push(f);return u(h,Yp(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
790
- function Zs(a,b){$s(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return at(e,a.startTime,b)})}
791
- function at(a,b,c){var d=a.initSegmentUri?bt(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=bt(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
792
- dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}Ys.prototype.wf=function(a){return{data:a.data}};function bt(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new M(2,9,9004,"Could not parse uri "+a);}
793
- function $s(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
794
- f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function ct(){Js.apply(this,arguments)}pa(ct,Js);
795
- ct.prototype.Dc=function(a){var b,c,d,e,f,g;return G(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(dt(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Yp(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
753
+ function ur(a,b){var c=[];if(a.segments){a=r(a.segments);for(var d=a.next();!d.done;d=a.next())d=Sq(d.value.g,"EXT-X-KEY"),c.push.apply(c,ia(d))}d=a=!1;var e=[],f=new Set;c=r(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Pq(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=W(g,"KEYFORMAT")||"identity",g=(h=Qr[h])?h(g,b):null){if(g.keyIds){h=r(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,lg:d}}
754
+ function as(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Ta("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new M(2,4,4042);var d=0,e=W(b,"IV","");if(e){var f=kd(e.substr(2));if(16!=f.byteLength)throw new M(2,4,4043);}else d=Vq(c.g,"EXT-X-MEDIA-SEQUENCE");b=Wq(c.h,Pq(b,"URI"));var g=of([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return G(function(p){if(1==p.g)return u(p,
755
+ bs(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new M(2,4,4044);l={name:"AES-CBC"};m=h;return u(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;B(p)})}};return h}
756
+ function Xr(a,b){var c=Uq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Uq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)rr(a,kr);else{c?rr(a,Mr):rr(a,cs);d=Uq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new M(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Uq(b.g,"EXT-X-PART-INF");a.l&&c?(a.$=Number(Pq(c,"PART-TARGET")),a.J=Math.min(a.$,a.J),b=Uq(b.g,"EXT-X-SERVER-CONTROL"),a.V=b?Number(Pq(b,"PART-HOLD-BACK")):0):a.J=Math.min(d,a.J);a.ra=Math.max(d,a.ra)}}
757
+ function Jr(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.V?a.V:a.ra*a.g.hls.liveSegmentsDelay;a.j.Xf(0);a.j.Uf(b);a.j.Zc(!1)}function ds(a,b,c,d){c=Uq(c,"EXT-X-MAP");if(!c)return null;var e=Pq(c,"URI");d=Tr(Wq(b,e),d);b=[d,W(c,"BYTERANGE","")].join("-");a.Z.has(b)||(c=es(d,c),a.Z.set(b,c));return a.Z.get(b)}function es(a,b){var c=0,d=null;if(b=W(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new xi(function(){return[a]},c,d)}
758
+ function fs(a,b,c,d,e,f,g,h,k){var l=d.g,m=Tr(d.i,f),p=Uq(l,"EXTINF"),n=f=0,t=null;d.h.length&&!a.l&&Ta("Low-latency HLS 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.");var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var y=Uq(l,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(v=dg(y.value))}y=Ai;Uq(l,"EXT-X-GAP")&&(y=2);if(!p){if(0==d.h.length)throw new M(2,4,4024,"EXTINF");
759
+ if(!a.l)return null}var w=[];if(a.l)for(var x={},A=0;A<d.h.length;x={Wd:x.Wd},A++){var z=d.h[A],C=0==A?c:w[w.length-1],E=0==A?e:C.endTime,F=Number(W(z,"DURATION"))||a.$;if(F){F=E+F;var H=0,J=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=W(z,"BYTERANGE-START"))?Number(H):0:(H=W(z,"BYTERANGE"),J=r(gs(C,H)),H=J.next().value,J=J.next().value);if(C=W(z,"URI"))x.Wd=Wq(g,C),C=Ai,"YES"==W(z,"GAP")&&(C=2),w.push(new zi(E,F,function(K){return function(){return[K.Wd]}}(x),H,J,b,0,0,Infinity,[],"",null,null,C))}}p?
760
+ f=e+Number(p.value.split(",")[0]):f=w[w.length-1].endTime;(a=Uq(l,"EXT-X-BYTERANGE"))?(t=r(gs(c,a.value)),n=t.next().value,t=t.next().value):w.length&&(n=w[0].Sa,t=w[w.length-1].Ba);c="";a=null;"image"==h&&(c="1x1",h=Uq(l,"EXT-X-TILES"))&&(c=Pq(h,"LAYOUT"),(h=W(h,"DURATION"))&&(a=Number(h)));return new zi(e,f,function(){return m.length?[m]:[]},n,t,b,0,0,Infinity,w,c,a,v,y,k)}function gs(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Ba+1,d=c+b-1);return[c,d]}
761
+ function vr(a,b,c,d,e){var f=b.segments,g=void 0,h=Vq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=Vq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=Uq(b.g,"EXT-X-SKIP");l=l?Number(W(l,"SKIPPED-SEGMENTS")):0;var m=k+l,p=0;nr(a)&&d.has(m)&&(p=d.get(m));for(var n=[],t=null,v=0;v<f.length;v++){var y=f[v],w=0==v?p:t.endTime;m=k+l+v;Uq(b.g,"EXT-X-DISCONTINUITY")&&h++;var x=r(y.g);for(var A=x.next();!A.done;A=x.next())A=A.value,"EXT-X-KEY"==A.name&&"AES-128"==Pq(A,"METHOD")&&(g=as(a,A,b));d.set(m,w);x=ds(a,b.h,y.g,e);!a.l&&a.i.isAutoLowLatencyMode()&&
762
+ (a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(t=y=fs(a,x,t,y,w,e,b.h,c,g))y.m=h,a.g.hls.ignoreManifestProgramDateTime&&null!=a.F&&m<a.F||n.push(y)}if(a=n.some(function(z){return null!=z.g}))for(b={},c=0;c<n.length;b={tc:b.tc,sc:b.sc,bd:b.bd,qb:b.qb,rc:b.rc},c++)if(b.qb=n[c],null==b.qb.g)for(b.sc=0,b.tc=c,d=function(z){return function(){var C=n[z.tc];if(C){if(null!=C.g)return C.g+z.sc;z.sc-=C.endTime-C.startTime;z.tc+=1}return null}}(b),b.rc=0,b.bd=c,e=function(z){return function(){var C=
763
+ n[z.bd];if(C){C!=z.qb&&(z.rc+=C.endTime-C.startTime);if(null!=C.g)return C.g+z.rc;--z.bd}return null}}(b);null==b.qb.g;)b.qb.g=e(),null==b.qb.g&&(b.qb.g=d());if(a)for(a=r(n),b=a.next();!b.done;b=a.next())for(c=b.value,b=c.g,c=r(c.i),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return n}
764
+ function Tr(a,b){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 M(2,4,4039,e);}}return a}function Zr(a,b){if(a==Ib){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
765
+ function Yr(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v;return G(function(y){if(1==y.g){f=uf;g=Math.trunc((d.segments.length-1)/2);h=Tr(d.segments[g].i,e);k=new lb(h);l=k.Ha.split(".").pop();m=$r[b];if((p=m[l])||(p=zr[l])||(p=Zr(b,c)))return y.return(p);n=of([h],a.g.retryParameters);n.method="HEAD";return u(y,bs(a,n,f),2)}t=y.h;return(v=t.headers["content-type"])?y.return(v.split(";")[0]):y.return(b==Ib?"text/vtt":$r[b].mp4)})}
766
+ function lr(a,b){b=of([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return bs(a,b,0)}function jr(a){var b,c;G(function(d){if(1==d.g){if(!a.i)return d.return();D(d,2);return u(d,a.update(),4)}if(2!=d.g)return nr(a)&&(b=a.P,a.m.R(b)),ua(d,0);c=va(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.m.R(.1);B(d)})}function nr(a){return a.aa!=kr}function rr(a,b){a.aa=b;a.j&&a.j.Zc(!nr(a));nr(a)||a.m.stop()}
767
+ function bs(a,b,c){if(!a.I)throw new M(2,7,7001);b=a.i.networkingEngine.request(c,b);jf(a.I,b);return b.promise}I("shaka.hls.HlsParser",ir);
768
+ var zr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Ar={mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t"},Br={mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},$r={audio:Ar,video:Br,text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"txt/vtt",
769
+ ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Qr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new M(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new M(2,4,4041);return Eb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Pq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
770
+ b=Pq(a,"URI");b=hr(b);b=Hc(b.data);b=Eb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=W(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Pq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Pq(a,"URI");a=hr(a);a=Hc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Tf(a,b,new Set,0);return Eb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
771
+ Pq(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?Eb("org.w3.clearkey",null):null}},kr="VOD",cs="EVENT",Mr="LIVE",qr={hg:kr,ei:cs,fg:Mr};Sc("Tizen 3")||Sc("Tizen 2")||Uc()||(dh.m3u8=function(){return new ir},bh["application/x-mpegurl"]=function(){return new ir},bh["application/vnd.apple.mpegurl"]=function(){return new ir});function hs(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Of:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=dd(b)}catch(g){}throw new M(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function is(){}function js(a,b,c,d,e){var f=new ks;Cf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ls,h={tf:!1,cg:!1};a=ms(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Ze(a,function(){h.tf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.cg=!0;g.abort()});k.R(b/1E3);a.finally(function(){k.stop()})}return a}
772
+ function ms(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,w,x,A,z;return G(function(C){switch(C.g){case 1:return h=ns,k=os,n=p=0,t=Date.now(),D(C,2),u(C,h(a,c),4);case 4:return l=C.h,f(ps(l.headers)),v=l.clone().body.getReader(),w=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,x=function(E){function F(){var H,J;return G(function(K){switch(K.g){case 1:return D(K,2),u(K,v.read(),4);case 4:H=K.h;ua(K,3);break;case 2:return va(K),K.return();case 3:if(H.done){K.D(5);break}p+=H.value.byteLength;if(!g){K.D(5);
773
+ break}return u(K,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,p-n,w-p),n=p,t=J;H.done?E.close():(E.enqueue(H.value),F());B(K)}})}F()},new k({start:x}),u(C,l.arrayBuffer(),5);case 5:m=C.h;ua(C,3);break;case 2:A=va(C);if(d.tf)throw new M(1,1,7001,a,b);if(d.cg)throw new M(1,1,1003,a,b);throw new M(1,1,1002,a,A,b);case 3:return z=ps(l.headers),C.return(hs(z,m,l.status,a,l.url,b))}})}function ps(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
774
+ function qs(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}I("shaka.net.HttpFetchPlugin",is);is.isSupported=qs;is.parse=js;var ns=window.fetch,ls=window.AbortController,os=window.ReadableStream,ks=window.Headers;qs()&&(lf("http",js,2,!0),lf("https",js,2,!0),lf("blob",js,2,!0));function rs(){}
775
+ function ss(a,b,c,d,e){var f=new ts,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new M(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=us(f);e(t);p=!0}};f.onload=function(){var t=us(f),v=f.response;try{var y=hs(t,v,f.status,a,f.responseURL,c);l(y)}catch(w){m(w)}};f.onerror=function(t){m(new M(1,1,1002,a,t,
776
+ c))};f.ontimeout=function(){m(new M(1,1,1003,a,c))};f.onprogress=function(t){var v=Date.now();if(100<v-g||t.lengthComputable&&t.loaded==t.total)d(v-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=v};for(var n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new Ze(k,function(){f.abort();return Promise.resolve()})}
777
+ function us(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}I("shaka.net.HttpXHRPlugin",rs);rs.parse=ss;var ts=window.XMLHttpRequest;lf("http",ss,1,!0);lf("https",ss,1,!0);lf("blob",ss,1,!0);function vs(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function ws(a){return a.Pa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Sa+":"+a.Ba}function xs(a,b){return lk(a.g.Pa(),a.g.Sa,a.g.Ba,b.streaming.retryParameters)};function ys(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function zs(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}ys.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function As(a){var b=this;this.s=a;this.j=new Map;this.i=new vf(function(){return Bs(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new ys}As.prototype.destroy=function(){return this.i.destroy()};function Cs(a,b,c){a.m=b;a.l=c}function Bs(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
778
+ function Ds(a,b,c,d,e,f){wf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,t;return G(function(v){if(1==v.g)return u(v,Es(a,c),2);h=v.h;if(a.i.g)throw new M(2,9,7001);if(e)for(m in k=Hc(h),l=new Sf(k),l.data)p=Number(m),n=l.data[p],t=l.g[p],a.l(n,t);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v.return(f(h))})});a.j.set(b,g)}function Fs(a){return G(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
779
+ function Es(a,b){var c,d,e,f;return G(function(g){if(1==g.g)return c=uf,d=a.s.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;gc(a.h,e);return g.return(f.data)})};function Gs(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Lc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Gs.prototype.abort=function(){var a=this;return G(function(b){if(1==b.g){try{a.i.abort()}catch(c){}D(b,2);return u(b,a.g,4)}if(2!=b.g)return ua(b,0);va(b);B(b)})};
780
+ function Hs(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return G(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return u(g,b(f.key,f.value,f),2)}f.continue();B(g)})}})}Gs.prototype.store=function(){return this.h};Gs.prototype.promise=function(){return this.g};function Is(a){this.h=a;this.g=[]}Is.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Js(a,b){return Ks(a,b,"readwrite")}function Ks(a,b,c){c=a.h.transaction([b],c);var d=new Gs(c,b);a.g.push(d);d.promise().then(function(){gc(a.g,d)},function(){gc(a.g,d)});return d};function Ls(a,b,c){this.h=new Is(a);this.i=b;this.g=c}q=Ls.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Ms(this.i)};q.removeSegments=function(a,b){return Ns(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return G(function(d){if(1==d.g)return u(d,Os(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.wf(e)}))})};q.addManifests=function(){return Ms(this.g)};
781
+ q.updateManifest=function(){return Promise.reject(new M(2,9,9016,"Cannot modify values in "+this.g))};function Ps(a,b,c){a=Js(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=Js(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return Ns(this,this.g,a,b)};
782
+ q.getManifests=function(a){var b=this,c;return G(function(d){if(1==d.g)return u(d,Os(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Dc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return G(function(d){return 1==d.g?(b=Ks(a.h,a.g,"readonly"),c=new Map,u(d,Hs(b,function(e,f){var g;return G(function(h){if(1==h.g)return u(h,a.Dc(f),2);g=h.h;c.set(e,g);B(h)})}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};q.wf=function(a){return a};q.Dc=function(a){return Promise.resolve(a)};
783
+ function Ms(a){return Promise.reject(new M(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){if(1==m.g){d=Js(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={fd:g.fd},k=h.next())l=k.value,g.fd=e.add(l),g.fd.onsuccess=function(p){return function(){f.push(p.fd.result)}}(g);return u(m,d.promise(),2)}return m.return(f)})};
784
+ function Ns(a,b,c,d){a=Js(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={ed:e.ed},f=c.next())e.ed=f.value,b.delete(e.ed).onsuccess=function(g){return function(){return d(g.ed)}}(e);return a.promise()}
785
+ function Os(a,b,c){var d,e,f,g,h,k,l;return G(function(m){if(1==m.g){d=Ks(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={zc:h.zc,wc:h.wc},l=k.next())h.wc=l.value,h.zc=e.get(h.wc),h.zc.onsuccess=function(p){return function(){void 0==p.zc.result&&g.push(p.wc);f[p.wc]=p.zc.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new M(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(p){return f[p]}))})};function Qs(a){this.g=new Is(a)}Qs.prototype.destroy=function(){return this.g.destroy()};Qs.prototype.getAll=function(){var a=this,b,c;return G(function(d){return 1==d.g?(b=Ks(a.g,"session-ids","readonly"),c=[],u(d,Hs(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};Qs.prototype.add=function(a){var b=Js(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
786
+ Qs.prototype.remove=function(a){var b=this,c;return G(function(d){return 1==d.g?(c=Js(b.g,"session-ids"),u(d,Hs(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):u(d,c.promise(),0)})};function Rs(){this.g=new Map}Rs.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Rs.prototype.init=function(){var a=this;Ss.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
787
+ function Ts(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ra:d,Aa:f},Aa:e})})});if(b)return b;throw new M(2,9,9013,"Could not find a cell that supports add-operations");}function Us(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ra:d,Aa:f},e)})})}
788
+ function Vs(a,b,c){a=a.g.get(b);if(!a)throw new M(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new M(2,9,9013,"Could not find cell with name "+c);return b}function Ws(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Xs(a){var b=Array.from(a.g.keys());if(!b.length)throw new M(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
789
+ function Ys(a){var b,c,d;return G(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Ss,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Zs(a,b){Ss.set(a,b)}I("shaka.offline.StorageMuxer",Rs);Rs.unregister=function(a){Ss.delete(a)};Rs.register=Zs;Rs.prototype.destroy=Rs.prototype.destroy;var Ss=new Map;function $s(){Ls.apply(this,arguments)}pa($s,Ls);$s.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return G(function(g){d=Js(c.h,c.g);e=d.store();f=new Lc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new M(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
790
+ $s.prototype.Dc=function(a){var b,c,d,e,f,g;return G(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=at(a.periods[c],e),b.push(f);return u(h,$p(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
791
+ function at(a,b){bt(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return ct(e,a.startTime,b)})}
792
+ function ct(a,b,c){var d=a.initSegmentUri?dt(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=dt(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
793
+ dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}$s.prototype.wf=function(a){return{data:a.data}};function dt(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new M(2,9,9004,"Could not parse uri "+a);}
794
+ function bt(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
795
+ f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function et(){Ls.apply(this,arguments)}pa(et,Ls);
796
+ et.prototype.Dc=function(a){var b,c,d,e,f,g;return G(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(ft(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,$p(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
796
797
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
797
- function dt(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
798
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function et(){Js.apply(this,arguments)}pa(et,Js);q=et.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return Ns(this,a,b)};q.Dc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ft(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=ft.prototype;
799
- q.init=function(){var a=this,b=new Lc,c=!1,d=new O(function(){c=!0;b.reject(new M(2,9,9017))});d.R(2);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Ys(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new ct(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
800
- new ct(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new et(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Os(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new M(2,
798
+ function ft(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
799
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function gt(){Ls.apply(this,arguments)}pa(gt,Ls);q=gt.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return Ps(this,a,b)};q.Dc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ht(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=ht.prototype;
800
+ q.init=function(){var a=this,b=new Lc,c=!1,d=new O(function(){c=!0;b.reject(new M(2,9,9017))});d.R(2);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new $s(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new et(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
801
+ new et(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new gt(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Qs(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new M(2,
801
802
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return G(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),B(b)}})};
802
803
  q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
803
- q.erase=function(){var a=this;return G(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,gt(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
804
- function gt(){var a=new Lc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new M(2,9,9001,b.error));c.preventDefault()};return a}Xs("idb",function(){return Sc("CrKey")||Rc()||!window.indexedDB?null:new ft});function ht(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}ht.prototype.Qa=function(){return this.i};ht.prototype.Aa=function(){return this.h};ht.prototype.key=function(){return this.l};ht.prototype.toString=function(){return this.j};
805
- function it(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new ht(b,c,d,Number(a[4])):null};function jt(a,b){this.h=a;this.g=b}
806
- function kt(a,b){var c=new Q(null,0);c.ab(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=lt(a,d,e,c);e=b.streams.filter(function(l){return l.type==Ib}).map(function(l){return mt(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return mt(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
804
+ q.erase=function(){var a=this;return G(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,it(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
805
+ function it(){var a=new Lc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new M(2,9,9001,b.error));c.preventDefault()};return a}Zs("idb",function(){return Sc("CrKey")||Rc()||!window.indexedDB?null:new ht});function jt(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}jt.prototype.Ra=function(){return this.i};jt.prototype.Aa=function(){return this.h};jt.prototype.key=function(){return this.l};jt.prototype.toString=function(){return this.j};
806
+ function kt(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new jt(b,c,d,Number(a[4])):null};function lt(a,b){this.h=a;this.g=b}
807
+ function mt(a,b){var c=new Q(null,0);c.ab(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=nt(a,d,e,c);e=b.streams.filter(function(l){return l.type==Ib}).map(function(l){return ot(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ot(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
807
808
  g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1}}
808
- function lt(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=
809
- b.next())for(e=e.value,g=mt(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=mt(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
810
- function mt(a,b,c){var d=b.segments.map(function(e){return nt(a,e)});c.lc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Qj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
811
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function nt(a,b){var c=new ht("segment",a.h,a.g,b.dataKey);return new zi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?ot(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
812
- function ot(a,b){var c=new ht("segment",a.h,a.g,b);return new xi(function(){return[c.toString()]},0,null)};function pt(){this.g=null}q=pt.prototype;q.configure=function(){};
813
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:d=it(a);c.g=d;if(null==d||"manifest"!=d.g)throw new M(2,1,9004,a);e=new Ps;ta(m);return u(m,e.init(),4);case 4:return u(m,Ts(e,d.Qa(),d.Aa()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new jt(d.Qa(),d.Aa()),l=kt(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
809
+ function nt(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=
810
+ b.next())for(e=e.value,g=ot(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=ot(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
811
+ function ot(a,b,c){var d=b.segments.map(function(e){return pt(a,e)});c.lc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Sj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
812
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function pt(a,b){var c=new jt("segment",a.h,a.g,b.dataKey);return new zi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?qt(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
813
+ function qt(a,b){var c=new jt("segment",a.h,a.g,b);return new xi(function(){return[c.toString()]},0,null)};function rt(){this.g=null}q=rt.prototype;q.configure=function(){};
814
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:d=kt(a);c.g=d;if(null==d||"manifest"!=d.g)throw new M(2,1,9004,a);e=new Rs;ta(m);return u(m,e.init(),4);case 4:return u(m,Vs(e,d.Ra(),d.Aa()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new lt(d.Ra(),d.Aa()),l=mt(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
814
815
  q.update=function(){};
815
- q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:return d=c.g,e=new Ps,C(m,2,3),u(m,e.init(),5);case 5:return u(m,Ts(e,d.Qa(),d.Aa()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.D(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:va(m),m.D(3)}})};
816
- bh["application/x-offline-manifest"]=function(){return new pt};function qt(){}function rt(a){var b=it(a);b&&"manifest"==b.g?(a={uri:a,Of:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=bf(a)):a=b&&"segment"==b.g?st(b.key(),b):$e(new M(2,1,9004,a));return a}
817
- function st(a,b){var c=new Ps;return bf(void 0).ha(function(){return c.init()}).ha(function(){return Ts(c,b.Qa(),b.Aa())}).ha(function(d){return d.getSegments([b.key()])}).ha(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}I("shaka.offline.OfflineScheme",qt);qt.plugin=rt;lf("offline",rt);function tt(a,b,c){var d,e,f,g,h,k;return G(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,ut(y.info,p)){y.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=vt(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l.return(d)}})}
818
- function vt(a,b,c){var d,e;return G(function(f){switch(f.g){case 1:return d=new og({Ob:b,onError:function(){},Fd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,wg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ua(f,3);break;case 2:return va(f),u(f,d.destroy(),5);case 5:return f.return([]);case 3:return C(f,6),u(f,Hg(d),8);case 8:ua(f,7);break;case 6:return va(f),u(f,d.destroy(),
819
- 9);case 9:return f.return([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return G(function(h){if(1==h.g)return C(h,2),u(h,Ig(d,g),4);if(2!=h.g)return e.push(g),ua(h,0);va(h);B(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f.return(e)}})}
820
- function ut(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&hc(a.audioCapabilities,b.audioCapabilities,c)&&hc(a.videoCapabilities,b.videoCapabilities,c)};function wt(a,b,c){var d=b.presentationTimeline.getDuration();b=xt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function yt(a,b){var c=kt(new jt(a.Qa(),a.Aa()),b),d=b.appMetadata||{};c=xt(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
821
- function xt(a){var b=[],c=we(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(ne(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(oe(c.value));return b};function zt(){this.g={}}function At(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Bt(a,b){a.g[b.id]=b.bandwidth||2048}function Ct(a,b){a=a.g[b];null==a&&(a=0);return a};function Dt(a){var b=this;if(a&&a.constructor!=S)throw new M(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Hc()):(this.h=Kl(),this.g=new kf);this.i=[];this.j=[];var c=!a;this.l=new vf(function(){var d,e,f,g,h;return G(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return zs(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return u(k,b.g.destroy(),4);
822
- case 4:b.h=null,b.g=null,B(k)}})})}function Et(){if(Oc())a:{var a=r(Qs.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=Dt.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=El(a,b));return Ml(this.h,a)};q.getConfiguration=function(){var a=Kl();Ml(a,this.h,Kl());return a};q.Hc=function(){return this.g};
823
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new ys(this.g);this.j.push(f);b=Ft(this,a,b||{},function(){var g;return G(function(h){if(1==h.g)return u(h,ah(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Ze(b,function(){return zs(f)});b.finally(function(){gc(d.j,f)});return Gt(this,b)};
824
- function Ft(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,w,x,A,z;return G(function(D){switch(D.g){case 1:return Ht(),h=g=null,k=new Ps,n=m=l=null,C(D,2,3),u(D,d(),5);case 5:return g=D.h,u(D,It(a,b,g,e),6);case 6:p=D.h;Jt(a);t=!p.presentationTimeline.T()&&!p.presentationTimeline.Lb();if(!t)throw new M(2,9,9005,b);return u(D,Kt(a,p,function(E){n=n||E},e),7);case 7:h=D.h;Jt(a);if(n)throw n;return u(D,Lt(p,e),8);case 8:return u(D,k.init(),9);case 9:return Jt(a),u(D,Rs(k),10);case 10:return l=D.h,Jt(a),v=Mt(h,
825
- p,b,c,e,f),y=v.hh,w=v.Te,u(D,l.Aa.addManifests([y]),11);case 11:x=D.h;Jt(a);m=x[0];Jt(a);if(n)throw n;return u(D,Nt(a,w,m,y,f,e,l.Aa,p,h),12);case 12:return Jt(a),A=new ht("manifest",l.path.Qa,l.path.Aa,m),D.return(yt(A,y));case 3:return wa(D),u(D,k.destroy(),13);case 13:if(!g){D.D(14);break}return u(D,g.stop(),14);case 14:if(!h){D.D(16);break}return u(D,h.destroy(),16);case 16:xa(D,0);break;case 2:z=va(D);if(null==m){D.D(18);break}return u(D,Ot(m),18);case 18:throw n||z;}})}
826
- function Nt(a,b,c,d,e,f,g,h,k){var l,m,n,p,t,v,y,w,x,A;return G(function(z){switch(z.g){case 1:l={};m=0;n=function(D,E){var F,H,J,K,N,V,U;return G(function(P){if(1==P.g){F={};H=r(D);for(J=H.next();!J.done;F={Fb:F.Fb},J=H.next())F.Fb=J.value,K=vs(F.Fb,f),N=F.Fb.i,V=F.Fb.h,U=function(ca){return function(Aa){var za,Ua,ab;return G(function(Na){if(1==Na.g)return u(Na,g.addSegments([{data:Aa}]),2);za=Na.h;Jt(a);Ua=ca.Fb.g;ab=us(Ua);l[ab]=za[0];m+=Aa.byteLength;B(Na)})}}(F),Bs(e,F.Fb.groupId,K,N,V,U);return u(P,
827
- Ds(e),2)}if(!E)return P.D(0);Jt(a);Pt(h,d,k,f);return u(P,g.updateManifest(c,d),0)})};p=!1;C(z,2);if(!Qt(h)||!p||Rt(h)){z.D(4);break}return u(z,n(b.filter(function(D){return D.h}),!0),5);case 5:return Jt(a),b=b.filter(function(D){return!D.h}),t=l,v=m,l={},m=0,u(z,St(g,c,d,t,v,function(){return Jt(a)}),6);case 6:Jt(a);case 4:if(p){z.D(7);break}return u(z,n(b,!1),8);case 8:return Jt(a),y=l,w=m,l={},m=0,u(z,St(g,c,d,y,w,function(){return Jt(a)}),9);case 9:Jt(a);case 7:ua(z,0);break;case 2:return x=va(z),
828
- A=Object.values(l),u(z,g.removeSegments(A,function(){}),10);case 10:throw x;}})}function Ot(a){var b,c,d,e;return G(function(f){switch(f.g){case 1:return b=new Ps,u(f,b.init(),2);case 2:return u(f,Rs(b),3);case 3:return c=f.h,d=new ht("manifest",c.path.Qa,c.path.Aa,a),u(f,b.destroy(),4);case 4:return e=new Dt,u(f,e.remove(d.toString()),0)}})}
829
- function St(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,w;return G(function(x){switch(x.g){case 1:g=!1;C(x,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=r(m.segments),p=n.next();!p.done;p=n.next())t=p.value,v=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=v&&(t.dataKey=v,t.pendingSegmentRefId=void 0),v=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=v&&(t.initSegmentKey=v,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
830
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(x,a.updateManifest(b,c),4);case 4:g=!0;f();ua(x,0);break;case 2:return y=va(x),u(x,Ot(b),5);case 5:if(g){x.D(6);break}w=Object.values(d);return u(x,a.removeSegments(w,function(){}),6);case 6:throw y;}})}
831
- function Lt(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,A,z,D,E,F,H,J,K,N,V,U,P,ca;return G(function(Aa){switch(Aa.g){case 1:return c={width:Infinity,height:Infinity},Xd(a,b.restrictions,c),u(Aa,ae(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Ld(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(ne(m));n=r(a.textStreams);for(p=n.next();!p.done;p=n.next())t=p.value,
832
- d.push(oe(t));v=r(a.imageStreams);for(y=v.next();!y.done;y=v.next())w=y.value,d.push(pe(w));return u(Aa,b.offline.trackSelectionCallback(d),3);case 3:x=Aa.h;A=a.presentationTimeline.getDuration();z=0;D=r(x);for(E=D.next();!E.done;E=D.next())F=E.value,H=F.bandwidth*A/8,z+=H;C(Aa,4);return u(Aa,b.offline.downloadSizeCallback(z),6);case 6:J=Aa.h;if(!J)throw new M(2,9,9014);ua(Aa,5);break;case 4:K=va(Aa);if(K instanceof M)throw K;throw new M(2,9,9015);case 5:N=new Set;V=new Set;U=new Set;P=r(x);for(E=
833
- P.next();!E.done;E=P.next())ca=E.value,"variant"==ca.type&&N.add(ca.id),"text"==ca.type&&V.add(ca.id),"image"==ca.type&&U.add(ca.id);a.variants=a.variants.filter(function(za){return N.has(za.id)});a.textStreams=a.textStreams.filter(function(za){return V.has(za.id)});a.imageStreams=a.imageStreams.filter(function(za){return U.has(za.id)});Tt(a);B(Aa)}})}
834
- function Mt(a,b,c,d,e,f){var g=wt(c,b,d),h=e.offline.progressCallback;As(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Eg(a,"cenc",t)});var k=Qt(b)&&!Rt(b),l=null;k&&(l=Ut.get(a.g.keySystem));for(var m=new zt,n=r(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=r(b.imageStreams);for(p=n.next();!p.done;p=n.next())Bt(m,p.value);p=r(b.variants);for(n=p.next();!n.done;n=p.next())At(m,n.value);m=Vt(f,m,b,e);f=m.streams;m=m.Te;p=a.g;n=e.offline.usePersistentLicense;
835
- p&&n&&(p.initData=[]);return{hh:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Gc(),streams:f,sessionIds:n?Ng(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Te:m}}function Qt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
836
- function Rt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Pt(a,b,c,d){b.expiration=c.Gc();c=Ng(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Qt(a)&&d.offline.usePersistentLicense&&!c.length)throw new M(2,9,9007);}q.remove=function(a){return Wt(this,Xt(this,a))};
837
- function Xt(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.g){case 1:Ht();c=it(b);if(null==c||"manifest"!=c.g)throw new M(2,9,9004,b);d=c;e=new Ps;ta(k);return u(k,e.init(),4);case 4:return u(k,Ts(e,d.Qa(),d.Aa()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([Yt(a,h,e),Zt(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
838
- function $t(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:xd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:xd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Yt(a,b,c){return G(function(d){return u(d,au(a.g,a.h.drm,c,b),0)})}
839
- function Zt(a,b,c){function d(){}var e=bu(c);yt(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.xh=function(){return Wt(this,cu(this))};
840
- function cu(a){var b,c,d,e,f,g,h,k,l,m;return G(function(n){switch(n.g){case 1:return Ht(),b=a.g,c=a.h.drm,d=new Ps,e=!1,ta(n),u(n,d.init(),4);case 4:f=[],Us(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.D(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,tt(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.D(5);break;case 2:return wa(n),u(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n.return(!e)}})}
841
- q.list=function(){return Wt(this,du())};function du(){var a,b,c;return G(function(d){switch(d.g){case 1:return Ht(),a=[],b=new Ps,ta(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Ss(b,function(e,f){c=c.then(function(){var g;return G(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=yt(new ht("manifest",e.Qa,e.Aa,l),k);a.push(k)});B(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d.return(a)}})}
842
- function It(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){}},
843
- c.configure(d.manifest),Jt(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Jt(a),k=eu(h),u(l,Promise.all(gb(k,function(m){return m.createSegmentIndex()})),3);Jt(a);if(e)throw e;return l.return(h)})}
844
- function Kt(a,b,c,d){var e;return G(function(f){switch(f.g){case 1:return e=new og({Ob:a.g,onError:c,Fd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,tg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Hg(e),3);case 3:return u(f,Gg(e),4);case 4:return f.return(e)}})}
845
- function Vt(a,b,c,d){var e=new Map,f=eu(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=fu(a,b,c,h,d,e);g.set(h.id,k)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Te:Array.from(e.values())}}
846
- function fu(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
847
- tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;gu(d,c.presentationTimeline.jb(),function(l){var m=us(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Ct(b,d.id)*p;p=xs(a.g,p);f.set(m,new ts(l,p,k,!1))}l.h&&(n=us(l.h),f.has(n)||(p=.5*Ct(b,d.id),p=xs(a.g,p),f.set(n,new ts(l.h,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
848
- tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function gu(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Jt(a){if(a.l.g)throw new M(2,9,7001);}function Ht(){if(!Et())throw new M(2,9,9E3);}function Wt(a,b){return G(function(c){if(1==c.g)return a.i.push(b),ta(c),u(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);gc(a.i,b);return xa(c,0)})}
849
- function Gt(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){gc(a.i,c)})}function bu(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
850
- function au(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Vs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:$t(d,!1),videoCapabilities:$t(d,!0)}});return u(h,tt(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
851
- function eu(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
852
- function Tt(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}I("shaka.offline.Storage",Dt);Dt.deleteAll=function(){var a;return G(function(b){return 1==b.g?(a=new Ps,ta(b),u(b,Ws(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};Dt.prototype.list=Dt.prototype.list;
853
- Dt.prototype.removeEmeSessions=Dt.prototype.xh;Dt.prototype.remove=Dt.prototype.remove;Dt.prototype.store=Dt.prototype.store;Dt.prototype.getNetworkingEngine=Dt.prototype.Hc;Dt.prototype.getConfiguration=Dt.prototype.getConfiguration;Dt.prototype.configure=Dt.prototype.configure;Dt.prototype.destroy=Dt.prototype.destroy;Dt.support=Et;
854
- var Ut=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
855
- yn.offline=Et;function hu(){}function iu(){for(var a=r(ju),b=a.next();!b.done;b=a.next()){b=b.value;try{b.ng()}catch(c){Ta("Error installing polyfill!",c)}}}function ku(a,b){a={priority:b||0,ng:a};for(b=0;b<ju.length;b++)if(ju[b].priority<a.priority){ju.splice(b,0,a);return}ju.push(a)}I("shaka.polyfill",hu);hu.register=ku;hu.installAll=iu;var ju=[];function lu(){this.g=new mu}function nu(){window.AbortController||(window.AbortController=lu,window.AbortSignal=mu)}lu.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new L("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};ea.Object.defineProperties(lu.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});hu.AbortController=lu;lu.install=nu;
856
- function mu(){fb.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(mu,fb);ea.Object.defineProperties(mu.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});ku(nu);function ou(){}function pu(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())qu(b.value)}function qu(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}hu.Aria=ou;ou.install=pu;ku(pu);function ru(){}function su(){tu()}hu.EncryptionScheme=ru;ru.install=su;ku(su,-2);function uu(){}
857
- function vu(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
858
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",wu);document.addEventListener("webkitfullscreenerror",wu);document.addEventListener("mozfullscreenchange",wu);document.addEventListener("mozfullscreenerror",wu);document.addEventListener("MSFullscreenChange",wu);document.addEventListener("MSFullscreenError",wu)}}
859
- function wu(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}hu.Fullscreen=uu;uu.install=vu;ku(vu);function xu(){}function yu(){var a=!0;if(Vc()||Sc("PlayStation 5")||Wc()||Sc("Web0S")||Tc()||Sc("CrKey")||Sc("PC=EOS"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),zu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Au)}
860
- function Au(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x;return G(function(A){switch(A.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return A.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Oc())return A.return(b);if(c){if(Sc("CrKey")){if(!window.cast)throw new M(2,8,8E3);if(cast.__platform__&&cast.__platform__.canDisplayType){var z=c.contentType;c.width&&c.height&&(z+="; width="+c.width+"; height="+c.height);c.framerate&&(z+="; framerate="+
861
- c.framerate);"pq"===c.transferFunction&&(z+="; eotf=smpte2084");z=cast.__platform__.canDisplayType(z)}else z=dc(c.contentType)}else z=dc(c.contentType);e=z;if(!e)return A.return(b)}if(d&&(f=d.contentType,g=dc(f),!g))return A.return(b)}else if("file"==a.type){if(c&&(h=c.contentType,k=Pc(h),!k)||d&&(l=d.contentType,m=Pc(l),!m))return A.return(b)}else return A.return(b);if(!a.keySystemConfiguration)return b.supported=!0,A.return(Promise.resolve(b));n=a.keySystemConfiguration;p=[];t=[];n.audio&&(v={robustness:n.audio.robustness||
862
- "",contentType:a.audio.contentType},p.push(v));n.video&&(y={robustness:n.video.robustness||"",contentType:a.video.contentType},t.push(y));w={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes};p.length&&(w.audioCapabilities=p);t.length&&(w.videoCapabilities=t);C(A,3);return u(A,navigator.requestMediaKeySystemAccess(n.keySystem,[w]),5);case 5:x=A.h;ua(A,4);break;case 3:va(A);case 4:x&&(b.supported=!0,b.keySystemAccess=
863
- x);case 2:return A.return(b)}})}hu.MediaCapabilities=xu;xu.install=yu;var zu=null;xu.originalMcap=zu;ku(yu,-1);function Bu(){}function Cu(){var a=Xc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Du():a?12>=a?(Eu(),Fu()):Eu():(Sc("Tizen 2")||Sc("Tizen 3")||Sc("Tizen 4"))&&Gu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Hu()}
864
- function Eu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function Fu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Gu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Ad(b)[0]&&a(b)}}
865
- function Du(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
866
- function Hu(){var a=MediaSource.isTypeSupported;Sc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}hu.MediaSource=Bu;Bu.install=Cu;ku(Cu);function Iu(){}function Ju(){screen.orientation||void 0!=window.orientation&&Ku()}function Ku(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Lu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new L("change");b.dispatchEvent(c)})}hu.Orientation=Iu;
867
- Iu.install=Ju;function Lu(){fb.call(this);this.type="";this.angle=0}pa(Lu,fb);
868
- Lu.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
869
- Lu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};ku(Ju);function Mu(){}var Nu,Ou,Pu,Qu,Ru,Su;function Tu(a,b){try{var c=new Uu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Vu(a){var b=this.mediaKeys;b&&b!=a&&Wu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Wu(a,this):Promise.resolve()}
870
- function Xu(a){a=Hc(a.initData);if(Kc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=bd(a.subarray(4),!0);a=ed(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ic(a);this.dispatchEvent(b)}hu.PatchedMediaKeysApple=Mu;
871
- Mu.uninstall=function(){Nu&&(Nu=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Ou),HTMLMediaElement.prototype.setMediaKeys=Pu,window.MediaKeys=Qu,window.MediaKeySystemAccess=Ru,navigator.requestMediaKeySystemAccess=Su,Ou=Su=Pu=Ru=Qu=null,window.shakaMediaKeysPolyfill=!1)};
872
- Mu.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Nu=!0,Ou=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Pu=HTMLMediaElement.prototype.setMediaKeys,Qu=window.MediaKeys,Ru=window.MediaKeySystemAccess,Su=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Vu;window.MediaKeys=Yu;window.MediaKeySystemAccess=Uu;navigator.requestMediaKeySystemAccess=
873
- Tu;window.shakaMediaKeysPolyfill=!0}};
874
- function Uu(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("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=r(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
816
+ q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:return d=c.g,e=new Rs,D(m,2,3),u(m,e.init(),5);case 5:return u(m,Vs(e,d.Ra(),d.Aa()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.D(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:va(m),m.D(3)}})};
817
+ bh["application/x-offline-manifest"]=function(){return new rt};function st(){}function tt(a){var b=kt(a);b&&"manifest"==b.g?(a={uri:a,Of:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=bf(a)):a=b&&"segment"==b.g?ut(b.key(),b):$e(new M(2,1,9004,a));return a}
818
+ function ut(a,b){var c=new Rs;return bf(void 0).ha(function(){return c.init()}).ha(function(){return Vs(c,b.Ra(),b.Aa())}).ha(function(d){return d.getSegments([b.key()])}).ha(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}I("shaka.offline.OfflineScheme",st);st.plugin=tt;lf("offline",tt);function vt(a,b,c){var d,e,f,g,h,k;return G(function(l){switch(l.g){case 1:d=[];for(var m=[],p=r(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,wt(y.info,n)){y.sessionIds.push(n.sessionId);t=!0;break}t||m.push({info:n,sessionIds:[n.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=xt(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l.return(d)}})}
819
+ function xt(a,b,c){var d,e;return G(function(f){switch(f.g){case 1:return d=new og({Ob:b,onError:function(){},Fd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),D(f,2),d.configure(a),u(f,wg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ua(f,3);break;case 2:return va(f),u(f,d.destroy(),5);case 5:return f.return([]);case 3:return D(f,6),u(f,Hg(d),8);case 8:ua(f,7);break;case 6:return va(f),u(f,d.destroy(),
820
+ 9);case 9:return f.return([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return G(function(h){if(1==h.g)return D(h,2),u(h,Ig(d,g),4);if(2!=h.g)return e.push(g),ua(h,0);va(h);B(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f.return(e)}})}
821
+ function wt(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&hc(a.audioCapabilities,b.audioCapabilities,c)&&hc(a.videoCapabilities,b.videoCapabilities,c)};function yt(a,b,c){var d=b.presentationTimeline.getDuration();b=zt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function At(a,b){var c=mt(new lt(a.Ra(),a.Aa()),b),d=b.appMetadata||{};c=zt(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
822
+ function zt(a){var b=[],c=we(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(ne(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(oe(c.value));return b};function Bt(){this.g={}}function Ct(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Dt(a,b){a.g[b.id]=b.bandwidth||2048}function Et(a,b){a=a.g[b];null==a&&(a=0);return a};function Ft(a){var b=this;if(a&&a.constructor!=S)throw new M(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Hc()):(this.h=Ml(),this.g=new kf);this.i=[];this.j=[];var c=!a;this.l=new vf(function(){var d,e,f,g,h;return G(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Bs(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return u(k,b.g.destroy(),4);
823
+ case 4:b.h=null,b.g=null,B(k)}})})}function Gt(){if(Oc())a:{var a=r(Ss.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=Ft.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Gl(a,b));return Ol(this.h,a)};q.getConfiguration=function(){var a=Ml();Ol(a,this.h,Ml());return a};q.Hc=function(){return this.g};
824
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new As(this.g);this.j.push(f);b=Ht(this,a,b||{},function(){var g;return G(function(h){if(1==h.g)return u(h,ah(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Ze(b,function(){return Bs(f)});b.finally(function(){gc(d.j,f)});return It(this,b)};
825
+ function Ht(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,w,x,A,z;return G(function(C){switch(C.g){case 1:return Jt(),h=g=null,k=new Rs,p=m=l=null,D(C,2,3),u(C,d(),5);case 5:return g=C.h,u(C,Kt(a,b,g,e),6);case 6:n=C.h;Lt(a);t=!n.presentationTimeline.T()&&!n.presentationTimeline.Lb();if(!t)throw new M(2,9,9005,b);return u(C,Mt(a,n,function(E){p=p||E},e),7);case 7:h=C.h;Lt(a);if(p)throw p;return u(C,Nt(n,e),8);case 8:return u(C,k.init(),9);case 9:return Lt(a),u(C,Ts(k),10);case 10:return l=C.h,Lt(a),v=Ot(h,
826
+ n,b,c,e,f),y=v.hh,w=v.Te,u(C,l.Aa.addManifests([y]),11);case 11:x=C.h;Lt(a);m=x[0];Lt(a);if(p)throw p;return u(C,Pt(a,w,m,y,f,e,l.Aa,n,h),12);case 12:return Lt(a),A=new jt("manifest",l.path.Ra,l.path.Aa,m),C.return(At(A,y));case 3:return wa(C),u(C,k.destroy(),13);case 13:if(!g){C.D(14);break}return u(C,g.stop(),14);case 14:if(!h){C.D(16);break}return u(C,h.destroy(),16);case 16:xa(C,0);break;case 2:z=va(C);if(null==m){C.D(18);break}return u(C,Qt(m),18);case 18:throw p||z;}})}
827
+ function Pt(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,v,y,w,x,A;return G(function(z){switch(z.g){case 1:l={};m=0;p=function(C,E){var F,H,J,K,N,V,U;return G(function(P){if(1==P.g){F={};H=r(C);for(J=H.next();!J.done;F={Fb:F.Fb},J=H.next())F.Fb=J.value,K=xs(F.Fb,f),N=F.Fb.i,V=F.Fb.h,U=function(ha){return function(Aa){var za,Ua,ab;return G(function(Na){if(1==Na.g)return u(Na,g.addSegments([{data:Aa}]),2);za=Na.h;Lt(a);Ua=ha.Fb.g;ab=ws(Ua);l[ab]=za[0];m+=Aa.byteLength;B(Na)})}}(F),Ds(e,F.Fb.groupId,K,N,V,U);return u(P,
828
+ Fs(e),2)}if(!E)return P.D(0);Lt(a);Rt(h,d,k,f);return u(P,g.updateManifest(c,d),0)})};n=!1;D(z,2);if(!St(h)||!n||Tt(h)){z.D(4);break}return u(z,p(b.filter(function(C){return C.h}),!0),5);case 5:return Lt(a),b=b.filter(function(C){return!C.h}),t=l,v=m,l={},m=0,u(z,Ut(g,c,d,t,v,function(){return Lt(a)}),6);case 6:Lt(a);case 4:if(n){z.D(7);break}return u(z,p(b,!1),8);case 8:return Lt(a),y=l,w=m,l={},m=0,u(z,Ut(g,c,d,y,w,function(){return Lt(a)}),9);case 9:Lt(a);case 7:ua(z,0);break;case 2:return x=va(z),
829
+ A=Object.values(l),u(z,g.removeSegments(A,function(){}),10);case 10:throw x;}})}function Qt(a){var b,c,d,e;return G(function(f){switch(f.g){case 1:return b=new Rs,u(f,b.init(),2);case 2:return u(f,Ts(b),3);case 3:return c=f.h,d=new jt("manifest",c.path.Ra,c.path.Aa,a),u(f,b.destroy(),4);case 4:return e=new Ft,u(f,e.remove(d.toString()),0)}})}
830
+ function Ut(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,w;return G(function(x){switch(x.g){case 1:g=!1;D(x,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=r(m.segments),n=p.next();!n.done;n=p.next())t=n.value,v=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=v&&(t.dataKey=v,t.pendingSegmentRefId=void 0),v=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=v&&(t.initSegmentKey=v,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
831
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(x,a.updateManifest(b,c),4);case 4:g=!0;f();ua(x,0);break;case 2:return y=va(x),u(x,Qt(b),5);case 5:if(g){x.D(6);break}w=Object.values(d);return u(x,a.removeSegments(w,function(){}),6);case 6:throw y;}})}
832
+ function Nt(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,A,z,C,E,F,H,J,K,N,V,U,P,ha;return G(function(Aa){switch(Aa.g){case 1:return c={width:Infinity,height:Infinity},Xd(a,b.restrictions,c),u(Aa,ae(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Ld(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(ne(m));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=n.value,
833
+ d.push(oe(t));v=r(a.imageStreams);for(y=v.next();!y.done;y=v.next())w=y.value,d.push(pe(w));return u(Aa,b.offline.trackSelectionCallback(d),3);case 3:x=Aa.h;A=a.presentationTimeline.getDuration();z=0;C=r(x);for(E=C.next();!E.done;E=C.next())F=E.value,H=F.bandwidth*A/8,z+=H;D(Aa,4);return u(Aa,b.offline.downloadSizeCallback(z),6);case 6:J=Aa.h;if(!J)throw new M(2,9,9014);ua(Aa,5);break;case 4:K=va(Aa);if(K instanceof M)throw K;throw new M(2,9,9015);case 5:N=new Set;V=new Set;U=new Set;P=r(x);for(E=
834
+ P.next();!E.done;E=P.next())ha=E.value,"variant"==ha.type&&N.add(ha.id),"text"==ha.type&&V.add(ha.id),"image"==ha.type&&U.add(ha.id);a.variants=a.variants.filter(function(za){return N.has(za.id)});a.textStreams=a.textStreams.filter(function(za){return V.has(za.id)});a.imageStreams=a.imageStreams.filter(function(za){return U.has(za.id)});Vt(a);B(Aa)}})}
835
+ function Ot(a,b,c,d,e,f){var g=yt(c,b,d),h=e.offline.progressCallback;Cs(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Eg(a,"cenc",t)});var k=St(b)&&!Tt(b),l=null;k&&(l=Wt.get(a.g.keySystem));for(var m=new Bt,p=r(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=r(b.imageStreams);for(n=p.next();!n.done;n=p.next())Dt(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())Ct(m,p.value);m=Xt(f,m,b,e);f=m.streams;m=m.Te;n=a.g;p=e.offline.usePersistentLicense;
836
+ n&&p&&(n.initData=[]);return{hh:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Gc(),streams:f,sessionIds:p?Ng(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Te:m}}function St(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
837
+ function Tt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Rt(a,b,c,d){b.expiration=c.Gc();c=Ng(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(St(a)&&d.offline.usePersistentLicense&&!c.length)throw new M(2,9,9007);}q.remove=function(a){return Yt(this,Zt(this,a))};
838
+ function Zt(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.g){case 1:Jt();c=kt(b);if(null==c||"manifest"!=c.g)throw new M(2,9,9004,b);d=c;e=new Rs;ta(k);return u(k,e.init(),4);case 4:return u(k,Vs(e,d.Ra(),d.Aa()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([$t(a,h,e),au(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
839
+ function bu(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:xd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:xd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function $t(a,b,c){return G(function(d){return u(d,cu(a.g,a.h.drm,c,b),0)})}
840
+ function au(a,b,c){function d(){}var e=du(c);At(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.xh=function(){return Yt(this,eu(this))};
841
+ function eu(a){var b,c,d,e,f,g,h,k,l,m;return G(function(p){switch(p.g){case 1:return Jt(),b=a.g,c=a.h.drm,d=new Rs,e=!1,ta(p),u(p,d.init(),4);case 4:f=[],Ws(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.D(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,vt(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.D(5);break;case 2:return wa(p),u(p,d.destroy(),11);case 11:xa(p,3);break;case 3:return p.return(!e)}})}
842
+ q.list=function(){return Yt(this,fu())};function fu(){var a,b,c;return G(function(d){switch(d.g){case 1:return Jt(),a=[],b=new Rs,ta(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Us(b,function(e,f){c=c.then(function(){var g;return G(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=At(new jt("manifest",e.Ra,e.Aa,l),k);a.push(k)});B(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d.return(a)}})}
843
+ function Kt(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){}},
844
+ c.configure(d.manifest),Lt(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Lt(a),k=gu(h),u(l,Promise.all(gb(k,function(m){return m.createSegmentIndex()})),3);Lt(a);if(e)throw e;return l.return(h)})}
845
+ function Mt(a,b,c,d){var e;return G(function(f){switch(f.g){case 1:return e=new og({Ob:a.g,onError:c,Fd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,tg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Hg(e),3);case 3:return u(f,Gg(e),4);case 4:return f.return(e)}})}
846
+ function Xt(a,b,c,d){var e=new Map,f=gu(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=hu(a,b,c,h,d,e);g.set(h.id,k)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Te:Array.from(e.values())}}
847
+ function hu(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
848
+ tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;iu(d,c.presentationTimeline.kb(),function(l){var m=ws(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=Et(b,d.id)*n;n=zs(a.g,n);f.set(m,new vs(l,n,k,!1))}l.h&&(p=ws(l.h),f.has(p)||(n=.5*Et(b,d.id),n=zs(a.g,n),f.set(p,new vs(l.h,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
849
+ tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function iu(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Lt(a){if(a.l.g)throw new M(2,9,7001);}function Jt(){if(!Gt())throw new M(2,9,9E3);}function Yt(a,b){return G(function(c){if(1==c.g)return a.i.push(b),ta(c),u(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);gc(a.i,b);return xa(c,0)})}
850
+ function It(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){gc(a.i,c)})}function du(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
851
+ function cu(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Xs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:bu(d,!1),videoCapabilities:bu(d,!0)}});return u(h,vt(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
852
+ function gu(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
853
+ function Vt(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}I("shaka.offline.Storage",Ft);Ft.deleteAll=function(){var a;return G(function(b){return 1==b.g?(a=new Rs,ta(b),u(b,Ys(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};Ft.prototype.list=Ft.prototype.list;
854
+ Ft.prototype.removeEmeSessions=Ft.prototype.xh;Ft.prototype.remove=Ft.prototype.remove;Ft.prototype.store=Ft.prototype.store;Ft.prototype.getNetworkingEngine=Ft.prototype.Hc;Ft.prototype.getConfiguration=Ft.prototype.getConfiguration;Ft.prototype.configure=Ft.prototype.configure;Ft.prototype.destroy=Ft.prototype.destroy;Ft.support=Gt;
855
+ var Wt=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
856
+ An.offline=Gt;function ju(){}function ku(){for(var a=r(lu),b=a.next();!b.done;b=a.next()){b=b.value;try{b.ng()}catch(c){Ta("Error installing polyfill!",c)}}}function mu(a,b){a={priority:b||0,ng:a};for(b=0;b<lu.length;b++)if(lu[b].priority<a.priority){lu.splice(b,0,a);return}lu.push(a)}I("shaka.polyfill",ju);ju.register=mu;ju.installAll=ku;var lu=[];function nu(){this.g=new ou}function pu(){window.AbortController||(window.AbortController=nu,window.AbortSignal=ou)}nu.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new L("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(nu.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});ju.AbortController=nu;nu.install=pu;
857
+ function ou(){fb.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(ou,fb);da.Object.defineProperties(ou.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});mu(pu);function qu(){}function ru(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())su(b.value)}function su(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}ju.Aria=qu;qu.install=ru;mu(ru);function tu(){}function uu(){vu()}ju.EncryptionScheme=tu;tu.install=uu;mu(uu,-2);function wu(){}
858
+ function xu(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
859
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",yu);document.addEventListener("webkitfullscreenerror",yu);document.addEventListener("mozfullscreenchange",yu);document.addEventListener("mozfullscreenerror",yu);document.addEventListener("MSFullscreenChange",yu);document.addEventListener("MSFullscreenError",yu)}}
860
+ function yu(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}ju.Fullscreen=wu;wu.install=xu;mu(xu);function zu(){}function Au(){var a=!0;if(Vc()||Sc("PlayStation 5")||Wc()||Sc("Web0S")||Tc()||Sc("CrKey")||Sc("PC=EOS"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Bu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Cu)}
861
+ function Cu(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x;return G(function(A){switch(A.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return A.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Oc())return A.return(b);if(c){if(Sc("CrKey")){if(!window.cast)throw new M(2,8,8E3);if(cast.__platform__&&cast.__platform__.canDisplayType){var z=c.contentType;c.width&&c.height&&(z+="; width="+c.width+"; height="+c.height);c.framerate&&(z+="; framerate="+
862
+ c.framerate);"pq"===c.transferFunction&&(z+="; eotf=smpte2084");z=cast.__platform__.canDisplayType(z)}else z=dc(c.contentType)}else z=dc(c.contentType);e=z;if(!e)return A.return(b)}if(d&&(f=d.contentType,g=dc(f),!g))return A.return(b)}else if("file"==a.type){if(c&&(h=c.contentType,k=Pc(h),!k)||d&&(l=d.contentType,m=Pc(l),!m))return A.return(b)}else return A.return(b);if(!a.keySystemConfiguration)return b.supported=!0,A.return(Promise.resolve(b));p=a.keySystemConfiguration;n=[];t=[];p.audio&&(v={robustness:p.audio.robustness||
863
+ "",contentType:a.audio.contentType},n.push(v));p.video&&(y={robustness:p.video.robustness||"",contentType:a.video.contentType},t.push(y));w={initDataTypes:[p.initDataType],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};n.length&&(w.audioCapabilities=n);t.length&&(w.videoCapabilities=t);D(A,3);return u(A,navigator.requestMediaKeySystemAccess(p.keySystem,[w]),5);case 5:x=A.h;ua(A,4);break;case 3:va(A);case 4:x&&(b.supported=!0,b.keySystemAccess=
864
+ x);case 2:return A.return(b)}})}ju.MediaCapabilities=zu;zu.install=Au;var Bu=null;zu.originalMcap=Bu;mu(Au,-1);function Du(){}function Eu(){var a=Xc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Fu():a?12>=a?(Gu(),Hu()):Gu():(Sc("Tizen 2")||Sc("Tizen 3")||Sc("Tizen 4"))&&Iu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Ju()}
865
+ function Gu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function Hu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Iu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Ad(b)[0]&&a(b)}}
866
+ function Fu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
867
+ function Ju(){var a=MediaSource.isTypeSupported;Sc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}ju.MediaSource=Du;Du.install=Eu;mu(Eu);function Ku(){}function Lu(){screen.orientation||void 0!=window.orientation&&Mu()}function Mu(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Nu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new L("change");b.dispatchEvent(c)})}ju.Orientation=Ku;
868
+ Ku.install=Lu;function Nu(){fb.call(this);this.type="";this.angle=0}pa(Nu,fb);
869
+ Nu.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
870
+ Nu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};mu(Lu);function Ou(){}var Pu,Qu,Ru,Su,Tu,Uu;function Vu(a,b){try{var c=new Wu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Xu(a){var b=this.mediaKeys;b&&b!=a&&Yu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Yu(a,this):Promise.resolve()}
871
+ function Zu(a){a=Hc(a.initData);if(Kc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=bd(a.subarray(4),!0);a=ed(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ic(a);this.dispatchEvent(b)}ju.PatchedMediaKeysApple=Ou;
872
+ Ou.uninstall=function(){Pu&&(Pu=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Qu),HTMLMediaElement.prototype.setMediaKeys=Ru,window.MediaKeys=Su,window.MediaKeySystemAccess=Tu,navigator.requestMediaKeySystemAccess=Uu,Qu=Uu=Ru=Tu=Su=null,window.shakaMediaKeysPolyfill=!1)};
873
+ Ou.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Pu=!0,Qu=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Ru=HTMLMediaElement.prototype.setMediaKeys,Su=window.MediaKeys,Tu=window.MediaKeySystemAccess,Uu=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Xu;window.MediaKeys=$u;window.MediaKeySystemAccess=Wu;navigator.requestMediaKeySystemAccess=
874
+ Vu;window.shakaMediaKeysPolyfill=!0}};
875
+ function Wu(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("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=r(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
875
876
  g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=r(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
876
- Uu.prototype.createMediaKeys=function(){var a=new Yu(this.keySystem);return Promise.resolve(a)};Uu.prototype.getConfiguration=function(){return this.g};function Yu(a){this.h=new WebKitMediaKeys(a);this.g=new xf}Yu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Zu(this.h,a)};Yu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
877
- function Wu(a,b){a.g.Rb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",Xu);try{return Aj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Zu(a){fb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new xf;this.sessionId="";this.expiration=NaN;this.closed=new Lc;this.keyStatuses=new $u}pa(Zu,fb);q=Zu.prototype;
878
- q.generateRequest=function(a,b){var c=this;this.h=new Lc;try{var d=this.l.createSession("video/mp4",Hc(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.ec()?"license-request":"license-renewal").set("message",Ic(e.message));e=new L("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(av(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
879
- function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:av(c,"output-not-allowed");break;default:av(c,"internal-error")}});av(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
880
- q.update=function(a){this.g=new Lc;try{this.i.update(Hc(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Rb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function av(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new L("keystatuseschange");a.dispatchEvent(b)}
881
- function $u(){this.size=0;this.g=void 0}q=$u.prototype;q.ec=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Zg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Zg.value();return this.g&&Fc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function bv(){}function cv(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=dv,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ev,window.MediaKeys=fv,window.MediaKeySystemAccess=gv,window.shakaMediaKeysPolyfill=!0)}function dv(){return Promise.reject(Error("The key system specified is not supported."))}
882
- function ev(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}hu.PatchedMediaKeysNop=bv;bv.install=cv;function fv(){throw new TypeError("Illegal constructor.");}fv.prototype.createSession=function(){};fv.prototype.setServerCertificate=function(){};function gv(){this.keySystem="";throw new TypeError("Illegal constructor.");}gv.prototype.getConfiguration=function(){};gv.prototype.createMediaKeys=function(){};ku(cv,-10);function hv(){}
883
- function iv(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)jv="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=kv;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=lv;window.MediaKeys=mv;window.MediaKeySystemAccess=nv;window.shakaMediaKeysPolyfill=!0}}
884
- function ov(a){var b=jv;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function kv(a,b){try{var c=new nv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function lv(a){var b=this.mediaKeys;b&&b!=a&&pv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&pv(a,this);return Promise.resolve()}hu.PatchedMediaKeysWebkit=hv;hv.install=iv;
885
- function nv(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=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),
877
+ Wu.prototype.createMediaKeys=function(){var a=new $u(this.keySystem);return Promise.resolve(a)};Wu.prototype.getConfiguration=function(){return this.g};function $u(a){this.h=new WebKitMediaKeys(a);this.g=new xf}$u.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new av(this.h,a)};$u.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
878
+ function Yu(a,b){a.g.Rb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",Zu);try{return Cj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function av(a){fb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new xf;this.sessionId="";this.expiration=NaN;this.closed=new Lc;this.keyStatuses=new bv}pa(av,fb);q=av.prototype;
879
+ q.generateRequest=function(a,b){var c=this;this.h=new Lc;try{var d=this.l.createSession("video/mp4",Hc(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.ec()?"license-request":"license-renewal").set("message",Ic(e.message));e=new L("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(cv(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
880
+ function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:cv(c,"output-not-allowed");break;default:cv(c,"internal-error")}});cv(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
881
+ q.update=function(a){this.g=new Lc;try{this.i.update(Hc(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Rb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function cv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new L("keystatuseschange");a.dispatchEvent(b)}
882
+ function bv(){this.size=0;this.g=void 0}q=bv.prototype;q.ec=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Zg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Zg.value();return this.g&&Fc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function dv(){}function ev(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=fv,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=gv,window.MediaKeys=hv,window.MediaKeySystemAccess=iv,window.shakaMediaKeysPolyfill=!0)}function fv(){return Promise.reject(Error("The key system specified is not supported."))}
883
+ function gv(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}ju.PatchedMediaKeysNop=dv;dv.install=ev;function hv(){throw new TypeError("Illegal constructor.");}hv.prototype.createSession=function(){};hv.prototype.setServerCertificate=function(){};function iv(){this.keySystem="";throw new TypeError("Illegal constructor.");}iv.prototype.getConfiguration=function(){};iv.prototype.createMediaKeys=function(){};mu(ev,-10);function jv(){}
884
+ function kv(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)lv="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=mv;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=nv;window.MediaKeys=ov;window.MediaKeySystemAccess=pv;window.shakaMediaKeysPolyfill=!0}}
885
+ function qv(a){var b=lv;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function mv(a,b){try{var c=new pv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function nv(a){var b=this.mediaKeys;b&&b!=a&&rv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&rv(a,this);return Promise.resolve()}ju.PatchedMediaKeysWebkit=jv;jv.install=kv;
886
+ function pv(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=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),
886
887
  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));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
887
- d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}nv.prototype.createMediaKeys=function(){var a=new mv(this.g);return Promise.resolve(a)};nv.prototype.getConfiguration=function(){return this.h};function mv(a){this.l=a;this.h=null;this.g=new xf;this.i=[];this.j=new Map}
888
- function pv(a,b){a.h=b;a.g.Rb();var c=jv;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ic(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=qv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.ec()?"licenserequest":"licenserenewal").set("message",d.message),d=new L("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=qv(a,d.sessionId))rv(d,"usable"),
889
- d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=qv(a,d.sessionId);e&&e.handleError(d)}))}mv.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new sv(b,this.l,a);this.i.push(a);return a};mv.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
890
- function qv(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 sv(a,b,c){fb.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 Lc;this.keyStatuses=new tv}pa(sv,fb);q=sv.prototype;
891
- q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?rv(this,"output-restricted"):1==b?rv(this,"expired"):rv(this,"internal-error"))};
892
- function uv(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Hc(ed("LOAD_SESSION|"+c));else{var e=ed("PERSISTENT|");d=md(e,b)}else d=Hc(b)}catch(g){return Promise.reject(g)}a.h=new Lc;var f=ov("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).R(.01)}return a.h}
893
- function vv(a,b,c){if(a.g)a.g.then(function(){return vv(a,b,c)}).catch(function(){return vv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=ad(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=jd(e.keys[0].k);e=jd(e.keys[0].kid)}else d=Hc(c),e=null;var f=ov("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
894
- function rv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new L("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return uv(this,b,null)};q.load=function(a){return"persistent-license"==this.l?uv(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Lc;vv(this,b,a);return b};
895
- q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=ov("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function tv(){this.size=0;this.g=void 0}q=tv.prototype;q.ec=function(){return this.g};
896
- q.forEach=function(a){this.g&&a(this.g,Zg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Zg.value();return this.g&&Fc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var jv="";ku(iv);function wv(){}function xv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=yv,Object.defineProperty(a,"disablePictureInPicture",{get:zv,set:Av,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Bv,document.addEventListener("webkitpresentationmodechanged",Cv,!0))}}
897
- function Cv(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
898
- function yv(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Bv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
899
- function zv(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Av(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}hu.PiPWebkit=wv;wv.install=xv;ku(xv);function Dv(){}function Ev(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Fv))}function Fv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}hu.RandomUUID=Dv;Dv.install=Ev;ku(Ev);function Gv(){}function Hv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Iv)}function Iv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}hu.StorageEstimate=Gv;Gv.install=Hv;ku(Hv);function Jv(){}function Kv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Lv})}function Lv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}hu.Symbol=Jv;Jv.install=Kv;ku(Kv);function Mv(){}function Nv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}hu.VideoPlayPromise=Mv;Mv.install=Nv;ku(Nv);function Ov(){}function Pv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Uc())&&(a.getVideoPlaybackQuality=Qv)}}function Qv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}hu.VideoPlaybackQuality=Ov;Ov.install=Pv;ku(Pv);function Rv(){}function Sv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Tv;else if(6==b)a=Uv;else{try{var c=!!Tv(1,2,"")}catch(d){c=!1}c&&(a=Tv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Tv(a,b,c){return new window.TextTrackCue(a,b,c)}function Uv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}hu.VTTCue=Rv;Rv.install=Sv;ku(Sv);function Vv(){}Vv.prototype.parseInit=function(){};Vv.prototype.setSequenceMode=function(){};Vv.prototype.parseMedia=function(a,b){var c=null,d=[];a=ad(a).split(/\r?\n/);a=r(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=Wv.exec(e))){var f=Xv.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new kc(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};I("shaka.text.LrcTextParser",Vv);Vv.prototype.parseMedia=Vv.prototype.parseMedia;
900
- Vv.prototype.setSequenceMode=Vv.prototype.setSequenceMode;Vv.prototype.parseInit=Vv.prototype.parseInit;var Wv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Xv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Ed["application/x-subtitle-lrc"]=function(){return new Vv};function Yv(){}Yv.prototype.parseInit=function(){};Yv.prototype.setSequenceMode=function(){};
901
- Yv.prototype.parseMedia=function(a,b){var c=ad(a);a=[];if(""==c)return a;var d=lg(c,"tt");if(!d)throw new M(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=$f(d,Zv,"frameRate"),f=$f(d,Zv,"subFrameRate"),g=$f(d,Zv,"frameRateMultiplier"),h=$f(d,Zv,"tickRate"),k=$f(d,Zv,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=$f(d,$v,"extent");if("default"!=l&&"preserve"!=l)throw new M(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new aw(e,f,
902
- g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?Yf(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var n=r(d),p=n.next();!p.done;p=n.next()){var t=p.value;p=new mc;var v=t.getAttribute("xml:id");if(v){p.id=v;var y=null;m&&(y=bw.exec(m)||cw.exec(m));v=y?Number(y[1]):null;y=y?Number(y[2]):null;var w,x;if(w=dw(t,g,"extent"))w=(x=bw.exec(w))||cw.exec(w),
903
- null!=w&&(p.width=Number(w[1]),p.height=Number(w[2]),x||(null!=v&&(p.width=100*p.width/v),null!=y&&(p.height=100*p.height/y)),p.widthUnits=x||null!=v?Cc:0,p.heightUnits=x||null!=y?Cc:0);if(t=dw(t,g,"origin"))w=(x=bw.exec(t))||cw.exec(t),null!=w&&(p.viewportAnchorX=Number(w[1]),p.viewportAnchorY=Number(w[2]),x||(null!=y&&(p.viewportAnchorY=100*p.viewportAnchorY/y),null!=v&&(p.viewportAnchorX=100*p.viewportAnchorX/v)),p.viewportAnchorUnits=x||null!=v?Cc:0)}else p=null;p&&h.push(p)}if(Vf(c,"p").length)throw new M(2,
904
- 2,2001,"<p> can only be inside <div> in TTML");m=r(Vf(c,"div"));for(n=m.next();!n.done;n=m.next())if(Vf(n.value,"span").length)throw new M(2,2,2001,"<span> can only be inside <p> in TTML");if(b=ew(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
905
- function ew(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var t=null,v=r(fw),y=v.next();!y.done&&!(t=gw(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(D){return D.nodeType==Node.TEXT_NODE});
906
- a=[];if(!y)for(var w=r(p.childNodes),x=w.next();!x.done;x=w.next())(x=ew(x.value,b,c,d,e,f,g,h,k,p,m))&&a.push(x);d=null!=l;w=/\S/.test(p.textContent);var A=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(A||w||"br"==p.tagName||0!=a.length||d&&!h))return null;x=hw(p,c);w=x.start;for(x=x.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)x=iw(n,c,w,x),w=x.start,x=x.end,n=n.parentNode;null==w&&(w=0);w+=b.periodStart;x=null==x?Infinity:x+b.periodStart;w=Math.max(w,b.segmentStart);
907
- x=Math.min(x,b.segmentEnd);if(!A&&0<a.length)for(w=Infinity,x=0,b=r(a),c=b.next();!c.done;c=b.next())c=c.value,w=Math.min(w,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new kc(w,x,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new kc(w,x,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=gw(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(D){return D.id==
908
- z})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&(g=gw(l,"region",f,"")[0]);jw(b,p,g,t,e,v,0==a.length);return b}
909
- function jw(a,b,c,d,e,f,g){f=f||g;"rtl"==kw(b,c,e,"direction",f)&&(a.direction="rtl");g=kw(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=lc);(g=kw(b,c,e,"textAlign",!0))?(a.positionAlign=lw[g],a.lineAlign=mw[g],a.textAlign=wc[g.toUpperCase()]):a.textAlign=oc;if(g=kw(b,c,e,"displayAlign",!0))a.displayAlign=xc[g.toUpperCase()];if(g=kw(b,c,e,"color",f))a.color=g;if(g=kw(b,c,e,"backgroundColor",
910
- f))a.backgroundColor=g;if(g=kw(b,c,e,"border",f))a.border=g;if(g=kw(b,c,e,"fontFamily",f))switch(g){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=g}(g=kw(b,c,e,"fontWeight",f))&&
911
- "bold"==g&&(a.fontWeight=700);g=kw(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=kw(b,c,e,"lineHeight",f))&&g.match(nw)&&(a.lineHeight=g);(g=kw(b,c,e,"fontSize",f))&&(g.match(nw)||g.match(ow))&&(a.fontSize=g);if(g=kw(b,c,e,"fontStyle",f))a.fontStyle=Bc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=kw(b,c,e,"textOutline",
912
- f))d=d.split(" "),d[0].match(nw)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(nw)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=kw(b,c,e,"letterSpacing",f))&&d.match(nw)&&(a.letterSpacing=d);(d=kw(b,c,e,"linePadding",f))&&d.match(nw)&&(a.linePadding=d);if(f=kw(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=dw(c,e,"textDecoration"))&&pw(a,c);(b=qw(b,e,"textDecoration"))&&pw(a,b)}
913
- function pw(a,b){b=r(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&gc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&gc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
914
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&gc(a.textDecoration,"overline")}}function kw(a,b,c,d,e){e=void 0===e?!0:e;return(a=qw(a,c,d))?a:e?dw(b,c,d):null}function dw(a,b,c){if(!a)return null;var d=$f(a,$v,c);return d?d:rw(a,b,c)}function qw(a,b,c){var d=$f(a,$v,c);return d?d:rw(a,b,c)}
915
- function rw(a,b,c){a=gw(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Zf(a[e],"urn:ebu:tt:style",c);f||(f=$f(a[e],$v,c));f||(f=qw(a[e],b,c));f&&(d=f)}return d}
916
- function gw(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Zf(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););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.getAttribute("xml:id")==e){f.push(g);break}return f}function iw(a,b,c,d){a=hw(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
917
- function hw(a,b){var c=sw(a.getAttribute("begin"),b),d=sw(a.getAttribute("end"),b);a=sw(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
918
- function sw(a,b){var c=null;if(tw.test(a)){a=tw.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(uw.test(a))c=vw(uw,a);else if(ww.test(a))c=vw(ww,a);else if(xw.test(a))a=xw.exec(a),c=Number(a[1])/b.frameRate;else if(yw.test(a))a=yw.exec(a),c=Number(a[1])/b.g;else if(zw.test(a))c=vw(zw,a);else if(a)throw new M(2,2,2001,"Could not parse cue time range in TTML");return c}
919
- function vw(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}I("shaka.text.TtmlTextParser",Yv);Yv.prototype.parseMedia=Yv.prototype.parseMedia;Yv.prototype.setSequenceMode=Yv.prototype.setSequenceMode;Yv.prototype.parseInit=Yv.prototype.parseInit;
920
- function aw(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
921
- var bw=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,ow=/^(\d{1,2}(?:\.\d+)?|100)%$/,nw=/^(\d+px|\d+em|\d*\.?\d+c)$/,cw=/^(\d+)px (\d+)px$/,tw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,uw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,ww=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,xw=/^(\d*(?:\.\d*)?)f$/,yw=/^(\d*(?:\.\d*)?)t$/,zw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),mw={left:rc,center:"center",right:"end",start:rc,
922
- end:"end"},lw={left:"line-left",center:"center",right:"line-right"},Zv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],$v=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],fw=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Ed["application/ttml+xml"]=function(){return new Yv};function Aw(){this.g=new Yv}Aw.prototype.parseInit=function(a){var b=!1;(new If).box("moov",Nf).box("trak",Nf).box("mdia",Nf).box("minf",Nf).box("stbl",Nf).S("stsd",Pf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new M(2,2,2007);};Aw.prototype.setSequenceMode=function(){};Aw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new If).box("mdat",Rf(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new M(2,2,2007);return e};
923
- I("shaka.text.Mp4TtmlParser",Aw);Aw.prototype.parseMedia=Aw.prototype.parseMedia;Aw.prototype.setSequenceMode=Aw.prototype.setSequenceMode;Aw.prototype.parseInit=Aw.prototype.parseInit;Ed['application/mp4; codecs="stpp"']=function(){return new Aw};Ed['application/mp4; codecs="stpp.ttml"']=function(){return new Aw};Ed['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Aw};Ed['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Aw};function Bw(){this.g=!1}Bw.prototype.parseInit=function(){};Bw.prototype.setSequenceMode=function(a){this.g=a};
924
- Bw.prototype.parseMedia=function(a,b){a=ad(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 M(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Cw(new Vq(d[1]));if(null==a)throw new M(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
925
- e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Vq(d);var f=new mc;Yq(d);Wq(d);for(var g=Yq(d);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))?
926
- (h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Wq(d);g=Yq(d)}b.push(f)}e=new Map;Dw(e);d=[];c=r(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]&&f[1].includes("::cue")){h="global";(g=f[1].match(/\((.*)\)/))&&(h=g.pop());g=f.slice(2,-1);f[1].includes("}")&&(k=/\{(.*?)\}/.exec(f[1]))&&(g=k[1].split(";"));k=new kc(0,0,"");for(var l=!1,m=0;m<g.length;m++){var n=
927
- /^\s*([^:]+):\s*(.*)/.exec(g[m]);if(n){var p=n[2].trim().replace(";","");switch(n[1].trim()){case "background-color":l=!0;k.backgroundColor=p;break;case "color":l=!0;k.color=p;break;case "font-family":l=!0;k.fontFamily=p;break;case "font-size":l=!0;k.fontSize=p;break;case "font-weight":700<=parseInt(p,10)&&(l=!0,k.fontWeight=700);break;case "font-style":switch(p){case "normal":l=!0;k.fontStyle=uc;break;case "italic":l=!0;k.fontStyle="italic";break;case "oblique":l=!0,k.fontStyle="oblique"}break;case "opacity":l=
928
- !0;k.opacity=parseFloat(p);break;case "text-shadow":l=!0;k.textShadow=p;break;case "white-space":l=!0,k.wrapLine="noWrap"!=p}}}l&&e.set(h,k)}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));g=new Vq(f[0]);k=Cw(g);n=Xq(g,/[ \t]+--\x3e[ \t]+/g);l=Cw(g);if(null==k||null==n||null==l)throw new M(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;m=Ew(f.slice(1).join("\n").trim());e.has("global")?(f=e.get("global").clone(),
929
- f.startTime=k,f.endTime=l,f.payload=""):f=new kc(k,l,"");Fw(m,f,e);Wq(g);for(k=Yq(g);k;)Gw(f,k,b),Wq(g),k=Yq(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};function Dw(a){for(var b=r(Object.entries(zc)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new kc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(Ac));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new kc(0,0,""),e.backgroundColor=d,a.set(c,e)}
930
- function Fw(a,b,c){0===c.size&&Dw(c);a=Hw(a);for(var d=[],e=-1,f=0;f<a.length;f++)"<"===a[f]?e=f+1:">"===a[f]&&0<e&&(e=a.substr(e,f-e),e.match(Iw)&&d.push(e),e=-1);d=r(d);for(f=d.next();!f.done;f=d.next())f=f.value,a=a.replace("<"+f+">",'<div time="'+f+'">'),a+="</div>";if(f=lg("<span>"+a+"</span>","span")){d=[];f=f.childNodes;if(1==f.length&&(e=f[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=a;return}a=r(f);for(f=a.next();!f.done;f=a.next())Jw(f.value,b,d,c);b.nestedCues=
931
- d}else b.payload=a}function Hw(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function Kw(a,b){return a&&0<a.length?a:b}
932
- function Jw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=Kw(h.backgroundColor,e.backgroundColor),e.color=Kw(h.color,e.color),e.fontFamily=Kw(h.fontFamily,e.fontFamily),e.fontSize=Kw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
933
- "italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=Cw(new Vq(g)))e.startTime=g}}if(bg(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())Jw(a.value,e,c,d)}
934
- function Gw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=oc:a.textAlign=wc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
935
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Lw(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=yc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=qc,a.line=Number(c[1]),c[2]&&(a.lineAlign=yc[c[2].toUpperCase()])}function Lw(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
936
- function Cw(a){a=Xq(a,Iw);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function Ew(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},c=/&(?:amp|lt|gt|quot|#(0+)?39);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}I("shaka.text.VttTextParser",Bw);Bw.prototype.parseMedia=Bw.prototype.parseMedia;Bw.prototype.setSequenceMode=Bw.prototype.setSequenceMode;
937
- Bw.prototype.parseInit=Bw.prototype.parseInit;var Iw=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Ed["text/vtt"]=function(){return new Bw};Ed['text/vtt; codecs="vtt"']=function(){return new Bw};Ed['text/vtt; codecs="wvtt"']=function(){return new Bw};function Mw(){this.g=null}Mw.prototype.parseInit=function(a){var b=this,c=!1;(new If).box("moov",Nf).box("trak",Nf).box("mdia",Nf).S("mdhd",function(d){d=oi(d.reader,d.version);b.g=d.timescale}).box("minf",Nf).box("stbl",Nf).S("stsd",Pf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new M(2,2,2008);if(!c)throw new M(2,2,2008);};Mw.prototype.setSequenceMode=function(){};
938
- Mw.prototype.parseMedia=function(a,b){if(!this.g)throw new M(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new If).box("moof",Nf).box("traf",Nf).S("tfdt",function(z){g=!0;c=ni(z.reader,z.version).nf}).S("tfhd",function(z){l=mi(z.reader,z.flags).zf}).S("trun",function(z){h=!0;d=pi(z.reader,z.version,z.flags).Rf}).box("mdat",Rf(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new M(2,2,2008);a=c;for(var m=new Ff(e,0),n=r(d),p=n.next();!p.done;p=n.next()){p=p.value;var t=p.Ee||l,v=p.Ld?
939
- c+p.Ld:a;a=v+(t||0);var y=0;do{var w=m.N();y+=w;var x=m.N(),A=null;"vttc"==Mf(x)?8<w&&(A=m.Bb(w-8)):m.skip(w-8);t&&A&&(w=Nw(A,b.periodStart+v/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&y<p.sampleSize)}return f.filter(Cb)};function Nw(a,b,c){var d,e,f;(new If).box("payl",Rf(function(g){d=ad(g)})).box("iden",Rf(function(g){e=ad(g)})).box("sttg",Rf(function(g){f=ad(g)})).parse(a);return d?Ow(d,e,f,b,c):null}
940
- function Ow(a,b,c,d,e){d=new kc(d,e,"");Fw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Vq(c),b=Yq(a);b;)Gw(d,b,[]),Wq(a),b=Yq(a);return d}I("shaka.text.Mp4VttParser",Mw);Mw.prototype.parseMedia=Mw.prototype.parseMedia;Mw.prototype.setSequenceMode=Mw.prototype.setSequenceMode;Mw.prototype.parseInit=Mw.prototype.parseInit;Ed['application/mp4; codecs="wvtt"']=function(){return new Mw};function Pw(){}Pw.prototype.parseInit=function(){};Pw.prototype.setSequenceMode=function(){};Pw.prototype.parseMedia=function(a){var b=ad(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Vq(c[0]),e=Qw(d),f=Xq(d,/,/g);d=Qw(d);if(null==e||null==f||null==d)throw new M(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new kc(e,d,c.slice(1).join("\n").trim()))}return a};
941
- function Qw(a){a=Xq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}I("shaka.text.SbvTextParser",Pw);Pw.prototype.parseMedia=Pw.prototype.parseMedia;Pw.prototype.setSequenceMode=Pw.prototype.setSequenceMode;Pw.prototype.parseInit=Pw.prototype.parseInit;Ed["text/x-subviewer"]=function(){return new Pw};function Rw(){this.g=new Bw}Rw.prototype.parseInit=function(){};Rw.prototype.setSequenceMode=function(){};Rw.prototype.parseMedia=function(a,b){a=ad(a);a=Sw(a);a=Hc(ed(a));return this.g.parseMedia(a,b)};function Sw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}I("shaka.text.SrtTextParser",Rw);
942
- Rw.srt2webvtt=Sw;Rw.prototype.parseMedia=Rw.prototype.parseMedia;Rw.prototype.setSequenceMode=Rw.prototype.setSequenceMode;Rw.prototype.parseInit=Rw.prototype.parseInit;Ed["text/srt"]=function(){return new Rw};function Tw(){}Tw.prototype.parseInit=function(){};Tw.prototype.setSequenceMode=function(){};
943
- Tw.prototype.parseMedia=function(a){var b="",c="";a=ad(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Uw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Vw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Ww);else if("Style"==e){e=f.split(Ww);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
944
- [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={be:e.be},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Vw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Ww);else if("Dialogue"==f){g=g.split(Ww);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Xw(f.Start);var k=Xw(f.End);g=new kc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.be=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.be}}(e)))&&Yw(g,f);d.push(g)}return d};
945
- function Yw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Zw(c))a.color=c;if(c=b.BackColour)if(c=Zw(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=sc;a.textAlign="start";break;case 2:a.displayAlign=sc;a.textAlign=oc;break;case 3:a.displayAlign=sc;a.textAlign="end";
888
+ d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}pv.prototype.createMediaKeys=function(){var a=new ov(this.g);return Promise.resolve(a)};pv.prototype.getConfiguration=function(){return this.h};function ov(a){this.l=a;this.h=null;this.g=new xf;this.i=[];this.j=new Map}
889
+ function rv(a,b){a.h=b;a.g.Rb();var c=lv;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ic(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=sv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.ec()?"licenserequest":"licenserenewal").set("message",d.message),d=new L("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=sv(a,d.sessionId))tv(d,"usable"),
890
+ d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=sv(a,d.sessionId);e&&e.handleError(d)}))}ov.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new uv(b,this.l,a);this.i.push(a);return a};ov.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
891
+ function sv(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 uv(a,b,c){fb.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 Lc;this.keyStatuses=new vv}pa(uv,fb);q=uv.prototype;
892
+ q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?tv(this,"output-restricted"):1==b?tv(this,"expired"):tv(this,"internal-error"))};
893
+ function wv(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Hc(ed("LOAD_SESSION|"+c));else{var e=ed("PERSISTENT|");d=md(e,b)}else d=Hc(b)}catch(g){return Promise.reject(g)}a.h=new Lc;var f=qv("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).R(.01)}return a.h}
894
+ function xv(a,b,c){if(a.g)a.g.then(function(){return xv(a,b,c)}).catch(function(){return xv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=ad(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=jd(e.keys[0].k);e=jd(e.keys[0].kid)}else d=Hc(c),e=null;var f=qv("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
895
+ function tv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new L("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return wv(this,b,null)};q.load=function(a){return"persistent-license"==this.l?wv(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Lc;xv(this,b,a);return b};
896
+ q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=qv("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function vv(){this.size=0;this.g=void 0}q=vv.prototype;q.ec=function(){return this.g};
897
+ q.forEach=function(a){this.g&&a(this.g,Zg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Zg.value();return this.g&&Fc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var lv="";mu(kv);function yv(){}function zv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Av,Object.defineProperty(a,"disablePictureInPicture",{get:Bv,set:Cv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Dv,document.addEventListener("webkitpresentationmodechanged",Ev,!0))}}
898
+ function Ev(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
899
+ function Av(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Dv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
900
+ function Bv(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Cv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}ju.PiPWebkit=yv;yv.install=zv;mu(zv);function Fv(){}function Gv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Hv))}function Hv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}ju.RandomUUID=Fv;Fv.install=Gv;mu(Gv);function Iv(){}function Jv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Kv)}function Kv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}ju.StorageEstimate=Iv;Iv.install=Jv;mu(Jv);function Lv(){}function Mv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Nv})}function Nv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}ju.Symbol=Lv;Lv.install=Mv;mu(Mv);function Ov(){}function Pv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}ju.VideoPlayPromise=Ov;Ov.install=Pv;mu(Pv);function Qv(){}function Rv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Uc())&&(a.getVideoPlaybackQuality=Sv)}}function Sv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}ju.VideoPlaybackQuality=Qv;Qv.install=Rv;mu(Rv);function Tv(){}function Uv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Vv;else if(6==b)a=Wv;else{try{var c=!!Vv(1,2,"")}catch(d){c=!1}c&&(a=Vv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Vv(a,b,c){return new window.TextTrackCue(a,b,c)}function Wv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}ju.VTTCue=Tv;Tv.install=Uv;mu(Uv);function Xv(){}Xv.prototype.parseInit=function(){};Xv.prototype.setSequenceMode=function(){};Xv.prototype.parseMedia=function(a,b){var c=null,d=[];a=ad(a).split(/\r?\n/);a=r(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=Yv.exec(e))){var f=Zv.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new kc(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};I("shaka.text.LrcTextParser",Xv);Xv.prototype.parseMedia=Xv.prototype.parseMedia;
901
+ Xv.prototype.setSequenceMode=Xv.prototype.setSequenceMode;Xv.prototype.parseInit=Xv.prototype.parseInit;var Yv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Zv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Ed["application/x-subtitle-lrc"]=function(){return new Xv};function $v(){}$v.prototype.parseInit=function(){};$v.prototype.setSequenceMode=function(){};
902
+ $v.prototype.parseMedia=function(a,b){var c=ad(a);a=[];if(""==c)return a;var d=lg(c,"tt");if(!d)throw new M(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=$f(d,aw,"frameRate"),f=$f(d,aw,"subFrameRate"),g=$f(d,aw,"frameRateMultiplier"),h=$f(d,aw,"tickRate"),k=$f(d,aw,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=$f(d,bw,"extent");if("default"!=l&&"preserve"!=l)throw new M(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new cw(e,f,
903
+ g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?Yf(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var p=r(d),n=p.next();!n.done;n=p.next()){var t=n.value;n=new mc;var v=t.getAttribute("xml:id");if(v){n.id=v;var y=null;m&&(y=dw.exec(m)||ew.exec(m));v=y?Number(y[1]):null;y=y?Number(y[2]):null;var w,x;if(w=fw(t,g,"extent"))w=(x=dw.exec(w))||ew.exec(w),
904
+ null!=w&&(n.width=Number(w[1]),n.height=Number(w[2]),x||(null!=v&&(n.width=100*n.width/v),null!=y&&(n.height=100*n.height/y)),n.widthUnits=x||null!=v?Cc:0,n.heightUnits=x||null!=y?Cc:0);if(t=fw(t,g,"origin"))w=(x=dw.exec(t))||ew.exec(t),null!=w&&(n.viewportAnchorX=Number(w[1]),n.viewportAnchorY=Number(w[2]),x||(null!=y&&(n.viewportAnchorY=100*n.viewportAnchorY/y),null!=v&&(n.viewportAnchorX=100*n.viewportAnchorX/v)),n.viewportAnchorUnits=x||null!=v?Cc:0)}else n=null;n&&h.push(n)}if(Vf(c,"p").length)throw new M(2,
905
+ 2,2001,"<p> can only be inside <div> in TTML");m=r(Vf(c,"div"));for(p=m.next();!p.done;p=m.next())if(Vf(p.value,"span").length)throw new M(2,2,2001,"<span> can only be inside <p> in TTML");if(b=gw(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
906
+ function gw(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var t=null,v=r(hw),y=v.next();!y.done&&!(t=iw(n,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(n.childNodes).every(function(C){return C.nodeType==Node.TEXT_NODE});
907
+ a=[];if(!y)for(var w=r(n.childNodes),x=w.next();!x.done;x=w.next())(x=gw(x.value,b,c,d,e,f,g,h,k,n,m))&&a.push(x);d=null!=l;w=/\S/.test(n.textContent);var A=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(A||w||"br"==n.tagName||0!=a.length||d&&!h))return null;x=jw(n,c);w=x.start;for(x=x.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)x=kw(p,c,w,x),w=x.start,x=x.end,p=p.parentNode;null==w&&(w=0);w+=b.periodStart;x=null==x?Infinity:x+b.periodStart;w=Math.max(w,b.segmentStart);
908
+ x=Math.min(x,b.segmentEnd);if(!A&&0<a.length)for(w=Infinity,x=0,b=r(a),c=b.next();!c.done;c=b.next())c=c.value,w=Math.min(w,c.startTime),x=Math.max(x,c.endTime);if("br"==n.tagName)return e=new kc(w,x,""),e.lineBreak=!0,e;b="";y&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new kc(w,x,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=iw(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(C){return C.id==
909
+ z})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&(g=iw(l,"region",f,"")[0]);lw(b,n,g,t,e,v,0==a.length);return b}
910
+ function lw(a,b,c,d,e,f,g){f=f||g;"rtl"==mw(b,c,e,"direction",f)&&(a.direction="rtl");g=mw(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=lc);(g=mw(b,c,e,"textAlign",!0))?(a.positionAlign=nw[g],a.lineAlign=ow[g],a.textAlign=wc[g.toUpperCase()]):a.textAlign=oc;if(g=mw(b,c,e,"displayAlign",!0))a.displayAlign=xc[g.toUpperCase()];if(g=mw(b,c,e,"color",f))a.color=g;if(g=mw(b,c,e,"backgroundColor",
911
+ f))a.backgroundColor=g;if(g=mw(b,c,e,"border",f))a.border=g;if(g=mw(b,c,e,"fontFamily",f))switch(g){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=g}(g=mw(b,c,e,"fontWeight",f))&&
912
+ "bold"==g&&(a.fontWeight=700);g=mw(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=mw(b,c,e,"lineHeight",f))&&g.match(pw)&&(a.lineHeight=g);(g=mw(b,c,e,"fontSize",f))&&(g.match(pw)||g.match(qw))&&(a.fontSize=g);if(g=mw(b,c,e,"fontStyle",f))a.fontStyle=Bc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=mw(b,c,e,"textOutline",
913
+ f))d=d.split(" "),d[0].match(pw)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(pw)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=mw(b,c,e,"letterSpacing",f))&&d.match(pw)&&(a.letterSpacing=d);(d=mw(b,c,e,"linePadding",f))&&d.match(pw)&&(a.linePadding=d);if(f=mw(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=fw(c,e,"textDecoration"))&&rw(a,c);(b=sw(b,e,"textDecoration"))&&rw(a,b)}
914
+ function rw(a,b){b=r(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&gc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&gc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
915
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&gc(a.textDecoration,"overline")}}function mw(a,b,c,d,e){e=void 0===e?!0:e;return(a=sw(a,c,d))?a:e?fw(b,c,d):null}function fw(a,b,c){if(!a)return null;var d=$f(a,bw,c);return d?d:tw(a,b,c)}function sw(a,b,c){var d=$f(a,bw,c);return d?d:tw(a,b,c)}
916
+ function tw(a,b,c){a=iw(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Zf(a[e],"urn:ebu:tt:style",c);f||(f=$f(a[e],bw,c));f||(f=sw(a[e],b,c));f&&(d=f)}return d}
917
+ function iw(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Zf(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););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.getAttribute("xml:id")==e){f.push(g);break}return f}function kw(a,b,c,d){a=jw(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
918
+ function jw(a,b){var c=uw(a.getAttribute("begin"),b),d=uw(a.getAttribute("end"),b);a=uw(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
919
+ function uw(a,b){var c=null;if(vw.test(a)){a=vw.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(ww.test(a))c=xw(ww,a);else if(yw.test(a))c=xw(yw,a);else if(zw.test(a))a=zw.exec(a),c=Number(a[1])/b.frameRate;else if(Aw.test(a))a=Aw.exec(a),c=Number(a[1])/b.g;else if(Bw.test(a))c=xw(Bw,a);else if(a)throw new M(2,2,2001,"Could not parse cue time range in TTML");return c}
920
+ function xw(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}I("shaka.text.TtmlTextParser",$v);$v.prototype.parseMedia=$v.prototype.parseMedia;$v.prototype.setSequenceMode=$v.prototype.setSequenceMode;$v.prototype.parseInit=$v.prototype.parseInit;
921
+ function cw(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
922
+ var dw=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,qw=/^(\d{1,2}(?:\.\d+)?|100)%$/,pw=/^(\d+px|\d+em|\d*\.?\d+c)$/,ew=/^(\d+)px (\d+)px$/,vw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ww=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,yw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,zw=/^(\d*(?:\.\d*)?)f$/,Aw=/^(\d*(?:\.\d*)?)t$/,Bw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),ow={left:rc,center:"center",right:"end",start:rc,
923
+ end:"end"},nw={left:"line-left",center:"center",right:"line-right"},aw=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],bw=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],hw=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Ed["application/ttml+xml"]=function(){return new $v};function Cw(){this.g=new $v}Cw.prototype.parseInit=function(a){var b=!1;(new If).box("moov",Nf).box("trak",Nf).box("mdia",Nf).box("minf",Nf).box("stbl",Nf).S("stsd",Pf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new M(2,2,2007);};Cw.prototype.setSequenceMode=function(){};Cw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new If).box("mdat",Rf(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new M(2,2,2007);return e};
924
+ I("shaka.text.Mp4TtmlParser",Cw);Cw.prototype.parseMedia=Cw.prototype.parseMedia;Cw.prototype.setSequenceMode=Cw.prototype.setSequenceMode;Cw.prototype.parseInit=Cw.prototype.parseInit;Ed['application/mp4; codecs="stpp"']=function(){return new Cw};Ed['application/mp4; codecs="stpp.ttml"']=function(){return new Cw};Ed['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Cw};Ed['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Cw};function Dw(){this.g=!1}Dw.prototype.parseInit=function(){};Dw.prototype.setSequenceMode=function(a){this.g=a};
925
+ Dw.prototype.parseMedia=function(a,b){a=ad(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 M(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Ew(new Xq(d[1]));if(null==a)throw new M(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
926
+ e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Xq(d);var f=new mc;$q(d);Yq(d);for(var g=$q(d);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))?
927
+ (h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Yq(d);g=$q(d)}b.push(f)}e=new Map;Fw(e);d=[];c=r(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]&&f[1].includes("::cue")){h="global";(g=f[1].match(/\((.*)\)/))&&(h=g.pop());g=f.slice(2,-1);f[1].includes("}")&&(k=/\{(.*?)\}/.exec(f[1]))&&(g=k[1].split(";"));k=new kc(0,0,"");for(var l=!1,m=0;m<g.length;m++){var p=
928
+ /^\s*([^:]+):\s*(.*)/.exec(g[m]);if(p){var n=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":l=!0;k.backgroundColor=n;break;case "color":l=!0;k.color=n;break;case "font-family":l=!0;k.fontFamily=n;break;case "font-size":l=!0;k.fontSize=n;break;case "font-weight":700<=parseInt(n,10)&&(l=!0,k.fontWeight=700);break;case "font-style":switch(n){case "normal":l=!0;k.fontStyle=uc;break;case "italic":l=!0;k.fontStyle="italic";break;case "oblique":l=!0,k.fontStyle="oblique"}break;case "opacity":l=
929
+ !0;k.opacity=parseFloat(n);break;case "text-shadow":l=!0;k.textShadow=n;break;case "white-space":l=!0,k.wrapLine="noWrap"!=n}}}l&&e.set(h,k)}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));g=new Xq(f[0]);k=Ew(g);p=Zq(g,/[ \t]+--\x3e[ \t]+/g);l=Ew(g);if(null==k||null==p||null==l)throw new M(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;m=Gw(f.slice(1).join("\n").trim());e.has("global")?(f=e.get("global").clone(),
930
+ f.startTime=k,f.endTime=l,f.payload=""):f=new kc(k,l,"");Hw(m,f,e);Yq(g);for(k=$q(g);k;)Iw(f,k,b),Yq(g),k=$q(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};function Fw(a){for(var b=r(Object.entries(zc)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new kc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(Ac));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new kc(0,0,""),e.backgroundColor=d,a.set(c,e)}
931
+ function Hw(a,b,c){0===c.size&&Fw(c);a=Jw(a);for(var d=[],e=-1,f=0;f<a.length;f++)"<"===a[f]?e=f+1:">"===a[f]&&0<e&&(e=a.substr(e,f-e),e.match(Kw)&&d.push(e),e=-1);d=r(d);for(f=d.next();!f.done;f=d.next())f=f.value,a=a.replace("<"+f+">",'<div time="'+f+'">'),a+="</div>";if(f=lg("<span>"+a+"</span>","span")){d=[];f=f.childNodes;if(1==f.length&&(e=f[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=a;return}a=r(f);for(f=a.next();!f.done;f=a.next())Lw(f.value,b,d,c);b.nestedCues=
932
+ d}else b.payload=a}function Jw(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function Mw(a,b){return a&&0<a.length?a:b}
933
+ function Lw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=Mw(h.backgroundColor,e.backgroundColor),e.color=Mw(h.color,e.color),e.fontFamily=Mw(h.fontFamily,e.fontFamily),e.fontSize=Mw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
934
+ "italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=Ew(new Xq(g)))e.startTime=g}}if(bg(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())Lw(a.value,e,c,d)}
935
+ function Iw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=oc:a.textAlign=wc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
936
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Nw(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=yc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=qc,a.line=Number(c[1]),c[2]&&(a.lineAlign=yc[c[2].toUpperCase()])}function Nw(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
937
+ function Ew(a){a=Zq(a,Kw);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function Gw(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},c=/&(?:amp|lt|gt|quot|#(0+)?39);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}I("shaka.text.VttTextParser",Dw);Dw.prototype.parseMedia=Dw.prototype.parseMedia;Dw.prototype.setSequenceMode=Dw.prototype.setSequenceMode;
938
+ Dw.prototype.parseInit=Dw.prototype.parseInit;var Kw=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Ed["text/vtt"]=function(){return new Dw};Ed['text/vtt; codecs="vtt"']=function(){return new Dw};Ed['text/vtt; codecs="wvtt"']=function(){return new Dw};function Ow(){this.g=null}Ow.prototype.parseInit=function(a){var b=this,c=!1;(new If).box("moov",Nf).box("trak",Nf).box("mdia",Nf).S("mdhd",function(d){d=oi(d.reader,d.version);b.g=d.timescale}).box("minf",Nf).box("stbl",Nf).S("stsd",Pf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new M(2,2,2008);if(!c)throw new M(2,2,2008);};Ow.prototype.setSequenceMode=function(){};
939
+ Ow.prototype.parseMedia=function(a,b){if(!this.g)throw new M(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new If).box("moof",Nf).box("traf",Nf).S("tfdt",function(z){g=!0;c=ni(z.reader,z.version).nf}).S("tfhd",function(z){l=mi(z.reader,z.flags).zf}).S("trun",function(z){h=!0;d=pi(z.reader,z.version,z.flags).Rf}).box("mdat",Rf(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new M(2,2,2008);a=c;for(var m=new Ff(e,0),p=r(d),n=p.next();!n.done;n=p.next()){n=n.value;var t=n.Ee||l,v=n.Ld?
940
+ c+n.Ld:a;a=v+(t||0);var y=0;do{var w=m.N();y+=w;var x=m.N(),A=null;"vttc"==Mf(x)?8<w&&(A=m.Bb(w-8)):m.skip(w-8);t&&A&&(w=Pw(A,b.periodStart+v/this.g,b.periodStart+a/this.g),f.push(w))}while(n.sampleSize&&y<n.sampleSize)}return f.filter(Cb)};function Pw(a,b,c){var d,e,f;(new If).box("payl",Rf(function(g){d=ad(g)})).box("iden",Rf(function(g){e=ad(g)})).box("sttg",Rf(function(g){f=ad(g)})).parse(a);return d?Qw(d,e,f,b,c):null}
941
+ function Qw(a,b,c,d,e){d=new kc(d,e,"");Hw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Xq(c),b=$q(a);b;)Iw(d,b,[]),Yq(a),b=$q(a);return d}I("shaka.text.Mp4VttParser",Ow);Ow.prototype.parseMedia=Ow.prototype.parseMedia;Ow.prototype.setSequenceMode=Ow.prototype.setSequenceMode;Ow.prototype.parseInit=Ow.prototype.parseInit;Ed['application/mp4; codecs="wvtt"']=function(){return new Ow};function Rw(){}Rw.prototype.parseInit=function(){};Rw.prototype.setSequenceMode=function(){};Rw.prototype.parseMedia=function(a){var b=ad(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Xq(c[0]),e=Sw(d),f=Zq(d,/,/g);d=Sw(d);if(null==e||null==f||null==d)throw new M(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new kc(e,d,c.slice(1).join("\n").trim()))}return a};
942
+ function Sw(a){a=Zq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}I("shaka.text.SbvTextParser",Rw);Rw.prototype.parseMedia=Rw.prototype.parseMedia;Rw.prototype.setSequenceMode=Rw.prototype.setSequenceMode;Rw.prototype.parseInit=Rw.prototype.parseInit;Ed["text/x-subviewer"]=function(){return new Rw};function Tw(){this.g=new Dw}Tw.prototype.parseInit=function(){};Tw.prototype.setSequenceMode=function(){};Tw.prototype.parseMedia=function(a,b){a=ad(a);a=Uw(a);a=Hc(ed(a));return this.g.parseMedia(a,b)};function Uw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}I("shaka.text.SrtTextParser",Tw);
943
+ Tw.srt2webvtt=Uw;Tw.prototype.parseMedia=Tw.prototype.parseMedia;Tw.prototype.setSequenceMode=Tw.prototype.setSequenceMode;Tw.prototype.parseInit=Tw.prototype.parseInit;Ed["text/srt"]=function(){return new Tw};function Vw(){}Vw.prototype.parseInit=function(){};Vw.prototype.setSequenceMode=function(){};
944
+ Vw.prototype.parseMedia=function(a){var b="",c="";a=ad(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Ww.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Xw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Yw);else if("Style"==e){e=f.split(Yw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
945
+ [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={be:e.be},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Xw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Yw);else if("Dialogue"==f){g=g.split(Yw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Zw(f.Start);var k=Zw(f.End);g=new kc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.be=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.be}}(e)))&&$w(g,f);d.push(g)}return d};
946
+ function $w(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=ax(c))a.color=c;if(c=b.BackColour)if(c=ax(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=sc;a.textAlign="start";break;case 2:a.displayAlign=sc;a.textAlign=oc;break;case 3:a.displayAlign=sc;a.textAlign="end";
946
947
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=oc;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=oc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
947
- function Zw(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function Xw(a){a=$w.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}I("shaka.text.SsaTextParser",Tw);Tw.prototype.parseMedia=Tw.prototype.parseMedia;Tw.prototype.setSequenceMode=Tw.prototype.setSequenceMode;Tw.prototype.parseInit=Tw.prototype.parseInit;
948
- var Uw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Vw=/^\s*([^:]+):\s*(.*)/,Ww=/\s*,\s*/,$w=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Ed["text/x-ssa"]=function(){return new Tw};/*
948
+ function ax(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function Zw(a){a=bx.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}I("shaka.text.SsaTextParser",Vw);Vw.prototype.parseMedia=Vw.prototype.parseMedia;Vw.prototype.setSequenceMode=Vw.prototype.setSequenceMode;Vw.prototype.parseInit=Vw.prototype.parseInit;
949
+ var Ww=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Xw=/^\s*([^:]+):\s*(.*)/,Yw=/\s*,\s*/,bx=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Ed["text/x-ssa"]=function(){return new Vw};/*
949
950
  @license
950
951
  EME Encryption Scheme Polyfill
951
952
  Copyright 2019 Google LLC
952
953
  SPDX-License-Identifier: Apache-2.0
953
954
  */
954
- function ax(){}var bx;function cx(){bx?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(bx=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=dx):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
955
- function dx(a,b){var c=this,d;return G(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,bx.call(c,a,b),2);d=e.h;if(ex(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=bx,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=fx;return e.return(fx.call(c,
955
+ function cx(){}var dx;function ex(){dx?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(dx=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=fx):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
956
+ function fx(a,b){var c=this,d;return G(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,dx.call(c,a,b),2);d=e.h;if(gx(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=dx,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=hx;return e.return(hx.call(c,
956
957
  a,b))})}
957
- function fx(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return G(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=gx(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=hx(h.videoCapabilities,d),l=hx(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."),
958
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(t,bx.call(c,a,e),2)}p=t.h;return t.return(new ix(p,d))})}function hx(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}I("EmeEncryptionSchemePolyfill",ax);ax.install=cx;function jx(){}var kx;
959
- function lx(){kx?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(kx=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=mx):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
960
- function mx(a){var b=this,c,d,e;return G(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,kx.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&ex(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=kx,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
961
- navigator.mediaCapabilities.decodingInfo=nx;if(d){f.D(3);break}e=c;return u(f,ox(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(nx.call(b,a))}})}
962
- function nx(a){var b=this,c,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=gx(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):u(m,kx.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
963
- new ix(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return u(m,ox(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
964
- function ox(a){var b,c;return G(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});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 u(d,
965
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}I("McEncryptionSchemePolyfill",jx);jx.install=lx;function ix(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
966
- ix.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};ix.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
967
- function gx(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function ex(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
968
- function px(){}function tu(){cx();lx()}I("EncryptionSchemePolyfills",px);px.install=tu;"undefined"!==typeof module&&module.exports&&(module.exports=px);/*
958
+ function hx(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return G(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=ix(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=jx(h.videoCapabilities,d),l=jx(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 p=Error("Unsupported keySystem or supportedConfigurations."),
959
+ p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(t,dx.call(c,a,e),2)}n=t.h;return t.return(new kx(n,d))})}function jx(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}I("EmeEncryptionSchemePolyfill",cx);cx.install=ex;function lx(){}var mx;
960
+ function nx(){mx?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(mx=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=ox):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
961
+ function ox(a){var b=this,c,d,e;return G(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,mx.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&gx(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=mx,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
962
+ navigator.mediaCapabilities.decodingInfo=px;if(d){f.D(3);break}e=c;return u(f,qx(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(px.call(b,a))}})}
963
+ function px(a){var b=this,c,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=ix(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):u(m,mx.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
964
+ new kx(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return u(m,qx(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
965
+ function qx(a){var b,c;return G(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});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 u(d,
966
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}I("McEncryptionSchemePolyfill",lx);lx.install=nx;function kx(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
967
+ kx.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};kx.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
968
+ function ix(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function gx(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
969
+ function rx(){}function vu(){ex();nx()}I("EncryptionSchemePolyfills",rx);rx.install=vu;"undefined"!==typeof module&&module.exports&&(module.exports=rx);/*
969
970
  @license
970
971
  Copyright 2013 Ali Al Dallal
971
972
 
@@ -989,7 +990,7 @@ function px(){}function tu(){cx();lx()}I("EncryptionSchemePolyfills",px);px.inst
989
990
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
990
991
  SOFTWARE.
991
992
  */
992
- for(var qx={ach:{u:"Lwo",A:"Acholi"},ady:{u:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",A:"Adyghe"},af:{u:"Afrikaans",A:"Afrikaans"},"af-NA":{u:"Afrikaans (Namibia)",A:"Afrikaans (Namibia)"},"af-ZA":{u:"Afrikaans (South Africa)",A:"Afrikaans (South Africa)"},ak:{u:"T\u0255\u0265i",A:"Akan"},ar:{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",A:"Arabic"},"ar-AR":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",A:"Arabic"},"ar-MA":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",A:"Arabic (Morocco)"},
993
+ for(var sx={ach:{u:"Lwo",A:"Acholi"},ady:{u:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",A:"Adyghe"},af:{u:"Afrikaans",A:"Afrikaans"},"af-NA":{u:"Afrikaans (Namibia)",A:"Afrikaans (Namibia)"},"af-ZA":{u:"Afrikaans (South Africa)",A:"Afrikaans (South Africa)"},ak:{u:"T\u0255\u0265i",A:"Akan"},ar:{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",A:"Arabic"},"ar-AR":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",A:"Arabic"},"ar-MA":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",A:"Arabic (Morocco)"},
993
994
  "ar-SA":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",A:"Arabic (Saudi Arabia)"},"ay-BO":{u:"Aymar aru",A:"Aymara"},az:{u:"Az\u0259rbaycan dili",A:"Azerbaijani"},"az-AZ":{u:"Az\u0259rbaycan dili",A:"Azerbaijani"},"be-BY":{u:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",A:"Belarusian"},bg:{u:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",A:"Bulgarian"},"bg-BG":{u:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
994
995
  A:"Bulgarian"},bn:{u:"\u09ac\u09be\u0982\u09b2\u09be",A:"Bengali"},"bn-IN":{u:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",A:"Bengali (India)"},"bn-BD":{u:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",A:"Bengali (Bangladesh)"},"bs-BA":{u:"Bosanski",A:"Bosnian"},ca:{u:"Catal\u00e0",A:"Catalan"},"ca-ES":{u:"Catal\u00e0",A:"Catalan"},cak:{u:"Maya Kaqchikel",A:"Kaqchikel"},"ck-US":{u:"\u13e3\u13b3\u13a9 (tsalagi)",A:"Cherokee"},cs:{u:"\u010ce\u0161tina",
995
996
  A:"Czech"},"cs-CZ":{u:"\u010ce\u0161tina",A:"Czech"},cy:{u:"Cymraeg",A:"Welsh"},"cy-GB":{u:"Cymraeg",A:"Welsh"},da:{u:"Dansk",A:"Danish"},"da-DK":{u:"Dansk",A:"Danish"},de:{u:"Deutsch",A:"German"},"de-AT":{u:"Deutsch (\u00d6sterreich)",A:"German (Austria)"},"de-DE":{u:"Deutsch (Deutschland)",A:"German (Germany)"},"de-CH":{u:"Deutsch (Schweiz)",A:"German (Switzerland)"},dsb:{u:"Dolnoserb\u0161\u0107ina",A:"Lower Sorbian"},el:{u:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",A:"Greek"},"el-GR":{u:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
@@ -1010,55 +1011,55 @@ A:"Slovak"},"sk-SK":{u:"Sloven\u010dina (Slovakia)",A:"Slovak (Slovakia)"},sl:{u
1010
1011
  sw:{u:"Kiswahili",A:"Swahili"},"sw-KE":{u:"Kiswahili",A:"Swahili (Kenya)"},ta:{u:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",A:"Tamil"},"ta-IN":{u:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",A:"Tamil"},te:{u:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",A:"Telugu"},"te-IN":{u:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",A:"Telugu"},tg:{u:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",A:"Tajik"},"tg-TJ":{u:"\u0442\u043e\u04b7\u0438\u043a\u04e3",A:"Tajik"},th:{u:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
1011
1012
  A:"Thai"},"th-TH":{u:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",A:"Thai (Thailand)"},tl:{u:"Filipino",A:"Filipino"},"tl-PH":{u:"Filipino",A:"Filipino"},tlh:{u:"tlhIngan-Hol",A:"Klingon"},tr:{u:"T\u00fcrk\u00e7e",A:"Turkish"},"tr-TR":{u:"T\u00fcrk\u00e7e",A:"Turkish"},"tt-RU":{u:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",A:"Tatar"},uk:{u:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",A:"Ukrainian"},"uk-UA":{u:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
1012
1013
  A:"Ukrainian"},ur:{u:"\u0627\u0631\u062f\u0648",A:"Urdu"},"ur-PK":{u:"\u0627\u0631\u062f\u0648",A:"Urdu"},uz:{u:"O'zbek",A:"Uzbek"},"uz-UZ":{u:"O'zbek",A:"Uzbek"},vi:{u:"Ti\u1ebfng Vi\u1ec7t",A:"Vietnamese"},"vi-VN":{u:"Ti\u1ebfng Vi\u1ec7t",A:"Vietnamese"},"xh-ZA":{u:"isiXhosa",A:"Xhosa"},yi:{u:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",A:"Yiddish"},"yi-DE":{u:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",A:"Yiddish (German)"},zh:{u:"\u4e2d\u6587",A:"Chinese"},"zh-HANS":{u:"\u4e2d\u6587\u7b80\u4f53",
1013
- A:"Chinese Simplified"},"zh-HANT":{u:"\u4e2d\u6587\u7e41\u9ad4",A:"Chinese Traditional"},"zh-CN":{u:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",A:"Chinese Simplified (China)"},"zh-HK":{u:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",A:"Chinese Traditional (Hong Kong)"},"zh-SG":{u:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",A:"Chinese Simplified (Singapore)"},"zh-TW":{u:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",A:"Chinese Traditional (Taiwan)"},"zu-ZA":{u:"isiZulu",A:"Zulu"}},rx=r(Object.keys(qx)),sx=rx.next();!sx.done;sx=
1014
- rx.next()){var tx=sx.value;qx[tx.toLowerCase()]=qx[tx]};function X(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new xf;this.localization=this.controls.za;this.player=this.controls.cc();this.video=this.controls.zb();this.adManager=this.player.rd();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
1015
- X.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};I("shaka.ui.Element",X);X.prototype.release=X.prototype.release;function ux(a){return vx(a,"shaka-back-to-overflow-button")}function vx(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function wx(a){a&&(a=vx(a,"shaka-chosen-item"))&&a.parentElement.focus()}function xx(){var a=R("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function Y(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
1016
- function yx(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function zx(a,b){X.call(this,a,b);var c=this;this.i=R("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=R("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new O(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=yx(e-d,!1)+" / "+yx(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
1017
- ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.ya();c.g.ea(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.ya(),this.g.ea(.5))}pa(zx,X);zx.prototype.release=function(){this.g.stop();this.g=null;X.prototype.release.call(this)};I("shaka.ui.AdCounter",zx);function Ax(a,b){X.call(this,a,b);var c=this;this.g=R("div");this.g.classList.add("shaka-ad-position");Y(this.g,!1);this.parent.appendChild(this.g);this.h=R("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&Bx(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&Bx(c)});this.eventManager.o(this.adManager,"ad-started",function(){Bx(c)});this.eventManager.o(this.adManager,
1018
- "ad-stopped",function(){c.h.textContent="";Y(c.g,!1)});this.ad&&Bx(this)}pa(Ax,X);function Bx(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));Y(a.g,!0)}}I("shaka.ui.AdPosition",Ax);function Cx(a,b){X.call(this,a,b);var c=this;this.button=Yk();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
1019
- c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?Dx(c.controls):Ex(c.controls)});this.ad&&(this.g(),this.h())}pa(Cx,X);Cx.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.s.paused&&!a.X;return a};Cx.prototype.g=function(){};Cx.prototype.h=function(){};
1020
- I("shaka.ui.PlayButton",Cx);function Fx(a,b){Cx.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa(Fx,Cx);Fx.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};Fx.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};I("shaka.ui.BigPlayButton",Fx);function Gx(a,b){X.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=R("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";Y(c.g,!0)}else Y(c.g,
1021
- !1)});this.eventManager.o(window,"click",function(){Y(c.g,!1)});Hx(this)}pa(Gx,X);Gx.prototype.release=function(){this.h=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];X.prototype.release.call(this)};function Ix(a,b){Jx.set(a,b)}function Hx(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=Jx.get(c);d?a.i.push(d.create(a.g,a.controls)):Ta("Unrecognized context menu element:",c)}}I("shaka.ui.ContextMenu",Gx);
1022
- Gx.registerElement=Ix;var Jx=new Map;function Kx(a,b,c,d){X.call(this,a,b);var e=this;this.container=R("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ia(c));this.g=!1;this.bar=document.createElement("input");this.l=new O(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ia(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
1023
- this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Mb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Mb()&&(e.g=!0,Lx(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(Lx(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,Lx(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
1024
- "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}pa(Kx,X);q=Kx.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);X.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.R(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
1025
- q.setValue=function(a){this.g||(this.bar.value=a)};function Lx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}I("shaka.ui.RangeElement",Kx);Kx.prototype.setValue=Kx.prototype.setValue;Kx.prototype.getValue=Kx.prototype.getValue;Kx.prototype.changeTo=Kx.prototype.changeTo;Kx.prototype.onChangeEnd=Kx.prototype.onChangeEnd;
1026
- Kx.prototype.onChange=Kx.prototype.onChange;Kx.prototype.onChangeStart=Kx.prototype.onChangeStart;Kx.prototype.setRange=Kx.prototype.setRange;function Mx(a,b){Kx.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=R("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new O(function(){c.video.currentTime=c.getValue()});this.s=new O(function(){Nx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Ox(c)});this.eventManager.o(this.localization,
1027
- "locale-changed",function(){return Ox(c)});this.eventManager.o(this.adManager,"ad-started",function(){Px(c)||Y(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Px(c)&&Y(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Qx(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Qx(c)});this.setValue(this.video.currentTime);this.update();Ox(this);this.ad&&Y(this.container,!1)}pa(Mx,Kx);q=Mx.prototype;
1028
- q.release=function(){this.h&&(this.h.stop(),this.h=null,this.s.stop(),this.s=null);Kx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Oe(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.R(.125))};q.onChangeEnd=function(){this.h.ya();this.controls.Oe(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
1029
- q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Ha(),g=f.end-f.start;this.setRange(f.start,f.end);Px(this)?(Y(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
1014
+ A:"Chinese Simplified"},"zh-HANT":{u:"\u4e2d\u6587\u7e41\u9ad4",A:"Chinese Traditional"},"zh-CN":{u:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",A:"Chinese Simplified (China)"},"zh-HK":{u:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",A:"Chinese Traditional (Hong Kong)"},"zh-SG":{u:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",A:"Chinese Simplified (Singapore)"},"zh-TW":{u:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",A:"Chinese Traditional (Taiwan)"},"zu-ZA":{u:"isiZulu",A:"Zulu"}},tx=r(Object.keys(sx)),ux=tx.next();!ux.done;ux=
1015
+ tx.next()){var vx=ux.value;sx[vx.toLowerCase()]=sx[vx]};function X(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new xf;this.localization=this.controls.za;this.player=this.controls.cc();this.video=this.controls.zb();this.adManager=this.player.rd();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
1016
+ X.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};I("shaka.ui.Element",X);X.prototype.release=X.prototype.release;function wx(a){return xx(a,"shaka-back-to-overflow-button")}function xx(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function yx(a){a&&(a=xx(a,"shaka-chosen-item"))&&a.parentElement.focus()}function zx(){var a=R("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function Y(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
1017
+ function Ax(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function Bx(a,b){X.call(this,a,b);var c=this;this.i=R("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=R("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new O(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=Ax(e-d,!1)+" / "+Ax(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
1018
+ ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.ya();c.g.ea(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.ya(),this.g.ea(.5))}pa(Bx,X);Bx.prototype.release=function(){this.g.stop();this.g=null;X.prototype.release.call(this)};I("shaka.ui.AdCounter",Bx);function Cx(a,b){X.call(this,a,b);var c=this;this.g=R("div");this.g.classList.add("shaka-ad-position");Y(this.g,!1);this.parent.appendChild(this.g);this.h=R("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&Dx(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&Dx(c)});this.eventManager.o(this.adManager,"ad-started",function(){Dx(c)});this.eventManager.o(this.adManager,
1019
+ "ad-stopped",function(){c.h.textContent="";Y(c.g,!1)});this.ad&&Dx(this)}pa(Cx,X);function Dx(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));Y(a.g,!0)}}I("shaka.ui.AdPosition",Cx);function Ex(a,b){X.call(this,a,b);var c=this;this.button=$k();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
1020
+ c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?Fx(c.controls):Gx(c.controls)});this.ad&&(this.g(),this.h())}pa(Ex,X);Ex.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.s.paused&&!a.X;return a};Ex.prototype.g=function(){};Ex.prototype.h=function(){};
1021
+ I("shaka.ui.PlayButton",Ex);function Hx(a,b){Ex.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa(Hx,Ex);Hx.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};Hx.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};I("shaka.ui.BigPlayButton",Hx);function Ix(a,b){X.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=R("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";Y(c.g,!0)}else Y(c.g,
1022
+ !1)});this.eventManager.o(window,"click",function(){Y(c.g,!1)});Jx(this)}pa(Ix,X);Ix.prototype.release=function(){this.h=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];X.prototype.release.call(this)};function Kx(a,b){Lx.set(a,b)}function Jx(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=Lx.get(c);d?a.i.push(d.create(a.g,a.controls)):Ta("Unrecognized context menu element:",c)}}I("shaka.ui.ContextMenu",Ix);
1023
+ Ix.registerElement=Kx;var Lx=new Map;function Mx(a,b,c,d){X.call(this,a,b);var e=this;this.container=R("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ia(c));this.g=!1;this.bar=document.createElement("input");this.l=new O(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ia(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
1024
+ this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Mb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Mb()&&(e.g=!0,Nx(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(Nx(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,Nx(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
1025
+ "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}pa(Mx,X);q=Mx.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);X.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.R(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
1026
+ q.setValue=function(a){this.g||(this.bar.value=a)};function Nx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}I("shaka.ui.RangeElement",Mx);Mx.prototype.setValue=Mx.prototype.setValue;Mx.prototype.getValue=Mx.prototype.getValue;Mx.prototype.changeTo=Mx.prototype.changeTo;Mx.prototype.onChangeEnd=Mx.prototype.onChangeEnd;
1027
+ Mx.prototype.onChange=Mx.prototype.onChange;Mx.prototype.onChangeStart=Mx.prototype.onChangeStart;Mx.prototype.setRange=Mx.prototype.setRange;function Ox(a,b){Mx.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=R("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new O(function(){c.video.currentTime=c.getValue()});this.s=new O(function(){Px(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Qx(c)});this.eventManager.o(this.localization,
1028
+ "locale-changed",function(){return Qx(c)});this.eventManager.o(this.adManager,"ad-started",function(){Rx(c)||Y(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Rx(c)&&Y(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Sx(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Sx(c)});this.setValue(this.video.currentTime);this.update();Qx(this);this.ad&&Y(this.container,!1)}pa(Ox,Mx);q=Ox.prototype;
1029
+ q.release=function(){this.h&&(this.h.stop(),this.h=null,this.s.stop(),this.s=null);Mx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Oe(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.R(.125))};q.onChangeEnd=function(){this.h.ya();this.controls.Oe(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
1030
+ q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Ja(),g=f.end-f.start;this.setRange(f.start,f.end);Rx(this)?(Y(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
1030
1031
  a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):Y(this.container,!1)};
1031
- function Nx(a){if(a.i.length){for(var b=a.player.Ha(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
1032
- 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function Qx(a){Nx(a);var b=a.player.Ha();b=b.end-b.start;a.player.T()&&5<b&&a.s.ea(1)}function Px(a){var b=a.player.Ha();b=b.end-b.start;return a.player.T()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Ox(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}I("shaka.ui.SeekBar",Mx);function Rx(){}
1033
- Rx.prototype.create=function(a,b){return new Mx(a,b)};Mx.Factory=Rx;function Z(a,b,c,d){fb.call(this);var e=this;this.P=!0;this.i=d;this.C=new po(c,a,this.i.castReceiverAppId,this.i.castAndroidReceiverCompatible);this.Xa=!0;this.s=this.C.zb();this.B=c;this.F=this.C.cc();this.sa=a;this.j=b;this.Va=this.F.rd();this.l=this.m=null;this.X=!1;this.G=[];this.ub=[];this.fb=!1;this.Z=new O(function(){e.j.style.cursor="none";e.fb=!1;Sx(e)});this.aa=new O(function(){e.g.removeAttribute("shown");e.I.R(2)});this.I=new O(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())Y(g.value,
1034
- !1)});this.Ja=new O(function(){e.Mb()&&Tx(e)});this.J=null;this.H=[];this.za=Ux();this.h=new xf;this.configure(this.i);Vx(this);this.ia=new Set;Wx(this);this.Ja.ea(.125);this.h.o(this.za,"locale-changed",function(f){e.Va.setLocale(f.locales[0])})}pa(Z,fb);q=Z.prototype;
1035
- q.destroy=function(){var a=this;return G(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.D(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.Z&&(a.Z.stop(),a.Z=null);a.aa&&(a.aa.stop(),a.aa=null);a.I&&(a.I.stop(),a.I=null);a.Ja&&(a.Ja.stop(),a.Ja=null);Xx(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.D(4);break}return u(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.sa){b.D(6);break}return u(b,a.sa.destroy(),7);case 7:a.sa=
1036
- null;case 6:a.F=null,a.B=null,a.s=null,a.za=null,a.ia.clear(),fb.prototype.release.call(a),B(b)}})};function Xx(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function Yx(a,b){Zx.set(a,b)}q.mg=function(a){this.Xa=a;Wx(this)};q.gh=function(){Sx(this)};
1037
- q.configure=function(a){this.i=a;this.C.vf(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.cb&&(this.cb=null);this.Wa&&(this.Wa=null);this.g?(Zk(this.g),Xx(this)):($x(this),ay(this));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");by(this);this.i.addBigPlayButton&&cy(this);this.i.customContextMenu&&(this.Wa=new Gx(this.U,this),this.H.push(this.Wa));this.$||dy(this);this.eb=R("div");this.eb.classList.add("shaka-server-side-ad-container");
1038
- this.g.appendChild(this.eb);ey(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));fy(this);this.ub=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Sx(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.o(b,"click",c);this.h.o(b,"dblclick",
1039
- c)}};q.Ke=function(a){(this.P=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");Sx(this)};q.Vf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.Ke(!1)};q.getAd=function(){return this.m};q.zg=function(){return this.C};q.Lg=function(){return this.za};q.$g=function(){return this.j};q.zb=function(){return this.s};q.Kg=function(){return this.B};q.cc=function(){return this.F};q.Jg=function(){return this.sa};
1040
- q.Eg=function(){return this.g};q.Tg=function(){return this.eb};q.Bg=function(){return this.O};q.Cg=function(){return this.i};q.fh=function(){return this.X};q.Oe=function(a){this.X=a};q.dh=function(){return this.Xa};q.Ef=function(){return this.l?this.l.getValue():this.s.currentTime};q.Wf=function(a){this.J=a};q.ld=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.fc=function(){this.I.ya()};
1032
+ function Px(a){if(a.i.length){for(var b=a.player.Ja(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
1033
+ 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function Sx(a){Px(a);var b=a.player.Ja();b=b.end-b.start;a.player.T()&&5<b&&a.s.ea(1)}function Rx(a){var b=a.player.Ja();b=b.end-b.start;return a.player.T()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Qx(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}I("shaka.ui.SeekBar",Ox);function Tx(){}
1034
+ Tx.prototype.create=function(a,b){return new Ox(a,b)};Ox.Factory=Tx;function Z(a,b,c,d){fb.call(this);var e=this;this.P=!0;this.i=d;this.C=new ro(c,a,this.i.castReceiverAppId,this.i.castAndroidReceiverCompatible);this.Ya=!0;this.s=this.C.zb();this.B=c;this.F=this.C.cc();this.sa=a;this.j=b;this.Wa=this.F.rd();this.l=this.m=null;this.X=!1;this.G=[];this.ub=[];this.gb=!1;this.Z=new O(function(){e.j.style.cursor="none";e.gb=!1;Ux(e)});this.aa=new O(function(){e.g.removeAttribute("shown");e.I.R(2)});this.I=new O(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())Y(g.value,
1035
+ !1)});this.La=new O(function(){e.Mb()&&Vx(e)});this.J=null;this.H=[];this.za=Wx();this.h=new xf;this.configure(this.i);Xx(this);this.ia=new Set;Yx(this);this.La.ea(.125);this.h.o(this.za,"locale-changed",function(f){e.Wa.setLocale(f.locales[0])})}pa(Z,fb);q=Z.prototype;
1036
+ q.destroy=function(){var a=this;return G(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.D(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.Z&&(a.Z.stop(),a.Z=null);a.aa&&(a.aa.stop(),a.aa=null);a.I&&(a.I.stop(),a.I=null);a.La&&(a.La.stop(),a.La=null);Zx(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.D(4);break}return u(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.sa){b.D(6);break}return u(b,a.sa.destroy(),7);case 7:a.sa=
1037
+ null;case 6:a.F=null,a.B=null,a.s=null,a.za=null,a.ia.clear(),fb.prototype.release.call(a),B(b)}})};function Zx(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function $x(a,b){ay.set(a,b)}q.mg=function(a){this.Ya=a;Yx(this)};q.gh=function(){Ux(this)};
1038
+ q.configure=function(a){this.i=a;this.C.vf(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.eb&&(this.eb=null);this.Xa&&(this.Xa=null);this.g?(al(this.g),Zx(this)):(by(this),cy(this));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");dy(this);this.i.addBigPlayButton&&ey(this);this.i.customContextMenu&&(this.Xa=new Ix(this.V,this),this.H.push(this.Xa));this.$||fy(this);this.fb=R("div");this.fb.classList.add("shaka-server-side-ad-container");
1039
+ this.g.appendChild(this.fb);gy(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));hy(this);this.ub=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Ux(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.o(b,"click",c);this.h.o(b,"dblclick",
1040
+ c)}};q.Ke=function(a){(this.P=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");Ux(this)};q.Vf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.Ke(!1)};q.getAd=function(){return this.m};q.zg=function(){return this.C};q.Lg=function(){return this.za};q.$g=function(){return this.j};q.zb=function(){return this.s};q.Kg=function(){return this.B};q.cc=function(){return this.F};q.Jg=function(){return this.sa};
1041
+ q.Eg=function(){return this.g};q.Tg=function(){return this.fb};q.Bg=function(){return this.O};q.Cg=function(){return this.i};q.fh=function(){return this.X};q.Oe=function(a){this.X=a};q.dh=function(){return this.Ya};q.Ef=function(){return this.l?this.l.getValue():this.s.currentTime};q.Wf=function(a){this.J=a};q.ld=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.fc=function(){this.I.ya()};
1041
1042
  q.wd=function(){return document.fullscreenEnabled||this.B.webkitSupportsFullscreen?!0:!1};q.ic=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.B;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
1042
- function gy(a){var b,c;return G(function(d){switch(d.g){case 1:C(d,2);if(!document.fullscreenEnabled){b=a.B;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();d.D(4);break}if(!document.pictureInPictureElement){d.D(5);break}return u(d,document.exitPictureInPicture(),5);case 5:return u(d,a.j.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){d.D(4);break}return u(d,screen.orientation.lock("landscape"),4);case 4:ua(d,0);break;case 2:c=va(d),
1043
- a.dispatchEvent(new L("error",(new Map).set("detail",c))),B(d)}})}function hy(a){var b;return G(function(c){if(!document.fullscreenEnabled)return b=a.B,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.D(0);screen.orientation&&screen.orientation.unlock();return u(c,document.exitFullscreen(),0)})}q.Ue=function(){var a=this;return G(function(b){return a.ic()?u(b,hy(a),0):u(b,gy(a),0)})};q.$f=function(){Y(this.K,!0);Y(this.O,!0);this.g.setAttribute("ad-active","true")};
1044
- q.Hf=function(){Y(this.K,!1);Y(this.O,!1);this.g.removeAttribute("ad-active")};function Ex(a){a.P&&a.s.duration&&(a.F.rf(),a.s.paused&&!a.X?a.s.play():a.s.pause())}function Dx(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
1045
- function $x(a){a.g=R("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.s.duration&&(a.Mb()?a.J=Date.now():(iy(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){jy(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&a.wd()&&a.Ue()})}
1046
- function cy(a){var b=R("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.cb=new Fx(b,a);a.H.push(a.cb)}function by(a){var b=R("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function ky(a){a.K=R("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();Y(a.K,b);a.M.appendChild(a.K);b=new Ax(a.K,a);a.H.push(b);b=new zx(a.K,a);a.H.push(b)}
1047
- function dy(a){a.$=R("div");a.$.classList.add("shaka-spinner-container");a.j.appendChild(a.$);var b=R("div");b.classList.add("shaka-spinner");a.$.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");b.setAttribute("fill",
1043
+ function iy(a){var b,c;return G(function(d){switch(d.g){case 1:D(d,2);if(!document.fullscreenEnabled){b=a.B;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();d.D(4);break}if(!document.pictureInPictureElement){d.D(5);break}return u(d,document.exitPictureInPicture(),5);case 5:return u(d,a.j.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){d.D(4);break}D(d,9);return u(d,screen.orientation.lock("landscape"),11);case 11:ua(d,4,2);break;case 9:va(d,
1044
+ 2);case 4:ua(d,0);break;case 2:c=va(d),a.dispatchEvent(new L("error",(new Map).set("detail",c))),B(d)}})}function jy(a){var b;return G(function(c){if(!document.fullscreenEnabled)return b=a.B,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.D(0);screen.orientation&&screen.orientation.unlock();return u(c,document.exitFullscreen(),0)})}q.Ue=function(){var a=this;return G(function(b){return a.ic()?u(b,jy(a),0):u(b,iy(a),0)})};
1045
+ q.$f=function(){Y(this.K,!0);Y(this.O,!0);this.g.setAttribute("ad-active","true")};q.Hf=function(){Y(this.K,!1);Y(this.O,!1);this.g.removeAttribute("ad-active")};function Gx(a){a.P&&a.s.duration&&(a.F.rf(),a.s.paused&&!a.X?a.s.play():a.s.pause())}function Fx(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
1046
+ function by(a){a.g=R("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.s.duration&&(a.Mb()?a.J=Date.now():(ky(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){ly(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&a.wd()&&a.Ue()})}
1047
+ function ey(a){var b=R("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.eb=new Hx(b,a);a.H.push(a.eb)}function dy(a){var b=R("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function my(a){a.K=R("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();Y(a.K,b);a.M.appendChild(a.K);b=new Cx(a.K,a);a.H.push(b);b=new Bx(a.K,a);a.H.push(b)}
1048
+ function fy(a){a.$=R("div");a.$.classList.add("shaka-spinner-container");a.j.appendChild(a.$);var b=R("div");b.classList.add("shaka-spinner");a.$.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");b.setAttribute("fill",
1048
1049
  "none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
1049
- function ey(a){a.M=R("div");a.M.classList.add("shaka-bottom-controls");a.M.classList.add("shaka-no-propagation");a.g.appendChild(a.M);a.h.o(a.M,"click",function(d){d.target.closest(".shaka-overflow-button")||a.fc()});ky(a);a.U=R("div");a.U.classList.add("shaka-controls-button-panel");a.U.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.U.classList.add("shaka-tooltips-on");a.M.appendChild(a.U);for(var b=r(a.i.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,Zx.get(c)?
1050
- (c=Zx.get(c).create(a.U,a),a.H.push(c)):Ta("Unrecognized control panel element requested:",c)}function fy(a){if(a.i.addSeekBar)a.l=ly.create(a.M,a),a.H.push(a.l);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function ay(a){a.O=R("div");a.O.classList.add("shaka-client-side-ad-container");Y(a.O,!1);a.h.o(a.O,"click",function(){jy(a)});a.j.appendChild(a.O)}
1051
- function Vx(a){a.h.o(a.F,"buffering",function(){a.P&&Y(a.$,a.F.Pc())});a.P&&Y(a.$,a.F.Pc());a.h.o(window,"keydown",function(b){my(a,b)});a.h.o(window,"click",function(){return a.fc()});a.h.o(a,"submenuopen",function(){a.fc()});a.h.o(a.s,"play",function(){Sx(a)});a.h.o(a.s,"pause",function(){Sx(a)});a.h.o(a.j,"mousemove",function(b){iy(a,b)});a.h.o(a.j,"touchmove",function(b){iy(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){iy(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.Z.ya()});
1052
- a.h.o(a.C,"caststatuschanged",function(){Wx(a)});a.h.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&iy(a,b);if(a.i.enableKeyboardPlaybackControls)switch(c=a.i.keyboardSeekDistance,b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),ny(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),ny(a,a.l.getValue()+c));break;case "Home":a.l&&
1053
- ny(a,a.F.Ha().start);break;case "End":a.l&&ny(a,a.F.Ha().end);break;case " ":e&&oy(a)}});a.h.o(a.j,"keyup",function(b){a.ia.delete(b.key)});a.h.o(a.Va,"ad-started",function(b){a.m=b.ad;a.$f()});a.h.o(a.Va,"ad-stopped",function(){a.m=null;a.Hf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return G(function(b){return u(b,py(a),0)})})}
1054
- function py(a){return G(function(b){return a.s&&0!=a.s.readyState&&!a.C.na()&&a.i.enableFullscreenOnRotation&&a.wd()?screen.orientation.type.includes("landscape")&&!a.ic()?u(b,gy(a),0):screen.orientation.type.includes("portrait")&&a.ic()?u(b,hy(a),0):b.D(0):b.return()})}
1055
- function iy(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Sx(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.fb=!0,a.I.stop(),a.Mb()||(Tx(a),Sx(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.Z.R(3))}function qy(a){return window.matchMedia("hover: hover").matches?a.ub.some(function(b){return b.matches(":hover")}):!1}
1056
- function Sx(a){var b=a.m?a.m.isPaused():!1,c=a.s.paused&&!a.X,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.fb||d||qy(a)?(Tx(a),a.g.setAttribute("shown","true"),a.aa.stop()):a.aa.R(a.i.fadeDelay)}function jy(a){a.P&&(a.ld()?a.I.ya():a.i.singleClickForPlayAndPause&&oy(a))}function oy(a){a.m&&a.m.isLinear()?Dx(a):Ex(a)}
1057
- function Wx(a){var b=a.C.na();a.dispatchEvent(new L("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Mb=function(){return this.P?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function ny(a,b){a.l.changeTo(b);a.Mb()&&Tx(a)}
1058
- function Tx(a){if(a.l)if(a.l.setValue(a.s.currentTime),a.l.update(),a.l.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new L("timeandseekrangeupdated"))}
1059
- function my(a,b){a.ia.add(b.key);var c=a.ld();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Sx(a),a.h.o(window,"mousedown",function(){a.h.qc(window,"mousedown")}));"Escape"==b.key&&a.I.ya();c&&a.ia.has("Tab")&&ry(a,b)}
1060
- function ry(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.ia.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1061
- function Ux(){var a=new Wb("en");a.ba("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
1050
+ function gy(a){a.M=R("div");a.M.classList.add("shaka-bottom-controls");a.M.classList.add("shaka-no-propagation");a.g.appendChild(a.M);a.h.o(a.M,"click",function(d){d.target.closest(".shaka-overflow-button")||a.fc()});my(a);a.V=R("div");a.V.classList.add("shaka-controls-button-panel");a.V.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.V.classList.add("shaka-tooltips-on");a.M.appendChild(a.V);for(var b=r(a.i.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,ay.get(c)?
1051
+ (c=ay.get(c).create(a.V,a),a.H.push(c)):Ta("Unrecognized control panel element requested:",c)}function hy(a){if(a.i.addSeekBar)a.l=ny.create(a.M,a),a.H.push(a.l);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function cy(a){a.O=R("div");a.O.classList.add("shaka-client-side-ad-container");Y(a.O,!1);a.h.o(a.O,"click",function(){ly(a)});a.j.appendChild(a.O)}
1052
+ function Xx(a){a.h.o(a.F,"buffering",function(){a.P&&Y(a.$,a.F.Pc())});a.P&&Y(a.$,a.F.Pc());a.h.o(window,"keydown",function(b){oy(a,b)});a.h.o(window,"click",function(){return a.fc()});a.h.o(a,"submenuopen",function(){a.fc()});a.h.o(a.s,"play",function(){Ux(a)});a.h.o(a.s,"pause",function(){Ux(a)});a.h.o(a.j,"mousemove",function(b){ky(a,b)});a.h.o(a.j,"touchmove",function(b){ky(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){ky(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.Z.ya()});
1053
+ a.h.o(a.C,"caststatuschanged",function(){Yx(a)});a.h.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&ky(a,b);if(a.i.enableKeyboardPlaybackControls)switch(c=a.i.keyboardSeekDistance,b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),py(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),py(a,a.l.getValue()+c));break;case "Home":a.l&&
1054
+ py(a,a.F.Ja().start);break;case "End":a.l&&py(a,a.F.Ja().end);break;case " ":e&&qy(a)}});a.h.o(a.j,"keyup",function(b){a.ia.delete(b.key)});a.h.o(a.Wa,"ad-started",function(b){a.m=b.ad;a.$f()});a.h.o(a.Wa,"ad-stopped",function(){a.m=null;a.Hf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return G(function(b){return u(b,ry(a),0)})})}
1055
+ function ry(a){return G(function(b){return a.s&&0!=a.s.readyState&&!a.C.na()&&a.i.enableFullscreenOnRotation&&a.wd()?screen.orientation.type.includes("landscape")&&!a.ic()?u(b,iy(a),0):screen.orientation.type.includes("portrait")&&a.ic()?u(b,jy(a),0):b.D(0):b.return()})}
1056
+ function ky(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Ux(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.gb=!0,a.I.stop(),a.Mb()||(Vx(a),Ux(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.Z.R(3))}function sy(a){return window.matchMedia("hover: hover").matches?a.ub.some(function(b){return b.matches(":hover")}):!1}
1057
+ function Ux(a){var b=a.m?a.m.isPaused():!1,c=a.s.paused&&!a.X,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.gb||d||sy(a)?(Vx(a),a.g.setAttribute("shown","true"),a.aa.stop()):a.aa.R(a.i.fadeDelay)}function ly(a){a.P&&(a.ld()?a.I.ya():a.i.singleClickForPlayAndPause&&qy(a))}function qy(a){a.m&&a.m.isLinear()?Fx(a):Gx(a)}
1058
+ function Yx(a){var b=a.C.na();a.dispatchEvent(new L("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Mb=function(){return this.P?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function py(a,b){a.l.changeTo(b);a.Mb()&&Vx(a)}
1059
+ function Vx(a){if(a.l)if(a.l.setValue(a.s.currentTime),a.l.update(),a.l.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new L("timeandseekrangeupdated"))}
1060
+ function oy(a,b){a.ia.add(b.key);var c=a.ld();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Ux(a),a.h.o(window,"mousedown",function(){a.h.qc(window,"mousedown")}));"Escape"==b.key&&a.I.ya();c&&a.ia.has("Tab")&&ty(a,b)}
1061
+ function ty(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.ia.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1062
+ function Wx(){var a=new Wb("en");a.ba("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
1062
1063
  ["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
1063
1064
  ["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],
1064
1065
  ["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],
@@ -1119,74 +1120,74 @@ a.ba("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
1119
1120
  ["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.uf(navigator.languages||[]);return a}I("shaka.ui.Controls",Z);Z.prototype.isOpaque=Z.prototype.Mb;Z.prototype.hideAdUI=Z.prototype.Hf;Z.prototype.showAdUI=Z.prototype.$f;
1120
1121
  Z.prototype.toggleFullScreen=Z.prototype.Ue;Z.prototype.isFullScreenEnabled=Z.prototype.ic;Z.prototype.isFullScreenSupported=Z.prototype.wd;Z.prototype.hideSettingsMenus=Z.prototype.fc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.ld;Z.prototype.setLastTouchEventTime=Z.prototype.Wf;Z.prototype.getDisplayTime=Z.prototype.Ef;Z.prototype.isCastAllowed=Z.prototype.dh;Z.prototype.setSeeking=Z.prototype.Oe;Z.prototype.isSeeking=Z.prototype.fh;Z.prototype.getConfig=Z.prototype.Cg;
1121
1122
  Z.prototype.getClientSideAdContainer=Z.prototype.Bg;Z.prototype.getServerSideAdContainer=Z.prototype.Tg;Z.prototype.getControlsContainer=Z.prototype.Eg;Z.prototype.getLocalPlayer=Z.prototype.Jg;Z.prototype.getPlayer=Z.prototype.cc;Z.prototype.getLocalVideo=Z.prototype.Kg;Z.prototype.getVideo=Z.prototype.zb;Z.prototype.getVideoContainer=Z.prototype.$g;Z.prototype.getLocalization=Z.prototype.Lg;Z.prototype.getCastProxy=Z.prototype.zg;Z.prototype.getAd=Z.prototype.getAd;
1122
- Z.prototype.setEnabledNativeControls=Z.prototype.Vf;Z.prototype.setEnabledShakaControls=Z.prototype.Ke;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.gh;Z.prototype.allowCast=Z.prototype.mg;Z.registerSeekBar=function(a){ly=a};Z.registerElement=Yx;Z.prototype.destroy=Z.prototype.destroy;var Zx=new Map,ly=new Rx;function sy(a,b){X.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=Yk();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=R("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1123
- this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);ty(this);this.eventManager.o(this.localization,"locale-updated",function(){uy(c)});this.eventManager.o(this.localization,"locale-changed",function(){uy(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&Y(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Y(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){Y(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Wf(Date.now());
1124
- d.stopPropagation()});this.eventManager.o(this.g,"click",function(){vy(c)});uy(this);this.ad&&this.ad.isLinear()&&Y(this.g,!1)}pa(sy,X);sy.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];X.prototype.release.call(this)};function wy(a,b){xy.set(a,b)}
1125
- function ty(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,xy.get(c)?(c=xy.get(c),a.i.push(c.create(a.h,a.controls))):Ta("Unrecognized overflow menu element requested:",c)}function vy(a){if(a.controls.ld())a.controls.fc();else{Y(a.h,!0);Sx(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};ib(a.h.childNodes,b)&&jb(a.h.childNodes,b)[0].focus()}}function uy(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1126
- I("shaka.ui.OverflowMenu",sy);sy.registerElement=wy;function yy(){}yy.prototype.create=function(a,b){return new sy(a,b)};Yx("overflow_menu",new yy);var xy=new Map;function zy(a,b){X.call(this,a,b);var c=this;this.g=Yk();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=R("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");a.appendChild(this.j);
1127
- this.i=R("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);Ay(this);By(this);this.eventManager.o(this.localization,"locale-updated",function(){Ay(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ay(c)});this.eventManager.o(this.g,"click",function(){c.controls.zb().webkitShowPlaybackTargetPicker()});a=this.controls.zb();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
1128
- c.player.Ff()==Ym;Y(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){By(c)})}pa(zy,X);function By(a){var b=a.controls.zb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Ay(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}I("shaka.ui.AirPlayButton",zy);function Cy(){}Cy.prototype.create=function(a,b){return new zy(a,b)};wy("airplay",new Cy);
1129
- Yx("airplay",new Cy);function Dy(a,b,c){this.i=a;this.h=Ey(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.oe()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.Re(b);b.ui=this;c.ui=this}q=Dy.prototype;q.destroy=function(){var a=this;return G(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?u(b,a.i.destroy(),4):b.D(4);a.i=null;B(b)})};q.oe=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Vc()&&1<navigator.maxTouchPoints};
1130
- q.getConfiguration=function(){var a=Ey(this);Dl(a,this.h,Ey(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=El(a,b));Dl(this.h,a,Ey(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new L("uiupdated"))};q.Dg=function(){return this.g};q.Ih=function(a){this.g.Ke(a)};
1131
- function Ey(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
1123
+ Z.prototype.setEnabledNativeControls=Z.prototype.Vf;Z.prototype.setEnabledShakaControls=Z.prototype.Ke;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.gh;Z.prototype.allowCast=Z.prototype.mg;Z.registerSeekBar=function(a){ny=a};Z.registerElement=$x;Z.prototype.destroy=Z.prototype.destroy;var ay=new Map,ny=new Tx;function uy(a,b){X.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=$k();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=R("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1124
+ this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);vy(this);this.eventManager.o(this.localization,"locale-updated",function(){wy(c)});this.eventManager.o(this.localization,"locale-changed",function(){wy(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&Y(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Y(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){Y(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Wf(Date.now());
1125
+ d.stopPropagation()});this.eventManager.o(this.g,"click",function(){xy(c)});wy(this);this.ad&&this.ad.isLinear()&&Y(this.g,!1)}pa(uy,X);uy.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];X.prototype.release.call(this)};function yy(a,b){zy.set(a,b)}
1126
+ function vy(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,zy.get(c)?(c=zy.get(c),a.i.push(c.create(a.h,a.controls))):Ta("Unrecognized overflow menu element requested:",c)}function xy(a){if(a.controls.ld())a.controls.fc();else{Y(a.h,!0);Ux(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};ib(a.h.childNodes,b)&&jb(a.h.childNodes,b)[0].focus()}}function wy(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1127
+ I("shaka.ui.OverflowMenu",uy);uy.registerElement=yy;function Ay(){}Ay.prototype.create=function(a,b){return new uy(a,b)};$x("overflow_menu",new Ay);var zy=new Map;function By(a,b){X.call(this,a,b);var c=this;this.g=$k();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=R("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");a.appendChild(this.j);
1128
+ this.i=R("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);Cy(this);Dy(this);this.eventManager.o(this.localization,"locale-updated",function(){Cy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Cy(c)});this.eventManager.o(this.g,"click",function(){c.controls.zb().webkitShowPlaybackTargetPicker()});a=this.controls.zb();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
1129
+ c.player.Ff()==$m;Y(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){Dy(c)})}pa(By,X);function Dy(a){var b=a.controls.zb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Cy(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}I("shaka.ui.AirPlayButton",By);function Ey(){}Ey.prototype.create=function(a,b){return new By(a,b)};yy("airplay",new Ey);
1130
+ $x("airplay",new Ey);function Fy(a,b,c){this.i=a;this.h=Gy(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.oe()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.Re(b);b.ui=this;c.ui=this}q=Fy.prototype;q.destroy=function(){var a=this;return G(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?u(b,a.i.destroy(),4):b.D(4);a.i=null;B(b)})};q.oe=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Vc()&&1<navigator.maxTouchPoints};
1131
+ q.getConfiguration=function(){var a=Gy(this);Fl(a,this.h,Gy(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Gl(a,b));Fl(this.h,a,Gy(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new L("uiupdated"))};q.Dg=function(){return this.g};q.Ih=function(a){this.g.Ke(a)};
1132
+ function Gy(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
1132
1133
  "picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},
1133
- trackLabelFormat:Fy,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.oe()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1134
- function Gy(){var a,b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,A,z,D;return G(function(E){switch(E.g){case 1:iu();if(!nm())return Hy("shaka-ui-load-failed",Iy),E.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");if(!b.length&&!a.length){E.D(2);break}if(b.length&&!a.length){d=r(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,!f.ui){g=document.createElement("div");h=f.parentElement;
1135
- h.replaceChild(g,f);g.appendChild(f);k=null;l=r(c);for(m=l.next();!m.done;m=l.next())if(n=m.value,n.parentElement==g){k=n;break}k||(k=document.createElement("canvas"),k.classList.add("shaka-canvas-container"),g.appendChild(k));Jy(g,f,k)}E.D(2);break}p=r(a);t=p.next();case 4:if(t.done){E.D(2);break}v=t.value;if(v.ui){E.D(5);break}y=null;w=r(b);for(e=w.next();!e.done;e=w.next())if(x=e.value,x.parentElement==v){y=x;break}y||(y=document.createElement("video"),y.setAttribute("playsinline",""),v.appendChild(y));
1136
- A=null;z=r(c);for(m=z.next();!m.done;m=z.next())if(D=m.value,D.parentElement==v){A=D;break}A||(A=document.createElement("canvas"),A.classList.add("shaka-canvas-container"),v.appendChild(A));C(E,7);return u(E,Jy(v,y,A),9);case 9:ua(E,5);break;case 7:return va(E),Hy("shaka-ui-load-failed",Ky),E.return();case 5:t=p.next();E.D(4);break;case 2:Hy("shaka-ui-loaded"),B(E)}})}function Hy(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
1137
- function Jy(a,b,c){var d,e,f,g,h,k,l,m,n;return G(function(p){switch(p.g){case 1:d=new S(b);e=new Dy(d,a,b);d.mf(c);f="";g=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(f=a.dataset.shakaPlayerCastReceiverId,g="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(f=b.dataset.shakaPlayerCastReceiverId,g="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);f.length&&e.configure({castReceiverAppId:f,castAndroidReceiverCompatible:g});
1138
- b.controls&&e.g.Vf(!0);if(h=b.getAttribute("src"))k=document.createElement("source"),k.setAttribute("src",h),b.appendChild(k),b.removeAttribute("src");l=r(b.querySelectorAll("source"));m=l.next();case 2:if(m.done){p.D(0);break}n=m.value;C(p,5);return u(p,e.g.cc().load(n.getAttribute("src")),7);case 7:p.D(0);break;case 5:va(p);case 3:m=l.next(),p.D(2)}})}I("shaka.ui.Overlay",Dy);Dy.prototype.setEnabled=Dy.prototype.Ih;Dy.prototype.getControls=Dy.prototype.Dg;Dy.prototype.configure=Dy.prototype.configure;
1139
- Dy.prototype.getConfiguration=Dy.prototype.getConfiguration;Dy.prototype.isMobile=Dy.prototype.oe;Dy.prototype.destroy=Dy.prototype.destroy;var Fy=0;Dy.TrackLabelFormat={LANGUAGE:Fy,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var Iy=0,Ky=1;Dy.FailReasonCode={NO_BROWSER_SUPPORT:Iy,PLAYER_FAILED_TO_LOAD:Ky};"complete"==document.readyState?G(function(a){if(1==a.g)return u(a,Promise.resolve(),2);Gy();B(a)}):window.addEventListener("load",Gy);function Ly(a,b,c,d,e,f,g){function h(z,D){return z+": "+D}function k(z){return"variant"==z.type?z.audioRoles?z.audioRoles.join(", "):void 0:z.roles.join(", ")}var l=a.find(function(z){return 1==z.active}),m=ux(b);Zk(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={Ta:n.Ta},p=a.next()){n.Ta=p.value;p=n.Ta.language;var t=
1140
- n.Ta.forced,v=f.resolve($b.gg),y=k(n.Ta),w=h(p,y);if(!m.has(w)){m.add(w);var x=Yk();x.addEventListener("click",function(z){return function(){c(z.Ta)}}(n));var A=R("span");x.appendChild(A);A.textContent=My(p,f);switch(g){case Fy:t&&(A.textContent+=" ("+v+")");break;case 1:y?A.textContent=y:(Ta("Track #"+n.Ta.id+" does not have a role, but the UI is configured to only show role."),A.textContent="?");t&&(A.textContent+=" ("+v+")");break;case 2:y&&(A.textContent+=": "+y);t&&(A.textContent+=" ("+v+")");
1141
- break;case 3:n.Ta.label?A.textContent=n.Ta.label:(Ta("Track #"+n.Ta.id+" does not have a label, but the UI is configured to only show labels."),A.textContent="?")}d&&w==l&&(x.appendChild(xx()),A.classList.add("shaka-chosen-item"),x.ariaSelected="true",e.textContent=A.textContent);b.appendChild(x)}}}
1142
- function My(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Rb(a);return a in qx?qx[a].u:c in qx?qx[c].u+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function Ny(a,b,c){X.call(this,a,b);var d=this;Oy(this,c);Py(this);Qy(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new L("submenuopen")),Y(d.menu,!0),wx(d.menu)):Y(d.menu,!1)})}pa(Ny,X);
1143
- function Oy(a,b){a.button=Yk();a.button.classList.add("shaka-overflow-button");a.icon=R("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=R("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=R("span");b.appendChild(a.nameSpan);a.currentSelection=R("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
1144
- function Py(a){a.menu=R("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Yk();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.fc()});var b=R("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1145
- R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Qy(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}Y(a.parent,!0);ib(a.parent.childNodes,b)&&jb(a.parent.childNodes,b)[0].focus();Sx(a.controls)}))}I("shaka.ui.SettingsMenu",Ny);function Ry(a,b){Ny.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){Sy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Sy(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Oa().length;Y(c.button,d);Ty(c)});this.eventManager.o(this.player,"variantchanged",
1146
- function(){Ty(c)});Sy(this);Ty(this)}pa(Ry,Ny);function Ty(a){var b=a.player.Oa();Ly(b,a.menu,function(c){a.player.Md(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);wx(a.menu);a.controls.dispatchEvent(new L("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1147
- function Sy(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}I("shaka.ui.AudioLanguageSelection",Ry);function Uy(){}Uy.prototype.create=function(a,b){return new Ry(a,b)};wy("language",new Uy);Yx("language",new Uy);function Vy(a,b){X.call(this,a,b);var c=this;this.h=this.controls.C;this.g=Yk();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=R("span");a.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");
1148
- a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);Wy(this);Xy(this);this.eventManager.o(this.localization,"locale-updated",function(){Wy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Wy(c)});this.eventManager.o(this.g,"click",function(){Yy(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Xy(c)})}pa(Vy,X);
1149
- function Yy(a){var b;G(function(c){if(1==c.g){if(a.h.na())return a.h.ag(),c.D(0);C(c,3);a.g.disabled=!0;return u(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,ua(c,0);b=va(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));B(c)})}function Xy(a){var b=a.h.qf()&&a.controls.Xa,c=a.h.na();Y(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Zy(a)}
1150
- function Zy(a){a.j.textContent=a.h.na()?a.h.Jd():a.localization.resolve("OFF")}function Wy(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Zy(a)}I("shaka.ui.CastButton",Vy);function $y(){}$y.prototype.create=function(a,b){return new Vy(a,b)};wy("cast",new $y);Yx("cast",new $y);function az(a,b){X.call(this,a,b);var c=this;this.g=Yk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);bz(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){bz(c)});this.eventManager.o(this.localization,"locale-changed",function(){bz(c)});
1151
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.xb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.We(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(az,X);function bz(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}I("shaka.ui.FastForwardButton",az);function cz(){}cz.prototype.create=function(a,b){return new az(a,b)};Yx("fast_forward",new cz);function dz(a,b){X.call(this,a,b);var c=this;this.h=this.controls.B;this.g=Yk();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");ez(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);fz(this);this.eventManager.o(this.localization,"locale-updated",function(){fz(c)});this.eventManager.o(this.localization,"locale-changed",function(){fz(c)});this.eventManager.o(this.g,"click",function(){return G(function(d){return u(d,
1152
- c.controls.Ue(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.ic()?"fullscreen_exit":"fullscreen";fz(c)});this.eventManager.o(this.h,"loadedmetadata",function(){ez(c)});this.eventManager.o(this.h,"loadeddata",function(){ez(c)})}pa(dz,X);function ez(a){a.controls.wd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function fz(a){a.g.ariaLabel=a.localization.resolve(a.controls.ic()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
1153
- I("shaka.ui.FullscreenButton",dz);function gz(){}gz.prototype.create=function(a,b){return new dz(a,b)};Yx("fullscreen",new gz);function hz(a,b){X.call(this,a,b);var c=this;this.g=Yk();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=R("span");this.l.classList.add("shaka-current-selection-span");
1154
- a.appendChild(this.l);this.g.appendChild(a);iz(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){iz(c)});this.eventManager.o(this.localization,"locale-changed",function(){iz(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.ya();c.h.ea(1)});this.m=this.video.loop;this.h=new O(function(){c.m!=c.video.loop&&(iz(c),c.m=c.video.loop)});this.h.ea(1)}pa(hz,X);hz.prototype.release=function(){this.h.stop();this.h=null;X.prototype.release.call(this)};
1155
- function iz(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}I("shaka.ui.LoopButton",hz);function jz(){}jz.prototype.create=function(a,b){return new hz(a,b)};wy("loop",new jz);Yx("loop",new jz);Ix("loop",new jz);function kz(a,b){X.call(this,a,b);var c=this;this.g=Yk();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);lz(this);mz(this);this.eventManager.o(this.localization,"locale-updated",function(){lz(c)});this.eventManager.o(this.localization,"locale-changed",function(){lz(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1156
- this.eventManager.o(this.video,"volumechange",function(){lz(c);mz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){lz(c);mz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){lz(c);mz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;lz(c);mz(c)})}pa(kz,X);function lz(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1157
- function mz(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}I("shaka.ui.MuteButton",kz);function nz(){}nz.prototype.create=function(a,b){return new kz(a,b)};Yx("mute",new nz);function oz(a,b){X.call(this,a,b);var c=this;this.l=this.controls.B;this.g=Yk();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
1158
- R("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);pz(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||Y(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){pz(c)});this.eventManager.o(this.localization,"locale-changed",function(){pz(c)});this.eventManager.o(this.g,"click",function(){qz(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
1134
+ trackLabelFormat:Hy,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.oe()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1135
+ function Iy(){var a,b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,A,z,C;return G(function(E){switch(E.g){case 1:ku();if(!pm())return Jy("shaka-ui-load-failed",Ky),E.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");if(!b.length&&!a.length){E.D(2);break}if(b.length&&!a.length){d=r(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,!f.ui){g=document.createElement("div");h=f.parentElement;
1136
+ h.replaceChild(g,f);g.appendChild(f);k=null;l=r(c);for(m=l.next();!m.done;m=l.next())if(p=m.value,p.parentElement==g){k=p;break}k||(k=document.createElement("canvas"),k.classList.add("shaka-canvas-container"),g.appendChild(k));Ly(g,f,k)}E.D(2);break}n=r(a);t=n.next();case 4:if(t.done){E.D(2);break}v=t.value;if(v.ui){E.D(5);break}y=null;w=r(b);for(e=w.next();!e.done;e=w.next())if(x=e.value,x.parentElement==v){y=x;break}y||(y=document.createElement("video"),y.setAttribute("playsinline",""),v.appendChild(y));
1137
+ A=null;z=r(c);for(m=z.next();!m.done;m=z.next())if(C=m.value,C.parentElement==v){A=C;break}A||(A=document.createElement("canvas"),A.classList.add("shaka-canvas-container"),v.appendChild(A));D(E,7);return u(E,Ly(v,y,A),9);case 9:ua(E,5);break;case 7:return va(E),Jy("shaka-ui-load-failed",My),E.return();case 5:t=n.next();E.D(4);break;case 2:Jy("shaka-ui-loaded"),B(E)}})}function Jy(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
1138
+ function Ly(a,b,c){var d,e,f,g,h,k,l,m,p;return G(function(n){switch(n.g){case 1:d=new S(b);e=new Fy(d,a,b);d.mf(c);f="";g=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(f=a.dataset.shakaPlayerCastReceiverId,g="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(f=b.dataset.shakaPlayerCastReceiverId,g="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);f.length&&e.configure({castReceiverAppId:f,castAndroidReceiverCompatible:g});
1139
+ b.controls&&e.g.Vf(!0);if(h=b.getAttribute("src"))k=document.createElement("source"),k.setAttribute("src",h),b.appendChild(k),b.removeAttribute("src");l=r(b.querySelectorAll("source"));m=l.next();case 2:if(m.done){n.D(0);break}p=m.value;D(n,5);return u(n,e.g.cc().load(p.getAttribute("src")),7);case 7:n.D(0);break;case 5:va(n);case 3:m=l.next(),n.D(2)}})}I("shaka.ui.Overlay",Fy);Fy.prototype.setEnabled=Fy.prototype.Ih;Fy.prototype.getControls=Fy.prototype.Dg;Fy.prototype.configure=Fy.prototype.configure;
1140
+ Fy.prototype.getConfiguration=Fy.prototype.getConfiguration;Fy.prototype.isMobile=Fy.prototype.oe;Fy.prototype.destroy=Fy.prototype.destroy;var Hy=0;Fy.TrackLabelFormat={LANGUAGE:Hy,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var Ky=0,My=1;Fy.FailReasonCode={NO_BROWSER_SUPPORT:Ky,PLAYER_FAILED_TO_LOAD:My};"complete"==document.readyState?G(function(a){if(1==a.g)return u(a,Promise.resolve(),2);Iy();B(a)}):window.addEventListener("load",Iy);function Ny(a,b,c,d,e,f,g){function h(z,C){return z+": "+C}function k(z){return"variant"==z.type?z.audioRoles?z.audioRoles.join(", "):void 0:z.roles.join(", ")}var l=a.find(function(z){return 1==z.active}),m=wx(b);al(b);b.appendChild(m);m=new Map;for(var p=r(a),n=p.next();!n.done;n=p.next())n=n.value,m.has(n.language)||m.set(n.language,new Set),m.get(n.language).add(k(n));m=new Set;l=l?h(l.language,k(l)):"";p={};a=r(a);for(n=a.next();!n.done;p={Ua:p.Ua},n=a.next()){p.Ua=n.value;n=p.Ua.language;var t=
1141
+ p.Ua.forced,v=f.resolve($b.gg),y=k(p.Ua),w=h(n,y);if(!m.has(w)){m.add(w);var x=$k();x.addEventListener("click",function(z){return function(){c(z.Ua)}}(p));var A=R("span");x.appendChild(A);A.textContent=Oy(n,f);switch(g){case Hy:t&&(A.textContent+=" ("+v+")");break;case 1:y?A.textContent=y:(Ta("Track #"+p.Ua.id+" does not have a role, but the UI is configured to only show role."),A.textContent="?");t&&(A.textContent+=" ("+v+")");break;case 2:y&&(A.textContent+=": "+y);t&&(A.textContent+=" ("+v+")");
1142
+ break;case 3:p.Ua.label?A.textContent=p.Ua.label:(Ta("Track #"+p.Ua.id+" does not have a label, but the UI is configured to only show labels."),A.textContent="?")}d&&w==l&&(x.appendChild(zx()),A.classList.add("shaka-chosen-item"),x.ariaSelected="true",e.textContent=A.textContent);b.appendChild(x)}}}
1143
+ function Oy(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Rb(a);return a in sx?sx[a].u:c in sx?sx[c].u+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function Py(a,b,c){X.call(this,a,b);var d=this;Qy(this,c);Ry(this);Sy(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new L("submenuopen")),Y(d.menu,!0),yx(d.menu)):Y(d.menu,!1)})}pa(Py,X);
1144
+ function Qy(a,b){a.button=$k();a.button.classList.add("shaka-overflow-button");a.icon=R("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=R("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=R("span");b.appendChild(a.nameSpan);a.currentSelection=R("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
1145
+ function Ry(a){a.menu=R("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=$k();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.fc()});var b=R("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1146
+ R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Sy(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}Y(a.parent,!0);ib(a.parent.childNodes,b)&&jb(a.parent.childNodes,b)[0].focus();Ux(a.controls)}))}I("shaka.ui.SettingsMenu",Py);function Ty(a,b){Py.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){Uy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Uy(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Qa().length;Y(c.button,d);Vy(c)});this.eventManager.o(this.player,"variantchanged",
1147
+ function(){Vy(c)});Uy(this);Vy(this)}pa(Ty,Py);function Vy(a){var b=a.player.Qa();Ny(b,a.menu,function(c){a.player.Md(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);yx(a.menu);a.controls.dispatchEvent(new L("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1148
+ function Uy(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}I("shaka.ui.AudioLanguageSelection",Ty);function Wy(){}Wy.prototype.create=function(a,b){return new Ty(a,b)};yy("language",new Wy);$x("language",new Wy);function Xy(a,b){X.call(this,a,b);var c=this;this.h=this.controls.C;this.g=$k();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=R("span");a.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");
1149
+ a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);Yy(this);Zy(this);this.eventManager.o(this.localization,"locale-updated",function(){Yy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Yy(c)});this.eventManager.o(this.g,"click",function(){$y(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Zy(c)})}pa(Xy,X);
1150
+ function $y(a){var b;G(function(c){if(1==c.g){if(a.h.na())return a.h.ag(),c.D(0);D(c,3);a.g.disabled=!0;return u(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,ua(c,0);b=va(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));B(c)})}function Zy(a){var b=a.h.qf()&&a.controls.Ya,c=a.h.na();Y(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");az(a)}
1151
+ function az(a){a.j.textContent=a.h.na()?a.h.Jd():a.localization.resolve("OFF")}function Yy(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");az(a)}I("shaka.ui.CastButton",Xy);function bz(){}bz.prototype.create=function(a,b){return new Xy(a,b)};yy("cast",new bz);$x("cast",new bz);function cz(a,b){X.call(this,a,b);var c=this;this.g=$k();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);dz(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){dz(c)});this.eventManager.o(this.localization,"locale-changed",function(){dz(c)});
1152
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.xb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.We(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(cz,X);function dz(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}I("shaka.ui.FastForwardButton",cz);function ez(){}ez.prototype.create=function(a,b){return new cz(a,b)};$x("fast_forward",new ez);function fz(a,b){X.call(this,a,b);var c=this;this.h=this.controls.B;this.g=$k();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");gz(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);hz(this);this.eventManager.o(this.localization,"locale-updated",function(){hz(c)});this.eventManager.o(this.localization,"locale-changed",function(){hz(c)});this.eventManager.o(this.g,"click",function(){return G(function(d){return u(d,
1153
+ c.controls.Ue(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.ic()?"fullscreen_exit":"fullscreen";hz(c)});this.eventManager.o(this.h,"loadedmetadata",function(){gz(c)});this.eventManager.o(this.h,"loadeddata",function(){gz(c)})}pa(fz,X);function gz(a){a.controls.wd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function hz(a){a.g.ariaLabel=a.localization.resolve(a.controls.ic()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
1154
+ I("shaka.ui.FullscreenButton",fz);function iz(){}iz.prototype.create=function(a,b){return new fz(a,b)};$x("fullscreen",new iz);function jz(a,b){X.call(this,a,b);var c=this;this.g=$k();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=R("span");this.l.classList.add("shaka-current-selection-span");
1155
+ a.appendChild(this.l);this.g.appendChild(a);kz(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){kz(c)});this.eventManager.o(this.localization,"locale-changed",function(){kz(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.ya();c.h.ea(1)});this.m=this.video.loop;this.h=new O(function(){c.m!=c.video.loop&&(kz(c),c.m=c.video.loop)});this.h.ea(1)}pa(jz,X);jz.prototype.release=function(){this.h.stop();this.h=null;X.prototype.release.call(this)};
1156
+ function kz(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}I("shaka.ui.LoopButton",jz);function lz(){}lz.prototype.create=function(a,b){return new jz(a,b)};yy("loop",new lz);$x("loop",new lz);Kx("loop",new lz);function mz(a,b){X.call(this,a,b);var c=this;this.g=$k();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);nz(this);oz(this);this.eventManager.o(this.localization,"locale-updated",function(){nz(c)});this.eventManager.o(this.localization,"locale-changed",function(){nz(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1157
+ this.eventManager.o(this.video,"volumechange",function(){nz(c);oz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){nz(c);oz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){nz(c);oz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;nz(c);oz(c)})}pa(mz,X);function nz(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1158
+ function oz(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}I("shaka.ui.MuteButton",mz);function pz(){}pz.prototype.create=function(a,b){return new mz(a,b)};$x("mute",new pz);function qz(a,b){X.call(this,a,b);var c=this;this.l=this.controls.B;this.g=$k();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
1159
+ R("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);rz(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||Y(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){rz(c)});this.eventManager.o(this.localization,"locale-changed",function(){rz(c)});this.eventManager.o(this.g,"click",function(){sz(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
1159
1160
  "branding_watermark";c.g.ariaLabel=c.localization.resolve("EXIT_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("ON")});this.eventManager.o(this.l,"leavepictureinpicture",function(){c.i.textContent="picture_in_picture_alt";c.g.ariaLabel=c.localization.resolve("ENTER_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("OFF")});this.eventManager.o(this.controls,"caststatuschanged",function(d){d.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&Y(c.g,!1):
1160
- document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&Y(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){rz(c)})}pa(oz,X);function qz(a){var b;G(function(c){if(1==c.g)return C(c,2),document.pictureInPictureElement?u(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),u(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return ua(c,0);b=va(c);a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));B(c)})}
1161
- function pz(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.ariaLabel=a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
1162
- function rz(a){G(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return Y(a.g,!1),b.D(0);if(!a.player||!a.player.hc())return Y(a.g,!0),b.D(0);Y(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.D(0)})}I("shaka.ui.PipButton",oz);function sz(){}sz.prototype.create=function(a,b){return new oz(a,b)};wy("picture_in_picture",new sz);Yx("picture_in_picture",new sz);Ix("picture_in_picture",new sz);function tz(a,b){Ny.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){uz(c)});this.eventManager.o(this.localization,"locale-changed",function(){uz(c)});this.eventManager.o(this.player,"ratechange",function(){vz(c,c.player.xb())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1163
- "x",d]}));uz(this);wz(this);vz(this,this.player.xb())}pa(tz,Ny);function uz(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1164
- function vz(a,b){var c=vx(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(xx()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1165
- "x")}function wz(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={xc:b.xc},d=c.next()){b.xc=d.value;d=Yk();var e=R("span");e.textContent=b.xc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.xc);a.video.defaultPlaybackRate=a.g.get(f.xc)}}(b));a.menu.appendChild(d)}wx(a.menu)}I("shaka.ui.PlaybackRateSelection",tz);function xz(){}xz.prototype.create=function(a,b){return new tz(a,b)};wy("playback_rate",new xz);Yx("playback_rate",new xz);function yz(a,b){X.call(this,a,b);var c=this;this.g=Yk();this.g.classList.add("shaka-current-time");zz(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.Ha().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.X,e=c.controls.Ef(),f=c.video.duration,g=c.player.Ha(),h=g.end-g.start;c.player.T()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(zz(c,"- "+yx(e,f)),c.g.disabled=
1166
- !1):(zz(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=yx(e,d),f&&(e+=" / "+yx(f,d)),zz(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}pa(yz,X);function zz(a,b){b!=a.g.textContent&&(a.g.textContent=b)}I("shaka.ui.PresentationTimeTracker",yz);function Az(){}Az.prototype.create=function(a,b){return new yz(a,b)};Yx("time_and_duration",new Az);function Bz(a,b){Ny.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){Cz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Cz(c)});this.eventManager.o(this.player,"variantchanged",function(){Dz(c)});this.eventManager.o(this.player,"trackschanged",function(){Dz(c)});this.eventManager.o(this.player,
1167
- "abrstatuschanged",function(){Dz(c)});Dz(this)}pa(Bz,Ny);
1168
- function Dz(a){var b=a.player.Oa(),c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return(a.player.hc()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.hc()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=ux(a.menu);Zk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;
1169
- for(var e={},f=r(b),g=f.next();!g.done;e={Yb:e.Yb},g=f.next()){e.Yb=g.value;g=Yk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Yb;a.player.configure({abr:{enabled:!1}});a.player.Ie(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=a.player.hc()?Math.round(e.Yb.bandwidth/1E3)+" kbits/s":e.Yb.height+"p";g.appendChild(h);d||e.Yb!=c||(g.ariaSelected="true",g.appendChild(xx()),h.classList.add("shaka-chosen-item"),
1170
- a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Yk();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});Dz(a)});a.g=R("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(xx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",
1171
- a.currentSelection.textContent);a.menu.appendChild(e);wx(a.menu);a.controls.dispatchEvent(new L("resolutionselectionupdated"));Cz(a)}
1172
- function Cz(a){var b=a.player.hc()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}I("shaka.ui.ResolutionSelection",Bz);function Ez(){}
1173
- Ez.prototype.create=function(a,b){return new Bz(a,b)};wy("quality",new Ez);Yx("quality",new Ez);function Fz(a,b){X.call(this,a,b);var c=this;this.g=Yk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);Gz(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){Gz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Gz(c)});
1174
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.xb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.We(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(Fz,X);function Gz(a){a.g.ariaLabel=a.localization.resolve("REWIND")}I("shaka.ui.RewindButton",Fz);function Hz(){}Hz.prototype.create=function(a,b){return new Fz(a,b)};Yx("rewind",new Hz);function Iz(a,b){X.call(this,a,b);var c=this;this.j=R("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=R("div");this.h.classList.add("shaka-skip-ad-counter");Y(this.h,!1);this.j.appendChild(this.h);this.g=Yk();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;Y(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);Jz(this);this.i=new O(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1175
- d:(c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){Jz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Jz(c)});this.eventManager.o(this.adManager,"ad-started",function(){Kz(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;Y(c.g,!1);Y(c.h,!1)});this.eventManager.o(this.g,
1176
- "click",function(){c.ad.skip()});this.ad&&Kz(this)}pa(Iz,X);Iz.prototype.release=function(){this.i.stop();this.i=null;X.prototype.release.call(this)};function Jz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function Kz(a){a.ad.isSkippable()&&(Y(a.g,!0),Y(a.h,!0),a.h.textContent="",a.i.ya(),a.i.ea(.5))}I("shaka.ui.SkipAdButton",Iz);function Lz(a,b){Cx.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}pa(Lz,Cx);Lz.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};Lz.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
1177
- I("shaka.ui.SmallPlayButton",Lz);function Mz(){}Mz.prototype.create=function(a,b){return new Lz(a,b)};Yx("play_pause",new Mz);function Nz(a,b){X.call(this,a,b);a=R("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}pa(Nz,X);I("shaka.ui.Spacer",Nz);function Oz(){}Oz.prototype.create=function(a,b){return new Nz(a,b)};Yx("spacer",new Oz);function Pz(a,b){function c(k){return yx(h.h[k],!1)+" (m)"}function d(k){return Math.round(h.h[k]/1E3)+" (kbits/s)"}function e(k){return h.h[k].toFixed(2)+" (s)"}function f(k){return h.h[k]+" (frames)"}function g(k){return h.h[k]+" (px)"}X.call(this,a,b);var h=this;this.i=Yk();this.i.classList.add("shaka-statistics-button");this.j=R("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=R("label");a.classList.add("shaka-overflow-button-label");
1161
+ document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&Y(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){tz(c)})}pa(qz,X);function sz(a){var b;G(function(c){if(1==c.g)return D(c,2),document.pictureInPictureElement?u(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),u(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return ua(c,0);b=va(c);a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));B(c)})}
1162
+ function rz(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.ariaLabel=a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
1163
+ function tz(a){G(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return Y(a.g,!1),b.D(0);if(!a.player||!a.player.hc())return Y(a.g,!0),b.D(0);Y(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.D(0)})}I("shaka.ui.PipButton",qz);function uz(){}uz.prototype.create=function(a,b){return new qz(a,b)};yy("picture_in_picture",new uz);$x("picture_in_picture",new uz);Kx("picture_in_picture",new uz);function vz(a,b){Py.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){wz(c)});this.eventManager.o(this.localization,"locale-changed",function(){wz(c)});this.eventManager.o(this.player,"ratechange",function(){xz(c,c.player.xb())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1164
+ "x",d]}));wz(this);yz(this);xz(this,this.player.xb())}pa(vz,Py);function wz(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1165
+ function xz(a,b){var c=xx(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(zx()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1166
+ "x")}function yz(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={xc:b.xc},d=c.next()){b.xc=d.value;d=$k();var e=R("span");e.textContent=b.xc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.xc);a.video.defaultPlaybackRate=a.g.get(f.xc)}}(b));a.menu.appendChild(d)}yx(a.menu)}I("shaka.ui.PlaybackRateSelection",vz);function zz(){}zz.prototype.create=function(a,b){return new vz(a,b)};yy("playback_rate",new zz);$x("playback_rate",new zz);function Az(a,b){X.call(this,a,b);var c=this;this.g=$k();this.g.classList.add("shaka-current-time");Bz(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.Ja().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.X,e=c.controls.Ef(),f=c.video.duration,g=c.player.Ja(),h=g.end-g.start;c.player.T()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(Bz(c,"- "+Ax(e,f)),c.g.disabled=
1167
+ !1):(Bz(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=Ax(e,d),f&&(e+=" / "+Ax(f,d)),Bz(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}pa(Az,X);function Bz(a,b){b!=a.g.textContent&&(a.g.textContent=b)}I("shaka.ui.PresentationTimeTracker",Az);function Cz(){}Cz.prototype.create=function(a,b){return new Az(a,b)};$x("time_and_duration",new Cz);function Dz(a,b){Py.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){Ez(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ez(c)});this.eventManager.o(this.player,"variantchanged",function(){Fz(c)});this.eventManager.o(this.player,"trackschanged",function(){Fz(c)});this.eventManager.o(this.player,
1168
+ "abrstatuschanged",function(){Fz(c)});Fz(this)}pa(Dz,Py);
1169
+ function Fz(a){var b=a.player.Qa(),c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return(a.player.hc()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.hc()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=wx(a.menu);al(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;
1170
+ for(var e={},f=r(b),g=f.next();!g.done;e={Yb:e.Yb},g=f.next()){e.Yb=g.value;g=$k();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Yb;a.player.configure({abr:{enabled:!1}});a.player.Ie(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=a.player.hc()?Math.round(e.Yb.bandwidth/1E3)+" kbits/s":e.Yb.height+"p";g.appendChild(h);d||e.Yb!=c||(g.ariaSelected="true",g.appendChild(zx()),h.classList.add("shaka-chosen-item"),
1171
+ a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=$k();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});Fz(a)});a.g=R("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(zx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",
1172
+ a.currentSelection.textContent);a.menu.appendChild(e);yx(a.menu);a.controls.dispatchEvent(new L("resolutionselectionupdated"));Ez(a)}
1173
+ function Ez(a){var b=a.player.hc()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}I("shaka.ui.ResolutionSelection",Dz);function Gz(){}
1174
+ Gz.prototype.create=function(a,b){return new Dz(a,b)};yy("quality",new Gz);$x("quality",new Gz);function Hz(a,b){X.call(this,a,b);var c=this;this.g=$k();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);Iz(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){Iz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Iz(c)});
1175
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.xb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.We(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(Hz,X);function Iz(a){a.g.ariaLabel=a.localization.resolve("REWIND")}I("shaka.ui.RewindButton",Hz);function Jz(){}Jz.prototype.create=function(a,b){return new Hz(a,b)};$x("rewind",new Jz);function Kz(a,b){X.call(this,a,b);var c=this;this.j=R("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=R("div");this.h.classList.add("shaka-skip-ad-counter");Y(this.h,!1);this.j.appendChild(this.h);this.g=$k();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;Y(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);Lz(this);this.i=new O(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1176
+ d:(c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){Lz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Lz(c)});this.eventManager.o(this.adManager,"ad-started",function(){Mz(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;Y(c.g,!1);Y(c.h,!1)});this.eventManager.o(this.g,
1177
+ "click",function(){c.ad.skip()});this.ad&&Mz(this)}pa(Kz,X);Kz.prototype.release=function(){this.i.stop();this.i=null;X.prototype.release.call(this)};function Lz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function Mz(a){a.ad.isSkippable()&&(Y(a.g,!0),Y(a.h,!0),a.h.textContent="",a.i.ya(),a.i.ea(.5))}I("shaka.ui.SkipAdButton",Kz);function Nz(a,b){Ex.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}pa(Nz,Ex);Nz.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};Nz.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
1178
+ I("shaka.ui.SmallPlayButton",Nz);function Oz(){}Oz.prototype.create=function(a,b){return new Nz(a,b)};$x("play_pause",new Oz);function Pz(a,b){X.call(this,a,b);a=R("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}pa(Pz,X);I("shaka.ui.Spacer",Pz);function Qz(){}Qz.prototype.create=function(a,b){return new Pz(a,b)};$x("spacer",new Qz);function Rz(a,b){function c(k){return Ax(h.h[k],!1)+" (m)"}function d(k){return Math.round(h.h[k]/1E3)+" (kbits/s)"}function e(k){return h.h[k].toFixed(2)+" (s)"}function f(k){return h.h[k]+" (frames)"}function g(k){return h.h[k]+" (px)"}X.call(this,a,b);var h=this;this.i=$k();this.i.classList.add("shaka-statistics-button");this.j=R("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=R("label");a.classList.add("shaka-overflow-button-label");
1178
1179
  this.s=R("span");a.appendChild(this.s);this.m=R("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.i.appendChild(a);this.parent.appendChild(this.i);this.g=R("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-statistics-container");this.g.classList.add("shaka-hidden");this.controls.g.appendChild(this.g);this.F=[];this.G=["stateHistory","switchHistory"];this.h=this.player.getStats();
1179
1180
  this.B={};this.C={width:g,height:g,completionPercent:function(k){return h.h[k]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f,stallsDetected:function(k){return h.h[k]+" (stalls)"},gapsJumped:function(k){return h.h[k]+" (gaps)"}};this.l=new O(function(){h.h=h.player.getStats();for(var k=r(h.F),l=k.next();!l.done;l=
1180
- k.next())l=l.value,h.B[l].textContent=h.C[l](l)});Qz(this);Rz(this);this.eventManager.o(this.localization,"locale-updated",function(){Qz(h)});this.eventManager.o(this.localization,"locale-changed",function(){Qz(h)});this.eventManager.o(this.i,"click",function(){Y(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ea(.1),Y(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),Y(h.g,!1));Qz(h)})}pa(Pz,X);
1181
- function Qz(a){a.s.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1182
- function Rz(a){for(var b=r(a.controls.i.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=R("div"),h=R("label");h.textContent=c+":";g.appendChild(h);h=R("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Ta("Unrecognized statistic element:",c)}Pz.prototype.release=function(){this.l.stop();this.l=null;X.prototype.release.call(this)};I("shaka.ui.StatisticsButton",Pz);function Sz(){}
1183
- Sz.prototype.create=function(a,b){return new Pz(a,b)};wy("statistics",new Sz);Ix("statistics",new Sz);function Tz(a,b){Ny.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Nb()?this.button.ariaPressed="true":this.button.ariaPressed="false";Uz(this);this.eventManager.o(this.localization,"locale-updated",function(){Vz(c);Wz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Vz(c);Wz(c)});this.eventManager.o(this.player,
1184
- "texttrackvisibility",function(){Xz(c);Wz(c)});this.eventManager.o(this.player,"textchanged",function(){Wz(c)});this.eventManager.o(this.player,"trackschanged",function(){Yz(c)});Xz(this);Vz(this);Wz(this);Yz(this)}pa(Tz,Ny);function Uz(a){var b=Yk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(xx());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1185
- function Xz(a){a.player.Nb()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new L("captionselectionupdated"))}
1186
- function Wz(a){var b=a.player.yb();Ly(b,a.menu,function(c){return Zz(a,c)},a.player.Nb(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=Yk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Qe(!1);Wz(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Nb()||(b.ariaSelected="true",b.appendChild(xx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1187
- a.currentSelection.textContent);wx(a.menu);a.controls.dispatchEvent(new L("captionselectionupdated"))}function Zz(a,b){return G(function(c){a.player.He(b);return u(c,a.player.Qe(!0),0)})}function Vz(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
1188
- function Yz(a){var b=0<a.player.yb().length;Y(a.button,b);Wz(a)}I("shaka.ui.TextSelection",Tz);function $z(){}$z.prototype.create=function(a,b){return new Tz(a,b)};wy("captions",new $z);Yx("captions",new $z);function aA(a,b){Kx.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return bA(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return cA(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return cA(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return bA(c)});this.eventManager.o(this.localization,"locale-updated",function(){return dA(c)});
1189
- this.eventManager.o(this.localization,"locale-changed",function(){return dA(c)});bA(this);dA(this);if(this.ad)this.onChange()}pa(aA,Kx);aA.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function bA(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);eA(a)}function cA(a){var b=a.ad.getVolume();a.setValue(b);eA(a)}
1190
- function eA(a){var b=a.h.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function dA(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}I("shaka.ui.VolumeBar",aA);function fA(){}fA.prototype.create=function(a,b){return new aA(a,b)};Yx("volume",new fA);}).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})();
1181
+ k.next())l=l.value,h.B[l].textContent=h.C[l](l)});Sz(this);Tz(this);this.eventManager.o(this.localization,"locale-updated",function(){Sz(h)});this.eventManager.o(this.localization,"locale-changed",function(){Sz(h)});this.eventManager.o(this.i,"click",function(){Y(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ea(.1),Y(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),Y(h.g,!1));Sz(h)})}pa(Rz,X);
1182
+ function Sz(a){a.s.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1183
+ function Tz(a){for(var b=r(a.controls.i.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=R("div"),h=R("label");h.textContent=c+":";g.appendChild(h);h=R("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Ta("Unrecognized statistic element:",c)}Rz.prototype.release=function(){this.l.stop();this.l=null;X.prototype.release.call(this)};I("shaka.ui.StatisticsButton",Rz);function Uz(){}
1184
+ Uz.prototype.create=function(a,b){return new Rz(a,b)};yy("statistics",new Uz);Kx("statistics",new Uz);function Vz(a,b){Py.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Nb()?this.button.ariaPressed="true":this.button.ariaPressed="false";Wz(this);this.eventManager.o(this.localization,"locale-updated",function(){Xz(c);Yz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Xz(c);Yz(c)});this.eventManager.o(this.player,
1185
+ "texttrackvisibility",function(){Zz(c);Yz(c)});this.eventManager.o(this.player,"textchanged",function(){Yz(c)});this.eventManager.o(this.player,"trackschanged",function(){$z(c)});Zz(this);Xz(this);Yz(this);$z(this)}pa(Vz,Py);function Wz(a){var b=$k();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(zx());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1186
+ function Zz(a){a.player.Nb()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new L("captionselectionupdated"))}
1187
+ function Yz(a){var b=a.player.yb();Ny(b,a.menu,function(c){return aA(a,c)},a.player.Nb(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=$k();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Qe(!1);Yz(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Nb()||(b.ariaSelected="true",b.appendChild(zx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1188
+ a.currentSelection.textContent);yx(a.menu);a.controls.dispatchEvent(new L("captionselectionupdated"))}function aA(a,b){return G(function(c){a.player.He(b);return u(c,a.player.Qe(!0),0)})}function Xz(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
1189
+ function $z(a){var b=0<a.player.yb().length;Y(a.button,b);Yz(a)}I("shaka.ui.TextSelection",Vz);function bA(){}bA.prototype.create=function(a,b){return new Vz(a,b)};yy("captions",new bA);$x("captions",new bA);function cA(a,b){Mx.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return dA(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return eA(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return eA(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return dA(c)});this.eventManager.o(this.localization,"locale-updated",function(){return fA(c)});
1190
+ this.eventManager.o(this.localization,"locale-changed",function(){return fA(c)});dA(this);fA(this);if(this.ad)this.onChange()}pa(cA,Mx);cA.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function dA(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);gA(a)}function eA(a){var b=a.ad.getVolume();a.setValue(b);gA(a)}
1191
+ function gA(a){var b=a.h.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function fA(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}I("shaka.ui.VolumeBar",cA);function hA(){}hA.prototype.create=function(a,b){return new cA(a,b)};$x("volume",new hA);}).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})();
1191
1192
 
1192
1193
  //# sourceMappingURL=shaka-player.ui.map