shaka-player 4.9.28 → 4.9.30

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.
@@ -9,14 +9,14 @@
9
9
  Copyright The Closure Library Authors.
10
10
  SPDX-License-Identifier: Apache-2.0
11
11
  */
12
- 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};
12
+ var r;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};
13
13
  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 fa=da(this);function ha(a,b){if(b)a:{var c=fa;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}}
14
14
  ha("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;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});
15
15
  ha("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=fa[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(aa(this))}})}return a});function ia(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
16
  function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function x(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
17
17
  if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var na;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;na=pa.a;break a}catch(a){}na=!1}ka=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=ka;
18
18
  function ra(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(qa)qa(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.Tj=b.prototype}function sa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function ta(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}sa.prototype.s=function(a){this.h=a};
19
- function va(a,b){a.i={fg:b,qg:!0};a.g=a.m||a.j}sa.prototype.return=function(a){this.i={return:a};this.g=this.j};function E(a,b,c){a.g=c;return{value:b}}sa.prototype.u=function(a){this.g=a};function H(a){a.g=0}function wa(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function xa(a,b){a.m=0;a.j=b||0}function ya(a,b,c){a.g=b;a.m=c||0}function Aa(a,b){a.m=b||0;b=a.i.fg;a.i=null;return b}function Ba(a){a.A=[a.i];a.m=0;a.j=0}
19
+ function va(a,b){a.i={fg:b,qg:!0};a.g=a.m||a.j}sa.prototype.return=function(a){this.i={return:a};this.g=this.j};function E(a,b,c){a.g=c;return{value:b}}sa.prototype.u=function(a){this.g=a};function H(a){a.g=0}function wa(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function xa(a,b){a.m=0;a.j=b||0}function ya(a,b,c){a.g=b;a.m=c||0}function za(a,b){a.m=b||0;b=a.i.fg;a.i=null;return b}function Ba(a){a.A=[a.i];a.m=0;a.j=0}
20
20
  function Ca(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.qg?a.g=a.m||a.j:void 0!=c.u&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function Da(a){this.g=new sa;this.h=a}function Ea(a,b){ta(a.g);var c=a.g.l;if(c)return Fa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ga(a)}
21
21
  function Fa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,va(a.g,g),Ga(a)}a.g.l=null;d.call(a.g,f);return Ga(a)}function Ga(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,va(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.qg)throw b.fg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
22
22
  function Ha(a){this.next=function(b){ta(a.g);a.g.l?b=Fa(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ga(a));return b};this.throw=function(b){ta(a.g);a.g.l?b=Fa(a,a.g.l["throw"],b,a.g.s):(va(a.g,b),b=Ga(a));return b};this.return=function(b){return Ea(a,b)};this[Symbol.iterator]=function(){return this}}function Ia(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())})}
@@ -25,16 +25,16 @@ ha("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!
25
25
  g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.H(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.C(g):this.m(g)}};
26
26
  b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=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.G();this.A()};b.prototype.G=function(){var g=this;e(function(){if(g.B()){var h=fa.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
27
27
  function(){if(this.o)return!1;var g=fa.CustomEvent,h=fa.Event,k=fa.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=fa.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.A=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;
28
- b.prototype.H=function(g){var h=this.j();g.rd(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,r){return"function"==typeof p?function(u){try{l(p(u))}catch(v){m(v)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});this.rd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.rd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
29
- break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).rd(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){p[u]=v;r--;0==r&&l(p)}}var p=[],r=0;do p.push(void 0),r++,d(k.value).rd(n(p.length-1),m),k=h.next();
28
+ b.prototype.H=function(g){var h=this.j();g.sd(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,q){return"function"==typeof p?function(u){try{l(p(u))}catch(v){m(v)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.sd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.sd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
29
+ break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).sd(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){p[u]=v;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).sd(n(p.length-1),m),k=h.next();
30
30
  while(!k.done)})};return b});function Ka(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
31
31
  ha("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ka(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
32
32
  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(!Ka(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ka(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ka(k,
33
33
  g)&&Ka(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ka(k,g)&&Ka(k[g],this.g)?delete k[g][this.g]:!1};return b});
34
- ha("Map",function(a){function b(){var h={};return h.Eb=h.next=h.head=h}function c(h,k){var l=h[1];return ia(function(){if(l){for(;l.head!=h[1];)l=l.Eb;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[0][l];if(m&&Ka(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
34
+ ha("Map",function(a){function b(){var h={};return h.Fb=h.next=h.head=h}function c(h,k){var l=h[1];return ia(function(){if(l){for(;l.head!=h[1];)l=l.Fb;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[0][l];if(m&&Ka(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
35
35
  list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[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!=
36
- m.value[0].x||"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[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],Eb:this[1].Eb,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].Eb.next=l.entry,this[1].Eb=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.Eb.next=
37
- h.entry.next,h.entry.next.Eb=h.entry.Eb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].Eb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
36
+ m.value[0].x||"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[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],Fb:this[1].Fb,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].Fb.next=l.entry,this[1].Fb=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.Fb.next=
37
+ h.entry.next,h.entry.next.Fb=h.entry.Fb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].Fb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
38
38
  function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
39
39
  ha("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([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||
40
40
  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]=
@@ -56,17 +56,17 @@ ha("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ka(
56
56
  Copyright 2016 Google LLC
57
57
  SPDX-License-Identifier: Apache-2.0
58
58
  */
59
- function Ta(){}function Ua(){};function Va(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Va.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Wa(a){return a.h/(1-Math.pow(a.g,a.i))};function Xa(){this.h=new Va(2);this.j=new Va(5);this.g=0;this.i=128E3;this.l=16E3}Xa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Xa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Xa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Wa(this.h),Wa(this.j))};function Ya(){}function Za(){}function $a(){}function ab(a){var b=Ja.apply(1,arguments);cb.has(a)||(cb.add(a),$a.apply(Ya,x(b)))}function db(){}function eb(){}function fb(){}var cb=new Set;window.console&&($a=function(){return console.warn.apply(console,x(Ja.apply(0,arguments)))},Za=function(){console.error.apply(console,x(Ja.apply(0,arguments)))});function gb(){this.g={}}q=gb.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 hb(){this.g=new gb}q=hb.prototype;q.release=function(){this.nb();this.g=null};q.D=function(a,b,c,d){this.g&&(a=new ib(a,b,c,d),this.g.push(b,a))};q.sa=function(a,b,c,d){function e(g){f.Hb(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};q.Hb=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Hb(),this.g.remove(b,e))}};
60
- q.nb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Hb();this.g.g={}}};S("shaka.util.EventManager",hb);hb.prototype.removeAll=hb.prototype.nb;hb.prototype.unlisten=hb.prototype.Hb;hb.prototype.listenOnce=hb.prototype.sa;hb.prototype.listen=hb.prototype.D;hb.prototype.release=hb.prototype.release;function ib(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=jb(a,d);this.target.addEventListener(b,c,this.g)}
61
- ib.prototype.Hb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function jb(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 lb(a)?b:b.capture||!1}
59
+ function Ta(){}function Ua(){};function Va(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Va.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Wa(a){return a.h/(1-Math.pow(a.g,a.i))};function Xa(){this.h=new Va(2);this.j=new Va(5);this.g=0;this.i=128E3;this.l=16E3}Xa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Xa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Xa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Wa(this.h),Wa(this.j))};function Ya(){}function Za(){}function $a(){}function ab(a){var b=Ja.apply(1,arguments);cb.has(a)||(cb.add(a),$a.apply(Ya,x(b)))}function db(){}function eb(){}function fb(){}var cb=new Set;window.console&&($a=function(){return console.warn.apply(console,x(Ja.apply(0,arguments)))},Za=function(){console.error.apply(console,x(Ja.apply(0,arguments)))});function gb(){this.g={}}r=gb.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.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])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function hb(){this.g=new gb}r=hb.prototype;r.release=function(){this.nb();this.g=null};r.D=function(a,b,c,d){this.g&&(a=new ib(a,b,c,d),this.g.push(b,a))};r.za=function(a,b,c,d){function e(g){f.Ib(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};r.Ib=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ib(),this.g.remove(b,e))}};
60
+ r.nb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Ib();this.g.g={}}};S("shaka.util.EventManager",hb);hb.prototype.removeAll=hb.prototype.nb;hb.prototype.unlisten=hb.prototype.Ib;hb.prototype.listenOnce=hb.prototype.za;hb.prototype.listen=hb.prototype.D;hb.prototype.release=hb.prototype.release;function ib(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=jb(a,d);this.target.addEventListener(b,c,this.g)}
61
+ ib.prototype.Ib=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function jb(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 lb(a)?b:b.capture||!1}
62
62
  function lb(a){var b=mb;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}mb=b}return b||!1}var mb=void 0;function nb(a){if(ob.has(a))return ob.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);ob.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),ob.set(a,b),b):!1}function pb(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}var ob=new Map;function qb(a,b){this.g=a;this.h=b}qb.prototype.toString=function(){return"v"+this.g+"."+this.h};function rb(a,b){var c=new qb(5,0),d=sb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function tb(a,b,c,d){$a([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function ub(a,b,c,d){Za([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var sb=null;function vb(){}vb.prototype.extract=function(){};vb.prototype.decode=function(){return[]};vb.prototype.clear=function(){};vb.prototype.getStreams=function(){return[]};function wb(){}wb.prototype.init=function(){};wb.prototype.parse=function(){return[]};function xb(){}function yb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Ab(a)==Ab(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Bb(a);b=Bb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Ab(a){return a instanceof ArrayBuffer?a:a.buffer}function Cb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
63
63
  function Bb(a,b,c){c=void 0===c?Infinity:c;return Db(a,void 0===b?0:b,c,Uint8Array)}function Eb(a,b,c){c=void 0===c?Infinity:c;return Db(a,void 0===b?0:b,c,Uint16Array)}function Fb(a,b,c){c=void 0===c?Infinity:c;return Db(a,void 0===b?0:b,c,DataView)}function Db(a,b,c,d){var e=Ab(a),f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}
64
64
  S("shaka.util.BufferUtils",xb);xb.toDataView=Fb;xb.toUint16=Eb;xb.toUint8=Bb;xb.toArrayBuffer=Cb;xb.equal=yb;function Gb(){}Gb.prototype.init=function(){};Gb.prototype.i=function(){};Gb.prototype.g=function(){};Gb.prototype.j=function(){};S("shaka.media.IClosedCaptionParser",Gb);function Hb(a){this.l=new wb;if(a=Ib[a.toLowerCase()])this.l=a();this.h=new vb;if(a=Jb)this.h=a()}Hb.prototype.init=function(a,b){(void 0===b?0:b)||this.g();this.l.init(a)};Hb.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Bb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
65
65
  Hb.prototype.g=function(){this.h.clear()};Hb.prototype.j=function(){return this.h.getStreams()};S("shaka.media.ClosedCaptionParser",Hb);Hb.findDecoder=function(){return Jb};Hb.unregisterDecoder=function(){Jb=null};Hb.registerDecoder=function(a){Jb=a};Hb.findParser=function(a){return Ib[a]};Hb.unregisterParser=function(a){delete Ib[a]};Hb.registerParser=function(a,b){Ib[a]=b};var Ib={},Jb=null;function Kb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Lb;this.scroll=Mb}S("shaka.text.CueRegion",Kb);var Lb=1;Kb.units={PX:0,PERCENTAGE:Lb,LINES:2};var Mb="";Kb.scrollMode={NONE:Mb,UP:"up"};function Nb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Ob(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Pb(a,b,c){c||(c=Nb);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={rg:void 0},d=a.next()){e.rg=d.value;d=b.findIndex(function(f){return function(g){return c(f.rg,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length}
66
- function Qb(a,b,c){c||(c=Nb);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 Rb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Kb;this.position=null;this.positionAlign=Sb;this.size=0;this.textAlign=Tb;this.direction=Ub;this.writingMode=Wb;this.lineInterpretation=Xb;this.line=null;this.lineHeight="";this.lineAlign=Yb;this.displayAlign=Zb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=$b;this.fontStyle=ac;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
66
+ function Qb(a,b,c){c||(c=Nb);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 Rb(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Kb;this.position=null;this.positionAlign=Sb;this.size=0;this.textAlign=Tb;this.direction=Ub;this.writingMode=Vb;this.lineInterpretation=Xb;this.line=null;this.lineHeight="";this.lineAlign=Yb;this.displayAlign=Zb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=$b;this.fontStyle=ac;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
67
67
  "";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={Tb:32,rows:15}}function bc(a,b){a=new Rb(a,b,"");a.lineBreak=!0;return a}Rb.prototype.clone=function(){var a=new Rb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
68
68
  function cc(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(!Qb(a.nestedCues,b.nestedCues,cc))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(!Qb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}S("shaka.text.Cue",Rb);Rb.equal=cc;Rb.prototype.clone=Rb.prototype.clone;var Sb="auto";
69
- Rb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Sb};var Tb="center",dc={LEFT:"left",RIGHT:"right",CENTER:Tb,START:"start",END:"end"};Rb.textAlign=dc;var Zb="after",ec={BEFORE:"before",CENTER:"center",AFTER:Zb};Rb.displayAlign=ec;var Ub="ltr";Rb.direction={HORIZONTAL_LEFT_TO_RIGHT:Ub,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Wb="horizontal-tb";Rb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Wb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Xb=0;
69
+ Rb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Sb};var Tb="center",dc={LEFT:"left",RIGHT:"right",CENTER:Tb,START:"start",END:"end"};Rb.textAlign=dc;var Zb="after",ec={BEFORE:"before",CENTER:"center",AFTER:Zb};Rb.displayAlign=ec;var Ub="ltr";Rb.direction={HORIZONTAL_LEFT_TO_RIGHT:Ub,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Vb="horizontal-tb";Rb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Vb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Xb=0;
70
70
  Rb.lineInterpretation={LINE_NUMBER:Xb,PERCENTAGE:1};var Yb="start",fc={CENTER:"center",START:Yb,END:"end"};Rb.lineAlign=fc;var gc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Rb.defaultTextColor=gc;var hc={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Rb.defaultTextBackgroundColor=hc;var $b=400;Rb.fontWeight={NORMAL:$b,BOLD:700};
71
71
  var ac="normal",ic={NORMAL:ac,ITALIC:"italic",OBLIQUE:"oblique"};Rb.fontStyle=ic;Rb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function jc(){}jc.prototype.destroy=function(){};function kc(a,b,c){lc[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,be:b}}function mc(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([nc,oc,pc,qc]),e=d.next();!e.done;e=d.next())if(e=lc[c+"-"+e.value]){var f=e.be(),g=f.isSupported(a,b);f.destroy();if(g)return e.be}return null}S("shaka.transmuxer.TransmuxerEngine",jc);jc.findTransmuxer=mc;jc.unregisterTransmuxer=function(a,b){delete lc[a.toLowerCase().split(";")[0]+"-"+b]};
72
72
  jc.registerTransmuxer=kc;jc.prototype.destroy=jc.prototype.destroy;var lc={},qc=1,pc=2,oc=3,nc=4;jc.PluginPriority={FALLBACK:qc,PREFERRED_SECONDARY:pc,PREFERRED:oc,APPLICATION:nc};/*
@@ -79,14 +79,14 @@ var rc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
79
79
  Copyright 2006 The Closure Library Authors
80
80
  SPDX-License-Identifier: Apache-2.0
81
81
  */
82
- function sc(a){var b;a instanceof sc?(tc(this,a.wb),this.nc=a.nc,uc(this,a.yb),vc(this,a.Ec),this.Na=a.Na,wc(this,a.g.clone()),this.Vb=a.Vb):a&&(b=String(a).match(rc))?(tc(this,b[1]||"",!0),this.nc=xc(b[2]||""),uc(this,b[3]||"",!0),vc(this,b[4]),this.Na=xc(b[5]||"",!0),wc(this,b[6]||"",!0),this.Vb=xc(b[7]||"")):this.g=new yc(null)}q=sc.prototype;q.wb="";q.nc="";q.yb="";q.Ec=null;q.Na="";q.Vb="";
83
- q.toString=function(){var a=[],b=this.wb;b&&a.push(zc(b,Ac,!0),":");if(b=this.yb){a.push("//");var c=this.nc;c&&a.push(zc(c,Ac,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ec;null!=b&&a.push(":",String(b))}if(b=this.Na)this.yb&&"/"!=b.charAt(0)&&a.push("/"),a.push(zc(b,"/"==b.charAt(0)?Bc:Cc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Vb)&&a.push("#",zc(b,Dc));return a.join("")};
84
- q.resolve=function(a){var b=this.clone();"data"===b.wb&&(b=new sc);var c=!!a.wb;c?tc(b,a.wb):c=!!a.nc;c?b.nc=a.nc:c=!!a.yb;c?uc(b,a.yb):c=null!=a.Ec;var d=a.Na;if(c)vc(b,a.Ec);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.yb&&!this.Na)d="/"+d;else{var e=b.Na.lastIndexOf("/");-1!=e&&(d=b.Na.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(""):".."==
85
- 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.Na=d:c=""!==a.g.toString();c?wc(b,a.g.clone()):c=!!a.Vb;c&&(b.Vb=a.Vb);return b};q.clone=function(){return new sc(this)};function tc(a,b,c){a.wb=c?xc(b,!0):b;a.wb&&(a.wb=a.wb.replace(/:$/,""))}function uc(a,b,c){a.yb=c?xc(b,!0):b}function vc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ec=b}else a.Ec=null}
82
+ function sc(a){var b;a instanceof sc?(tc(this,a.xb),this.nc=a.nc,uc(this,a.zb),vc(this,a.Ec),this.Na=a.Na,wc(this,a.g.clone()),this.Vb=a.Vb):a&&(b=String(a).match(rc))?(tc(this,b[1]||"",!0),this.nc=xc(b[2]||""),uc(this,b[3]||"",!0),vc(this,b[4]),this.Na=xc(b[5]||"",!0),wc(this,b[6]||"",!0),this.Vb=xc(b[7]||"")):this.g=new yc(null)}r=sc.prototype;r.xb="";r.nc="";r.zb="";r.Ec=null;r.Na="";r.Vb="";
83
+ r.toString=function(){var a=[],b=this.xb;b&&a.push(zc(b,Ac,!0),":");if(b=this.zb){a.push("//");var c=this.nc;c&&a.push(zc(c,Ac,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ec;null!=b&&a.push(":",String(b))}if(b=this.Na)this.zb&&"/"!=b.charAt(0)&&a.push("/"),a.push(zc(b,"/"==b.charAt(0)?Bc:Cc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Vb)&&a.push("#",zc(b,Dc));return a.join("")};
84
+ r.resolve=function(a){var b=this.clone();"data"===b.xb&&(b=new sc);var c=!!a.xb;c?tc(b,a.xb):c=!!a.nc;c?b.nc=a.nc:c=!!a.zb;c?uc(b,a.zb):c=null!=a.Ec;var d=a.Na;if(c)vc(b,a.Ec);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.zb&&!this.Na)d="/"+d;else{var e=b.Na.lastIndexOf("/");-1!=e&&(d=b.Na.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(""):".."==
85
+ 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.Na=d:c=""!==a.g.toString();c?wc(b,a.g.clone()):c=!!a.Vb;c&&(b.Vb=a.Vb);return b};r.clone=function(){return new sc(this)};function tc(a,b,c){a.xb=c?xc(b,!0):b;a.xb&&(a.xb=a.xb.replace(/:$/,""))}function uc(a,b,c){a.zb=c?xc(b,!0):b}function vc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ec=b}else a.Ec=null}
86
86
  function wc(a,b,c){b instanceof yc?a.g=b:(c||(b=zc(b,Ec)),a.g=new yc(b))}function xc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function zc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Fc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Fc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ac=/[#\/\?@]/g,Cc=/[#\?:]/g,Bc=/[#\?]/g,Ec=/[#\?@]/g,Dc=/#/g;function yc(a){this.g=a||null}
87
- function Gc(a){if(!a.Ha&&(a.Ha={},a.Oc=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=yc.prototype;q.Ha=null;q.Oc=null;function Hc(a){Gc(a);return a.Oc}q.add=function(a,b){Gc(this);this.g=null;var c=this.Ha.hasOwnProperty(a)?this.Ha[a]:null;c||(this.Ha[a]=c=[]);c.push(b);this.Oc++;return this};
88
- q.set=function(a,b){Gc(this);this.g=null;this.Ha.hasOwnProperty(a)?this.Ha[a]=[b]:this.add(a,b);return this};q.get=function(a){Gc(this);return this.Ha[a]||[]};q.toString=function(){if(this.g)return this.g;if(!this.Ha)return"";var a=[],b;for(b in this.Ha)for(var c=encodeURIComponent(b),d=this.Ha[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
89
- q.clone=function(){var a=new yc;a.g=this.g;if(this.Ha){var b={},c;for(c in this.Ha)b[c]=this.Ha[c].concat();a.Ha=b;a.Oc=this.Oc}return a};function T(a,b,c){var d=Ja.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Ic)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}T.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};S("shaka.util.Error",T);var Ic=!0;T.Severity={RECOVERABLE:1,CRITICAL:2};T.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
87
+ function Gc(a){if(!a.Ha&&(a.Ha={},a.Oc=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," ")))}}r=yc.prototype;r.Ha=null;r.Oc=null;function Hc(a){Gc(a);return a.Oc}r.add=function(a,b){Gc(this);this.g=null;var c=this.Ha.hasOwnProperty(a)?this.Ha[a]:null;c||(this.Ha[a]=c=[]);c.push(b);this.Oc++;return this};
88
+ r.set=function(a,b){Gc(this);this.g=null;this.Ha.hasOwnProperty(a)?this.Ha[a]=[b]:this.add(a,b);return this};r.get=function(a){Gc(this);return this.Ha[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.Ha)return"";var a=[],b;for(b in this.Ha)for(var c=encodeURIComponent(b),d=this.Ha[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
89
+ r.clone=function(){var a=new yc;a.g=this.g;if(this.Ha){var b={},c;for(c in this.Ha)b[c]=this.Ha[c].concat();a.Ha=b;a.Oc=this.Oc}return a};function T(a,b,c){var d=Ja.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Ic)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}T.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};S("shaka.util.Error",T);var Ic=!0;T.Severity={RECOVERABLE:1,CRITICAL:2};T.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
90
90
  T.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
91
91
  CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,
92
92
  WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,
@@ -98,35 +98,35 @@ CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:90
98
98
  CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};function Jc(a){this.h=a;this.g=void 0}Jc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Kc(a,b){return a.length&&b.length&&a!==b?0<Lc(a,b).length:!0}
99
99
  function Lc(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
100
100
  f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
101
- function Mc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Nc=new Jc(function(){return Cb(new Uint8Array([0]))}),Oc=new Map;function Qc(a){this.h=a;this.g=null}Qc.prototype.X=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Qc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Sc(a){this.h=a;this.g=null}Sc.prototype.lc=function(){this.stop();this.h();return this};Sc.prototype.X=function(a){var b=this;this.stop();this.g=(new Qc(function(){b.h()})).X(a);return this};Sc.prototype.Va=function(a){var b=this;this.stop();this.g=(new Qc(function(){b.g.X(a);b.h()})).X(a);return this};Sc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Sc);Sc.prototype.stop=Sc.prototype.stop;Sc.prototype.tickEvery=Sc.prototype.Va;
102
- Sc.prototype.tickAfter=Sc.prototype.X;Sc.prototype.tickNow=Sc.prototype.lc;function Tc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Uc(a){return""!=Vc().canPlayType(a)}function Wc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Xc(){return Yc("Xbox One")}function Zc(){return Yc("Tizen")}function $c(){return Yc("Tizen 3")}function ad(){return Yc("Tizen 2")}function bd(){return Yc("Web0S")}function cd(){return bd()&&38===dd()}function ed(){return Yc("CrKey")}
103
- function dd(){if(!Yc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function fd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Zc()&&!Yc("PC=EOS")&&!Yc("PC=APL")&&!Yc("VirginMedia")&&!gd()&&!hd()&&!Yc("AFT")&&!Yc("WPE")&&!Yc("DT_STB_BCM")}function id(){return Yc("PlayStation 5")}function hd(){return Yc("PlayStation 4")}function jd(){return Yc("Hisense")||Yc("VIDAA")}
101
+ function Mc(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Nc=new Jc(function(){return Cb(new Uint8Array([0]))}),Oc=new Map;function Qc(a){this.h=a;this.g=null}Qc.prototype.Y=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Qc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Sc(a){this.h=a;this.g=null}Sc.prototype.lc=function(){this.stop();this.h();return this};Sc.prototype.Y=function(a){var b=this;this.stop();this.g=(new Qc(function(){b.h()})).Y(a);return this};Sc.prototype.Va=function(a){var b=this;this.stop();this.g=(new Qc(function(){b.g.Y(a);b.h()})).Y(a);return this};Sc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",Sc);Sc.prototype.stop=Sc.prototype.stop;Sc.prototype.tickEvery=Sc.prototype.Va;
102
+ Sc.prototype.tickAfter=Sc.prototype.Y;Sc.prototype.tickNow=Sc.prototype.lc;function Tc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function Uc(a){return""!=Vc().canPlayType(a)}function Wc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function Xc(){return Yc("Xbox One")}function Zc(){return Yc("Tizen")}function $c(){return Yc("Tizen 3")}function ad(){return Yc("Tizen 2")}function bd(){return Yc("Web0S")}function cd(){return bd()&&38===dd()}function ed(){return Yc("CrKey")}
103
+ function dd(){if(!Yc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function fd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Zc()&&!Yc("PC=EOS")&&!Yc("PC=APL")&&!Yc("VirginMedia")&&!gd()&&!hd()&&!Yc("AFT")&&!Yc("WPE")&&!Yc("DT_STB_BCM")&&!Yc("Sky_STB")}function id(){return Yc("PlayStation 5")}function hd(){return Yc("PlayStation 4")}function jd(){return Yc("Hisense")||Yc("VIDAA")}
104
104
  function gd(){return Yc("SOPOpenBrowser")}function kd(){if(!fd())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function ld(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("windows"):!1}function md(){return Yc("Android")}
105
- function Yc(a){return(navigator.userAgent||"").includes(a)}function Vc(){if(nd)return nd;od||(od=new Sc(function(){nd=null}));(nd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(nd=document.createElement("video"));od.X(1);return nd}function td(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill}
106
- function vd(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u;return O(function(v){switch(v.g){case 1:a={width:Infinity,height:Infinity};if(ed()){n=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;wa(v,15);if(!(p=n)){v.u(17);break}return E(v,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),18)}if(Zc()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),
105
+ function Yc(a){return(navigator.userAgent||"").includes(a)}function Vc(){if(nd)return nd;od||(od=new Sc(function(){nd=null}));(nd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(nd=document.createElement("video"));od.Y(1);return nd}function pd(a){return a?a===window.shakaMediaKeysPolyfill:!!window.shakaMediaKeysPolyfill}
106
+ function ud(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u;return O(function(v){switch(v.g){case 1:a={width:Infinity,height:Infinity};if(ed()){n=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;wa(v,15);if(!(p=n)){v.u(17);break}return E(v,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),18)}if(Zc()){a.width=1920;a.height=1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(b=webapis.systeminfo.getMaxVideoResolution(),
107
107
  a.width=b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(w){$a("Tizen: Error detecting screen size, default screen size 1920x1080.")}v.u(3);break}if(Xc()){a.width=1920;a.height=1080;try{c=void 0;c="undefined"!==typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows;d=new c.Media.Protection.ProtectionCapabilities;
108
108
  e=c.Media.Protection.ProtectionCapabilityResult;f=null;do f=d.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(f===e.maybe);f===e.probably&&(a.width=3840,a.height=2160)}catch(w){$a("Xbox: Error detecting screen size, default screen size 1920x1080.")}v.u(3);break}if(bd()){try{g=JSON.parse(window.PalmSystem.deviceInfo),
109
- a.width=Math.max(1920,g.screenWidth),a.height=Math.max(1080,g.screenHeight)}catch(w){$a("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}v.u(3);break}if(jd()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);v.u(3);break}if(!hd()&&!id()){v.u(3);break}h=!1;wa(v,9);return E(v,window.msdk.device.getDisplayInfo(),11);case 11:k=v.h;h="4K"===k.resolution;ya(v,10);break;case 9:return Aa(v),
110
- wa(v,12),E(v,window.msdk.device.getDisplayInfoImmediate(),14);case 14:l=v.h;h="4K"===l.resolution;ya(v,10);break;case 12:m=Aa(v),$a("PlayStation: Failed to get the display info:",m);case 10:h?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);v.u(3);break;case 18:p=v.h;case 17:if(p){a.width=3840;a.height=2160;v.u(19);break}if(!(r=n)){v.u(20);break}return E(v,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),21);case 21:r=v.h;case 20:r&&(a.width=1920,
111
- a.height=1080);case 19:ya(v,3);break;case 15:u=Aa(v),Za("Failed to check canDisplayType:",u);case 3:return v.return(a)}})}var od=null,nd=null;function wd(){}
109
+ a.width=Math.max(1920,g.screenWidth),a.height=Math.max(1080,g.screenHeight)}catch(w){$a("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}v.u(3);break}if(jd()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);v.u(3);break}if(!hd()&&!id()){v.u(3);break}h=!1;wa(v,9);return E(v,window.msdk.device.getDisplayInfo(),11);case 11:k=v.h;h="4K"===k.resolution;ya(v,10);break;case 9:return za(v),
110
+ wa(v,12),E(v,window.msdk.device.getDisplayInfoImmediate(),14);case 14:l=v.h;h="4K"===l.resolution;ya(v,10);break;case 12:m=za(v),$a("PlayStation: Failed to get the display info:",m);case 10:h?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);v.u(3);break;case 18:p=v.h;case 17:if(p){a.width=3840;a.height=2160;v.u(19);break}if(!(q=n)){v.u(20);break}return E(v,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),21);case 21:q=v.h;case 20:q&&(a.width=1920,
111
+ a.height=1080);case 19:ya(v,3);break;case 15:u=za(v),Za("Failed to check canDisplayType:",u);case 3:return v.return(a)}})}var od=null,nd=null;function wd(){}
112
112
  function xd(a){if(!a)return"";a=Bb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!hd())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Za('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
113
113
  (a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
114
114
  function yd(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new T(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Fb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return zd(d)}
115
115
  function Ad(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Bb(a);if(239==c[0]&&187==c[1]&&191==c[2])return xd(c);if(254==c[0]&&255==c[1])return yd(c.subarray(2),!1);if(255==c[0]&&254==c[1])return yd(c.subarray(2),!0);if(0==c[0]&&0==c[2])return yd(a,!1);if(0==c[1]&&0==c[3])return yd(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return xd(a);throw new T(2,2,2003);}
116
116
  function Bd(a){if(window.TextEncoder&&!hd()){var b=new TextEncoder;return Cb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Cb(b)}function Cd(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function zd(a){return Dd.value()(a)}
117
117
  function Ed(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",wd);wd.resetFromCharCode=function(){Dd.g=void 0};
118
- wd.toUTF16=Cd;wd.toUTF8=Bd;wd.fromBytesAutoDetect=Ad;wd.fromUTF16=yd;wd.fromUTF8=xd;var Dd=new Jc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Qb:65536};0<b.Qb;b={Qb:b.Qb},b.Qb/=2)if(a(b.Qb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Qb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Qb));return e}}(b);return null});function Fd(){}function Gd(a){a=zd(Bb(a));return btoa(a)}function Hd(a,b){b=void 0==b?!0:b;a=Gd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Id(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Ld(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
119
- function Md(a){var b=Bb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Nd(){for(var a=Ja.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(Bb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Fd);Fd.concat=Nd;Fd.toHex=Md;Fd.fromHex=Ld;Fd.fromBase64=Id;Fd.toBase64=Hd;Fd.toStandardBase64=Gd;function Od(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new sc(a[0]);b=new sc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new sc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new sc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
118
+ wd.toUTF16=Cd;wd.toUTF8=Bd;wd.fromBytesAutoDetect=Ad;wd.fromUTF16=yd;wd.fromUTF8=xd;var Dd=new Jc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Qb:65536};0<b.Qb;b={Qb:b.Qb},b.Qb/=2)if(a(b.Qb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Qb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Qb));return e}}(b);return null});function Fd(){}function Gd(a){a=zd(Bb(a));return btoa(a)}function Hd(a,b){b=void 0==b?!0:b;a=Gd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Id(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Jd(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
119
+ function Kd(a){var b=Bb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Nd(){for(var a=Ja.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(Bb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Fd);Fd.concat=Nd;Fd.toHex=Kd;Fd.fromHex=Jd;Fd.fromBase64=Id;Fd.toBase64=Hd;Fd.toStandardBase64=Gd;function Od(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new sc(a[0]);b=new sc(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new sc(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new sc(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
120
120
  function Pd(a,b,c){return{keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set}}
121
- function Qd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Hd(Ld(h),!1));var l=g;22!=l.length&&(l=Hd(Ld(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Bb(Bd(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
121
+ function Qd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Hd(Jd(h),!1));var l=g;22!=l.length&&(l=Hd(Jd(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Bb(Bd(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
122
122
  audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Rd(a,b){if(1==b.length)return b[0];a=Sd(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Sd(a,b){for(var c=t(Td[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Ud?"":null}
123
- function Vd(a,b){var c=[];a=t(Td[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Ud="text",Wd={fa:"video",V:"audio",qa:Ud,pe:"image",Ti:"application"},Td={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Xd(){}function Yd(a,b){var c=a;b&&!Zd.includes(a)&&(c+='; codecs="'+b+'"');return c}function $d(a,b){b&&(a+='; codecs="'+b+'"');return a}function ae(a,b,c){var d=Yd(a,b);b=$d(a,b);mc(b)?(a=mc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
123
+ function Vd(a,b){var c=[];a=t(Td[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Ud="text",Wd={ea:"video",W:"audio",qa:Ud,pe:"image",Ti:"application"},Td={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Xd(){}function Yd(a,b){var c=a;b&&!Zd.includes(a)&&(c+='; codecs="'+b+'"');return c}function $d(a,b){b&&(a+='; codecs="'+b+'"');return a}function ae(a,b,c){var d=Yd(a,b);b=$d(a,b);mc(b)?(a=mc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
124
124
  function be(a,b,c){var d=[b];ce.forEach(function(e,f){var g=a[f];"codecs"==f?Zd.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function de(a){return a.split(";")[0].split("/")[1]}
125
125
  function ee(a){var b=fe(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
126
- a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "vvc1"===a:case "vvi1"===a:return"vvc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function he(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=fe(c.value),b.push(c[0]);return b.sort().join(",")}
127
- function ie(a){return a.split(";")[0]}function je(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function le(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function fe(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",Xd);Xd.getFullTypeWithAllCodecs=$d;Xd.getFullType=Yd;
126
+ a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "vvc1"===a:case "vvi1"===a:return"vvc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function ge(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=fe(c.value),b.push(c[0]);return b.sort().join(",")}
127
+ function ie(a){return a.split(";")[0]}function je(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function ke(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function fe(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",Xd);Xd.getFullTypeWithAllCodecs=$d;Xd.getFullType=Yd;
128
128
  var ce=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),Zd=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function me(a){this.i=null;this.j=a;this.B=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.C="";this.A=function(){};this.o=new Map}function ne(a){return oe[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Jb:!1}me.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
129
- function pe(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(p){if(1==p.g)return E(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(Bb(b)),p.return();f=a.B?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Bb(b),g,e);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.l&&r.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);H(p)})}
129
+ function pe(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(p){if(1==p.g)return E(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(Bb(b)),p.return();f=a.B?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Bb(b),g,e);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(q){return q.startTime>=a.l&&q.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);H(p)})}
130
130
  me.prototype.remove=function(a,b){var c=this;return O(function(d){if(1==d.g)return E(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));H(d)})};function qe(a,b,c){a.l=b;a.m=c}function re(a,b,c){a.C=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
131
131
  function se(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())se(a,d.value,c)}
132
132
  function te(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);se(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.C&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
@@ -143,8 +143,8 @@ var Ce=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
143
143
  "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function He(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 instanceof 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 WeakSet;return b(a)}function Ie(a){var b={},c;for(c in a)b[c]=a[c];return b};function Je(){}
144
144
  function Ke(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Le(e,b,c);if(d.length){b=new gb;e=t(e);for(c=e.next();!c.done;c=e.next())c=c.value,b.push(String(c.video.width||0),c);var f=[];b.forEach(function(u,v){u=0;var w=[];v=t(v);for(var A=v.next(),y={};!A.done;y={ne:void 0},A=v.next())y.ne=A.value,A=d.filter(function(C){return function(z){return C.ne.decodingInfos[0][z]}}(y)).length,A>u?(u=A,w=[y.ne]):A==u&&w.push(y.ne);f.push.apply(f,x(w))});e=f}c=new Set;b=new Set;e=t(e);for(var g=e.next();!g.done;g=
145
145
  e.next())g=g.value,g.audio&&c.add(g.audio),g.video&&b.add(g.video);c=Array.from(c).sort(function(u,v){return u.bandwidth-v.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=ee(m.codecs),p=ee(g.codecs);n!=p||g.bandwidth&&m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);
146
- e.set(k,l)}c=Array.from(b).sort(function(u,v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=pb();var r=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=ee(m.codecs),p=ee(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),r.push(g.id)):g.width==m.width&&g.height==m.height&&(n=ee(m.codecs),p=ee(g.codecs),n!=p||g.bandwidth&&
147
- m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),r.push(g.id)))}else l.push(g),r.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var v=u.audio;u=u.video;return v&&!h.includes(v.id)||u&&!r.includes(u.id)?!1:!0})}
146
+ e.set(k,l)}c=Array.from(b).sort(function(u,v){return u.bandwidth&&v.bandwidth?u.bandwidth-v.bandwidth:u.width-v.width});b=pb();var q=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=ee(m.codecs),p=ee(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),q.push(g.id)):g.width==m.width&&g.height==m.height&&(n=ee(m.codecs),p=ee(g.codecs),n!=p||g.bandwidth&&
147
+ m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),q.push(g.id)))}else l.push(g),q.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(u){var v=u.audio;u=u.video;return v&&!h.includes(v.id)||u&&!q.includes(u.id)?!1:!0})}
148
148
  function Le(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={Yg:void 0},d=b.next())if(e.Yg=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Yg)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={Wf:void 0},b=c.next())if(d.Wf=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Wf)}}(d)),b.length){a=b;break}return a}function Me(a,b,c){a.variants=a.variants.filter(function(d){return Ne(d,b,c)})}
149
149
  function Ne(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)||
150
150
  !d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function Oe(a,b,c){var d=!1;a=t(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Ne(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Pe(a,b,c){c=void 0===c?[]:c;return O(function(d){if(1==d.g)return E(d,Qe(a,b,0<b.offlineSessionIds.length,c),2);Re(b);return E(d,Se(b),0)})}
@@ -152,18 +152,18 @@ function Qe(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return Xc()&&Te(b.va
152
152
  function Te(a){var b={dvav:"avc3",dva1:"avc1",dvhe:"hev1",dvh1:"hvc1"},c=new Set;a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=t(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=t(Object.keys(b));for(var e=d.next();!e.done;e=d.next())if(e=e.value,a.codecs.includes(e)){a.codecs=a.codecs.replace(e,b[e]);break}}}
153
153
  function Ve(a,b){var c=Xc(),d=Yc("Firefox")&&md(),e=a.video,f=e&&e.width||0,g=e&&e.height||0;if(c&&e&&(1920<f||1080<g)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return!1;if(e){c=Xe(e.codecs);if(e.codecs.includes(",")){f=e.codecs.split(",");c=Rd("video",f);c=Xe(c);f=Rd("audio",f);f=Ye(f,e.mimeType);g=ae(e.mimeType,f,"audio");if(!nb(g))return!1;c=[c,f].join()}f=ae(e.mimeType,c,"video");if(!nb(f))return!1;e.codecs=c}e=a.audio;if(d&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus"))return!1;
154
154
  if(e){d=Ye(e.codecs,e.mimeType);c=ae(e.mimeType,d,"audio");if(!nb(c))return!1;e.codecs=d}return a.decodingInfos.some(function(h){return!h.supported||b&&(h=h.keySystemAccess)&&h.keySystem!=b?!1:!0})}function Ze(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=Ze(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
155
- function $e(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=function(m,n){if(m){var p=Ie(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,qd:void 0},g=f.next())k=g.value,h.qd=Ze(k),h.cache=af,h.cache[h.qd]?d=c(d,h.cache[h.qd]):e.push(bf(k).then(function(m){return function(n){var p=
156
- null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())p=c(p,r.value);p&&(m.cache[m.qd]=p,d=c(d,p))}}(h)));return E(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);H(l)})}
155
+ function $e(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=function(m,n){if(m){var p=Ie(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,rd:void 0},g=f.next())k=g.value,h.rd=Ze(k),h.cache=af,h.cache[h.rd]?d=c(d,h.cache[h.rd]):e.push(bf(k).then(function(m){return function(n){var p=
156
+ null;n=t(n||[]);for(var q=n.next();!q.done;q=n.next())p=c(p,q.value);p&&(m.cache[m.rd]=p,d=c(d,p))}}(h)));return E(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);H(l)})}
157
157
  function bf(a){var b=[""];a.video&&(b=je(a.video.contentType).split(","));var c=[""];a.audio&&(c=je(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=t(c),g=f.next(),h={};!g.done;h={rc:void 0},g=f.next())g=g.value,h.rc=He(a),a.video&&(h.rc.video.contentType=Yd(ie(h.rc.video.contentType),e)),a.audio&&(h.rc.audio.contentType=Yd(ie(h.rc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.rc).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);
158
158
  return null})}
159
- function Ue(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D;return O(function(I){switch(I.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return I.return();f=t(d);g=f.next();h={};case 2:if(g.done){I.u(4);break}h.Ag=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){I.u(7);break}n=m.value;p=cf(n,b,c).filter(function(F){return function(J){J=J[0];return(J.keySystemConfiguration&&J.keySystemConfiguration.keySystem)===F.Ag}}(h));r=t(p);u=r.next();case 8:if(u.done){I.u(10);break}v=u.value;
160
- return E(I,$e(n,v),9);case 9:u=r.next();I.u(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();I.u(5);break;case 7:if(k)return I.return();h={Ag:void 0};g=f.next();I.u(2);break;case 4:w=t(a),A=w.next();case 12:if(A.done){I.u(0);break}y=A.value;C=cf(y,b,c).filter(function(F){F=F[0];F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});z=t(C);B=z.next();case 15:if(B.done){A=w.next();I.u(12);break}D=B.value;return E(I,$e(y,D),16);case 16:B=z.next(),I.u(15)}})}
159
+ function Ue(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D;return O(function(I){switch(I.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return I.return();f=t(d);g=f.next();h={};case 2:if(g.done){I.u(4);break}h.Ag=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){I.u(7);break}n=m.value;p=cf(n,b,c).filter(function(F){return function(J){J=J[0];return(J.keySystemConfiguration&&J.keySystemConfiguration.keySystem)===F.Ag}}(h));q=t(p);u=q.next();case 8:if(u.done){I.u(10);break}v=u.value;
160
+ return E(I,$e(n,v),9);case 9:u=q.next();I.u(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();I.u(5);break;case 7:if(k)return I.return();h={Ag:void 0};g=f.next();I.u(2);break;case 4:w=t(a),A=w.next();case 12:if(A.done){I.u(0);break}y=A.value;C=cf(y,b,c).filter(function(F){F=F[0];F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});z=t(C);B=z.next();case 15:if(B.done){A=w.next();I.u(12);break}D=B.value;return E(I,$e(y,D),16);case 16:B=z.next(),I.u(15)}})}
161
161
  function cf(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=je(k);if(l.includes(",")&&!d){var m=l.split(","),n=ie(k);l=Rd("video",m);m=Rd("audio",m);m=Ye(m,n);n=ae(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=Xe(l);k={contentType:ae(ie(k),l,"video"),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":k.transferFunction=
162
162
  "srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=ie(l),l=Ye(je(l),k),k=ae(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=
163
163
  k.value,l=t(g),n=l.next();!n.done;n=l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;l=[];n=t(h);for(m=n.next();!m.done;m=
164
- n.next()){m=Object.assign({},m.value);var p=c.get(k),r={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=t(p);for(var u=p.next();!u.done;u=p.next()){u=u.value;if(u.initData&&u.initData.length){for(var v=new Set,w=t(u.initData),A=w.next();!A.done;A=w.next())v.add(A.value.initDataType);r.initDataType=u.initData[0].initDataType}u.distinctiveIdentifierRequired&&(r.distinctiveIdentifier="required");u.persistentStateRequired&&(r.persistentState="required");
165
- u.sessionType&&(r.sessionTypes=[u.sessionType]);d&&(r.audio?(u.encryptionScheme&&(r.audio.encryptionScheme=r.audio.encryptionScheme||u.encryptionScheme),r.audio.robustness=r.audio.robustness||u.audioRobustness):(r.audio={robustness:u.audioRobustness},u.encryptionScheme&&(r.audio.encryptionScheme=u.encryptionScheme)),""==r.audio.robustness&&delete r.audio.robustness);e&&(r.video?(u.encryptionScheme&&(r.video.encryptionScheme=r.video.encryptionScheme||u.encryptionScheme),r.video.robustness=r.video.robustness||
166
- u.videoRobustness):(r.video={robustness:u.videoRobustness},u.encryptionScheme&&(r.video.encryptionScheme=u.encryptionScheme)),""==r.video.robustness&&delete r.video.robustness)}m.keySystemConfiguration=r;l.push(m)}a.push(l)}return a}function Ye(a,b){return"flac"==a.toLowerCase()?kd()?"fLaC":"flac":"opus"===a.toLowerCase()?kd()?"mp4"==de(b)?"Opus":"opus":"opus":a}
164
+ n.next()){m=Object.assign({},m.value);var p=c.get(k),q={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=t(p);for(var u=p.next();!u.done;u=p.next()){u=u.value;if(u.initData&&u.initData.length){for(var v=new Set,w=t(u.initData),A=w.next();!A.done;A=w.next())v.add(A.value.initDataType);q.initDataType=u.initData[0].initDataType}u.distinctiveIdentifierRequired&&(q.distinctiveIdentifier="required");u.persistentStateRequired&&(q.persistentState="required");
165
+ u.sessionType&&(q.sessionTypes=[u.sessionType]);d&&(q.audio?(u.encryptionScheme&&(q.audio.encryptionScheme=q.audio.encryptionScheme||u.encryptionScheme),q.audio.robustness=q.audio.robustness||u.audioRobustness):(q.audio={robustness:u.audioRobustness},u.encryptionScheme&&(q.audio.encryptionScheme=u.encryptionScheme)),""==q.audio.robustness&&delete q.audio.robustness);e&&(q.video?(u.encryptionScheme&&(q.video.encryptionScheme=q.video.encryptionScheme||u.encryptionScheme),q.video.robustness=q.video.robustness||
166
+ u.videoRobustness):(q.video={robustness:u.videoRobustness},u.encryptionScheme&&(q.video.encryptionScheme=u.encryptionScheme)),""==q.video.robustness&&delete q.video.robustness)}m.keySystemConfiguration=q;l.push(m)}a.push(l)}return a}function Ye(a,b){return"flac"==a.toLowerCase()?kd()?"fLaC":"flac":"opus"===a.toLowerCase()?kd()?"mp4"==de(b)?"Opus":"opus":"opus":a}
167
167
  function Xe(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 Re(a){a.textStreams=a.textStreams.filter(function(b){b=Yd(b.mimeType,b.codecs);return ne(b)})}
168
168
  function Se(a){var b,c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.u(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(df.has(f)){l.u(5);break}g=ef.get(f);if(!g){df.set(f,!1);l.u(5);break}return E(l,ff(g),7);case 7:h=l.h,df.set(f,h);case 5:(k=df.get(f))&&b.push(e);d=c.next();l.u(2);break;case 4:a.imageStreams=b,H(l)}})}
169
169
  function ff(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)}})}
@@ -181,49 +181,49 @@ originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:nu
181
181
  function xf(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Ge(ze(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return ze(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=yf(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(ue,[]);return a.length?
182
182
  yf(e,a[0]):e}function yf(a,b){return a.filter(function(c){return c.roles.includes(b)})}function We(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}S("shaka.util.StreamUtils",Je);Je.meetsRestrictions=Ne;
183
183
  var af={},nf=0,df=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),ef=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function zf(){var a=this;this.A=null;this.j=!1;this.i=new Xa;this.F=new hb;navigator.connection&&navigator.connection.addEventListener&&this.F.D(navigator.connection,"change",function(){if(a.j&&a.g.useNetworkInformation){a.i=new Xa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.s=[];this.B=1;this.G=!1;this.h=this.o=this.g=this.l=null;this.C=new Sc(function(){if(a.j&&a.g.restrictToElementSize){var b=a.chooseVariant();
184
- b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.m=null}q=zf.prototype;q.stop=function(){this.A=null;this.j=!1;this.s=[];this.B=1;this.o=this.l=null;this.h&&(this.h.disconnect(),this.h=null);this.C.stop();this.m=null};q.release=function(){this.F.release();this.C=null};q.init=function(a){this.A=a};
185
- q.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.o.clientHeight*d);c=Math.min(c,this.o.clientWidth*d)}var e=this.s.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||
184
+ b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.m=null}r=zf.prototype;r.stop=function(){this.A=null;this.j=!1;this.s=[];this.B=1;this.o=this.l=null;this.h&&(this.h.disconnect(),this.h=null);this.C.stop();this.m=null};r.release=function(){this.F.release();this.C=null};r.init=function(a){this.A=a};
185
+ r.chooseVariant=function(a){a=void 0===a?!1:a;var b=Infinity,c=Infinity;this.g.restrictToScreenSize&&(c=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,b=window.screen.height*c,c*=window.screen.width);if(this.h&&this.g.restrictToElementSize){var d=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio;b=Math.min(b,this.o.clientHeight*d);c=Math.min(c,this.o.clientWidth*d)}var e=this.s.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});e.length||
186
186
  (e=this.s);d=e;a&&e.length!=this.s.length&&(d=this.s.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));a=Af(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=b||Infinity!=c){a=Bf(a);a=t(a);for(e=a.next();!e.done;e=a.next())if(e=e.value,e.height>=b&&e.width>=c){b=e.height;c=e.width;break}a=Af(this,this.g.restrictions,d,b,c)}b=this.getBandwidthEstimate();d.length&&!a.length&&(a=Af(this,null,d,Infinity,Infinity),a=[a[0]]);c=a[0]||null;for(d=
187
- 0;d<a.length;d++){e=a[d];for(var f=isNaN(this.B)?1:Math.abs(this.B),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<e.video.height))&&(c=e)}this.l=Date.now();return c};q.enable=function(){this.j=!0};q.disable=function(){this.j=!1};
188
- q.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.l&&this.j&&Cf(this))};q.trySuggestStreams=function(){null!=this.l&&this.j&&Cf(this)};q.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.m?this.m.getBandwidthEstimate(a):a};q.setVariants=function(a){this.s=a};
189
- q.playbackRateChanged=function(a){this.B=a};q.setMediaElement=function(a){var b=this;this.o=a;this.h&&(this.h.disconnect(),this.h=null);this.o&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.X(Df)}),this.h.observe(this.o))};q.setCmsdManager=function(a){this.m=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
187
+ 0;d<a.length;d++){e=a[d];for(var f=isNaN(this.B)?1:Math.abs(this.B),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&(c.bandwidth!=e.bandwidth||c.bandwidth==e.bandwidth&&c.video&&e.video&&(c.video.width<e.video.width||c.video.height<e.video.height))&&(c=e)}this.l=Date.now();return c};r.enable=function(){this.j=!0};r.disable=function(){this.j=!1};
188
+ r.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.l&&this.j&&Cf(this))};r.trySuggestStreams=function(){null!=this.l&&this.j&&Cf(this)};r.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);a=this.i.getBandwidthEstimate(a);return this.m?this.m.getBandwidthEstimate(a):a};r.setVariants=function(a){this.s=a};
189
+ r.playbackRateChanged=function(a){this.B=a};r.setMediaElement=function(a){var b=this;this.o=a;this.h&&(this.h.disconnect(),this.h=null);this.o&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.Y(Df)}),this.h.observe(this.o))};r.setCmsdManager=function(a){this.m=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
190
190
  function Cf(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0;a.l-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.l<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}function Af(a,b,c,d,e){if(a.m){var f=a.m.lg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Ne(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
191
191
  function Bf(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}S("shaka.abr.SimpleAbrManager",zf);zf.prototype.configure=zf.prototype.configure;zf.prototype.setCmsdManager=zf.prototype.setCmsdManager;zf.prototype.setMediaElement=zf.prototype.setMediaElement;zf.prototype.playbackRateChanged=zf.prototype.playbackRateChanged;zf.prototype.setVariants=zf.prototype.setVariants;
192
192
  zf.prototype.getBandwidthEstimate=zf.prototype.getBandwidthEstimate;zf.prototype.trySuggestStreams=zf.prototype.trySuggestStreams;zf.prototype.segmentDownloaded=zf.prototype.segmentDownloaded;zf.prototype.disable=zf.prototype.disable;zf.prototype.enable=zf.prototype.enable;zf.prototype.chooseVariant=zf.prototype.chooseVariant;zf.prototype.init=zf.prototype.init;zf.prototype.release=zf.prototype.release;zf.prototype.stop=zf.prototype.stop;var Df=1;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Ef(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Ef.prototype.add=function(a,b,c){return Ff(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
193
193
  function Ff(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||e.spatialAudio!==f.spatialAudio||c&&!Gf(e,f)||!Hf(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Gf(a,b))&&Hf(a.roles,b.roles)));return d?!1:!0}Ef.prototype.values=function(){return this.g.values()};
194
- function Gf(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return he(d)});b=b.codecs.split(",").map(function(d){return he(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Hf(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function If(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Jf(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}If.prototype.create=function(a){var b=this,c="smooth"==this.h&&pb(),d=a.filter(function(e){return Ff(b.i,e,!c,b.g)});return d.length?new Ef(d[0],d,!c,this.g):this.j.create(a)};
194
+ function Gf(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return ge(d)});b=b.codecs.split(",").map(function(d){return ge(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Hf(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function If(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Jf(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}If.prototype.create=function(a){var b=this,c="smooth"==this.h&&pb(),d=a.filter(function(e){return Ff(b.i,e,!c,b.g)});return d.length?new Ef(d[0],d,!c,this.g):this.j.create(a)};
195
195
  function Jf(a,b,c,d,e,f,g,h,k,l){this.s=a;this.A=b;this.h=c;this.i=d;this.B=e;this.l=f;this.g=void 0===g?"":g;this.j=void 0===h?"":h;this.m=void 0===k?"reload":k;this.o=void 0===l?!1:l}
196
196
  Jf.prototype.create=function(a){var b=[];b=Kf(a,this.s);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Lf(b,this.A);a.length&&(b=a);this.l&&(a=Mf(b,this.l),a.length&&(b=a));this.i&&(a=Nf(b,this.i),a.length&&(b=a));this.h&&(a=Of(b,this.h),a.length&&(b=a));this.g&&(a=Pf(b,this.g),a.length&&(b=a));this.j&&(a=Qf(b,this.j),a.length&&(b=a));a=Rf(b,this.B);a.length&&(b=a);return new Ef(b[0],b,!("smooth"==this.m&&pb()),this.o)};
197
197
  function Kf(a,b){b=ze(b);var c=Ge(b,a.map(function(d){return Fe(d)}));return c?a.filter(function(d){return c==Fe(d)}):[]}function Lf(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Pf(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Qf(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
198
198
  function Of(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Nf(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Mf(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Rf(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function Sf(){this.g=Tf;this.i=(new Map).set(Tf,2).set(Uf,1);this.h=0}function Vf(a,b,c){a.i.set(Tf,c).set(Uf,b)}var Uf=0,Tf=1;function Wf(a,b){var c=Xf();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
199
- function Yf(a){var b,c;return O(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return E(d,new Promise(function(e){(new Sc(e)).X(c/1E3)}),2)}a.h*=a.m;H(d)})}function Xf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Zf(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Zf.prototype.resolve=function(){};Zf.prototype.reject=function(){};function $f(a,b){this.promise=a;this.i=b;this.g=!1}function ag(a){return new $f(Promise.reject(a),function(){return Promise.resolve()})}function bg(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new $f(a,function(){return Promise.resolve()})}function cg(a){return new $f(Promise.resolve(a),function(){return Promise.resolve()})}function dg(a){return new $f(a,function(){return a.catch(function(){})})}$f.prototype.abort=function(){this.g=!0;return this.i()};
199
+ function Yf(a){var b,c;return O(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return E(d,new Promise(function(e){(new Sc(e)).Y(c/1E3)}),2)}a.h*=a.m;H(d)})}function Xf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Zf(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Zf.prototype.resolve=function(){};Zf.prototype.reject=function(){};function $f(a,b){this.promise=a;this.i=b;this.g=!1}function ag(a){return new $f(Promise.reject(a),function(){return Promise.resolve()})}function bg(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new $f(a,function(){return Promise.resolve()})}function cg(a){return new $f(Promise.resolve(a),function(){return Promise.resolve()})}function dg(a){return new $f(a,function(){return a.catch(function(){})})}$f.prototype.abort=function(){this.g=!0;return this.i()};
200
200
  function eg(a){return new $f(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}$f.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
201
- $f.prototype.za=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=fg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Zf,g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new $f(f,function(){return d()})};
202
- function fg(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()}}}S("shaka.util.AbortableOperation",$f);$f.prototype.chain=$f.prototype.za;$f.prototype["finally"]=$f.prototype.finally;$f.all=eg;$f.prototype.abort=$f.prototype.abort;$f.notAbortable=dg;$f.completed=cg;$f.aborted=bg;$f.failed=ag;function U(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
201
+ $f.prototype.xa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=fg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Zf,g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new $f(f,function(){return d()})};
202
+ function fg(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()}}}S("shaka.util.AbortableOperation",$f);$f.prototype.chain=$f.prototype.xa;$f.prototype["finally"]=$f.prototype.finally;$f.all=eg;$f.prototype.abort=$f.prototype.abort;$f.notAbortable=dg;$f.completed=cg;$f.aborted=bg;$f.failed=ag;function U(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
203
203
  function gg(a){var b=new U(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}U.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};U.prototype.stopImmediatePropagation=function(){this.g=!0};U.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",U);
204
204
  var hg={Vi:"abrstatuschanged",Wi:"adaptation",Xi:"buffering",Yi:"complete",Zi:"downloadfailed",$i:"downloadheadersreceived",aj:"drmsessionupdate",cj:"emsg",tj:"prft",Error:"error",dj:"expirationupdated",ej:"firstquartile",fj:"gapjumped",ij:"keystatuschanged",kj:"loaded",lj:"loading",nj:"manifestparsed",oj:"manifestupdated",pj:"mediaqualitychanged",Metadata:"metadata",qj:"midpoint",rj:"nospatialvideoinfo",sj:"onstatechange",uj:"ratechange",wj:"segmentappended",xj:"sessiondata",yj:"spatialvideoinfo",
205
205
  zj:"stalldetected",Aj:"started",Bj:"statechanged",Cj:"streaming",Dj:"textchanged",Ej:"texttrackvisibility",Fj:"thirdquartile",Gj:"timelineregionadded",Hj:"timelineregionenter",Ij:"timelineregionexit",Jj:"trackschanged",Lj:"unloading",Nj:"variantchanged"};function ig(){this.wa=new gb;this.Wd=this}ig.prototype.addEventListener=function(a,b){this.wa&&this.wa.push(a,b)};ig.prototype.removeEventListener=function(a,b){this.wa&&this.wa.remove(a,b)};ig.prototype.dispatchEvent=function(a){if(!this.wa)return!0;var b=this.wa.get(a.type)||[],c=this.wa.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Wd;a.currentTarget=this.Wd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
206
- ig.prototype.release=function(){this.wa=null};function jg(){this.g=[]}function kg(a,b){a.g.push(b.finally(function(){Ob(a.g,b)}))}jg.prototype.destroy=function(){for(var a=[],b=t(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 lg(a,b,c,d,e,f){ig.call(this);this.i=!1;this.m=new jg;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.A=c||null;this.B=d||null;this.F=e||null;this.C=f||null;this.o=this.s=!1}ra(lg,ig);q=lg.prototype;q.Df=function(a){this.s=a};q.Ef=function(a){this.o=a};function mg(a,b,c,d){c=c||ng;var e=og[a];if(!e||c>=e.priority)og[a]={priority:c,be:b,oi:void 0===d?!1:d}}
207
- function pg(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}q.si=function(a){this.g.add(a)};q.Oi=function(a){this.g.delete(a)};q.oh=function(){this.g.clear()};q.ti=function(a){this.h.add(a)};q.Pi=function(a){this.h.delete(a)};q.ph=function(){this.h.clear()};
208
- function qg(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();ig.prototype.release.call(this);return this.m.destroy()};
209
- q.request=function(a,b,c){var d=this,e=new rg;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new sg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?He(b.retryParameters):Xf();b.uris=He(b.uris);f=tg(this,a,b,c);var g=f.za(function(){return ug(d,a,b,c,new Wf(b.retryParameters,!1),0,null,e)}),h=g.za(function(p){return vg(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
210
- var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.za(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.Wh||!d.l||u.fromCache||"HEAD"==b.method||a!=wg||d.l(u.timeMs,u.data.byteLength,zg(c));d.C&&d.C(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new sg(n.promise,function(){return n.abort()},e);kg(this.m,f);return f};
211
- function tg(a,b,c,d){function e(h){f=f.za(function(){c.body&&(c.body=Cb(c.body));return h(b,c,d)})}var f=cg(void 0);a.B&&e(a.B);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.za(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
212
- function ug(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new sc(c.uris[f]),l=k.wb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),tc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=og[l])?l.be:null;if(!n)return ag(new T(2,1,1E3,k));var p=l.oi,r=null,u=null,v=!1,w=!1,A;return dg(Yf(e)).za(function(){if(a.i)return bg();A=Date.now();var y=0;c.requestStartTime=Date.now();
213
- var C=n(c.uris[f],c,b,function(D,I,F){r&&r.stop();u&&u.X(B/1E3);a.l&&b==wg&&(y++,c.packetNumber=y,a.l(D,I,zg(d),c),m=!0,h.g=F)},function(D){a.j&&a.j(D,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return C;var z=c.retryParameters.connectionTimeout;z&&(r=new Sc(function(){v=!0;C.abort()}),r.X(z/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Sc(function(){v=!0;C.abort()}));return C}).za(function(y){r&&r.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-A);var C={response:y,
214
- Wh:m};!w&&a.j&&a.j(y.headers,c,b);return C},function(y){r&&r.stop();u&&u.stop();if(a.A){var C=null,z=0;y instanceof T&&(C=y,1001==y.code&&(z=y.data[1]));a.A(c,C,z,v)}if(a.i)return bg();v&&(y=new T(1,1,1003,c.uris[f],b));if(y instanceof T){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return C=(new Map).set("error",y),C=new U("retry",C),a.dispatchEvent(C),f=(f+1)%c.uris.length,ug(a,b,c,d,e,f,y,h)}throw y;})}
215
- function vg(a,b,c,d){var e=cg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Fg:void 0},f=a.next())g.Fg=f.value,e=e.za(function(h){return function(){var k=c.response;k.data&&(k.data=Cb(k.data));return(0,h.Fg)(b,k,d)}}(g));return e.za(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function zg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.gd)return!1}return!0}S("shaka.net.NetworkingEngine",lg);
206
+ ig.prototype.release=function(){this.wa=null};function jg(){this.g=[]}function kg(a,b){a.g.push(b.finally(function(){Ob(a.g,b)}))}jg.prototype.destroy=function(){for(var a=[],b=t(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 lg(a,b,c,d,e,f){ig.call(this);this.i=!1;this.m=new jg;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.A=c||null;this.B=d||null;this.F=e||null;this.C=f||null;this.o=this.s=!1}ra(lg,ig);r=lg.prototype;r.Df=function(a){this.s=a};r.Ef=function(a){this.o=a};function mg(a,b,c,d){c=c||ng;var e=og[a];if(!e||c>=e.priority)og[a]={priority:c,be:b,oi:void 0===d?!1:d}}
207
+ function pg(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}r.si=function(a){this.g.add(a)};r.Oi=function(a){this.g.delete(a)};r.oh=function(){this.g.clear()};r.ti=function(a){this.h.add(a)};r.Pi=function(a){this.h.delete(a)};r.ph=function(){this.h.clear()};
208
+ function qg(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}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();ig.prototype.release.call(this);return this.m.destroy()};
209
+ r.request=function(a,b,c){var d=this,e=new rg;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new sg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?He(b.retryParameters):Xf();b.uris=He(b.uris);f=tg(this,a,b,c);var g=f.xa(function(){return ug(d,a,b,c,new Wf(b.retryParameters,!1),0,null,e)}),h=g.xa(function(p){return vg(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
210
+ var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.xa(function(p){var q=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=q;p.Wh||!d.l||u.fromCache||"HEAD"==b.method||a!=wg||d.l(u.timeMs,u.data.byteLength,xg(c));d.C&&d.C(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new sg(n.promise,function(){return n.abort()},e);kg(this.m,f);return f};
211
+ function tg(a,b,c,d){function e(h){f=f.xa(function(){c.body&&(c.body=Cb(c.body));return h(b,c,d)})}var f=cg(void 0);a.B&&e(a.B);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.xa(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
212
+ function ug(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new sc(c.uris[f]),l=k.xb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),tc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=og[l])?l.be:null;if(!n)return ag(new T(2,1,1E3,k));var p=l.oi,q=null,u=null,v=!1,w=!1,A;return dg(Yf(e)).xa(function(){if(a.i)return bg();A=Date.now();var y=0;c.requestStartTime=Date.now();
213
+ var C=n(c.uris[f],c,b,function(D,I,F){q&&q.stop();u&&u.Y(B/1E3);a.l&&b==wg&&(y++,c.packetNumber=y,a.l(D,I,xg(d),c),m=!0,h.g=F)},function(D){a.j&&a.j(D,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!p)return C;var z=c.retryParameters.connectionTimeout;z&&(q=new Sc(function(){v=!0;C.abort()}),q.Y(z/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Sc(function(){v=!0;C.abort()}));return C}).xa(function(y){q&&q.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-A);var C={response:y,
214
+ Wh:m};!w&&a.j&&a.j(y.headers,c,b);return C},function(y){q&&q.stop();u&&u.stop();if(a.A){var C=null,z=0;y instanceof T&&(C=y,1001==y.code&&(z=y.data[1]));a.A(c,C,z,v)}if(a.i)return bg();v&&(y=new T(1,1,1003,c.uris[f],b));if(y instanceof T){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return C=(new Map).set("error",y),C=new U("retry",C),a.dispatchEvent(C),f=(f+1)%c.uris.length,ug(a,b,c,d,e,f,y,h)}throw y;})}
215
+ function vg(a,b,c,d){var e=cg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Fg:void 0},f=a.next())g.Fg=f.value,e=e.xa(function(h){return function(){var k=c.response;k.data&&(k.data=Cb(k.data));return(0,h.Fg)(b,k,d)}}(g));return e.xa(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function xg(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.hd)return!1}return!0}S("shaka.net.NetworkingEngine",lg);
216
216
  lg.prototype.request=lg.prototype.request;lg.prototype.destroy=lg.prototype.destroy;lg.makeRequest=qg;lg.defaultRetryParameters=function(){return Xf()};lg.prototype.clearAllResponseFilters=lg.prototype.ph;lg.prototype.unregisterResponseFilter=lg.prototype.Pi;lg.prototype.registerResponseFilter=lg.prototype.ti;lg.prototype.clearAllRequestFilters=lg.prototype.oh;lg.prototype.unregisterRequestFilter=lg.prototype.Oi;lg.prototype.registerRequestFilter=lg.prototype.si;lg.unregisterScheme=function(a){delete og[a]};
217
217
  lg.registerScheme=mg;lg.prototype.setForceHTTPS=lg.prototype.Ef;lg.prototype.setForceHTTP=lg.prototype.Df;function rg(){this.g=0}lg.NumBytesRemainingClass=rg;function sg(a,b,c){$f.call(this,a,b);this.h=c}ra(sg,$f);lg.PendingRequest=sg;var wg=1;lg.RequestType={MANIFEST:0,SEGMENT:wg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};lg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var ng=3;
218
- lg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ng};var og={};function Ag(a){this.g=!1;this.h=new Zf;this.i=a}Ag.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 Bg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Cg(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Dg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Eg(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Fg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Gg(a,b){this.h=Fb(a);this.i=b==Hg;this.g=0}q=Gg.prototype;q.ma=function(){return this.g<this.h.byteLength};q.ra=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.S=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Ig();}};q.ka=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Ig();}};q.O=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Ig();}};
219
- q.Cg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Ig();}};q.Fc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Ig();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.mb=function(a){if(this.g+a>this.h.byteLength)throw Ig();var b=Bb(this.h,this.g,a);this.g+=a;return b};
220
- q.skip=function(a){if(this.g+a>this.h.byteLength)throw Ig();this.g+=a};q.Ai=function(a){if(this.g<a)throw Ig();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Ig();this.g=a};q.hc=function(){for(var a=this.g;this.ma()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Bb(this.h,a,this.g-a);this.g+=1;return xd(a)};function Ig(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Gg);Gg.prototype.readTerminatedString=Gg.prototype.hc;Gg.prototype.seek=Gg.prototype.seek;Gg.prototype.rewind=Gg.prototype.Ai;
221
- Gg.prototype.skip=Gg.prototype.skip;Gg.prototype.readBytes=Gg.prototype.mb;Gg.prototype.readUint64=Gg.prototype.Fc;Gg.prototype.readInt32=Gg.prototype.Cg;Gg.prototype.readUint32=Gg.prototype.O;Gg.prototype.readUint16=Gg.prototype.ka;Gg.prototype.readUint8=Gg.prototype.S;Gg.prototype.getLength=Gg.prototype.getLength;Gg.prototype.getPosition=Gg.prototype.ra;Gg.prototype.hasMoreData=Gg.prototype.ma;var Hg=1;Gg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Hg};function Jg(){this.i=[];this.h=[];this.g=!1}q=Jg.prototype;q.box=function(a,b){a=Kg(a);this.i[a]=Ng;this.h[a]=b;return this};q.R=function(a,b){a=Kg(a);this.i[a]=Og;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Gg(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Cc(0,a,b,c)};
222
- q.Cc=function(a,b,c,d){var e=b.ra();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.O(),g=b.O(),h=Pg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.ra()+8>b.getLength()){this.g=!0;return}f=b.Fc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Og){if(d&&b.ra()+4>b.getLength()){this.g=!0;return}n=b.O();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.ra(),b=0<d?b.mb(d):new Uint8Array(0),b=new Gg(b,0),l({name:h,parser:this,
218
+ lg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ng};var og={};function Ag(a){this.g=!1;this.h=new Zf;this.i=a}Ag.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 Bg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Cg(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Dg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Eg(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Fg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Gg(a,b){this.h=Fb(a);this.i=b==Hg;this.g=0}r=Gg.prototype;r.ma=function(){return this.g<this.h.byteLength};r.ra=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.S=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Ig();}};r.ka=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Ig();}};r.O=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Ig();}};
219
+ r.Cg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Ig();}};r.Fc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Ig();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.mb=function(a){if(this.g+a>this.h.byteLength)throw Ig();var b=Bb(this.h,this.g,a);this.g+=a;return b};
220
+ r.skip=function(a){if(this.g+a>this.h.byteLength)throw Ig();this.g+=a};r.Ai=function(a){if(this.g<a)throw Ig();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Ig();this.g=a};r.hc=function(){for(var a=this.g;this.ma()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Bb(this.h,a,this.g-a);this.g+=1;return xd(a)};function Ig(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Gg);Gg.prototype.readTerminatedString=Gg.prototype.hc;Gg.prototype.seek=Gg.prototype.seek;Gg.prototype.rewind=Gg.prototype.Ai;
221
+ Gg.prototype.skip=Gg.prototype.skip;Gg.prototype.readBytes=Gg.prototype.mb;Gg.prototype.readUint64=Gg.prototype.Fc;Gg.prototype.readInt32=Gg.prototype.Cg;Gg.prototype.readUint32=Gg.prototype.O;Gg.prototype.readUint16=Gg.prototype.ka;Gg.prototype.readUint8=Gg.prototype.S;Gg.prototype.getLength=Gg.prototype.getLength;Gg.prototype.getPosition=Gg.prototype.ra;Gg.prototype.hasMoreData=Gg.prototype.ma;var Hg=1;Gg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Hg};function Jg(){this.i=[];this.h=[];this.g=!1}r=Jg.prototype;r.box=function(a,b){a=Kg(a);this.i[a]=Lg;this.h[a]=b;return this};r.R=function(a,b){a=Kg(a);this.i[a]=Og;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Gg(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Cc(0,a,b,c)};
222
+ r.Cc=function(a,b,c,d){var e=b.ra();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.O(),g=b.O(),h=Pg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.ra()+8>b.getLength()){this.g=!0;return}f=b.Fc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Og){if(d&&b.ra()+4>b.getLength()){this.g=!0;return}n=b.O();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.ra(),b=0<d?b.mb(d):new Uint8Array(0),b=new Gg(b,0),l({name:h,parser:this,
223
223
  partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.ra(),b.getLength()-b.ra()))}};function Qg(a){for(var b=Rg(a);a.reader.ma()&&!a.parser.g;)a.parser.Cc(a.start+b,a.reader,a.partialOkay)}function Sg(a){for(var b=Rg(a),c=a.reader.O(),d=0;d<c&&(a.parser.Cc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Tg(a){var b=Rg(a);for(a.reader.skip(78);a.reader.ma()&&!a.parser.g;)a.parser.Cc(a.start+b,a.reader,a.partialOkay)}
224
224
  function Ug(a){var b=Rg(a);a.reader.skip(8);var c=a.reader.ka();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.ma()&&!a.parser.g;)a.parser.Cc(a.start+b,a.reader,a.partialOkay)}function Vg(a){return function(b){a(b.reader.mb(b.reader.getLength()-b.reader.ra()))}}function Kg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Pg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
225
- function Rg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Jg);Jg.headerSize=Rg;Jg.typeToString=Pg;Jg.allData=Vg;Jg.audioSampleEntry=Ug;Jg.visualSampleEntry=Tg;Jg.sampleDescription=Sg;Jg.children=Qg;Jg.prototype.parseNext=Jg.prototype.Cc;Jg.prototype.parse=Jg.prototype.parse;Jg.prototype.stop=Jg.prototype.stop;Jg.prototype.fullBox=Jg.prototype.R;Jg.prototype.box=Jg.prototype.box;var Ng=0,Og=1;function Wg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Jg).box("moov",Qg).box("moof",Qg).R("pssh",function(c){if(!(1<c.version)){var d=Bb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Md(c.reader.mb(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=Md(c.reader.mb(16));b.h.push(f)}}}}).parse(a)}
226
- function Xg(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=Fb(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=t(c),c=b.next();!c.done;c=b.next())c=Ld(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
225
+ function Rg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Jg);Jg.headerSize=Rg;Jg.typeToString=Pg;Jg.allData=Vg;Jg.audioSampleEntry=Ug;Jg.visualSampleEntry=Tg;Jg.sampleDescription=Sg;Jg.children=Qg;Jg.prototype.parseNext=Jg.prototype.Cc;Jg.prototype.parse=Jg.prototype.parse;Jg.prototype.stop=Jg.prototype.stop;Jg.prototype.fullBox=Jg.prototype.R;Jg.prototype.box=Jg.prototype.box;var Lg=0,Og=1;function Wg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Jg).box("moov",Qg).box("moof",Qg).R("pssh",function(c){if(!(1<c.version)){var d=Bb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Kd(c.reader.mb(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=Kd(c.reader.mb(16));b.h.push(f)}}}}).parse(a)}
226
+ function Xg(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=Fb(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=t(c),c=b.next();!c.done;c=b.next())c=Jd(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
227
227
  @license
228
228
  tXml
229
229
  Copyright 2015 Tobias Nickel
@@ -231,8 +231,8 @@ function Xg(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=
231
231
  */
232
232
  function Yg(a,b){var c=void 0===c?!1:c;a=Ad(a);return Zg(a,b,c)}function Zg(a,b,c){a=$g(a,void 0===c?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return d.tagName===b}))?a:null}function ah(a){return bh.has(a)?bh.get(a):""}
233
233
  function $g(a,b){function c(f,g){g=void 0===g?!1:g;for(var h=[];a[e];)if(60==a.charCodeAt(e)){if(47===a.charCodeAt(e+1)){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(-1==k){var l=f.indexOf(".");0<l&&(k=g.indexOf(f.substring(0,l)))}if(-1==k)throw f=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(33===a.charCodeAt(e+1)){if(45==a.charCodeAt(e+2)){for(;-1!==e&&(62!==a.charCodeAt(e)||
234
- 45!=a.charCodeAt(e-1)||45!=a.charCodeAt(e-2)||-1==e);)e=a.indexOf(">",e+1);-1===e&&(e=a.length)}else if(91===a.charCodeAt(e+2)&&91===a.charCodeAt(e+8)&&"cdata"===a.substr(e+3,5).toLowerCase()){k=a.indexOf("]]\x3e",e);-1==k?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];62!==a.charCodeAt(e)&&a[e];){var p=a.charCodeAt(e);if(64<p&&91>p||96<p&&123>p){p=d();for(var r=a.charCodeAt(e);r&&39!==r&&34!==r&&!(64<r&&91>r||96<r&&123>
235
- r)&&62!==r;)e++,r=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(39===r||34===r){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)"string"!==typeof k[m]&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(p.startsWith("xmlns:")){r=u;var v=p.split(":")[1];bh.set(r,v);ch.set(v,r)}"tt"===m&&"xml:space"===p&&"preserve"===u&&(l=!0);n[p]=u}e++}47!==a.charCodeAt(e-1)?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length;for(n=
234
+ 45!=a.charCodeAt(e-1)||45!=a.charCodeAt(e-2)||-1==e);)e=a.indexOf(">",e+1);-1===e&&(e=a.length)}else if(91===a.charCodeAt(e+2)&&91===a.charCodeAt(e+8)&&"cdata"===a.substr(e+3,5).toLowerCase()){k=a.indexOf("]]\x3e",e);-1==k?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];62!==a.charCodeAt(e)&&a[e];){var p=a.charCodeAt(e);if(64<p&&91>p||96<p&&123>p){p=d();for(var q=a.charCodeAt(e);q&&39!==q&&34!==q&&!(64<q&&91>q||96<q&&123>
235
+ q)&&62!==q;)e++,q=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(39===q||34===q){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)"string"!==typeof k[m]&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(p.startsWith("xmlns:")){q=u;var v=p.split(":")[1];bh.set(q,v);ch.set(v,q)}"tt"===m&&"xml:space"===p&&"preserve"===u&&(l=!0);n[p]=u}e++}47!==a.charCodeAt(e-1)?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length;for(n=
236
236
  0;n<m;n++)p=k[n],"string"!==typeof p?b&&(p.parent=l):n==m-1&&"\n"==p&&k.pop();k=l}h.push(k);if("string"===typeof k)break;"?"===k.tagName[0]&&k.children&&(h.push.apply(h,x(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,-2===e&&(e=a.length),k=a.slice(k,e+1),g?0<k.length&&h.push(k):h.length&&1==k.length&&"\n"==k[0]?h.push(k):0<k.trim().length&&h.push(k),e++;return h}function d(){for(var f=e;-1==="\r\n\t>/= ".indexOf(a[e])&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")}
237
237
  function dh(a){return"string"===typeof a}function eh(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function fh(a,b){var c=[];if(!a.children)return[];a=t(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function gh(a){if("string"===typeof a)return Ed(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:Ed(a)}
238
238
  function hh(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=gh(a))&&(a=a.trim());return a}function ih(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())ih(d.value,b,c)}return c}function jh(a,b){a=fh(a,b);return 1!=a.length?null:a[0]}function kh(a,b,c){a=lh(a,b,c);return 1!=a.length?null:a[0]}
@@ -240,57 +240,57 @@ function mh(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(
240
240
  function ph(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function qh(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}
241
241
  function rh(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 sh(a){a=Number(a);return 0===a%1?a:null}function th(a){a=Number(a);return 0===a%1&&0<a?a:null}function uh(a){a=Number(a);return 0===a%1&&0<=a?a:null}function vh(a){a=Number(a);return isNaN(a)?null:a}function wh(a){return a?"true"===a.toLowerCase():!1}
242
242
  function xh(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
243
- function yh(a){var b=[];a=Ed(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,Ib:c.split("/@")[1]||
244
- null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Ib=c.slice(1))}return b}
245
- function zh(a,b){var c=yh(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=Ah(a,"t",d.t)),null!==d.n&&(c=Ah(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.Ib)&&a[c]?Bh(a[c],e,d,hh(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}
243
+ function yh(a){var b=[];a=Ed(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,Jb:c.split("/@")[1]||
244
+ null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Jb=c.slice(1))}return b}
245
+ function zh(a,b){var c=yh(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=Ah(a,"t",d.t)),null!==d.n&&(c=Ah(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.Jb)&&a[c]?Bh(a[c],e,d,hh(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}
246
246
  function Ah(a,b,c){var d=0;a=t(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function Bh(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
247
247
  function Ch(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=ch.has(b)?ch.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=t(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,"string"==typeof d?c=new Text(d):c=Ch(d),b.appendChild(c);return b}
248
- function Dh(a){if(!a)return null;var b={tagName:a.tagName,attributes:Ie(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Dh(c),c.parent=b,b.children.push(c));return b}var bh=new Map,ch=new Map;function Eh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ha=this.ba=!1;this.J=0;this.g=null;this.B=new hb;this.i=new Map;this.A=new Map;this.l=new Zf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.$=new Map;this.ea=new Map;this.L=new Sc(function(){return Fh(b)});this.P=!1;this.N=[];this.W=!1;this.K=new Sc(function(){Gh(b)});this.l.catch(function(){});this.j=new Ag(function(){return Hh(b)});this.aa=!1;this.F=this.G=null}q=Eh.prototype;q.destroy=function(){return this.j.destroy()};
249
- function Hh(a){return O(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.L.stop(),a.L=null,E(b,Ih(a),2);case 2:if(!a.m){b.u(3);break}wa(b,4);return E(b,a.m.setMediaKeys(null),6);case 6:ya(b,5);break;case 4:Aa(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.aa=!1,a.G=null,H(b)}})}q.configure=function(a){this.h=a;this.K&&this.K.Va(this.h.updateExpirationTime)};
248
+ function Dh(a){if(!a)return null;var b={tagName:a.tagName,attributes:Ie(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Dh(c),c.parent=b,b.children.push(c));return b}var bh=new Map,ch=new Map;function Eh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ha=this.ba=!1;this.J=0;this.g=null;this.B=new hb;this.i=new Map;this.A=new Map;this.l=new Zf;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.$=new Map;this.ga=new Map;this.L=new Sc(function(){return Fh(b)});this.P=!1;this.N=[];this.U=!1;this.K=new Sc(function(){Gh(b)});this.l.catch(function(){});this.j=new Ag(function(){return Hh(b)});this.aa=!1;this.F=this.G=null}r=Eh.prototype;r.destroy=function(){return this.j.destroy()};
249
+ function Hh(a){return O(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.L.stop(),a.L=null,E(b,Ih(a),2);case 2:if(!a.m){b.u(3);break}wa(b,4);return E(b,a.m.setMediaKeys(null),6);case 6:ya(b,5);break;case 4:za(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.aa=!1,a.G=null,H(b)}})}r.configure=function(a){this.h=a;this.K&&this.K.Va(this.h.updateExpirationTime)};
250
250
  function Jh(a,b,c){a.ha=!0;a.A=new Map;a.P=c;return Kh(a,b)}function Lh(a,b,c){a.A=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.P=0<a.A.size;return Kh(a,b)}
251
251
  function Mh(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 Nh(a,g,[])}
252
- function Kh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z;return O(function(B){if(1==B.g){if(c=Oh(a))for(d=t(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(D){return D.video&&D.video.drmInfos.length||D.audio&&D.audio.drmInfos.length?!0:!1});g||(h=Eg(a.h.servers),Ph(b,h));k=new Set;l=t(b);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=Qh(n),r=t(p),u=r.next();!u.done;u=r.next())v=u.value,k.add(v);w=t(k);for(A=w.next();!A.done;A=
252
+ function Kh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z;return O(function(B){if(1==B.g){if(c=Oh(a))for(d=t(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(D){return D.video&&D.video.drmInfos.length||D.audio&&D.audio.drmInfos.length?!0:!1});g||(h=Eg(a.h.servers),Ph(b,h));k=new Set;l=t(b);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=Qh(n),q=t(p),u=q.next();!u.done;u=q.next())v=u.value,k.add(v);w=t(k);for(A=w.next();!A.done;A=
253
253
  w.next())y=A.value,Rh(y,Eg(a.h.servers),Eg(a.h.advanced||{}),a.h.keySystemsMapping);return E(B,Ue(b,a.P,a.aa,a.h.preferredKeySystems),2)}Bg(a.j);C=g||Object.keys(a.h.servers).length;if(!C)return a.ba=!0,B.return(Promise.resolve());z=Nh(a,void 0,b);return B.return(g?z:z.catch(function(){}))})}
254
- function Sh(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.u(2);break}return E(c,a.G,3);case 3:return Bg(a.j),c.return();case 2:return wa(c,4),a.G=a.m.setMediaKeys(a.s),E(c,a.G,6);case 6:ya(c,5);break;case 4:b=Aa(c),a.o(new T(2,6,6003,b.message));case 5:Bg(a.j),H(c)}})}function Th(a,b){return O(function(c){if(1==c.g)return E(c,Sh(a),2);Uh(a,b.initDataType,Bb(b.initData));H(c)})}
255
- q.qc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.sa(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.sa(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Vh(b,e.value);b.W=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ih(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
254
+ function Sh(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.u(2);break}return E(c,a.G,3);case 3:return Bg(a.j),c.return();case 2:return wa(c,4),a.G=a.m.setMediaKeys(a.s),E(c,a.G,6);case 6:ya(c,5);break;case 4:b=za(c),a.o(new T(2,6,6003,b.message));case 5:Bg(a.j),H(c)}})}function Th(a,b){return O(function(c){if(1==c.g)return E(c,Sh(a),2);Uh(a,b.initDataType,Bb(b.initData));H(c)})}
255
+ r.qc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.za(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.za(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Vh(b,e.value);b.U=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ih(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
256
256
  b.A.size?E(c,Sh(b),2):c.u(2)}Wh(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Th(b,d)});H(c)})};
257
- function Xh(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=qg([a.g.serverCertificateUri],a.h.retryParameters);wa(g,3);c=a.C.Db.request(5,b);return E(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Bb(d.data);ya(g,4);break;case 3:throw e=Aa(g),new T(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();
258
- wa(g,6);return E(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:ya(g,0);break;case 6:throw f=Aa(g),new T(2,6,6004,f.message);}})}function Yh(a,b){var c,d,e;return O(function(f){if(1==f.g)return E(f,Zh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.fb=new Zf,d.push(e.fb);d.push(c.remove());return E(f,Promise.all(d),3)}a.i.delete(c);H(f)})}
257
+ function Xh(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=qg([a.g.serverCertificateUri],a.h.retryParameters);wa(g,3);c=a.C.Eb.request(5,b);return E(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Bb(d.data);ya(g,4);break;case 3:throw e=za(g),new T(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();
258
+ wa(g,6);return E(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:ya(g,0);break;case 6:throw f=za(g),new T(2,6,6004,f.message);}})}function Yh(a,b){var c,d,e;return O(function(f){if(1==f.g)return E(f,Zh(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.fb=new Zf,d.push(e.fb);d.push(c.remove());return E(f,Promise.all(d),3)}a.i.delete(c);H(f)})}
259
259
  function Wh(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.A.size)return g.u(2);a.A.forEach(function(h,k){Zh(a,k,h)});return E(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&$h(a))return g.return(a.l);a.l=new Zf;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Uh(a,f.initDataType,f.initData);ai(a)&&a.l.resolve();return g.return(a.l)})}
260
- function Uh(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(yb(c,e.value.initData))return}0<a.i.size&&ai(a)&&(a.l.resolve(),a.l=new Zf,a.l.catch(function(){}));bi(a,b,c,a.g.sessionType)}}function ci(a){a=a.i.keys();a=Cg(a,function(b){return b.sessionId});return Array.from(a)}
261
- q.Pe=function(){var a=this,b=this.i.keys();b=Cg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.Uc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.zd=function(){return Fg(this.ea)};
262
- function Nh(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y;return O(function(C){switch(C.g){case 1:d=new Map;if(c.length){e=di(a,c,d);C.u(2);break}return E(C,ei(a,b),3);case 3:e=C.h;case 2:f=e;if(!f)throw new T(2,6,6001);Bg(a.j);wa(C,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());p=t(k);for(r=p.next();!r.done;r=p.next())u=r.value,a.H.add(u.contentType.toLowerCase());if(c.length){var z=
260
+ function Uh(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(yb(c,e.value.initData))return;var f=!1;a.A.forEach(function(g){!f&&yb(c,g.initData)&&(f=!0)});if(f)return}0<a.i.size&&ai(a)&&(a.l.resolve(),a.l=new Zf,a.l.catch(function(){}));bi(a,b,c,a.g.sessionType)}}function ci(a){a=a.i.keys();a=Cg(a,function(b){return b.sessionId});return Array.from(a)}
261
+ r.Pe=function(){var a=this,b=this.i.keys();b=Cg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.Uc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Bd=function(){return Fg(this.ga)};
262
+ function Nh(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y;return O(function(C){switch(C.g){case 1:d=new Map;if(c.length){e=di(a,c,d);C.u(2);break}return E(C,ei(a,b),3);case 3:e=C.h;case 2:f=e;if(!f)throw new T(2,6,6001);Bg(a.j);wa(C,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());p=t(k);for(q=p.next();!q.done;q=p.next())u=q.value,a.H.add(u.contentType.toLowerCase());if(c.length){var z=
263
263
  f.keySystem;var B=d.get(f.keySystem);var D=[],I=[],F=[],J=[],K=[],G=new Set;fi(B,D,I,J,F,K,G);var M=a.P?"persistent-license":"temporary";z={keySystem:z,encryptionScheme:D[0],licenseServerUri:I[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||M,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:J[0],serverCertificateUri:F[0],initData:K,keyIds:G};B=t(B);
264
264
  for(D=B.next();!D.done;D=B.next())D=D.value,D.distinctiveIdentifierRequired&&(z.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(z.persistentStateRequired=D.persistentStateRequired);B=z}else B=f.keySystem,z=b.get(f.keySystem),D=[],I=[],F=[],J=[],K=[],G=new Set,fi(z.drmInfos,D,I,J,F,K,G),B={keySystem:B,encryptionScheme:D[0],licenseServerUri:I[0],distinctiveIdentifierRequired:"required"==z.distinctiveIdentifier,persistentStateRequired:"required"==z.persistentState,
265
265
  sessionType:z.sessionTypes[0]||"temporary",audioRobustness:(z.audioCapabilities?z.audioCapabilities[0].robustness:"")||"",videoRobustness:(z.videoCapabilities?z.videoCapabilities[0].robustness:"")||"",serverCertificate:J[0],serverCertificateUri:F[0],initData:K,keyIds:G};a.g=B;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return E(C,f.createMediaKeys(),6);case 6:v=C.h;Bg(a.j);a.s=v;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.s)){C.u(7);break}wa(C,8);return E(C,a.s.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
266
- 10);case 10:w=C.h;if("usable"!=w)throw new T(2,6,6018);Bg(a.j);ya(C,7,4);break;case 8:A=Aa(C,4);if(A instanceof T)throw A;throw new T(2,6,6019,A.message);case 7:return a.ba=!0,E(C,Xh(a),11);case 11:Bg(a.j);ya(C,0);break;case 4:y=Aa(C);Bg(a.j,y);a.g=null;a.H.clear();if(y instanceof T)throw y;throw new T(2,6,6002,y.message);}})}
266
+ 10);case 10:w=C.h;if("usable"!=w)throw new T(2,6,6018);Bg(a.j);ya(C,7,4);break;case 8:A=za(C,4);if(A instanceof T)throw A;throw new T(2,6,6019,A.message);case 7:return a.ba=!0,E(C,Xh(a),11);case 11:Bg(a.j);ya(C,0);break;case 4:y=za(C);Bg(a.j,y);a.g=null;a.H.clear();if(y instanceof T)throw y;throw new T(2,6,6002,y.message);}})}
267
267
  function di(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(Qh(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(1==c.size&&c.has(""))throw new T(2,6,6E3);a=t(a.h.preferredKeySystems);e=a.next();for(d={};!e.done;d={Bg:void 0},e=a.next())for(d.Bg=e.value,e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
268
268
  l.Bg}}(d)))return f.keySystemAccess;a=t([!0,!1]);for(d=a.next();!d.done;d=a.next())for(d=d.value,e=t(b),f=e.next();!f.done;f=e.next()){f=t(f.value.decodingInfos);for(var g=f.next();!g.done;g=f.next())if(g=g.value,g.supported&&g.keySystemAccess){var h=c.get(g.keySystemAccess.keySystem);h=t(h);for(var k=h.next();!k.done;k=h.next())if(!!k.value.licenseServerUri==d)return g.keySystemAccess}}return null}
269
- function ei(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A;return O(function(y){switch(y.g){case 1:if(1==b.size&&b.has(""))throw new T(2,6,6E3);d=t(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=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){y.u(4);break}k=h.value;if(!b.has(k)){y.u(3);break}l=b.get(k);wa(y,6);return E(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
270
- y.h,y.return(c);case 6:Aa(y);case 7:Bg(a.j);case 3:h=g.next();y.u(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){y.u(11);break}p=n.value;r=t(b.keys());u=r.next();case 12:if(u.done){n=m.next();y.u(9);break}v=u.value;w=b.get(v);A=w.drmInfos.some(function(C){return!!C.licenseServerUri});if(A!=p){y.u(13);break}wa(y,15);return E(y,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=y.h,y.return(c);case 15:Aa(y);case 16:Bg(a.j);case 13:u=r.next();y.u(12);break;case 11:return y.return(c)}})}
271
- function Oh(a){a=Eg(a.h.clearKeys);return 0==a.size?null:Qd(a)}function gi(a){ai(a)&&a.l.resolve()}function hi(a,b){(new Sc(function(){b.loaded=!0;gi(a)})).X(ii)}
272
- function Zh(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.W?a.N.push(n):Vh(a,n)});a.B.D(d,"keystatuseschange",function(n){return ji(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,kf:Infinity,fb:null,type:"persistent-license"};a.i.set(d,f);wa(m,2);return E(m,
273
- d.load(b),4);case 4:return g=m.h,Bg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(h,6,6013)),f.loaded=!0),hi(a,f),gi(a),m.return(d);case 2:k=Aa(m),Bg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(l,6,6005,k.message)),f.loaded=!0,gi(a);case 3:return m.return(Promise.resolve())}})}
274
- function bi(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new T(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.W?a.N.push(f):Vh(a,f)});a.B.D(e,"keystatuseschange",function(f){return ji(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,kf:Infinity,fb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof T||(b=new T(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&Hd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
269
+ function ei(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A;return O(function(y){switch(y.g){case 1:if(1==b.size&&b.has(""))throw new T(2,6,6E3);d=t(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=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){y.u(4);break}k=h.value;if(!b.has(k)){y.u(3);break}l=b.get(k);wa(y,6);return E(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
270
+ y.h,y.return(c);case 6:za(y);case 7:Bg(a.j);case 3:h=g.next();y.u(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){y.u(11);break}p=n.value;q=t(b.keys());u=q.next();case 12:if(u.done){n=m.next();y.u(9);break}v=u.value;w=b.get(v);A=w.drmInfos.some(function(C){return!!C.licenseServerUri});if(A!=p){y.u(13);break}wa(y,15);return E(y,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=y.h,y.return(c);case 15:za(y);case 16:Bg(a.j);case 13:u=q.next();y.u(12);break;case 11:return y.return(c)}})}
271
+ function Oh(a){a=Eg(a.h.clearKeys);return 0==a.size?null:Qd(a)}function gi(a){ai(a)&&a.l.resolve()}function hi(a,b){(new Sc(function(){b.loaded=!0;gi(a)})).Y(ii)}
272
+ function Zh(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.B.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.U?a.N.push(n):Vh(a,n)});a.B.D(d,"keystatuseschange",function(n){return ji(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,kf:Infinity,fb:null,type:"persistent-license"};a.i.set(d,f);wa(m,2);return E(m,
273
+ d.load(b),4);case 4:return g=m.h,Bg(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(h,6,6013)),f.loaded=!0),hi(a,f),gi(a),m.return(d);case 2:k=za(m),Bg(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new T(l,6,6005,k.message)),f.loaded=!0,gi(a);case 3:return m.return(Promise.resolve())}})}
274
+ function bi(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new T(2,6,6005,f.message));return}a.B.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.U?a.N.push(f):Vh(a,f)});a.B.D(e,"keystatuseschange",function(f){return ji(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,kf:Infinity,fb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof T||(b=new T(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&Hd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
275
275
  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.o(new T(2,6,6006,f.message,f,h))}})}
276
- function Vh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v;O(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&Hd(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=qg([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
277
- f.headers[h];if(Mc(a.g.keySystem)){var A=yd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=Zg(A,"PlayReadyKeyMessage");var y=ih(A,"HttpHeader");y=t(y);for(var C=y.next();!C.done;C=y.next()){var z=C.value;C=ih(z,"name")[0];z=ih(z,"value")[0];g.headers[gh(C)]=gh(z)}A=ih(A,"Challenge")[0];g.body=Id(gh(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();wa(w,2);m=a.C.Db.request(2,g);return E(w,m.promise,4);case 4:l=w.h;ya(w,3);break;case 2:n=Aa(w);if(a.j.g)return w.return();
278
- p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.fb&&d.fb.reject(p)):(d&&d.fb&&d.fb.reject(p),a.i.delete(c),ai(a)&&(a.l.resolve(),a.L.X(.1)));return w.return();case 3:if(a.j.g)return w.return();a.J+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Hd(l.data);wa(w,5);return E(w,c.update(l.data),7);case 7:ya(w,6);break;case 5:return r=Aa(w),u=new T(2,6,6008,r.message),a.o(u),d&&d.fb&&d.fb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new U("drmsessionupdate");a.C.onEvent(v);d&&(d.fb&&d.fb.resolve(),
276
+ function Vh(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v;O(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&Hd(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=qg([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
277
+ f.headers[h];if(Mc(a.g.keySystem)){var A=yd(g.body,!0,!0);if(A.includes("PlayReadyKeyMessage")){A=Zg(A,"PlayReadyKeyMessage");var y=ih(A,"HttpHeader");y=t(y);for(var C=y.next();!C.done;C=y.next()){var z=C.value;C=ih(z,"name")[0];z=ih(z,"value")[0];g.headers[gh(C)]=gh(z)}A=ih(A,"Challenge")[0];g.body=Id(gh(A))}else g.headers["Content-Type"]="text/xml; charset=utf-8"}k=Date.now();wa(w,2);m=a.C.Eb.request(2,g);return E(w,m.promise,4);case 4:l=w.h;ya(w,3);break;case 2:n=za(w);if(a.j.g)return w.return();
278
+ p=new T(2,6,6007,n);1==a.i.size?(a.o(p),d&&d.fb&&d.fb.reject(p)):(d&&d.fb&&d.fb.reject(p),a.i.delete(c),ai(a)&&(a.l.resolve(),a.L.Y(.1)));return w.return();case 3:if(a.j.g)return w.return();a.J+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Hd(l.data);wa(w,5);return E(w,c.update(l.data),7);case 7:ya(w,6);break;case 5:return q=za(w),u=new T(2,6,6008,q.message),a.o(u),d&&d.fb&&d.fb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new U("drmsessionupdate");a.C.onEvent(v);d&&(d.fb&&d.fb.resolve(),
279
279
  hi(a,d));H(w)}})}
280
- function ji(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(Mc(a.g.keySystem)&&16==g.byteLength&&(Wc()||hd())){h=Fb(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=Md(g).slice(0,32);a.$.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.fb&&(a.i.delete(b),b.close().catch(function(){}));ai(a)&&
281
- (a.l.resolve(),a.L.X(ki))}function Fh(a){var b=a.$,c=a.ea;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.o(new T(2,6,6014));a.C.Xd(Fg(c))}
282
- function li(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G;return O(function(M){if(1==M.g){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready.recommendation":c};e=
283
- [{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(N,L){var P,R,Q,ca,ea,la,Qa,ua;return O(function(za){switch(za.g){case 1:return wa(za,2),E(za,L.createMediaKeys(),4);case 4:ya(za,3);break;case 2:return Aa(za),za.return();case 3:R=
280
+ function ji(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(Mc(a.g.keySystem)&&16==g.byteLength&&(Wc()||hd())){h=Fb(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=Kd(g).slice(0,32);a.$.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.fb&&(a.i.delete(b),b.close().catch(function(){}));ai(a)&&
281
+ (a.l.resolve(),a.L.Y(ki))}function Fh(a){var b=a.$,c=a.ga;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.o(new T(2,6,6014));a.C.Xd(Fg(c))}
282
+ function li(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F,J,K,G;return O(function(M){if(1==M.g){a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready.recommendation":c};e=
283
+ [{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(N,L){var P,R,Q,ca,ea,la,Qa,ua;return O(function(Aa){switch(Aa.g){case 1:return wa(Aa,2),E(Aa,L.createMediaKeys(),4);case 4:ya(Aa,3);break;case 2:return za(Aa),Aa.return();case 3:R=
284
284
  (P=L.getConfiguration().sessionTypes)?P.includes("persistent-license"):!1,$c()&&(R=!1),Q=L.getConfiguration().videoCapabilities,ca=L.getConfiguration().audioCapabilities,ea={persistentState:R,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(N)&&k.get(N)?ea=k.get(N):k.set(N,ea),(la=Q[0].encryptionScheme)&&!ea.encryptionSchemes.includes(la)&&ea.encryptionSchemes.push(la),(Qa=Q[0].robustness)&&!ea.videoRobustnessLevels.includes(Qa)&&ea.videoRobustnessLevels.push(Qa),(ua=
285
- ca[0].robustness)&&!ea.audioRobustnessLevels.includes(ua)&&ea.audioRobustnessLevels.push(ua),H(za)}})};m=function(N,L,P,R){var Q,ca,ea,la,Qa,ua,za,La,Ra,ma;return O(function(bb){switch(bb.g){case 1:wa(bb,2);Q=He(g);ca=t(Q.videoCapabilities);for(ea=ca.next();!ea.done;ea=ca.next())la=ea.value,la.encryptionScheme=L,la.robustness=P;Qa=t(Q.audioCapabilities);for(ua=Qa.next();!ua.done;ua=Qa.next())za=ua.value,za.encryptionScheme=L,za.robustness=R;La=He(Q);La.persistentState="required";La.sessionTypes=["persistent-license"];
286
- Ra=[La,Q];return E(bb,navigator.requestMediaKeySystemAccess(N,Ra),4);case 4:return ma=bb.h,E(bb,l(N,ma),5);case 5:ya(bb,0);break;case 2:Aa(bb),H(bb)}})};n=function(N,L,P,R){var Q,ca,ea;return O(function(la){switch(la.g){case 1:return wa(la,2),Q={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:N,video:{encryptionScheme:L,robustness:P},audio:{encryptionScheme:L,
287
- robustness:R}}},E(la,navigator.mediaCapabilities.decodingInfo(Q),4);case 4:return ca=la.h,ea=ca.keySystemAccess,E(la,l(N,ea),5);case 5:ya(la,0);break;case 2:Aa(la),H(la)}})};p=t(a);for(r=p.next();!r.done;r=p.next())u=r.value,k.set(u,null);v=[];w=t(h);for(A=w.next();!A.done;A=w.next())for(y=A.value,C=t(a),z=C.next();!z.done;z=C.next())B=z.value,"org.w3.clearkey"===B&&kd()||(v.push(m(B,y,"","")),v.push(n(B,y,"","")));D=t(a);for(I=D.next();!I.done;I=D.next())for(F=I.value,J=t(d[F]||[]),K=J.next();!K.done;K=
288
- J.next())G=K.value,v.push(m(F,null,G,"")),v.push(m(F,null,"",G)),v.push(n(F,null,G,"")),v.push(n(F,null,"",G));return E(M,Promise.all(v),2)}return M.return(Fg(k))})}function mi(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Sc(e)).X(ni)}),wa(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ya(c,0);Aa(c);H(c)})}
289
- function Ih(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return E(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return O(function(g){if(1==g.g)return wa(g,2),a.ha||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?E(g,mi(e),5):E(g,e.remove(),5);if(2!=g.g)return ya(g,0);Aa(g);H(g)})})),0)})}function Qh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
285
+ ca[0].robustness)&&!ea.audioRobustnessLevels.includes(ua)&&ea.audioRobustnessLevels.push(ua),H(Aa)}})};m=function(N,L,P,R){var Q,ca,ea,la,Qa,ua,Aa,La,Ra,ma;return O(function(bb){switch(bb.g){case 1:wa(bb,2);Q=He(g);ca=t(Q.videoCapabilities);for(ea=ca.next();!ea.done;ea=ca.next())la=ea.value,la.encryptionScheme=L,la.robustness=P;Qa=t(Q.audioCapabilities);for(ua=Qa.next();!ua.done;ua=Qa.next())Aa=ua.value,Aa.encryptionScheme=L,Aa.robustness=R;La=He(Q);La.persistentState="required";La.sessionTypes=["persistent-license"];
286
+ Ra=[La,Q];return E(bb,navigator.requestMediaKeySystemAccess(N,Ra),4);case 4:return ma=bb.h,E(bb,l(N,ma),5);case 5:ya(bb,0);break;case 2:za(bb),H(bb)}})};n=function(N,L,P,R){var Q,ca,ea;return O(function(la){switch(la.g){case 1:return wa(la,2),Q={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:N,video:{encryptionScheme:L,robustness:P},audio:{encryptionScheme:L,
287
+ robustness:R}}},E(la,navigator.mediaCapabilities.decodingInfo(Q),4);case 4:return ca=la.h,ea=ca.keySystemAccess,E(la,l(N,ea),5);case 5:ya(la,0);break;case 2:za(la),H(la)}})};p=t(a);for(q=p.next();!q.done;q=p.next())u=q.value,k.set(u,null);v=[];w=t(h);for(A=w.next();!A.done;A=w.next())for(y=A.value,C=t(a),z=C.next();!z.done;z=C.next())B=z.value,"org.w3.clearkey"===B&&kd()||(v.push(m(B,y,"","")),v.push(n(B,y,"","")));D=t(a);for(I=D.next();!I.done;I=D.next())for(F=I.value,J=t(d[F]||[]),K=J.next();!K.done;K=
288
+ J.next())G=K.value,v.push(m(F,null,G,"")),v.push(m(F,null,"",G)),v.push(n(F,null,G,"")),v.push(n(F,null,"",G));return E(M,Promise.all(v),2)}return M.return(Fg(k))})}function mi(a){var b;return O(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Sc(e)).Y(ni)}),wa(c,2),E(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ya(c,0);za(c);H(c)})}
289
+ function Ih(a){var b;return O(function(c){b=Array.from(a.i.entries());a.i.clear();return E(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return O(function(g){if(1==g.g)return wa(g,2),a.ha||a.A.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?E(g,mi(e),5):E(g,e.remove(),5);if(2!=g.g)return ya(g,0);za(g);H(g)})})),0)})}function Qh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
290
290
  function Gh(a){a.i.forEach(function(b,c){var d=b.kf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.kf=e)})}function ai(a){a=a.i.values();return Dg(a,function(b){return b.loaded})}function $h(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.$.get(c.value))return!1;return!0}
291
291
  function Ph(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
292
292
  function fi(a,b,c,d,e,f,g){var h=[];a=t(a);for(var k=a.next(),l={};!k.done;l={va:void 0},k=a.next()){l.va=k.value;b.includes(l.va.encryptionScheme)||b.push(l.va.encryptionScheme);"org.w3.clearkey"==l.va.keySystem&&l.va.licenseServerUri.startsWith("data:application/json;base64,")?h.includes(l.va.licenseServerUri)||h.push(l.va.licenseServerUri):c.includes(l.va.licenseServerUri)||c.push(l.va.licenseServerUri);e.includes(l.va.serverCertificateUri)||e.push(l.va.serverCertificateUri);l.va.serverCertificate&&
293
- (d.some(function(p){return function(r){return yb(r,p.va.serverCertificate)}}(l))||d.push(l.va.serverCertificate));if(l.va.initData){k=t(l.va.initData);for(var m=k.next(),n={};!m.done;n={Ve:void 0},m=k.next())n.Ve=m.value,f.some(function(p){return function(r){var u=p.Ve;return r.keyId&&r.keyId==u.keyId?!0:r.initDataType==u.initDataType&&yb(r.initData,u.initData)}}(n))||f.push(n.Ve)}if(l.va.keyIds)for(l=t(l.va.keyIds),k=l.next();!k.done;k=l.next())g.add(k.value)}if(1==h.length)c.push(h[0]);else if(0<
293
+ (d.some(function(p){return function(q){return yb(q,p.va.serverCertificate)}}(l))||d.push(l.va.serverCertificate));if(l.va.initData){k=t(l.va.initData);for(var m=k.next(),n={};!m.done;n={Ve:void 0},m=k.next())n.Ve=m.value,f.some(function(p){return function(q){var u=p.Ve;return q.keyId&&q.keyId==u.keyId?!0:q.initDataType==u.initDataType&&yb(q.initData,u.initData)}}(n))||f.push(n.Ve)}if(l.va.keyIds)for(l=t(l.va.keyIds),k=l.next();!k.done;k=l.next())g.add(k.value)}if(1==h.length)c.push(h[0]);else if(0<
294
294
  h.length){b=[];h=t(h);for(d=h.next();!d.done;d=h.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,x(d.keys));h=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(h))}}
295
295
  function Rh(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=
296
296
  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 ni=1,ii=5,ki=.5;/*
@@ -301,17 +301,17 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
301
301
  */
302
302
  function oi(a,b,c){this.h=a;this.i=b;this.g=c}function pi(a,b){return O(function(c){if(1==c.g)return E(c,Pe(a.g,b,a.h.drm.preferredKeySystems),2);Ke(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(rf))throw new T(2,4,4032);return c.return(qi(a,b))})}
303
303
  function qi(a,b){var c=Oe(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.s)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,ri(a,d.keySystem,f.video),ri(a,d.keySystem,f.audio);si(a,b)}return c}function ri(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Uh(a.g,e.initDataType,e.initData)}}}
304
- function si(a,b){a=a.g?a.g.zd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(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=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?ti.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
304
+ function si(a,b){a=a.g?a.g.Bd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(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=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?ti.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
305
305
  missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var ti=["output-restricted","internal-error"];function ui(){}function vi(a,b){if(b){var c=wi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",ui);ui.unregisterParserByMime=function(a){delete wi[a]};ui.registerParserByMime=function(a,b){wi[a]=b};ui.registerParserByExtension=function(){rb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ui.AccessibilityPurpose={Mj:"visually impaired",gj:"hard of hearing"};var wi={};function xi(a,b){function c(){f=!0}function d(m){h.push(m);Qg(m)}var e=a=Bb(a),f=!1,g,h=[],k=[];(new Jg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).R("stsd",function(m){g=m;h.push(m);Sg(m)}).R("encv",c).R("enca",c).R("dvav",function(m){k.push({box:m,cb:1701733238})}).R("dva1",function(m){k.push({box:m,cb:1701733238})}).R("dvh1",function(m){k.push({box:m,cb:1701733238})}).R("dvhe",function(m){k.push({box:m,cb:1701733238})}).R("hev1",function(m){k.push({box:m,cb:1701733238})}).R("hvc1",
306
- function(m){k.push({box:m,cb:1701733238})}).R("avc1",function(m){k.push({box:m,cb:1701733238})}).R("avc3",function(m){k.push({box:m,cb:1701733238})}).R("ac-3",function(m){k.push({box:m,cb:1701733217})}).R("ec-3",function(m){k.push({box:m,cb:1701733217})}).R("ac-4",function(m){k.push({box:m,cb:1701733217})}).R("mp4a",function(m){k.push({box:m,cb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw fb(Md(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,
306
+ function(m){k.push({box:m,cb:1701733238})}).R("avc1",function(m){k.push({box:m,cb:1701733238})}).R("avc3",function(m){k.push({box:m,cb:1701733238})}).R("ac-3",function(m){k.push({box:m,cb:1701733217})}).R("ec-3",function(m){k.push({box:m,cb:1701733217})}).R("ac-4",function(m){k.push({box:m,cb:1701733217})}).R("mp4a",function(m){k.push({box:m,cb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw fb(Kd(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,
307
307
  e=yi(e,g,l.box,h,l.cb);return Wc()&&ld()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
308
308
  function yi(a,b,c,d,e){var f=zi.value(),g=a.subarray(c.start,c.start+c.size),h=Fb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Fb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Ai(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Xc()||Wc()?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=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Ai(e,d.start,d.size+k.byteLength);k=Fb(e,b.start);b=Rg(b);
309
- a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ai(a,b,c){a=Fb(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 zi=new Jc(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 Bi(a,b,c,d,e,f,g){this.M=a;this.Da=b;this.pa=c;this.gf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}Bi.prototype.$b=function(){return this.Da};Bi.prototype.Yb=function(){return this.pa};Bi.prototype.Wc=function(){return this.g};function Ci(a,b){return a===b?!0:a&&b?a.$b()==b.$b()&&a.Yb()==b.Yb()&&Qb(a.M().sort(),b.M().sort())&&yb(a.Wc(),b.Wc()):a==b}S("shaka.media.InitSegmentReference",Bi);
309
+ a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ai(a,b,c){a=Fb(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 zi=new Jc(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 Bi(a,b,c,d,e,f,g){this.M=a;this.Da=b;this.pa=c;this.gf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}Bi.prototype.$b=function(){return this.Da};Bi.prototype.Yb=function(){return this.pa};Bi.prototype.Xc=function(){return this.g};function Fi(a,b){return a===b?!0:a&&b?a.$b()==b.$b()&&a.Yb()==b.Yb()&&Qb(a.M().sort(),b.M().sort())&&yb(a.Xc(),b.Xc()):a==b}S("shaka.media.InitSegmentReference",Bi);
310
310
  Bi.prototype.getEndByte=Bi.prototype.Yb;Bi.prototype.getStartByte=Bi.prototype.$b;
311
- function Gi(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?Hi:r;this.startTime=a;this.j=this.endTime=b;this.C=c;this.Da=d;this.pa=e;this.da=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.s=null;this.i=0;this.o=void 0===v?!1:v;this.Ld=this.gd=!1;a=t(this.g);for(b=a.next();!b.done;b=
312
- a.next())b.value.vg();this.o&&this.g.length&&this.g[this.g.length-1].ug();this.B=this.mimeType=this.codecs=null}q=Gi.prototype;q.M=function(){return this.C()};q.getStartTime=function(){return this.startTime};q.yh=function(){return this.endTime};q.$b=function(){return this.Da};q.Yb=function(){return this.pa};q.Rh=function(){return this.tilesLayout};q.Qh=function(){return this.A};q.ac=function(){return this.status};q.ii=function(){this.status=Ii};q.ff=function(){this.preload=!0};q.ci=function(){return this.preload};
313
- q.Od=function(){this.l=!1};q.$h=function(){return this.l};q.vg=function(){this.gd=!0};q.bi=function(){return this.gd};q.ug=function(){this.Ld=!0};q.ai=function(){return this.Ld};q.tg=function(){this.m=!0};q.Xh=function(){return this.m};q.Pg=function(a){this.s=a};q.Ph=function(){return this.s};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
314
- q.Jf=function(a){null==this.h?Za("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.Li=function(a){this.B=a};q.Wc=function(){return this.B};function Ji(a,b){a.da=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Ji(c.value,b)}S("shaka.media.SegmentReference",Gi);Gi.prototype.getSegmentData=Gi.prototype.Wc;Gi.prototype.setSegmentData=Gi.prototype.Li;Gi.prototype.syncAgainst=Gi.prototype.Jf;Gi.prototype.offset=Gi.prototype.offset;
311
+ function Gi(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v){l=void 0===l?[]:l;q=void 0===q?Hi:q;this.startTime=a;this.j=this.endTime=b;this.C=c;this.Da=d;this.pa=e;this.da=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===p?null:p;this.status=q;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.s=null;this.i=0;this.o=void 0===v?!1:v;this.Ld=this.hd=!1;a=t(this.g);for(b=a.next();!b.done;b=
312
+ a.next())b.value.vg();this.o&&this.g.length&&this.g[this.g.length-1].ug();this.B=this.mimeType=this.codecs=null}r=Gi.prototype;r.M=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.yh=function(){return this.endTime};r.$b=function(){return this.Da};r.Yb=function(){return this.pa};r.Rh=function(){return this.tilesLayout};r.Qh=function(){return this.A};r.ac=function(){return this.status};r.ii=function(){this.status=Ii};r.ff=function(){this.preload=!0};r.ci=function(){return this.preload};
313
+ r.Od=function(){this.l=!1};r.$h=function(){return this.l};r.vg=function(){this.hd=!0};r.bi=function(){return this.hd};r.ug=function(){this.Ld=!0};r.ai=function(){return this.Ld};r.tg=function(){this.m=!0};r.Xh=function(){return this.m};r.Pg=function(a){this.s=a};r.Ph=function(){return this.s};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
314
+ r.Jf=function(a){null==this.h?Za("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.Li=function(a){this.B=a};r.Xc=function(){return this.B};function Ji(a,b){a.da=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Ji(c.value,b)}S("shaka.media.SegmentReference",Gi);Gi.prototype.getSegmentData=Gi.prototype.Xc;Gi.prototype.setSegmentData=Gi.prototype.Li;Gi.prototype.syncAgainst=Gi.prototype.Jf;Gi.prototype.offset=Gi.prototype.offset;
315
315
  Gi.prototype.getThumbnailSprite=Gi.prototype.Ph;Gi.prototype.setThumbnailSprite=Gi.prototype.Pg;Gi.prototype.hasByterangeOptimization=Gi.prototype.Xh;Gi.prototype.markAsByterangeOptimization=Gi.prototype.tg;Gi.prototype.isLastPartial=Gi.prototype.ai;Gi.prototype.markAsLastPartial=Gi.prototype.ug;Gi.prototype.isPartial=Gi.prototype.bi;Gi.prototype.markAsPartial=Gi.prototype.vg;Gi.prototype.isIndependent=Gi.prototype.$h;Gi.prototype.markAsNonIndependent=Gi.prototype.Od;Gi.prototype.isPreload=Gi.prototype.ci;
316
316
  Gi.prototype.markAsPreload=Gi.prototype.ff;Gi.prototype.markAsUnavailable=Gi.prototype.ii;Gi.prototype.getStatus=Gi.prototype.ac;Gi.prototype.getTileDuration=Gi.prototype.Qh;Gi.prototype.getTilesLayout=Gi.prototype.Rh;Gi.prototype.getEndByte=Gi.prototype.Yb;Gi.prototype.getStartByte=Gi.prototype.$b;Gi.prototype.getEndTime=Gi.prototype.yh;Gi.prototype.getStartTime=Gi.prototype.getStartTime;Gi.prototype.getUris=Gi.prototype.M;var Hi=0,Ii=1;Gi.Status={Ui:Hi,Kj:Ii,mj:2};function Ki(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Li(a){return!a||Ki(a)?null:a.length?a.end(a.length-1):null}function Mi(a,b){return!a||!a.length||Ki(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Ni(a,b){if(!a||!a.length||Ki(a))return 0;var c=0;a=t(Oi(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}
317
317
  function Pi(a,b,c){if(!a||!a.length||Ki(a))return null;a=Oi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Oi(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};/*
@@ -325,9 +325,9 @@ function Ui(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
325
325
  d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=xd(Bb(a.data,1,d));a=xd(Bb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=xd(Bb(a.data,1,d));a=xd(Bb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=xd(Bb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
326
326
  c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Cb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=xd(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=xd(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Cb(a.data),b):null}
327
327
  function Vi(a){for(var b=0,c=[];Ri(a,b);){var d=Ti(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Ti(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ui(e))&&c.push(f);b+=e.size+10}Si(a,b)&&(b+=10)}return c}function Wi(a,b){for(var c=b=void 0===b?0:b,d=0;Ri(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Ti(a,b+6),Si(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",Qi);Qi.getID3Data=Wi;
328
- Qi.getID3Frames=Vi;function Xi(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Fc());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,Pc:c,vd:d,Oj:e}}function Yi(a,b){return 1==b?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.O()}}function Zi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.ka();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
328
+ Qi.getID3Frames=Vi;function Xi(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Fc());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,Pc:c,wd:d,Oj:e}}function Yi(a,b){return 1==b?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.O()}}function Zi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.ka();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
329
329
  function $i(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={xf:null,sampleSize:null,ee:null};c&256&&(h.xf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.ee=0==b?a.O():a.Cg());e.push(h)}return{Sj:d,Gg:e,sh:f}}function aj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.ka();a.skip(2);a.skip(2);a.skip(2);a=a.ka()+a.ka()/65536;return{channelCount:b,sampleRate:a}}function bj(a){a=a.O();return{codec:Pg(a)}}
330
- function cj(a){var b=null,c=null,d=a.mb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.ka()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.ka();a.ka();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,md:c}}
330
+ function cj(a){var b=null,c=null,d=a.mb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.ka()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.ka();a.ka();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,nd:c}}
331
331
  function dj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function ej(a){return(10>a?"0":"")+a};/*
332
332
 
333
333
  Copyright Brightcove, Inc.
@@ -345,154 +345,156 @@ function dj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0
345
345
  limitations under the License.
346
346
  */
347
347
  function fj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Bb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function gj(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Gg(c,0)).O(),a.g=8*d,a.i-=d)}function hj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;gj(a)}a.h<<=b;a.g-=b}
348
- function ij(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&gj(a);c=b-c;return 0<c?d<<c|ij(a,c):d}function jj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;gj(a);return b+jj(a)}function kj(a){hj(a,1+jj(a))}function V(a){var b=jj(a);return ij(a,b+1)-1}function lj(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function W(a){return 1===ij(a,1)}function mj(a){return ij(a,8)}
349
- function uj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=lj(a),d=(c+d+256)%256),c=0===d?c:d}function vj(a){mj(a);V(a);return V(a)}S("shaka.util.ExpGolomb",fj);function wj(){this.G=null;this.H=!1;this.m=this.J=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.s=null}q=wj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
350
- q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,xj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Gd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
351
- k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,p=m;2<p;){var r=f[n+1]+2;switch(f[n]){case 5:var u=zd(f.subarray(n+2,n+r));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
352
- null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,nh:u,sampleRate:48E3}))}n+=r;p-=r}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Gd&&(g.Gd=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
348
+ function ij(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&gj(a);c=b-c;return 0<c?d<<c|ij(a,c):d}function jj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;gj(a);return b+jj(a)}function kj(a){hj(a,1+jj(a))}function V(a){var b=jj(a);return ij(a,b+1)-1}function lj(a){a=V(a);return 1&a?1+a>>>1:-1*(a>>>1)}function W(a){return 1===ij(a,1)}function tj(a){return ij(a,8)}
349
+ function uj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=lj(a),d=(c+d+256)%256),c=0===d?c:d}function vj(a){tj(a);V(a);return V(a)}S("shaka.util.ExpGolomb",fj);function wj(){this.G=null;this.H=!1;this.m=this.J=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.s=null}r=wj.prototype;r.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
350
+ r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,xj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Gd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
351
+ k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,p=m;2<p;){var q=f[n+1]+2;switch(f[n]){case 5:var u=zd(f.subarray(n+2,n+q));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
352
+ null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,nh:u,sampleRate:48E3}))}n+=q;p-=q}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Gd&&(g.Gd=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
353
353
  break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.J=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.B=f.audio,this.A=f.audioCodec);-1!=f.Gd&&(this.C=f.Gd);d&&!this.H&&(d=!1,e=b-188);this.H=!0;break;case this.J:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.B:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
354
354
  break;case this.C:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
355
355
  function yj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.s&&(a.s=e);c.pts=zj(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=zj(d,
356
- a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.ni=function(a){rb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.nf(a)};
357
- q.nf=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var p=a[n];if(p){if(2<=g&&1==p){b&&!h.length&&-1==k&&(p=n-(3<g?3:g),c&&0!=p&&(p=a.subarray(0,p),b.data=Nd(b.data,p),b.fullData=Nd(b.fullData,p)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=Nd(b.data,k),b.fullData=Nd(b.fullData,k)));if(n>=e-f)return h;
358
- n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Nd(b.data,a),b.fullData=Nd(b.fullData,a));return h};q.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Nd.apply(Fd,x(c.value)),(c=yj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Vi(c.data),dts:c.dts,pts:c.pts});return a};
359
- q.Kb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Nd.apply(Fd,x(c.value)),e=yj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Nd(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
360
- q.zc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Nd.apply(Fd,x(d.value)),f=yj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Nd(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.nf(e,
361
- g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.Kb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.zc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.Tc=function(){return{audio:this.A,video:this.m}};
362
- q.Ed=function(){for(var a=[],b=t(this.zc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};q.Uh=function(){rb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Te();return{height:a.height,width:a.width}};q.Te=function(){return"hvc"==this.m?Aj(this):Bj(this)};
363
- function Bj(a){var b={height:null,width:null,codec:null};a=a.Ed();if(!a.length)return b;a=a.find(function(p){return 7==p.type});if(!a)return b;a=new fj(a.data);var c=mj(a),d=mj(a),e=mj(a);kj(a);if(Cj.includes(c)){var f=V(a);3===f&&hj(a,1);kj(a);kj(a);hj(a,1);if(W(a)){f=3!==f?8:12;for(var g=0;g<f;g++)W(a)&&(6>g?uj(a,16):uj(a,64))}}kj(a);f=V(a);if(0===f)V(a);else if(1===f)for(hj(a,1),kj(a),kj(a),f=V(a),g=0;g<f;g++)kj(a);kj(a);hj(a,1);f=V(a);g=V(a);var h=ij(a,1);0===h&&hj(a,1);hj(a,1);var k=0,l=0,m=
356
+ a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}r.ni=function(a){rb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.nf(a)};
357
+ r.nf=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var p=a[n];if(p){if(2<=g&&1==p){b&&!h.length&&-1==k&&(p=n-(3<g?3:g),c&&0!=p&&(p=a.subarray(0,p),b.data=Nd(b.data,p),b.fullData=Nd(b.fullData,p)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=Nd(b.data,k),b.fullData=Nd(b.fullData,k)));if(n>=e-f)return h;
358
+ n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=Nd(b.data,a),b.fullData=Nd(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Nd.apply(Fd,x(c.value)),(c=yj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Vi(c.data),dts:c.dts,pts:c.pts});return a};
359
+ r.Kb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Nd.apply(Fd,x(c.value)),e=yj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Nd(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
360
+ r.zc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Nd.apply(Fd,x(d.value)),f=yj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Nd(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.nf(e,
361
+ g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Kb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.zc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};r.Tc=function(){return{audio:this.A,video:this.m}};
362
+ r.Ed=function(){for(var a=[],b=t(this.zc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};r.Uh=function(){rb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Te();return{height:a.height,width:a.width}};r.Te=function(){return"hvc"==this.m?Aj(this):Bj(this)};
363
+ function Bj(a){var b={height:null,width:null,codec:null};a=a.Ed();if(!a.length)return b;a=a.find(function(p){return 7==p.type});if(!a)return b;a=new fj(a.data);var c=tj(a),d=tj(a),e=tj(a);kj(a);if(Cj.includes(c)){var f=V(a);3===f&&hj(a,1);kj(a);kj(a);hj(a,1);if(W(a)){f=3!==f?8:12;for(var g=0;g<f;g++)W(a)&&(6>g?uj(a,16):uj(a,64))}}kj(a);f=V(a);if(0===f)V(a);else if(1===f)for(hj(a,1),kj(a),kj(a),f=V(a),g=0;g<f;g++)kj(a);kj(a);hj(a,1);f=V(a);g=V(a);var h=ij(a,1);0===h&&hj(a,1);hj(a,1);var k=0,l=0,m=
364
364
  0,n=0;W(a)&&(k=V(a),l=V(a),m=V(a),n=V(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.codec="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
365
- function Aj(a){var b={height:null,width:null,codec:null};a=a.Ed();if(!a.length)return b;a=a.find(function(z){return 33==z.type});if(!a)return b;var c=new fj(a.fullData,!0);mj(c);mj(c);ij(c,4);var d=ij(c,3);W(c);var e=ij(c,2),f=ij(c,1),g=ij(c,5),h=ij(c,32);a=mj(c);for(var k=mj(c),l=mj(c),m=mj(c),n=mj(c),p=mj(c),r=mj(c),u=[],v=[],w=0;w<d;w++)u.push(W(c)),v.push(W(c));if(0<d)for(w=d;8>w;w++)ij(c,2);for(w=0;w<d;w++)u[w]&&ij(c,88),v[w]&&mj(c);V(c);d=V(c);3==d&&ij(c,1);u=V(c);v=V(c);var A=w=0,y=0,C=0;W(c)&&
366
- (w+=V(c),A+=V(c),y+=V(c),C+=V(c));b.width=String(u-(w+A)*(1===d||2===d?2:1));b.height=String(v-(y+C)*(1===d?2:1));c=function(z){for(var B=0,D=0;32>D;D++)B|=(z>>D&1)<<31-D;return B>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+r;p&&(e+="."+p.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
365
+ function Aj(a){var b={height:null,width:null,codec:null};a=a.Ed();if(!a.length)return b;a=a.find(function(z){return 33==z.type});if(!a)return b;var c=new fj(a.fullData,!0);tj(c);tj(c);ij(c,4);var d=ij(c,3);W(c);var e=ij(c,2),f=ij(c,1),g=ij(c,5),h=ij(c,32);a=tj(c);for(var k=tj(c),l=tj(c),m=tj(c),n=tj(c),p=tj(c),q=tj(c),u=[],v=[],w=0;w<d;w++)u.push(W(c)),v.push(W(c));if(0<d)for(w=d;8>w;w++)ij(c,2);for(w=0;w<d;w++)u[w]&&ij(c,88),v[w]&&tj(c);V(c);d=V(c);3==d&&ij(c,1);u=V(c);v=V(c);var A=w=0,y=0,C=0;W(c)&&
366
+ (w+=V(c),A+=V(c),y+=V(c),C+=V(c));b.width=String(u-(w+A)*(1===d||2===d?2:1));b.height=String(v-(y+C)*(1===d?2:1));c=function(z){for(var B=0,D=0;32>D;D++)B|=(z>>D&1)<<31-D;return B>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+q;p&&(e+="."+p.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
367
367
  a.toString(16).toUpperCase());b.codec=e;return b}function zj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Dj(a){return 0>xj(a)?!1:!0}function xj(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}S("shaka.util.TsParser",wj);wj.syncOffset=xj;wj.probe=Dj;wj.prototype.getVideoInfo=wj.prototype.Te;wj.prototype.getVideoResolution=wj.prototype.Uh;wj.prototype.getVideoNalus=wj.prototype.Ed;
368
368
  wj.prototype.getCodecs=wj.prototype.Tc;wj.prototype.getStartTime=wj.prototype.getStartTime;wj.prototype.getVideoData=wj.prototype.zc;wj.prototype.getAudioData=wj.prototype.Kb;wj.prototype.getMetadata=wj.prototype.getMetadata;wj.prototype.parseNalus=wj.prototype.nf;wj.prototype.parseAvcNalus=wj.prototype.ni;wj.prototype.parse=wj.prototype.parse;wj.prototype.clearData=wj.prototype.clearData;wj.Timescale=9E4;var Cj=[100,110,122,244,44,83,86,118,128,138,139,134];function Ej(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&$a("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,rb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{$a("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?($a("Could not find LCEVC Library on this page"),
369
369
  a=!1):(this.h.SupportObject.SupportStatus||$a(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function Fj(a){a.g&&a.i.classList.add("shaka-hidden")}
370
- Ej.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Gj(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",Ej);Ej.prototype.release=Ej.prototype.release;function Hj(a,b,c,d){var e=this;this.i=a;this.ba=c;this.A=null;this.F=b;this.h={};this.G={};this.Ea={};this.g=null;this.ha=!1;this.$=d||null;this.l={};this.s=new hb;this.j={};this.H=null;this.L=new Zf;this.N="";this.ua=!1;this.m=Ij(this,this.L);this.C=!1;this.J=new Ag(function(){return Jj(e)});this.B=!1;this.aa="UNKNOWN";this.Fa=this.Ka=!1;this.ya=new Zf;this.o=!1;this.xa=!0;this.na=this.P=this.oa=this.W=this.K=this.ea=null;this.wa=new Zf}
371
- function Ij(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.xa=!0});a.s.D(c,"endstreaming",function(){a.xa=!1});a.s.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.s.sa(a.i,"playing",function(){a.ua=!0});a.N=Kj(c);a.i.src=a.N;return c}c=new MediaSource;a.s.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.s.sa(a.i,"playing",function(){a.ua=!0});a.N=Kj(c);a.i.src=a.N;return c}
372
- function Lj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(r){if(1==r.g)return a.createSegmentIndex?E(r,a.createSegmentIndex(),2):r.u(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=Wd;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.qa){if(m=Yd(h,k),!ne(m))return r.return(!1)}else if(b==c.fa?k=Xe(k):b==c.V&&(k=Ye(k,h)),n=
373
- be(a,h,k),p=$d(h,k),!nb(n)&&!mc(p))return r.return(!1);return r.return(!0)})}q=Hj.prototype;q.destroy=function(){return this.J.destroy()};
374
- function Jj(a){var b,c,d,e,f,g,h,k;return O(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p.catch(ve)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.F&&b.push(a.F.destroy());for(k in a.j)b.push(a.j[k].destroy());return E(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.m=null;a.g=null;a.F=null;a.h={};a.j={};a.H=null;
375
- a.l={};a.$=null;a.K=null;a.ba=null;H(l)})}q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return f=Wd,E(m,e.L,2);case 2:e.B=b,e.aa=c,e.Ka=d,e.Fa=!e.B&&"HLS"==e.aa&&!e.Ka,e.K=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return E(m,Mj(e,k,l,l.codecs),6);case 6:e.o?(e.l[f.V]=[],e.l[f.fa]=[]):e.l[k]=[],h=g.next(),m.u(3)}})};
376
- function Mj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v;return O(function(w){switch(w.g){case 1:return e=Wd,f=Ta,g=Ua,E(w,Lj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Yd(c.mimeType,d);if(b==e.qa){Nj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!nb(h)||!a.B&&Zd.includes(h))k=!0;l=$d(c.mimeType,d);if(!k){w.u(4);break}m=Sd(e.V,(d||"").split(","));n=Sd(e.fa,(d||"").split(","));if(!m||!n){w.u(5);break}a.o=!0;return E(w,Mj(a,e.V,c,m),6);case 6:return E(w,
377
- Mj(a,e.fa,c,n),7);case 7:return w.return();case 5:if(p=mc(l))r=p(),a.j[b]=r,h=r.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Bg(a.J);try{v=a.m.addSourceBuffer(u)}catch(A){throw new T(2,3,3015,A,"The mediaSource_ status was "+a.m.readyState+" expected 'open'",null);}a.B&&(v.mode=Oj);a.s.D(v,"error",function(){var A=a.l[b][0];A.p.reject(new T(2,3,3014,a.i.error?a.i.error.code:0,A.uri))});a.s.D(v,"updateend",function(){return Pj(a,b)});a.h[b]=v;a.G[b]=h;a.Ea[b]=!!c.drmInfos.length;
378
- H(w)}})}q.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
379
- function Nj(a,b,c,d){a.g||(a.g=new me(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ha;a=a.aa;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,oe[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):rb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):rb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
370
+ Ej.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Gj(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",Ej);Ej.prototype.release=Ej.prototype.release;function Hj(a,b,c,d){var e=this;this.j=a;this.aa=c;this.A=null;this.F=b;this.h={};this.G={};this.Fa={};this.g=null;this.ga=!1;this.U=d||null;this.l={};this.s=new hb;this.i={};this.H=null;this.L=new Zf;this.ua="";this.Ka=!1;this.m=Ij(this,this.L);this.C=!1;this.J=new Ag(function(){return Jj(e)});this.B=!1;this.$="UNKNOWN";this.Ba=this.Ea=!1;this.ta=new Zf;this.o=!1;this.oa=!0;this.wa=this.N=this.na=this.P=this.K=this.ba=null;this.ha=new Zf}
371
+ function Ij(a,b){if(window.ManagedMediaSource){a.j.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.oa=!0});a.s.D(c,"endstreaming",function(){a.oa=!1})}else c=new MediaSource;a.s.za(c,"sourceopen",function(){URL.revokeObjectURL(a.ua);b.resolve()});a.s.za(a.j,"playing",function(){a.Ka=!0});a.ua=Kj(c);a.j.src=a.ua;return c}
372
+ function Lj(a,b){var c,d,e,f,g,h,k,l,m,n,p;return O(function(q){if(1==q.g)return a.createSegmentIndex?E(q,a.createSegmentIndex(),2):q.u(2);if(!a.segmentIndex)return q.return(!1);if(0==a.segmentIndex.getNumReferences())return q.return(!0);c=Wd;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.qa){if(m=Yd(h,k),!ne(m))return q.return(!1)}else if(b==c.ea?k=Xe(k):b==c.W&&(k=Ye(k,h)),n=
373
+ be(a,h,k),p=$d(h,k),!nb(n)&&!mc(p))return q.return(!1);return q.return(!0)})}r=Hj.prototype;r.destroy=function(){return this.J.destroy()};
374
+ function Jj(a){var b,c,d,e,f,g,h,k;return O(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p.catch(ve)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.F&&b.push(a.F.destroy());for(k in a.i)b.push(a.i[k].destroy());return E(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.A=null;a.m=null;a.g=null;a.F=null;a.h={};a.i={};a.H=null;
375
+ a.l={};a.U=null;a.K=null;a.aa=null;H(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return f=Wd,E(m,e.L,2);case 2:e.B=b,e.$=c,e.Ea=d,e.Ba=!e.B&&"HLS"==e.$&&!e.Ea,e.K=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return E(m,Mj(e,k,l,l.codecs),6);case 6:e.o?(e.l[f.W]=[],e.l[f.ea]=[]):e.l[k]=[],h=g.next(),m.u(3)}})};
376
+ function Mj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v;return O(function(w){switch(w.g){case 1:return e=Wd,f=Ta,g=Ua,E(w,Lj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Yd(c.mimeType,d);if(b==e.qa){Nj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!nb(h)||!a.B&&Zd.includes(h))k=!0;l=$d(c.mimeType,d);if(!k){w.u(4);break}m=Sd(e.W,(d||"").split(","));n=Sd(e.ea,(d||"").split(","));if(!m||!n){w.u(5);break}a.o=!0;return E(w,Mj(a,e.W,c,m),6);case 6:return E(w,
377
+ Mj(a,e.ea,c,n),7);case 7:return w.return();case 5:if(p=mc(l))q=p(),a.i[b]=q,h=q.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Bg(a.J);try{v=a.m.addSourceBuffer(u)}catch(A){throw new T(2,3,3015,A,"The mediaSource_ status was "+a.m.readyState+" expected 'open'",null);}a.B&&(v.mode=Oj);a.s.D(v,"error",function(){var A=a.l[b][0];A.p.reject(new T(2,3,3014,a.j.error?a.j.error.code:0,A.uri))});a.s.D(v,"updateend",function(){return Pj(a,b)});a.h[b]=v;a.G[b]=h;a.Fa[b]=!!c.drmInfos.length;
378
+ H(w)}})}r.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
379
+ function Nj(a,b,c,d){a.g||(a.g=new me(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ga;a=a.$;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,oe[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):rb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):rb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
380
380
  function Qj(a){return a.C?!1:a.m?"ended"==a.m.readyState:!0}function Rj(a,b){a.C||!Object.keys(a.h).length?a=null:b==Ud?a=a.g.g:(a=Sj(a,b),a=!a||Ki(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Tj(a,b){return a.C?null:b==Ud?a.g.h:Li(Sj(a,b))}function Uj(a,b,c){if(a.C)return 0;if(b==Ud)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Sj(a,b);return Ni(a,c)}
381
- q.sb=function(){var a={total:this.C?[]:Oi(this.i.buffered),audio:this.C?[]:Oi(Sj(this,"audio")),video:this.C?[]:Oi(Sj(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 Sj(a,b){try{return a.h[b].buffered}catch(c){return null}}
382
- function Vj(a,b,c,d,e,f){var g=null,h=Bb(c);if(Zd.includes(e))f=Vi(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ba.Yd([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.da&&d.da.timescale){var k=d.da.timescale;if(!isNaN(k)){var l=0,m=!1;(new Jg).box("moof",Qg).box("traf",Qg).R("tfdt",function(n){l=Yi(n.reader,
383
- n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!Dj(h)||(a.K?a.K.clearData():a.K=new wj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ba.Yd(h,f,d?d.endTime:null));return g}
384
- function Wj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,r,u,v,w,A,y,C,z,B,D,I;return O(function(F){switch(F.g){case 1:m=Wd;if(b!=m.qa){F.u(2);break}if(!a.B){F.u(3);break}return E(F,a.ya,4);case 4:n=F.h,a.g.s=n;case 3:return E(F,pe(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.M()[0]:null),5);case 5:return F.return();case 2:if(l||!a.o){F.u(6);break}return E(F,Wj(a,m.V,c,d,e,f,g,h,k,!0),7);case 7:return E(F,Wj(a,m.fa,c,d,e,f,g,h,k,!0),8);case 8:return F.return();
385
- case 6:if(!a.h[b])return F.return();p=a.h[b].timestampOffset;r=a.G[b];a.j[b]&&(r=a.j[b].getOriginalMimeType());d&&(u=Vj(a,b,c,d,r,p),null!=u&&(null==a.W&&b==m.fa&&(a.W=u,a.oa=d.startTime,null!=a.P&&(v=0,a.oa==a.na&&(v=a.W-a.P),a.wa.resolve(v))),null==a.P&&b==m.V&&(a.P=u,a.na=d.startTime,null!=a.W&&(w=0,a.oa==a.na&&(w=a.W-a.P),a.wa.resolve(w))),A=d.startTime-u,y=Math.abs(p-A),(.001<=y||g||h)&&(!k||0<A||!p)&&(p=A,a.Fa&&(Xj(a,b,function(){return Yj(a,b)},null),Xj(a,b,function(){return Zj(a,b,p)},null))),
386
- C=b==m.fa||!(m.fa in a.h),a.B&&C&&a.ya.resolve(p)));f&&b==m.fa&&(a.g||Nj(a,"application/cea-608",a.B,!1),a.H||(z=r.split(";",1)[0],a.H=new Hb(z)),d?(B=a.H.i(c),B.length&&te(a.g,B,d.startTime,d.endTime,p)):a.H.init(c,h));if(!a.j[b]){F.u(9);break}return E(F,a.j[b].transmux(c,e,d,a.m.duration,b),10);case 10:c=F.h;case 9:c=ak(a,c,d?d.startTime:null,b,d?d.M()[0]:null);if(!d||!a.B||b==m.qa){F.u(11);break}if(!g&&!h){F.u(11);break}D=d.startTime;if("HLS"!=a.aa||a.o||b!=m.V||!a.h[m.fa]){F.u(13);break}return E(F,
387
- a.wa,14);case 14:I=F.h,.1<Math.abs(I)&&(D-=I);case 13:Xj(a,b,function(){return Yj(a,b)},null),Xj(a,b,function(){return Zj(a,b,D)},null);case 11:return E(F,Xj(a,b,function(){var J=c;if("video"==b&&a.$){var K=a.$;K.g&&K.g.appendBuffer(J,"video",K.o,-p)}a.h[b].appendBuffer(J)},d?d.M()[0]:null),15);case 15:H(F)}})}function bk(a,b){var c=Tj(a,"video")||0;re(a.g,b,c)}function ck(a){a.g&&re(a.g,"",0)}
388
- q.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Wd,a==e.qa?E(f,d.g.remove(b,c),0):E(f,Xj(d,a,function(){return dk(d,a,b,c)},null),4)):d.o?E(f,Xj(d,e.V,function(){return dk(d,e.V,b,c)},null),0):f.u(0)})};function ek(a,b){var c;return O(function(d){return 1==d.g?(c=Wd,b==c.qa?a.g?E(d,a.g.remove(0,Infinity),0):d.return():E(d,Xj(a,b,function(){return dk(a,b,0,a.m.duration)},null),4)):a.o?E(d,Xj(a,c.V,function(){return dk(a,c.V,0,a.m.duration)},null),0):d.u(0)})}
389
- q.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Wd,a==c.qa?d.return():E(d,Xj(b,a,function(){b.i.currentTime-=.001;Pj(b,a)},null),2)):b.o?E(d,Xj(b,c.V,function(){var e=c.V;b.i.currentTime-=.001;Pj(b,e)},null),0):d.u(0)})};
390
- function fk(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Wd;if(b==l.qa)return f||(a.g.s=c),qe(a.g,d,e),p.return();m=[];return E(p,gk(a,b,g,h,k),2)}n=p.h;n||(m.push(Xj(a,b,function(){return Yj(a,b)},null)),a.o&&m.push(Xj(a,l.V,function(){return Yj(a,l.V)},null)));f||(m.push(Xj(a,b,function(){return Zj(a,b,c)},null)),a.o&&m.push(Xj(a,l.V,function(){return Zj(a,l.V,c)},null)));m.push(Xj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Pj(a,
391
- b)},null));a.o&&m.push(Xj(a,l.V,function(){var r=l.V;a.h[r].appendWindowStart=0;a.h[r].appendWindowEnd=e;a.h[r].appendWindowStart=d;Pj(a,r)},null));return E(p,Promise.all(m),0)})}
392
- function hk(a,b,c){var d;return O(function(e){if(1==e.g){d=Wd;if(b==d.qa)return e.return();b==d.fa&&(a.ya=new Zf);Xj(a,b,function(){return Yj(a,b)},null);a.o&&Xj(a,d.V,function(){return Yj(a,d.V)},null);return E(e,Xj(a,b,function(){return Zj(a,b,c)},null),2)}return a.o?E(e,Xj(a,d.V,function(){return Zj(a,d.V,c)},null),0):e.u(0)})}q.endOfStream=function(a){var b=this;return O(function(c){return E(c,ik(b,function(){Qj(b)||"closed"===b.m.readyState||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};
393
- q.Ua=function(a){var b=this;return O(function(c){return E(c,ik(b,function(){if(a<b.m.duration)for(var d in b.h){var e={start:function(){},p:new Zf,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.ea=a}),0)})};q.getDuration=function(){return this.m.duration};function dk(a,b,c,d){d<=c?Pj(a,b):a.h[b].remove(c,d)}function Yj(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;Pj(a,b)}
381
+ r.ub=function(){var a={total:this.C?[]:Oi(this.j.buffered),audio:this.C?[]:Oi(Sj(this,"audio")),video:this.C?[]:Oi(Sj(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 Sj(a,b){try{return a.h[b].buffered}catch(c){return null}}
382
+ function Vj(a,b,c,d,e,f){var g=null,h=Bb(c);if(Zd.includes(e))f=Vi(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.aa.Yd([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.da&&d.da.timescale){var k=d.da.timescale;if(!isNaN(k)){var l=0,m=!1;(new Jg).box("moof",Qg).box("traf",Qg).R("tfdt",function(n){l=Yi(n.reader,
383
+ n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!Dj(h)||(a.K?a.K.clearData():a.K=new wj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.aa.Yd(h,f,d?d.endTime:null));return g}
384
+ function Wj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,q,u,v,w,A,y,C,z,B,D,I;return O(function(F){switch(F.g){case 1:m=Wd;if(b!=m.qa){F.u(2);break}if(!a.B){F.u(3);break}return E(F,a.ta,4);case 4:n=F.h,a.g.s=n;case 3:return E(F,pe(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.M()[0]:null),5);case 5:return F.return();case 2:if(l||!a.o){F.u(6);break}return E(F,Wj(a,m.W,c,d,e,f,g,h,k,!0),7);case 7:return E(F,Wj(a,m.ea,c,d,e,f,g,h,k,!0),8);case 8:return F.return();
385
+ case 6:if(!a.h[b])return F.return();p=a.h[b].timestampOffset;q=a.G[b];a.i[b]&&(q=a.i[b].getOriginalMimeType());d&&(u=Vj(a,b,c,d,q,p),null!=u&&(null==a.P&&b==m.ea&&(a.P=u,a.na=d.startTime,null!=a.N&&(v=0,a.na==a.wa&&(v=a.P-a.N),a.ha.resolve(v))),null==a.N&&b==m.W&&(a.N=u,a.wa=d.startTime,null!=a.P&&(w=0,a.na==a.wa&&(w=a.P-a.N),a.ha.resolve(w))),A=d.startTime-u,y=Math.abs(p-A),(.001<=y||g||h)&&(!k||0<A||!p)&&(p=A,a.Ba&&(Xj(a,b,function(){return Yj(a,b)},null),Xj(a,b,function(){return Zj(a,b,p)},null))),
386
+ C=b==m.ea||!(m.ea in a.h),a.B&&C&&a.ta.resolve(p)));f&&b==m.ea&&(a.g||Nj(a,"application/cea-608",a.B,!1),a.H||(z=q.split(";",1)[0],a.H=new Hb(z)),d?(B=a.H.i(c),B.length&&te(a.g,B,d.startTime,d.endTime,p)):a.H.init(c,h));if(!a.i[b]){F.u(9);break}return E(F,a.i[b].transmux(c,e,d,a.m.duration,b),10);case 10:c=F.h;case 9:c=ak(a,c,d?d.startTime:null,b,d?d.M()[0]:null);if(!d||!a.B||b==m.qa){F.u(11);break}if(!g&&!h){F.u(11);break}D=d.startTime;if("HLS"!=a.$||a.o||b!=m.W||!a.h[m.ea]){F.u(13);break}return E(F,
387
+ a.ha,14);case 14:I=F.h,.1<Math.abs(I)&&(D-=I);case 13:Xj(a,b,function(){return Yj(a,b)},null),Xj(a,b,function(){return Zj(a,b,D)},null);case 11:return E(F,Xj(a,b,function(){var J=c;if("video"==b&&a.U){var K=a.U;K.g&&K.g.appendBuffer(J,"video",K.o,-p)}a.h[b].appendBuffer(J)},d?d.M()[0]:null),15);case 15:H(F)}})}function bk(a,b){var c=Tj(a,"video")||0;re(a.g,b,c)}function ck(a){a.g&&re(a.g,"",0)}
388
+ r.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Wd,a==e.qa?E(f,d.g.remove(b,c),0):E(f,Xj(d,a,function(){return dk(d,a,b,c)},null),4)):d.o?E(f,Xj(d,e.W,function(){return dk(d,e.W,b,c)},null),0):f.u(0)})};function ek(a,b){var c;return O(function(d){return 1==d.g?(c=Wd,b==c.qa?a.g?E(d,a.g.remove(0,Infinity),0):d.return():E(d,Xj(a,b,function(){return dk(a,b,0,a.m.duration)},null),4)):a.o?E(d,Xj(a,c.W,function(){return dk(a,c.W,0,a.m.duration)},null),0):d.u(0)})}
389
+ r.flush=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Wd,a==c.qa?d.return():E(d,Xj(b,a,function(){b.j.currentTime-=.001;Pj(b,a)},null),2)):b.o?E(d,Xj(b,c.W,function(){var e=c.W;b.j.currentTime-=.001;Pj(b,e)},null),0):d.u(0)})};
390
+ function fk(a,b,c,d,e,f,g,h,k){var l,m,n;return O(function(p){if(1==p.g){l=Wd;if(b==l.qa)return f||(a.g.s=c),qe(a.g,d,e),p.return();m=[];return E(p,gk(a,b,g,h,k),2)}n=p.h;n||(m.push(Xj(a,b,function(){return Yj(a,b)},null)),a.o&&m.push(Xj(a,l.W,function(){return Yj(a,l.W)},null)));f||(m.push(Xj(a,b,function(){return Zj(a,b,c)},null)),a.o&&m.push(Xj(a,l.W,function(){return Zj(a,l.W,c)},null)));m.push(Xj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Pj(a,
391
+ b)},null));a.o&&m.push(Xj(a,l.W,function(){var q=l.W;a.h[q].appendWindowStart=0;a.h[q].appendWindowEnd=e;a.h[q].appendWindowStart=d;Pj(a,q)},null));return E(p,Promise.all(m),0)})}
392
+ function hk(a,b,c){var d;return O(function(e){if(1==e.g){d=Wd;if(b==d.qa)return e.return();b==d.ea&&(a.ta=new Zf);Xj(a,b,function(){return Yj(a,b)},null);a.o&&Xj(a,d.W,function(){return Yj(a,d.W)},null);return E(e,Xj(a,b,function(){return Zj(a,b,c)},null),2)}return a.o?E(e,Xj(a,d.W,function(){return Zj(a,d.W,c)},null),0):e.u(0)})}r.endOfStream=function(a){var b=this;return O(function(c){return E(c,ik(b,function(){Qj(b)||"closed"===b.m.readyState||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};
393
+ r.Ua=function(a){var b=this;return O(function(c){return E(c,ik(b,function(){if(a<b.m.duration)for(var d in b.h){var e={start:function(){},p:new Zf,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.ba=a}),0)})};r.getDuration=function(){return this.m.duration};function dk(a,b,c,d){d<=c?Pj(a,b):a.h[b].remove(c,d)}function Yj(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;Pj(a,b)}
394
394
  function Zj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Pj(a,b)}function Pj(a,b){if(!a.C){var c=a.l[b][0];c&&(c.p.resolve(),jk(a,b))}}function Xj(a,b,c,d){Bg(a.J);c={start:c,p:new Zf,uri:d};a.l[b].push(c);1==a.l[b].length&&kk(a,b);return c.p}
395
- function ik(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Bg(a.J);c=[];d={};for(e in a.h)d={ready:void 0},d.ready=new Zf,f={start:function(m){return function(){return m.ready.resolve()}}(d),p:d.ready,uri:null},a.l[e].push(f),c.push(d.ready),1==a.l[e].length&&f.start();wa(l,2);return E(l,Promise.all(c),4);case 4:ya(l,3);break;case 2:throw g=Aa(l),g;case 3:return wa(l,5,6),E(l,b(),6);case 6:Ba(l);for(h in a.h)jk(a,h);Ca(l,0);break;case 5:throw k=Aa(l),new T(2,3,3015,k,a.i.error||"No error in the media element",
396
- null);}})}function jk(a,b){a.l[b].shift();kk(a,b)}function kk(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new T(2,3,3017,b)):c.p.reject(new T(2,3,3015,d,a.i.error||"No error in the media element",c.uri)),jk(a,b)}}function ak(a,b,c,d,e){var f=null==c,g=a.Ea[d];c=a.ba.Ch();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Mc(c),f=Zc()||Xc()||gd()||Wc()&&ld()&&c;f&&"mp4"==de(a.G[d])&&(b=xi(b,e));return b}
397
- function lk(a,b,c,d){return Xj(a,b,function(){b!==Ud&&(pb()&&(a.j[b]&&(a.j[b].destroy(),delete a.j[b]),d&&(a.j[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Pj(a,b))},null)}
398
- function mk(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J;return O(function(K){switch(K.g){case 1:c=Wd;a.C=!0;a.o=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.ua&&(a.i.autoplay=!1);xa(K,2);a.s.nb();g=[];for(h in a.j)g.push(a.j[h].destroy());for(k in a.l)for(l=a.l[k],m=l[0],a.l[k]=l.slice(0,1),m&&g.push(m.p.catch(ve)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())r=p.value,r.p.reject(new T(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.m.removeSourceBuffer(v)}catch(G){}}return E(K,
399
- Promise.all(g),4);case 4:return a.j={},a.h={},w=a.m.duration,a.L=new Zf,a.m=Ij(a,a.L),E(K,a.L,5);case 5:!isNaN(w)&&w?a.m.duration=w:!isNaN(a.ea)&&a.ea&&(a.m.duration=a.ea),A=new Zf,y=a.m.sourceBuffers,C=b.size,z=0,B=function(){z++;z===C&&(A.resolve(),a.s.Hb(y,"addsourcebuffer",B))},a.s.D(y,"addsourcebuffer",B),D=t(b.keys()),I=D.next();case 6:if(I.done)return a.i.currentTime=d,E(K,A,2);F=I.value;J=b.get(F);return E(K,Mj(a,F,J,J.codecs),9);case 9:a.o?(a.l[c.V]=[],a.l[c.fa]=[]):a.l[F]=[];I=D.next();
400
- K.u(6);break;case 2:Ba(K),a.C=!1,Bg(a.J),a.s.sa(a.i,"canplaythrough",function(){a.J.g||(a.i.autoplay=e,f||a.i.play())}),Ca(K,0)}})}function nk(a,b){return ik(a,function(){return mk(a,b)})}
401
- function gk(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,y,C;return O(function(z){if(1==z.g){f=Wd;if(b==f.qa)return z.return(!1);g=ee(je(a.G[b]));h=ie(a.G[b]);l=!1;m=Yd(c,d);n=a.A.forceTransmux;if(!nb(m)||!a.B&&Zd.includes(m))n=!0;n&&(p=$d(c,d),r=mc(p))&&(k=r(),u=Sd(f.V,(d||"").split(",")),v=Sd(f.fa,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.V&&(w=u),m=k.convertCodecs(b,$d(c,w))):m=k.convertCodecs(b,p));A=ee(je(m));y=ie(m);if(g===A&&h===y)return a.j[b]&&!k?(a.j[b].destroy(),delete a.j[b]):!a.j[b]&&k?a.j[b]=
402
- k:k&&(a.j[b]&&a.j[b].transmux!=k.transmux?(a.j[b].destroy(),delete a.j[b],a.j[b]=k):k.destroy()),z.return(!1);C=!0;if(a.o||l&&k&&!a.j[b])C=!1;if(C&&"smooth"===a.A.codecSwitchingStrategy&&pb())return E(z,lk(a,b,m,k),3);k&&k.destroy();return E(z,nk(a,e),3)}return z.return(!0)})}
403
- function ok(a,b,c,d){if(b==Ud)var e=!1;else{e=ee(je(a.G[b]));var f=ie(a.G[b]),g=Yd(c,d),h=a.A.forceTransmux;if(!nb(g)||!a.B&&Zd.includes(g))h=!0;c=$d(c,d);h&&(h=mc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=ee(je(g));g=ie(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!pb()||a.o:!1}var Kj=window.URL.createObjectURL,Oj="sequence";function pk(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=a}q=pk.prototype;q.getDuration=function(){return this.j};q.Fh=function(){return this.g};q.Ng=function(a){this.i=a};q.Ua=function(a){this.j=a};q.Kh=function(){return this.i};q.Lg=function(a){this.A=a};q.kc=function(a){this.F=a};q.ge=function(a){this.m=a};q.Dd=function(){return this.m};q.Cf=function(a){this.s=a};q.xh=function(){return this.s};
404
- q.yg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Ud(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
405
- q.fd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Ud(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=d-this.h-this.g)}};q.Md=function(){this.o=!0};q.di=function(){return this.o};q.Mg=function(a){this.B=a};q.Bh=function(){return this.B};
406
- q.Ud=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.hf=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.U=function(){return Infinity==this.j&&!this.F};q.dc=function(){return Infinity!=this.j&&!this.F};q.ib=function(){return Math.max(this.G,this.Lb()-this.m)};q.Rg=function(a){this.G=a};
407
- q.Lb=function(){return this.U()||this.dc()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};q.Vc=function(a){var b=Math.max(this.l,this.G);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Lb()-this.m+a,this.ub()))};q.Ab=function(){return this.Vc(0)};q.ub=function(){return Math.max(0,this.Lb()-(this.U()||this.dc()?this.s:0))};q.Xg=function(){return null==this.i||null!=this.h&&this.C?!1:!0};
408
- q.Kg=function(a){this.H=a};S("shaka.media.PresentationTimeline",pk);pk.prototype.setAvailabilityTimeOffset=pk.prototype.Kg;pk.prototype.usingPresentationStartTime=pk.prototype.Xg;pk.prototype.getSeekRangeEnd=pk.prototype.ub;pk.prototype.getSeekRangeStart=pk.prototype.Ab;pk.prototype.getSafeSeekRangeStart=pk.prototype.Vc;pk.prototype.getSegmentAvailabilityEnd=pk.prototype.Lb;pk.prototype.setUserSeekStart=pk.prototype.Rg;pk.prototype.getSegmentAvailabilityStart=pk.prototype.ib;
409
- pk.prototype.isInProgress=pk.prototype.dc;pk.prototype.isLive=pk.prototype.U;pk.prototype.offset=pk.prototype.offset;pk.prototype.notifyMaxSegmentDuration=pk.prototype.hf;pk.prototype.notifyMinSegmentStartTime=pk.prototype.Ud;pk.prototype.getInitialProgramDateTime=pk.prototype.Bh;pk.prototype.setInitialProgramDateTime=pk.prototype.Mg;pk.prototype.isStartTimeLocked=pk.prototype.di;pk.prototype.lockStartTime=pk.prototype.Md;pk.prototype.notifySegments=pk.prototype.fd;pk.prototype.notifyTimeRange=pk.prototype.yg;
395
+ function ik(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Bg(a.J);c=[];d={};for(e in a.h)d={ready:void 0},d.ready=new Zf,f={start:function(m){return function(){return m.ready.resolve()}}(d),p:d.ready,uri:null},a.l[e].push(f),c.push(d.ready),1==a.l[e].length&&f.start();wa(l,2);return E(l,Promise.all(c),4);case 4:ya(l,3);break;case 2:throw g=za(l),g;case 3:return wa(l,5,6),E(l,b(),6);case 6:Ba(l);for(h in a.h)jk(a,h);Ca(l,0);break;case 5:throw k=za(l),new T(2,3,3015,k,a.j.error||"No error in the media element",
396
+ null);}})}function jk(a,b){a.l[b].shift();kk(a,b)}function kk(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new T(2,3,3017,b)):c.p.reject(new T(2,3,3015,d,a.j.error||"No error in the media element",c.uri)),jk(a,b)}}function ak(a,b,c,d,e){var f=null==c,g=a.Fa[d];c=a.aa.Ch();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Mc(c),f=Zc()||Xc()||gd()||Wc()&&ld()&&c;f&&"mp4"==de(a.G[d])&&(b=xi(b,e));return b}
397
+ function lk(a,b,c,d){return Xj(a,b,function(){b!==Ud&&(pb()&&(a.i[b]&&(a.i[b].destroy(),delete a.i[b]),d&&(a.i[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Pj(a,b))},null)}
398
+ function mk(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F,J;return O(function(K){switch(K.g){case 1:c=Wd;a.C=!0;a.o=!1;d=a.j.currentTime;e=a.j.autoplay;f=a.j.paused;a.Ka&&(a.j.autoplay=!1);xa(K,2);a.s.nb();g=[];for(h in a.i)g.push(a.i[h].destroy());for(k in a.l)for(l=a.l[k],m=l[0],a.l[k]=l.slice(0,1),m&&g.push(m.p.catch(ve)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())q=p.value,q.p.reject(new T(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.m.removeSourceBuffer(v)}catch(G){}}return E(K,
399
+ Promise.all(g),4);case 4:return a.i={},a.h={},w=a.m.duration,a.L=new Zf,a.m=Ij(a,a.L),E(K,a.L,5);case 5:!isNaN(w)&&w?a.m.duration=w:!isNaN(a.ba)&&a.ba&&(a.m.duration=a.ba),A=new Zf,y=a.m.sourceBuffers,C=b.size,z=0,B=function(){z++;z===C&&(A.resolve(),a.s.Ib(y,"addsourcebuffer",B))},a.s.D(y,"addsourcebuffer",B),D=t(b.keys()),I=D.next();case 6:if(I.done)return a.j.currentTime=d,E(K,A,2);F=I.value;J=b.get(F);return E(K,Mj(a,F,J,J.codecs),9);case 9:a.o?(a.l[c.W]=[],a.l[c.ea]=[]):a.l[F]=[];I=D.next();
400
+ K.u(6);break;case 2:Ba(K),a.C=!1,Bg(a.J),a.s.za(a.j,"canplaythrough",function(){a.J.g||(a.j.autoplay=e,f||a.j.play())}),Ca(K,0)}})}function nk(a,b){return ik(a,function(){return mk(a,b)})}
401
+ function gk(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,y,C;return O(function(z){if(1==z.g){f=Wd;if(b==f.qa)return z.return(!1);g=ee(je(a.G[b]));h=ie(a.G[b]);l=!1;m=Yd(c,d);n=a.A.forceTransmux;if(!nb(m)||!a.B&&Zd.includes(m))n=!0;n&&(p=$d(c,d),q=mc(p))&&(k=q(),u=Sd(f.W,(d||"").split(",")),v=Sd(f.ea,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.W&&(w=u),m=k.convertCodecs(b,$d(c,w))):m=k.convertCodecs(b,p));A=ee(je(m));y=ie(m);if(g===A&&h===y)return a.i[b]&&!k?(a.i[b].destroy(),delete a.i[b]):!a.i[b]&&k?a.i[b]=
402
+ k:k&&(a.i[b]&&a.i[b].transmux!=k.transmux?(a.i[b].destroy(),delete a.i[b],a.i[b]=k):k.destroy()),z.return(!1);C=!0;if(a.o||l&&k&&!a.i[b])C=!1;if(C&&"smooth"===a.A.codecSwitchingStrategy&&pb())return E(z,lk(a,b,m,k),3);k&&k.destroy();return E(z,nk(a,e),3)}return z.return(!0)})}
403
+ function ok(a,b,c,d){if(b==Ud)var e=!1;else{e=ee(je(a.G[b]));var f=ie(a.G[b]),g=Yd(c,d),h=a.A.forceTransmux;if(!nb(g)||!a.B&&Zd.includes(g))h=!0;c=$d(c,d);h&&(h=mc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=ee(je(g));g=ie(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!pb()||a.o:!1}var Kj=window.URL.createObjectURL,Oj="sequence";function pk(a,b,c){this.i=a;this.s=b;this.m=this.l=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.C=!0;this.J=!1;this.G=0;this.F=void 0===c?!0:c;this.H=0;this.o=!1;this.B=a}r=pk.prototype;r.getDuration=function(){return this.l};r.Fh=function(){return this.g};r.Ng=function(a){this.i=a};r.Ua=function(a){this.l=a};r.Kh=function(){return this.i};r.Lg=function(a){this.A=a};r.kc=function(a){a&&!this.C&&(this.J=!0);this.C=a};r.ge=function(a){this.m=a};r.Dd=function(){return this.m};
404
+ r.Cf=function(a){this.s=a};r.xh=function(){return this.s};r.yg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Ud(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.F&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
405
+ r.gd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Ud(b);this.h=Math.max(this.h,c);null!=this.i&&this.F&&!this.o&&(this.i=d-this.h-this.g)}};r.Md=function(){this.o=!0};r.di=function(){return this.o};r.Mg=function(a){this.B=a};r.Bh=function(){return this.B};
406
+ r.Ud=function(a){null==this.j?this.j=a:this.J||(this.j=Math.min(this.j,a))};r.hf=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};r.V=function(){return Infinity==this.l&&!this.C};r.dc=function(){return Infinity!=this.l&&!this.C};r.ib=function(){return Math.max(this.G,this.Lb()-this.m)};r.Rg=function(a){this.G=a};
407
+ r.Lb=function(){return this.V()||this.dc()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.H,this.l):this.h?Math.min(this.h,this.l):this.l};r.Wc=function(a){var b=Math.max(this.j,this.G);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Lb()-this.m+a,this.vb()))};r.Bb=function(){return this.Wc(0)};r.vb=function(){return Math.max(0,this.Lb()-(this.V()||this.dc()?this.s:0))};r.Xg=function(){return null==this.i||null!=this.h&&this.F?!1:!0};
408
+ r.Kg=function(a){this.H=a};S("shaka.media.PresentationTimeline",pk);pk.prototype.setAvailabilityTimeOffset=pk.prototype.Kg;pk.prototype.usingPresentationStartTime=pk.prototype.Xg;pk.prototype.getSeekRangeEnd=pk.prototype.vb;pk.prototype.getSeekRangeStart=pk.prototype.Bb;pk.prototype.getSafeSeekRangeStart=pk.prototype.Wc;pk.prototype.getSegmentAvailabilityEnd=pk.prototype.Lb;pk.prototype.setUserSeekStart=pk.prototype.Rg;pk.prototype.getSegmentAvailabilityStart=pk.prototype.ib;
409
+ pk.prototype.isInProgress=pk.prototype.dc;pk.prototype.isLive=pk.prototype.V;pk.prototype.offset=pk.prototype.offset;pk.prototype.notifyMaxSegmentDuration=pk.prototype.hf;pk.prototype.notifyMinSegmentStartTime=pk.prototype.Ud;pk.prototype.getInitialProgramDateTime=pk.prototype.Bh;pk.prototype.setInitialProgramDateTime=pk.prototype.Mg;pk.prototype.isStartTimeLocked=pk.prototype.di;pk.prototype.lockStartTime=pk.prototype.Md;pk.prototype.notifySegments=pk.prototype.gd;pk.prototype.notifyTimeRange=pk.prototype.yg;
410
410
  pk.prototype.getDelay=pk.prototype.xh;pk.prototype.setDelay=pk.prototype.Cf;pk.prototype.getSegmentAvailabilityDuration=pk.prototype.Dd;pk.prototype.setSegmentAvailabilityDuration=pk.prototype.ge;pk.prototype.setStatic=pk.prototype.kc;pk.prototype.setClockOffset=pk.prototype.Lg;pk.prototype.getPresentationStartTime=pk.prototype.Kh;pk.prototype.setDuration=pk.prototype.Ua;pk.prototype.setPresentationStartTime=pk.prototype.Ng;pk.prototype.getMaxSegmentDuration=pk.prototype.Fh;
411
411
  pk.prototype.getDuration=pk.prototype.getDuration;function qk(a,b,c){this.j=c;this.l=a;this.s=rk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}qk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function sk(a,b){a.i=b}function tk(a){this.g=a}function rk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Oi(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 uk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.m=c;this.l=new hb;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.s=!1;this.l.D(a,"waiting",function(){return vk(f)});this.o=(new Sc(function(){vk(f)})).Va(this.m.gapJumpTimerTime)}uk.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.o&&(this.o.stop(),this.o=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};uk.prototype.lf=function(){this.s=!0;vk(this)};
412
412
  function vk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=rk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new U("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Pi(c,b,a.m.gapDetectionThreshold),
413
- null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Xc()||Zc())e=Math.ceil(100*(e+a.m.gapPadding))/100;e>=a.B.ub()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new U("gapjumped")))}}}};function wk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=xk.value().get(b),c.sa(a,b,d))}var xk=new Jc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function yk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new hb;this.i=new zk(a);wk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ak(e,e.j())})}yk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Bk(a){return a.o?a.g.currentTime:a.j()}
414
- function Ck(a,b){0<a.g.readyState?Dk(a.i,b):wk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ak(a,a.j())})}function Ak(a,b){.001>Math.abs(a.g.currentTime-b)?Ek(a):(a.h.sa(a.g,"seeking",function(){Ek(a)}),Dk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Ek(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
415
- function zk(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Sc(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}zk.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Dk(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Va(.1)};function Fk(a){this.h=a;this.j=!1;this.g=null;this.i=new hb}q=Fk.prototype;q.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.sa(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;wk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.qe=function(a){this.g=this.j?this.g:a};
416
- q.nd=function(){return(this.j?this.h.currentTime:this.g)||0};q.Uf=function(){return 0};q.Tf=function(){return 0};q.xg=function(){};
417
- function Gk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=Hk(a,c,f);this.j=new uk(a,b.presentationTimeline,c,this.o,f);this.h=new yk(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Bk(g.h);h=Ik(g,k);if(.001<Math.abs(h-k)){k=!1;if(!ed()||ed()&&md())k=!0;else{var l=Date.now()/1E3;if(!g.s||g.s<l-1)g.s=l,k=!0}if(k){Ck(g.h,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},
418
- function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Ab():g.g.ub():0>h&&(h=g.g.ub()+h);return Jk(g,Kk(g,h))});this.m=new Sc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Bk(g.h),k=g.g.Ab(),l=g.g.ub();3>l-k&&(k=l-3);h<k&&(h=Ik(g,h),g.i.currentTime=h)}})}q=Gk.prototype;q.ready=function(){this.m.Va(.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.A=function(){}};
419
- q.qe=function(a){Ck(this.h,a)};q.nd=function(){var a=Bk(this.h);return 0<this.i.readyState&&!this.i.paused?Kk(this,a):a};q.Uf=function(){return this.o?this.o.o:0};q.Tf=function(){return this.j.C};q.xg=function(){this.j.lf()};function Jk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
420
- function Ik(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Ab(),f=a.g.ub(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Vc(c),k=a.g.Vc(d);c=a.g.Vc(c+d);return b>=g?Jk(a,b):b>f?f:b<e?Mi(a.i.buffered,k)?k:c:b>=h||Mi(a.i.buffered,b)?b:c}function Kk(a,b){var c=a.g.Ab();if(b<c)return c;a=a.g.ub();return b>a?a:b}
421
- function Hk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new qk(new tk(a),b.stallThreshold,c);sk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Lk(a){this.g=a;this.m=null;this.i=0;this.o=!1}q=Lk.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.ji=function(){this.o=!0};q.Ub=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
422
- 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};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.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
423
- q.Qd=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};q.ed=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.Qd(a);this.Ca(b)};q.Ca=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
424
- q.vc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){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],b=new Gi(a.startTime,b,a.C,a.Da,a.pa,a.da,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
425
- q.ie=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Sc(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Va(a))};Lk.prototype[Symbol.iterator]=function(){return this.zb(0)};
426
- Lk.prototype.zb=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Za("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Mk(this,d,f,c)};function Nk(a,b,c){a=new Gi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Lk([a])}
427
- S("shaka.media.SegmentIndex",Lk);Lk.forSingleSegment=Nk;Lk.prototype.getIteratorForTime=Lk.prototype.zb;Lk.prototype.updateEvery=Lk.prototype.ie;Lk.prototype.fit=Lk.prototype.vc;Lk.prototype.evict=Lk.prototype.Ca;Lk.prototype.mergeAndEvict=Lk.prototype.ed;Lk.prototype.offset=Lk.prototype.offset;Lk.prototype.get=Lk.prototype.get;Lk.prototype.find=Lk.prototype.find;Lk.prototype.markImmutable=Lk.prototype.ji;Lk.prototype.release=Lk.prototype.release;Lk.prototype.getNumEvicted=Lk.prototype.getNumEvicted;
413
+ null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Xc()||Zc())e=Math.ceil(100*(e+a.m.gapPadding))/100;e>=a.B.vb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new U("gapjumped")))}}}};function wk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=xk.value().get(b),c.za(a,b,d))}var xk=new Jc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function yk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new hb;this.i=new zk(a);wk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ak(e,e.j())})}yk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Bk(a){return a.o?a.g.currentTime:a.j()}
414
+ function Ck(a,b){0<a.g.readyState?Dk(a.i,b):wk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ak(a,a.j())})}function Ak(a,b){.001>Math.abs(a.g.currentTime-b)?Ek(a):(a.h.za(a.g,"seeking",function(){Ek(a)}),Dk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Ek(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
415
+ function zk(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new Sc(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}zk.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Dk(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Va(.1)};function Fk(a){this.h=a;this.j=!1;this.g=null;this.i=new hb}r=Fk.prototype;r.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.za(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;wk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};r.qe=function(a){this.g=this.j?this.g:a};
416
+ r.od=function(){return(this.j?this.h.currentTime:this.g)||0};r.Uf=function(){return 0};r.Tf=function(){return 0};r.xg=function(){};
417
+ function Gk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=Hk(a,c,f);this.j=new uk(a,b.presentationTimeline,c,this.o,f);this.h=new yk(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Bk(g.h);h=Ik(g,k);if(.001<Math.abs(h-k)){k=!1;if(!ed()||ed()&&md())k=!0;else{var l=Date.now()/1E3,m=ed()&&Yc("Fuchsia")?3:1;if(!g.s||g.s<l-m)g.s=l,k=!0}if(k){Ck(g.h,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&
418
+ !k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Bb():g.g.vb():0>h&&(h=g.g.vb()+h);return Jk(g,Kk(g,h))});this.m=new Sc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Bk(g.h),k=g.g.Bb(),l=g.g.vb();3>l-k&&(k=l-3);h<k&&(h=Ik(g,h),g.i.currentTime=h)}})}r=Gk.prototype;r.ready=function(){this.m.Va(.25)};
419
+ r.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.A=function(){}};r.qe=function(a){Ck(this.h,a)};r.od=function(){var a=Bk(this.h);return 0<this.i.readyState&&!this.i.paused?Kk(this,a):a};r.Uf=function(){return this.o?this.o.o:0};r.Tf=function(){return this.j.C};r.xg=function(){this.j.lf()};function Jk(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
420
+ function Ik(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Bb(),f=a.g.vb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Wc(c),k=a.g.Wc(d);c=a.g.Wc(c+d);return b>=g?Jk(a,b):b>f?f:b<e?Mi(a.i.buffered,k)?k:c:b>=h||Mi(a.i.buffered,b)?b:c}function Kk(a,b){var c=a.g.Bb();if(b<c)return c;a=a.g.vb();return b>a?a:b}
421
+ function Hk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new qk(new tk(a),b.stallThreshold,c);sk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Lk(a){this.g=a;this.m=null;this.i=0;this.o=!1}r=Lk.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.i};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.ji=function(){this.o=!0};r.Ub=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
422
+ r.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};r.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
423
+ r.Qd=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};r.fd=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.Qd(a);this.Ca(b)};r.Ca=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
424
+ r.vc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){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],b=new Gi(a.startTime,b,a.C,a.Da,a.pa,a.da,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
425
+ r.ie=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Sc(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Va(a))};Lk.prototype[Symbol.iterator]=function(){return this.Ab(0)};
426
+ Lk.prototype.Ab=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Za("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Mk(this,d,f,c)};function Nk(a,b,c){a=new Gi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Lk([a])}
427
+ S("shaka.media.SegmentIndex",Lk);Lk.forSingleSegment=Nk;Lk.prototype.getIteratorForTime=Lk.prototype.Ab;Lk.prototype.updateEvery=Lk.prototype.ie;Lk.prototype.fit=Lk.prototype.vc;Lk.prototype.evict=Lk.prototype.Ca;Lk.prototype.mergeAndEvict=Lk.prototype.fd;Lk.prototype.offset=Lk.prototype.offset;Lk.prototype.get=Lk.prototype.get;Lk.prototype.find=Lk.prototype.find;Lk.prototype.markImmutable=Lk.prototype.ji;Lk.prototype.release=Lk.prototype.release;Lk.prototype.getNumEvicted=Lk.prototype.getNumEvicted;
428
428
  Lk.prototype.getNumReferences=Lk.prototype.getNumReferences;function Mk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Mk.prototype.Jc=function(a){this.reverse=a};Mk.prototype.rh=function(){return this.h};Mk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
429
429
  Mk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};S("shaka.media.SegmentIterator",Mk);Mk.prototype.next=Mk.prototype.next;Mk.prototype.current=Mk.prototype.current;Mk.prototype.currentPosition=Mk.prototype.rh;
430
- Mk.prototype.setReverse=Mk.prototype.Jc;function Ok(){Lk.call(this,[]);this.h=[]}ra(Ok,Lk);q=Ok.prototype;q.clone=function(){var a=new Ok;a.h=this.h.slice();a.i=this.i;return a};q.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};q.Ub=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Ub(a)};
431
- q.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};q.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};q.offset=function(){};q.Qd=function(){};
432
- q.Ca=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Ca(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};q.ed=function(){};q.vc=function(){};q.ie=function(){};S("shaka.media.MetaSegmentIndex",Ok);Ok.prototype.updateEvery=Ok.prototype.ie;Ok.prototype.fit=Ok.prototype.vc;Ok.prototype.mergeAndEvict=Ok.prototype.ed;Ok.prototype.evict=Ok.prototype.Ca;Ok.prototype.merge=Ok.prototype.Qd;Ok.prototype.offset=Ok.prototype.offset;
430
+ Mk.prototype.setReverse=Mk.prototype.Jc;function Ok(){Lk.call(this,[]);this.h=[]}ra(Ok,Lk);r=Ok.prototype;r.clone=function(){var a=new Ok;a.h=this.h.slice();a.i=this.i;return a};r.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};r.Ub=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Ub(a)};
431
+ r.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};r.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.Qd=function(){};
432
+ r.Ca=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Ca(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};r.fd=function(){};r.vc=function(){};r.ie=function(){};S("shaka.media.MetaSegmentIndex",Ok);Ok.prototype.updateEvery=Ok.prototype.ie;Ok.prototype.fit=Ok.prototype.vc;Ok.prototype.mergeAndEvict=Ok.prototype.fd;Ok.prototype.evict=Ok.prototype.Ca;Ok.prototype.merge=Ok.prototype.Qd;Ok.prototype.offset=Ok.prototype.offset;
433
433
  Ok.prototype.get=Ok.prototype.get;Ok.prototype.find=Ok.prototype.find;Ok.prototype.forEachTopLevelReference=Ok.prototype.Ub;Ok.prototype.release=Ok.prototype.release;function Pk(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Cd();this.h=new Sc(function(){b.g.wg(.25*b.i)})}Pk.prototype.release=function(){this.set(this.Xb());this.h&&(this.h.stop(),this.h=null);this.g=null};Pk.prototype.set=function(a){this.i=a;Qk(this)};Pk.prototype.Xb=function(){return this.g.Xb()};function Qk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Cd()!=b&&a.g.Ff(b);return}catch(c){}a.h.Va(.25);0!=a.g.Cd()&&a.g.Ff(0)};function Rk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Sc(function(){Sk(b,!1)})).Va(.25)}Rk.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Sk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Tk(){this.g=null;this.h=[]}function Uk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function Vk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(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 Wk(){this.i=this.h=null;this.g=[]}function Xk(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 Yk(){this.Sb=this.A=this.B=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.L=this.N=this.H=this.J=this.K=this.l=this.o=NaN;this.g=new Tk;this.h=new Wk};function Zk(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.o=d}function $k(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
434
- function al(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.zb(b,!0,a.o)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.preload&&null!=b.pa&&(c=!1);2==b.ac()&&(c=!1);c&&b.da&&bl(a,b.da);c&&!a.h.has(b)&&(c=new cl(a.l),dl(c,b,a.i),a.h.set(b,c));if(a.i.fastSwitching&&b.gd&&b.Ld)break}el(a)}}function bl(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Ci(d,b)})){var c=new cl(a.l);dl(c,b,a.i);a.j.set(b,c)}}
434
+ function al(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ab(b,!0,a.o)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.preload&&null!=b.pa&&(c=!1);2==b.ac()&&(c=!1);c&&b.da&&bl(a,b.da);c&&!a.h.has(b)&&(c=new cl(a.l),dl(c,b,a.i),a.h.set(b,c));if(a.i.fastSwitching&&b.hd&&b.Ld)break}el(a)}}function bl(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Fi(d,b)})){var c=new cl(a.l);dl(c,b,a.i);a.j.set(b,c)}}
435
435
  function fl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&gl(a,c)}function hl(a){fl(a,a.h);fl(a,a.j);a.g=null}Zk.prototype.Ca=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&gl(this,d);b&&el(this)};Zk.prototype.Jc=function(a){this.o=a;this.g&&this.g.Jc(a)};
436
- function el(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={We:void 0},d=c.next())e.We=d.value,b.some(function(f){return function(g){return Ci(g.da,f.We)}}(e))||gl(a,e.We)}function il(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&gl(a,d)}el(a)}function jl(a,b){b&&b!==a.i&&(hl(a),a.i=b)}function gl(a,b){var c=a.h;b instanceof Bi&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function cl(a){this.g=a;this.Zd=this.If=null}
437
- function dl(a,b,c){var d=new Uint8Array(0);a.Zd=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Nd(d,e):d=e,a.If?E(f,a.If(d),3):f.u(0);d=new Uint8Array(0);H(f)})})}cl.prototype.abort=function(){this.Zd&&this.Zd.abort()};function kl(a){ig.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Sc(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new U("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Va(2)}ra(kl,ig);kl.prototype.release=function(){this.g.clear();this.h.stop();ig.prototype.release.call(this)};function ll(a){ig.call(this);this.g=new Map;this.h=a}ra(ll,ig);ll.prototype.release=function(){this.g.clear();ig.prototype.release.call(this)};function ml(a,b){var c=a.g.get(b);c||(c={jd:[],ag:null,contentType:b},a.g.set(b,c));return c}function nl(a,b,c){var d=ml(a,b.contentType);ol(a,d);a={gf:b,position:c};d=d.jd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
438
- ll.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.jd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.gf;break a}}d=null}if(e=d)e=c.ag,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);
439
- 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.ag=d,JSON.stringify(d),c=new U("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function ol(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.jd;b.jd=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.jd=[]};function pl(a,b,c,d,e){a=qg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function ql(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.F=new Map;this.B=1;this.s=this.j=null;this.J=0;this.G=!1;this.i=new Map;this.C=!1;this.K=null;this.A=!1;this.m=new Ag(function(){return rl(c)});this.L=Date.now()/1E3;this.o=new Map;this.H={projection:null,hfov:null};this.P=0;this.N=Infinity}q=ql.prototype;q.destroy=function(){return this.m.destroy()};
436
+ function el(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={We:void 0},d=c.next())e.We=d.value,b.some(function(f){return function(g){return Fi(g.da,f.We)}}(e))||gl(a,e.We)}function il(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&gl(a,d)}el(a)}function jl(a,b){b&&b!==a.i&&(hl(a),a.i=b)}function gl(a,b){var c=a.h;b instanceof Bi&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function cl(a){this.g=a;this.Zd=this.If=null}
437
+ function dl(a,b,c){var d=new Uint8Array(0);a.Zd=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Nd(d,e):d=e,a.If?E(f,a.If(d),3):f.u(0);d=new Uint8Array(0);H(f)})})}cl.prototype.abort=function(){this.Zd&&this.Zd.abort()};function kl(a){ig.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Sc(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new U("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Va(2)}ra(kl,ig);kl.prototype.release=function(){this.g.clear();this.h.stop();ig.prototype.release.call(this)};function ll(a){ig.call(this);this.g=new Map;this.h=a}ra(ll,ig);ll.prototype.release=function(){this.g.clear();ig.prototype.release.call(this)};function ml(a,b){var c=a.g.get(b);c||(c={kd:[],ag:null,contentType:b},a.g.set(b,c));return c}function nl(a,b,c){var d=ml(a,b.contentType);ol(a,d);a={gf:b,position:c};d=d.kd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
438
+ ll.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.kd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.gf;break a}}d=null}if(e=d)e=c.ag,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);
439
+ 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.ag=d,JSON.stringify(d),c=new U("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function ol(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.kd;b.kd=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.kd=[]};function pl(a,b,c,d,e){a=qg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function ql(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.G=new Map;this.B=1;this.s=this.j=null;this.K=0;this.H=!1;this.i=new Map;this.F=!1;this.L=null;this.A=!1;this.m=new Ag(function(){return rl(c)});this.N=Date.now()/1E3;this.o=new Map;this.J={projection:null,hfov:null};this.U=0;this.P=Infinity;this.C=null}r=ql.prototype;r.destroy=function(){return this.m.destroy()};
440
440
  function rl(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,sl(e),b.push(tl(e)),e.T&&(hl(e.T),e.T=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,hl(h);return E(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.l=null;a.h=null;H(k)})}
441
- q.configure=function(a){this.h=a;this.K=new Wf({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.T&&(hl(b.T),b.T=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,hl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Ud))&&
442
- b.T&&(hl(b.T),b.T=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.T&&(hl(b.T),b.T=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.T?(il(c.T,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(hl(c.T),c.T=null)):0<a.segmentPrefetchLimit&&(c.T=ul(this,c.stream));a.disableAudioPrefetch||vl(this)};function wl(a,b,c){a.l.presentationTimeline.U()||(a.P=b,a.N=c)}
443
- q.start=function(a){var b=this;return O(function(c){if(1==c.g)return E(c,xl(b,a||new Map),2);Bg(b.m);b.C=!0;H(c)})};function yl(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Wd,a.J++,d=a.J,wa(l,2),E(l,ek(a.g.Y,c.qa),4);case 4:ya(l,3);break;case 2:if(e=Aa(l),a.g)a.g.onError(e);case 3:f=Yd(b.mimeType,b.codecs),Nj(a.g.Y,f,a.l.sequenceMode,b.external),g=a.g.Y.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.J==d&&(k=zl(a,b),a.i.set(c.qa,k),Al(a,k,0)),H(l)}})}
444
- function Bl(a){var b=a.i.get(Ud);b&&(sl(b),tl(b).catch(function(){}),a.i.delete(Ud));a.s=null}function Cl(a,b){for(var c=0>a.g.Za(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.ga&&e.ga.Jc(c),e.T&&e.T.Jc(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Jc(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Nb&&(Dl(a,b,!1,0,!1),c.Nb=d);else if(b=c.Nb)c.Nb=null,Dl(a,b,!0,0,!1)}
445
- function El(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.j=b;a.C&&(b.video&&Dl(a,b.video,c,d,e,f),b.audio&&Dl(a,b.audio,c,d,e,f))}function Fl(a,b){O(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):E(c,b.createSegmentIndex(),2):c.return();Dl(a,b,!0,0,!1);H(c)})}function Gl(a,b){for(var c=t(a.F.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.F.delete(d))}}
446
- function Dl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ud?g&&(g.Nb&&(b.trickModeVideo?(g.Nb=b,b=b.trickModeVideo):g.Nb=null),g.stream!=b||e)&&(a.o.has(b)?g.T=a.o.get(b):g.T&&jl(g.T,b),b.type==Ud&&(e=Yd(b.mimeType,b.codecs),Nj(a.g.Y,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ia?(e="("+g.type+":"+g.stream.id+")",a.F.has(e)||a.F.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),g.stream=b,g.ga=null,g.Vf=!!f,c?g.Mc?g.oe=!0:g.Ia?(g.Rb=!0,g.ud=d,
441
+ r.configure=function(a){this.h=a;this.L=new Wf({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.T&&(hl(b.T),b.T=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,hl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Ud))&&
442
+ b.T&&(hl(b.T),b.T=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.T&&(hl(b.T),b.T=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.T?(il(c.T,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(hl(c.T),c.T=null)):0<a.segmentPrefetchLimit&&(c.T=ul(this,c.stream));a.disableAudioPrefetch||vl(this)};function wl(a,b,c){a.l.presentationTimeline.V()||(a.U=b,a.P=c)}
443
+ r.start=function(a){var b=this;return O(function(c){if(1==c.g)return E(c,xl(b,a||new Map),2);Bg(b.m);b.F=!0;H(c)})};function yl(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Wd,a.K++,d=a.K,wa(l,2),E(l,ek(a.g.X,c.qa),4);case 4:ya(l,3);break;case 2:if(e=za(l),a.g)a.g.onError(e);case 3:f=Yd(b.mimeType,b.codecs),Nj(a.g.X,f,a.l.sequenceMode,b.external),g=a.g.X.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.K==d&&(k=zl(a,b),a.i.set(c.qa,k),Al(a,k,0)),H(l)}})}
444
+ function Bl(a){var b=a.i.get(Ud);b&&(sl(b),tl(b).catch(function(){}),a.C=a.i.get(Ud),a.i.delete(Ud));a.s=null}function Cl(a,b){for(var c=0>a.g.Za(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.fa&&e.fa.Jc(c),e.T&&e.T.Jc(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Jc(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Nb&&(Dl(a,b,!1,0,!1),c.Nb=d);else if(b=c.Nb)c.Nb=null,Dl(a,b,!0,0,!1)}
445
+ function El(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.j=b;a.F&&(b.video&&Dl(a,b.video,c,d,e,f),b.audio&&Dl(a,b.audio,c,d,e,f))}function Fl(a,b){O(function(c){if(1==c.g)return a.C=null,a.s=b,a.F?b.segmentIndex?c.u(2):E(c,b.createSegmentIndex(),2):c.return();Dl(a,b,!0,0,!1);H(c)})}function Gl(a,b){for(var c=t(a.G.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.G.delete(d))}}
446
+ function Dl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ud?g&&(g.Nb&&(b.trickModeVideo?(g.Nb=b,b=b.trickModeVideo):g.Nb=null),g.stream!=b||e)&&(a.o.has(b)?g.T=a.o.get(b):g.T&&jl(g.T,b),b.type==Ud&&(e=Yd(b.mimeType,b.codecs),Nj(a.g.X,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ia?(e="("+g.type+":"+g.stream.id+")",a.G.has(e)||a.G.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),g.stream=b,g.fa=null,g.Vf=!!f,c?g.Mc?g.oe=!0:g.Ia?(g.Rb=!0,g.vd=d,
447
447
  g.oe=!0):(sl(g),Hl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Ia||g.pb||Al(a,g,0),Il(a,g).catch(function(h){if(a.g)a.g.onError(h)})):yl(a,b)}
448
- function Il(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.eb)return e.return();c=b.stream;d=b.eb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.eb!=d||b.stream!=c)return e.return();var f=a.g.Bd();var g=Tj(a.g.Y,b.type),h=b.stream.segmentIndex.find(b.Ma?b.Ma.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.pa?k.pa-k.Da:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.da)&&(h+=(k.pa?k.pa-k.Da:null)||0),k=a.g.getBandwidthEstimate(),
448
+ function Il(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.eb)return e.return();c=b.stream;d=b.eb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.eb!=d||b.stream!=c)return e.return();var f=a.g.Vc();var g=Tj(a.g.X,b.type),h=b.stream.segmentIndex.find(b.Ma?b.Ma.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.pa?k.pa-k.Da:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.da)&&(h+=(k.pa?k.pa-k.Da:null)||0),k=a.g.getBandwidthEstimate(),
449
449
  f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.eb.h.g>h?!0:!1):f=!1;f&&b.eb.abort();H(e)})}
450
- q.Hc=function(){if(this.g)for(var a=this.g.Bd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.Y;e.C?e=!1:d==Ud?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Sj(e,d),e=Mi(e,a));if(!e){c.T&&(c.T.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.ga=null;(null!=Tj(this.g.Y,d)||c.Ia)&&Jl(this,c);c.eb&&(c.eb.abort(),c.eb=null);d===Ud&&(d=this.g.Y,d.H&&d.H.g());c.Hc=!0}}};
451
- function Jl(a,b){b.Mc||b.Rb||(b.Ia?(b.Rb=!0,b.ud=0):null==Rj(a.g.Y,b.type)?null==b.pb&&Al(a,b,0):(sl(b),Hl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
452
- function xl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Wd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.V,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.fa,a.j.video),e.add(a.j.video));a.s&&(d.set(c.qa,a.s),e.add(a.s));f=a.g.Y;return E(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Bg(a.m);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=zl(a,l),b.has(l.id)&&(n=
453
- b.get(l.id),$k(n,function(r,u,v){return Kl(r,u,v||null,a.h.retryParameters,a.g.Db)}),m.T=n),a.i.set(k,m),Al(a,m,0));H(p)})}function zl(a,b){return{stream:b,type:b.type,ga:null,T:ul(a,b),Ma:null,ec:null,df:null,bf:null,af:null,Nb:null,endOfStream:!1,Ia:!1,pb:null,Rb:!1,ud:0,oe:!1,Mc:!1,Hc:!0,tf:!1,Zc:!1,eb:null}}
454
- function ul(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Ud&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Ud&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.T)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new Zk(a.h.segmentPrefetchLimit,b,function(d,e,f){return Kl(d,e,f||null,a.h.retryParameters,a.g.Db)},0>a.g.Za()):null}
450
+ r.Hc=function(){if(this.g)for(var a=this.g.Vc(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.X;e.C?e=!1:d==Ud?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Sj(e,d),e=Mi(e,a));if(!e){c.T&&(c.T.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.fa=null;(null!=Tj(this.g.X,d)||c.Ia)&&Jl(this,c);c.eb&&(c.eb.abort(),c.eb=null);d===Ud&&(d=this.g.X,d.H&&d.H.g());c.Hc=!0}}};
451
+ function Jl(a,b){b.Mc||b.Rb||(b.Ia?(b.Rb=!0,b.vd=0):null==Rj(a.g.X,b.type)?null==b.pb&&Al(a,b,0):(sl(b),Hl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
452
+ function xl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Wd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.W,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ea,a.j.video),e.add(a.j.video));a.s&&(d.set(c.qa,a.s),e.add(a.s));f=a.g.X;return E(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Bg(a.m);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=zl(a,l),b.has(l.id)&&(n=
453
+ b.get(l.id),$k(n,function(q,u,v){return Kl(q,u,v||null,a.h.retryParameters,a.g.Eb)}),m.T=n),a.i.set(k,m),Al(a,m,0));H(p)})}function zl(a,b){return{stream:b,type:b.type,fa:null,T:ul(a,b),Ma:null,ec:null,df:null,bf:null,af:null,Nb:null,endOfStream:!1,Ia:!1,pb:null,Rb:!1,vd:0,oe:!1,Mc:!1,Hc:!0,tf:!1,$c:!1,eb:null}}
454
+ function ul(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Ud&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Ud&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.T)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new Zk(a.h.segmentPrefetchLimit,b,function(d,e,f){return Kl(d,e,f||null,a.h.retryParameters,a.g.Eb)},0>a.g.Za()):null}
455
455
  function vl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.l.variants),e=d.next(),f={};!e.done;f={gb:void 0},e=d.next())if(f.gb=e.value,f.gb.audio)if(a.o.has(f.gb.audio)){if(e=a.o.get(f.gb.audio),il(e,b),!(0<b&&c.some(function(h){return function(k){return ye(h.gb.audio.language,k)}}(f)))){var g=a.i.get(f.gb.audio.type);e!==(g&&g.T)&&hl(e);a.o.delete(f.gb.audio)}}else 0>=b||!c.some(function(h){return function(k){return ye(h.gb.audio.language,k)}}(f))||!(e=ul(a,f.gb.audio))||
456
- (f.gb.audio.segmentIndex||f.gb.audio.createSegmentIndex(),a.o.set(f.gb.audio,e))}q.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.Y.Ua(a):this.g.Y.Ua(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
457
- function Ll(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Bg(a.m);if(b.Ia||null==b.pb||b.Mc)return h.return();b.pb=null;if(!b.Rb){h.u(2);break}return E(h,Hl(a,b,b.oe,b.ud),3);case 3:return h.return();case 2:Gl(a,b);if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return E(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ia||b.pb||Al(a,b,0),h.return();case 4:wa(h,6);d=Ml(a,b);null!=d&&(Al(a,b,d),b.Zc=!1);ya(h,7);break;case 6:return e=
458
- Aa(h),E(h,Nl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.u(0);break}return E(h,a.g.Y.endOfStream(),10);case 10:Bg(a.m),g=a.g.Y.getDuration(),0!=g&&g<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.Ua(g),H(h)}})}
459
- function Ml(a,b){if(Ol(b))return bk(a.g.Y,b.stream.originalId||""),null;b.type==Ud&&ck(a.g.Y);if(!a.g.Y.xa&&b.type!=Ud)return a.h.updateIntervalSeconds/2;var c=a.g.Bd();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ca(c,!0),al(e,c);d=b.Ma?b.Ma.endTime:c;var f=Uj(a.g.Y,b.type,c),g=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),h=a.l.presentationTimeline.getDuration()-d;e=Tj(a.g.Y,b.type);if(1E-6>h&&e)return b.endOfStream=
460
- !0,"video"==b.type&&(a=a.i.get(Ud))&&Ol(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.ga;e=Pl(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.Vf&&(f=!0,b.Vf=!1);g=Infinity;h=Array.from(a.i.values());h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,Ol(k)||k.ga&&!k.ga.current()||(g=Math.min(g,k.Ma?k.Ma.endTime:c));if(d>=g+a.l.presentationTimeline.g)return a.h.updateIntervalSeconds;b.T&&b.ga&&!a.o.has(b.stream)&&(b.T.Ca(e.startTime),al(b.T,
456
+ (f.gb.audio.segmentIndex||f.gb.audio.createSegmentIndex(),a.o.set(f.gb.audio,e))}r.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.X.Ua(a):this.g.X.Ua(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
457
+ function Ll(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Bg(a.m);if(b.Ia||null==b.pb||b.Mc)return h.return();b.pb=null;if(!b.Rb){h.u(2);break}return E(h,Hl(a,b,b.oe,b.vd),3);case 3:return h.return();case 2:Gl(a,b);if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return E(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ia||b.pb||Al(a,b,0),h.return();case 4:wa(h,6);d=Ml(a,b);null!=d&&(Al(a,b,d),b.$c=!1);ya(h,7);break;case 6:return e=
458
+ za(h),E(h,Nl(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.u(0);break}return E(h,a.g.X.endOfStream(),10);case 10:Bg(a.m),g=a.g.X.getDuration(),0!=g&&g<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.Ua(g),H(h)}})}
459
+ function Ml(a,b){if(Ol(b))return bk(a.g.X,b.stream.originalId||""),null;b.type==Ud&&ck(a.g.X);if(!a.g.X.oa&&b.type!=Ud)return a.h.updateIntervalSeconds/2;var c=a.g.Vc();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ca(c,!0),al(e,c);d=b.Ma?b.Ma.endTime:c;var f=Uj(a.g.X,b.type,c),g=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),h=a.l.presentationTimeline.getDuration()-d;e=Tj(a.g.X,b.type);if(1E-6>h&&e)return b.endOfStream=
460
+ !0,"video"==b.type&&(a=a.i.get(Ud))&&Ol(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.fa;e=Pl(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.Vf&&(f=!0,b.Vf=!1);g=Infinity;h=Array.from(a.i.values());h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,Ol(k)||k.fa&&!k.fa.current()||(g=Math.min(g,k.Ma?k.Ma.endTime:c));if(d>=g+a.l.presentationTimeline.g)return a.h.updateIntervalSeconds;b.T&&b.fa&&!a.o.has(b.stream)&&(b.T.Ca(e.startTime),al(b.T,
461
461
  e.startTime));Ql(a,b,c,e,f).catch(function(){});return null}
462
- function Pl(a,b,c,d){if(b.ga)return b.ga.current();if(b.Ma||d)return c=b.Ma?b.Ma.endTime:d,a=0>a.g.Za(),b.stream.segmentIndex&&(b.ga=b.stream.segmentIndex.zb(c,!1,a)),b.ga&&b.ga.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Za();var f=null;d&&(b.stream.segmentIndex&&(b.ga=b.stream.segmentIndex.zb(e,!1,a)),f=b.ga&&b.ga.next().value);f||(b.stream.segmentIndex&&(b.ga=b.stream.segmentIndex.zb(c,!1,a)),f=b.ga&&b.ga.next().value);return f}
463
- function Ql(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:f=Wd;g=b.stream;h=b.ga;b.Ia=!0;wa(B,2);if(2==d.ac())throw new T(1,1,1011);return E(B,Rl(a,b,d,e),4);case 4:Bg(a.m);if(a.A)return B.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if(a.h.lowLatencyMode&&l&&k&&("HLS"!=a.l.type||d.m))return p=new Uint8Array(0),u=r=!1,w=function(D){var I,F,J,K;return O(function(G){switch(G.g){case 1:if(r)return G.return();u=!0;Bg(a.m);
464
- if(a.A)return G.return();wa(G,2);p=Sl(p,D);I=!1;F=0;(new Jg).box("mdat",function(M){F=M.size+M.start;I=!0}).parse(p,!1,!0);if(!I){G.u(4);break}J=p.subarray(0,F);p=p.subarray(F);return E(G,Tl(a,b,c,g,d,J,!0,e),5);case 5:b.T&&b.ga&&al(b.T,d.startTime,!0);case 4:ya(G,0);break;case 2:v=K=Aa(G),H(G)}})},E(B,Ul(a,b,d,w),9);m=Ul(a,b,d);return E(B,m,7);case 7:n=B.h;Bg(a.m);if(a.A)return B.return();Bg(a.m);return b.Rb?(b.Ia=!1,Al(a,b,0),B.return()):E(B,Tl(a,b,c,g,d,n,!1,e),6);case 9:A=B.h;if(v)throw v;if(u){B.u(10);
465
- break}r=!0;Bg(a.m);return a.A?B.return():b.Rb?(b.Ia=!1,Al(a,b,0),B.return()):E(B,Tl(a,b,c,g,d,A,!1,e),10);case 10:b.T&&b.ga&&al(b.T,d.startTime,!0);case 6:Bg(a.m);if(a.A)return B.return();b.Ma=d;h.next();b.Ia=!1;b.tf=!1;y=a.g.Y.sb();C=y[b.type];eb(JSON.stringify(C));b.Rb||a.g.lf(d,b.stream);Al(a,b,0);ya(B,0);break;case 2:z=Aa(B);Bg(a.m,z);if(a.A)return B.return();b.Ia=!1;if(7001==z.code)b.Ia=!1,sl(b),Al(a,b,0),B.u(0);else if(b.type==f.qa&&a.h.ignoreTextStreamFailures)a.i.delete(f.qa),B.u(0);else if(3017==
466
- z.code)Vl(a,b,z),B.u(0);else return b.Zc=!0,1==z.category&&b.T&&gl(b.T,d),z.severity=2,E(B,Nl(a,b,z),0)}})}function Wl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):E(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Bb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
467
- function Sl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Vl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.tf})){if(a.g.wd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.Zc=!0;a.A=!0;a.g.onError(c);return}b.tf=!0}Al(a,b,4)}
468
- function Rl(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:e=Wd;f=null==b.Ma&&null==b.ec;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.P)-.1);k=Math.min(c.appendWindowEnd,a.N)+.01;l=c.codecs||b.stream.codecs;m=he(l);n=ie(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.df&&h==b.bf&&k==b.af&&m==b.cf&&n==b.sg){B.u(2);break}r=b.cf&&b.sg&&ok(a.g.Y,b.type,n,l);if(!r){B.u(3);break}u=null;b.type===e.fa?u=a.i.get(e.V):b.type===e.V&&(u=a.i.get(e.fa));if(!u){B.u(3);
469
- break}return E(B,tl(u).catch(function(){}),5);case 5:u.ec=null,Jl(a,u);case 3:return v=function(){var D,I,F;return O(function(J){if(1==J.g)return D=new Map,a.j.audio&&D.set(e.V,a.j.audio),a.j.video&&D.set(e.fa,a.j.video),wa(J,2),b.bf=h,b.af=k,b.cf=m,b.sg=n,b.df=p,I=a.l.sequenceMode||"HLS"==a.l.type,E(J,fk(a.g.Y,b.type,p,h,k,I,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,D),4);if(2!=J.g)return ya(J,0);F=Aa(J);b.bf=null;b.af=null;b.cf=null;b.df=null;throw F;})},E(B,v(),2);case 2:return Ci(c.da,
470
- b.ec)||(b.ec=c.da,c.l&&c.da&&(w=Ul(a,b,c.da),A=function(){var D,I,F,J,K,G,M;return O(function(N){switch(N.g){case 1:return wa(N,2),E(N,w,4);case 4:return D=N.h,Bg(a.m),I=null,F=new Map,J={projection:null,hfov:null},K=new Jg,K.box("moov",Qg).box("trak",Qg).box("mdia",Qg).R("mdhd",function(L){I=Zi(L.reader,L.version).timescale}).box("hdlr",function(L){L=L.reader;L.skip(8);switch(L.hc()){case "soun":F.set(e.V,I);break;case "vide":F.set(e.fa,I)}I=null}).box("minf",Qg).box("stbl",Qg).R("stsd",Sg).box("encv",
471
- Tg).box("avc1",Tg).box("avc3",Tg).box("hev1",Tg).box("hvc1",Tg).box("dvav",Tg).box("dva1",Tg).box("dvh1",Tg).box("dvhe",Tg).box("vexu",Qg).box("proj",Qg).R("prji",function(L){L=L.reader.hc();J.projection=L}).box("hfov",function(L){L=L.reader.O()/1E3;J.hfov=L}).parse(D),Xl(a,J),F.has(b.type)?c.da.timescale=F.get(b.type):null!=I&&(c.da.timescale=I),G=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,E(N,a.g.Yf(b.type,D),5);case 5:return E(N,Wj(a.g.Y,b.type,D,null,b.stream,G,b.Hc,d),6);case 6:ya(N,
472
- 0);break;case 2:throw M=Aa(N),b.ec=null,M;}})},y=c.startTime,f&&(C=Tj(a.g.Y,b.type),null!=C&&(y=C)),a.g.li(y,c.da),g.push(A()))),a.l.sequenceMode&&(z=b.Ma?b.Ma.i:null,c.i!=z&&g.push(hk(a.g.Y,b.type,c.startTime))),E(B,Promise.all(g),0)}})}
473
- function Tl(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p;return O(function(r){switch(r.g){case 1:k=d.closedCaptions&&0<d.closedCaptions.size;m=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;n=a.h.parsePrftBox&&!a.G;if(m||n)l=new Jg;m&&l.R("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.hc();var A=u.reader.hc();var y=u.reader.O();var C=u.reader.O();var z=u.reader.O();var B=u.reader.O();var D=e.startTime+C/y}else y=
462
+ function Pl(a,b,c,d){if(b.fa)return b.fa.current();if(b.Ma||d)return c=b.Ma?b.Ma.endTime:d,a=0>a.g.Za(),b.stream.segmentIndex&&(b.fa=b.stream.segmentIndex.Ab(c,!1,a)),b.fa&&b.fa.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Za();var f=null;d&&(b.stream.segmentIndex&&(b.fa=b.stream.segmentIndex.Ab(e,!1,a)),f=b.fa&&b.fa.next().value);f||(b.stream.segmentIndex&&(b.fa=b.stream.segmentIndex.Ab(c,!1,a)),f=b.fa&&b.fa.next().value);return f}
463
+ function Ql(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:f=Wd;g=b.stream;h=b.fa;b.Ia=!0;wa(B,2);if(2==d.ac())throw new T(1,1,1011);return E(B,Rl(a,b,d,e),4);case 4:Bg(a.m);if(a.A)return B.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if(a.h.lowLatencyMode&&l&&k&&("HLS"!=a.l.type||d.m))return p=new Uint8Array(0),u=q=!1,w=function(D){var I,F,J,K;return O(function(G){switch(G.g){case 1:if(q)return G.return();u=!0;Bg(a.m);
464
+ if(a.A)return G.return();wa(G,2);p=Sl(p,D);I=!1;F=0;(new Jg).box("mdat",function(M){F=M.size+M.start;I=!0}).parse(p,!1,!0);if(!I){G.u(4);break}J=p.subarray(0,F);p=p.subarray(F);return E(G,Tl(a,b,c,g,d,J,!0,e),5);case 5:b.T&&b.fa&&al(b.T,d.startTime,!0);case 4:ya(G,0);break;case 2:v=K=za(G),H(G)}})},E(B,Ul(a,b,d,w),9);m=Ul(a,b,d);return E(B,m,7);case 7:n=B.h;Bg(a.m);if(a.A)return B.return();Bg(a.m);return b.Rb?(b.Ia=!1,Al(a,b,0),B.return()):E(B,Tl(a,b,c,g,d,n,!1,e),6);case 9:A=B.h;if(v)throw v;if(u){B.u(10);
465
+ break}q=!0;Bg(a.m);return a.A?B.return():b.Rb?(b.Ia=!1,Al(a,b,0),B.return()):E(B,Tl(a,b,c,g,d,A,!1,e),10);case 10:b.T&&b.fa&&al(b.T,d.startTime,!0);case 6:Bg(a.m);if(a.A)return B.return();b.Ma=d;h.next();b.Ia=!1;b.tf=!1;y=a.g.X.ub();C=y[b.type];eb(JSON.stringify(C));b.Rb||a.g.lf(d,b.stream);Al(a,b,0);ya(B,0);break;case 2:z=za(B);Bg(a.m,z);if(a.A)return B.return();b.Ia=!1;if(7001==z.code)b.Ia=!1,sl(b),Al(a,b,0),B.u(0);else if(b.type==f.qa&&a.h.ignoreTextStreamFailures)a.i.delete(f.qa),B.u(0);else{if(3017==
466
+ z.code)return E(B,Vl(a,b,z),0);b.$c=!0;1==z.category&&b.T&&gl(b.T,d);z.severity=2;return E(B,Nl(a,b,z),0)}}})}function Wl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):E(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Bb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
467
+ function Sl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
468
+ function Vl(a,b,c){var d,e,f,g,h,k;return O(function(l){if(1==l.g){d=Array.from(a.i.values());if(e=d.some(function(m){return m!=b&&m.tf}))return l.u(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.xd(b.stream,f))return l.return();h=Math.round(100*a.B);if(20<h)a.B-=.2;else if(4<h)a.B-=.04;else return b.$c=!0,a.A=!0,a.g.onError(c),l.return();b.tf=!0;k=a.g.Vc();return E(l,Xl(a,b,k),2)}Al(a,b,4);H(l)})}
469
+ function Rl(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:e=Wd;f=null==b.Ma&&null==b.ec;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.U)-.1);k=Math.min(c.appendWindowEnd,a.P)+.01;l=c.codecs||b.stream.codecs;m=ge(l);n=ie(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.df&&h==b.bf&&k==b.af&&m==b.cf&&n==b.sg){B.u(2);break}q=b.cf&&b.sg&&ok(a.g.X,b.type,n,l);if(!q){B.u(3);break}u=null;b.type===e.ea?u=a.i.get(e.W):b.type===e.W&&(u=a.i.get(e.ea));if(!u){B.u(3);
470
+ break}return E(B,tl(u).catch(function(){}),5);case 5:u.ec=null,Jl(a,u);case 3:return v=function(){var D,I,F;return O(function(J){if(1==J.g)return D=new Map,a.j.audio&&D.set(e.W,a.j.audio),a.j.video&&D.set(e.ea,a.j.video),wa(J,2),b.bf=h,b.af=k,b.cf=m,b.sg=n,b.df=p,I=a.l.sequenceMode||"HLS"==a.l.type,E(J,fk(a.g.X,b.type,p,h,k,I,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,D),4);if(2!=J.g)return ya(J,0);F=za(J);b.bf=null;b.af=null;b.cf=null;b.df=null;throw F;})},E(B,v(),2);case 2:return Fi(c.da,
471
+ b.ec)||(b.ec=c.da,c.l&&c.da&&(w=Ul(a,b,c.da),A=function(){var D,I,F,J,K,G,M;return O(function(N){switch(N.g){case 1:return wa(N,2),E(N,w,4);case 4:return D=N.h,Bg(a.m),I=null,F=new Map,J={projection:null,hfov:null},K=new Jg,K.box("moov",Qg).box("trak",Qg).box("mdia",Qg).R("mdhd",function(L){I=Zi(L.reader,L.version).timescale}).box("hdlr",function(L){L=L.reader;L.skip(8);switch(L.hc()){case "soun":F.set(e.W,I);break;case "vide":F.set(e.ea,I)}I=null}).box("minf",Qg).box("stbl",Qg).R("stsd",Sg).box("encv",
472
+ Tg).box("avc1",Tg).box("avc3",Tg).box("hev1",Tg).box("hvc1",Tg).box("dvav",Tg).box("dva1",Tg).box("dvh1",Tg).box("dvhe",Tg).box("vexu",Qg).box("proj",Qg).R("prji",function(L){L=L.reader.hc();J.projection=L}).box("hfov",function(L){L=L.reader.O()/1E3;J.hfov=L}).parse(D),Yl(a,J),F.has(b.type)?c.da.timescale=F.get(b.type):null!=I&&(c.da.timescale=I),G=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,E(N,a.g.Yf(b.type,D),5);case 5:return E(N,Wj(a.g.X,b.type,D,null,b.stream,G,b.Hc,d),6);case 6:ya(N,
473
+ 0);break;case 2:throw M=za(N),b.ec=null,M;}})},y=c.startTime,f&&(C=Tj(a.g.X,b.type),null!=C&&(y=C)),a.g.li(y,c.da),g.push(A()))),a.l.sequenceMode&&(z=b.Ma?b.Ma.i:null,c.i!=z&&g.push(hk(a.g.X,b.type,c.startTime))),E(B,Promise.all(g),0)}})}
474
+ function Tl(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p;return O(function(q){switch(q.g){case 1:k=d.closedCaptions&&0<d.closedCaptions.size;m=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;n=a.h.parsePrftBox&&!a.H;if(m||n)l=new Jg;m&&l.R("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.hc();var A=u.reader.hc();var y=u.reader.O();var C=u.reader.O();var z=u.reader.O();var B=u.reader.O();var D=e.startTime+C/y}else y=
474
475
  u.reader.O(),D=u.reader.Fc()/y+e.timestampOffset,C=D-e.startTime,z=u.reader.O(),B=u.reader.O(),w=u.reader.hc(),A=u.reader.hc();u=u.reader.mb(u.reader.getLength()-u.reader.ra());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.mi():(v=D+z/y,y=(new Map).set("detail",{startTime:D,endTime:v,schemeIdUri:w,value:A,timescale:y,presentationTimeDelta:C,eventDuration:z,id:B,messageData:u}),y=new U("emsg",y),y.cancelable=!0,a.g.onEvent(y),y.defaultPrevented||"https://aomedia.org/emsg/ID3"!=
475
- w&&"https://developer.apple.com/streaming/emsg-id3"!=w||(w=Vi(u),w.length&&a.g.Yd([{cueTime:D,data:u,frames:w,dts:D,pts:D}],0,v)))});n&&l.R("prft",function(u){if(!a.G&&e.da.timescale){var v=u.reader,w=u.version;v.O();u=v.O();var A=v.O();u=1E3*u+A/Math.pow(2,32)*1E3;0===w?v=v.O():(w=v.O(),v=v.O(),v=w*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.da.timescale*1E3)});v=new U("prft",
476
- v);a.g.onEvent(v);a.G=!0}});(m||n)&&l.parse(f);return E(r,Yl(a,b,c),2);case 2:return Bg(a.m),p=b.Hc,b.Hc=!1,E(r,a.g.Yf(b.type,f),3);case 3:return E(r,Wj(a.g.Y,b.type,f,e,d,k,p,h,g),4);case 4:Bg(a.m),H(r)}})}
477
- function Yl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g){d=b.stream.segmentIndex;d instanceof Ok&&d.Ca(a.l.presentationTimeline.Ab());e=Math.max(a.h.bufferBehind,a.l.presentationTimeline.g);f=Rj(a.g.Y,b.type);if(null==f)return k.return();g=c-f;h=g-e;return h<=a.h.evictionGoal?k.return():E(k,a.g.Y.remove(b.type,f,f+h),2)}Bg(a.m);H(k)})}function Ol(a){return a&&a.type==Ud&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
478
- function Ul(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.Wc())return l.return(e);f=null;if(b.T){var m=b.T,n=m.h;c instanceof Bi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.If=d),f=m.Zd):f=null}f||(f=Kl(c,b.stream,d||null,a.h.retryParameters,a.g.Db));g=0;b.ga&&(g=b.ga.h);b.eb=f;return E(l,f.promise,2);case 2:h=l.h;b.eb=null;k=h.data;if(!c.aesKey){l.u(3);break}return E(l,Wl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
476
+ w&&"https://developer.apple.com/streaming/emsg-id3"!=w||(w=Vi(u),w.length&&a.g.Yd([{cueTime:D,data:u,frames:w,dts:D,pts:D}],0,v)))});n&&l.R("prft",function(u){if(!a.H&&e.da.timescale){var v=u.reader,w=u.version;v.O();u=v.O();var A=v.O();u=1E3*u+A/Math.pow(2,32)*1E3;0===w?v=v.O():(w=v.O(),v=v.O(),v=w*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.da.timescale*1E3)});v=new U("prft",
477
+ v);a.g.onEvent(v);a.H=!0}});(m||n)&&l.parse(f);return E(q,Xl(a,b,c),2);case 2:return Bg(a.m),p=b.Hc,b.Hc=!1,E(q,a.g.Yf(b.type,f),3);case 3:return E(q,Wj(a.g.X,b.type,f,e,d,k,p,h,g),4);case 4:Bg(a.m),H(q)}})}
478
+ function Xl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g){d=b.stream.segmentIndex;d instanceof Ok&&d.Ca(a.l.presentationTimeline.Bb());e=Math.max(a.h.bufferBehind*a.B,a.l.presentationTimeline.g);f=Rj(a.g.X,b.type);if(null==f)return a.C==b&&(a.C=null),k.return();g=c-f;h=g-e;return h<=a.h.evictionGoal?k.return():E(k,a.g.X.remove(b.type,f,f+h),2)}if(4!=k.g)return Bg(a.m),a.C?E(k,Xl(a,a.C,c),4):k.u(0);Bg(a.m);H(k)})}
479
+ function Ol(a){return a&&a.type==Ud&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
480
+ function Ul(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.Xc())return l.return(e);f=null;if(b.T){var m=b.T,n=m.h;c instanceof Bi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.If=d),f=m.Zd):f=null}f||(f=Kl(c,b.stream,d||null,a.h.retryParameters,a.g.Eb));g=0;b.fa&&(g=b.fa.h);b.eb=f;return E(l,f.promise,2);case 2:h=l.h;b.eb=null;k=h.data;if(!c.aesKey){l.u(3);break}return E(l,Wl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
479
481
  function Kl(a,b,c,d,e){var f=a instanceof Gi?a:void 0,g=f?1:0;a=pl(a.M(),a.Da,a.pa,d,c);a.contentType=b.type;return e.request(wg,a,{type:g,stream:b,segment:f})}
480
- function Hl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Rb=!1,b.oe=!1,b.ud=0,b.Mc=!0,b.Ma=null,b.ga=null,b.T&&!a.o.has(b.stream)&&hl(b.T),d?(e=a.g.Bd(),f=a.g.Y.getDuration(),E(g,a.g.Y.remove(b.type,e+d,f),3)):E(g,ek(a.g.Y,b.type),4);if(3!=g.g)return Bg(a.m),c?E(g,a.g.Y.flush(b.type),3):g.u(3);Bg(a.m);b.Mc=!1;b.endOfStream=!1;b.Ia||b.pb||Al(a,b,0);H(g)})}
481
- function Al(a,b,c){var d=b.type;if(d!=Ud||a.i.has(d))b.pb=(new Qc(function(){var e;return O(function(f){if(1==f.g)return wa(f,2),E(f,Ll(a,b),4);if(2!=f.g)return ya(f,0);e=Aa(f);if(a.g)a.g.onError(e);H(f)})})).X(c)}function sl(a){null!=a.pb&&(a.pb.stop(),a.pb=null)}function tl(a){return O(function(b){return a.eb?E(b,a.eb.abort(),0):b.u(0)})}
482
- function Nl(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,Yf(a.K),2);Bg(a.m);if(1===c.category){if(b.Nb)return Cl(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.wd(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);H(e)})}
483
- function Zl(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.L<c)return h.return(!1);a.L=b;d=Wd;if(e=a.i.get(d.V))e.ec=null,Jl(a,e),tl(e).catch(function(){});if(f=a.i.get(d.fa))f.ec=null,Jl(a,f),tl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.V,a.j.audio);a.j.video&&g.set(d.fa,a.j.video);return E(h,nk(a.g.Y,g),2)}return h.return(!0)})}
484
- function Xl(a,b){if(a.H.projection!=b.projection||a.H.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new U("spatialvideoinfo",c)}else c=new U("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.H=b}};function $l(){}
482
+ function Hl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Rb=!1,b.oe=!1,b.vd=0,b.Mc=!0,b.Ma=null,b.fa=null,b.T&&!a.o.has(b.stream)&&hl(b.T),d?(e=a.g.Vc(),f=a.g.X.getDuration(),E(g,a.g.X.remove(b.type,e+d,f),3)):E(g,ek(a.g.X,b.type),4);if(3!=g.g)return Bg(a.m),c?E(g,a.g.X.flush(b.type),3):g.u(3);Bg(a.m);b.Mc=!1;b.endOfStream=!1;b.Ia||b.pb||Al(a,b,0);H(g)})}
483
+ function Al(a,b,c){var d=b.type;if(d!=Ud||a.i.has(d))b.pb=(new Qc(function(){var e;return O(function(f){if(1==f.g)return wa(f,2),E(f,Ll(a,b),4);if(2!=f.g)return ya(f,0);e=za(f);if(a.g)a.g.onError(e);H(f)})})).Y(c)}function sl(a){null!=a.pb&&(a.pb.stop(),a.pb=null)}function tl(a){return O(function(b){return a.eb?E(b,a.eb.abort(),0):b.u(0)})}
484
+ function Nl(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,Yf(a.L),2);Bg(a.m);if(1===c.category&&1003!=c.code){if(b.Nb)return Cl(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.xd(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);H(e)})}
485
+ function Zl(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.N<c)return h.return(!1);a.N=b;d=Wd;if(e=a.i.get(d.W))e.ec=null,Jl(a,e),tl(e).catch(function(){});if(f=a.i.get(d.ea))f.ec=null,Jl(a,f),tl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.W,a.j.audio);a.j.video&&g.set(d.ea,a.j.video);return E(h,nk(a.g.X,g),2)}return h.return(!0)})}
486
+ function Yl(a,b){if(a.J.projection!=b.projection||a.J.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new U("spatialvideoinfo",c)}else c=new U("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.J=b}};function $l(){}
485
487
  function am(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=He(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=He(n)),m=am(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?(Za("Invalid config, wrong type for "+m),
486
488
  k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&$a("Unexpected number of arguments for "+m),a[l]=b[l]):(Za("Invalid config, unrecognized key "+m),k=!1)}return k}function bm(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 cm(a,b){return a&&b}
487
489
  function dm(a,b){function c(g){for(var h=t(Object.keys(g)),k=h.next();!k.done;k=h.next())k=k.value,f(g[k])&&0===Object.keys(g[k]).length?delete g[k]:e(g[k])?delete g[k]:"function"==typeof g[k]?delete g[k]:f(g[k])&&(c(g[k]),0===Object.keys(g[k]).length&&delete g[k])}function d(g,h){return Object.keys(g).reduce(function(k,l){var m=g[l];if(h.hasOwnProperty(l))if(f(m)&&f(h[l])){if(m=d(m,h[l]),0<Object.keys(m).length||!f(m))k[l]=m}else e(m)&&e(h[l])||Number.isNaN(m)&&Number.isNaN(h[l])||m!==h[l]&&(k[l]=
488
- m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",$l);$l.getDifferenceFromConfigObjects=dm;$l.convertToConfigObject=bm;$l.mergeConfigObjects=am;function em(){}function fm(a){a=Ad(a);return(new sc(a)).yb}function gm(a,b,c){function d(h){Fb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Bb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=Cd(b,!0):e=b;a=Ad(a);a=Cd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function hm(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ad(a).split("skd://").pop();return gm(a,c,b)}
490
+ m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",$l);$l.getDifferenceFromConfigObjects=dm;$l.convertToConfigObject=bm;$l.mergeConfigObjects=am;function em(){}function fm(a){a=Ad(a);return(new sc(a)).zb}function gm(a,b,c){function d(h){Fb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Bb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=Cd(b,!0):e=b;a=Ad(a);a=Cd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function hm(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ad(a).split("skd://").pop();return gm(a,c,b)}
489
491
  function im(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.util.FairPlayUtils",em);em.commonFairPlayResponse=function(a,b){if(2===a){try{var c=xd(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=Cb(Id(c)))}};em.expressplayFairPlayRequest=function(a,b){im(a,b)};
490
492
  em.conaxFairPlayRequest=function(a,b){im(a,b)};em.ezdrmFairPlayRequest=function(a,b){im(a,b)};em.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Bb(b.body),a=Hd(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Bd("spc="+a))};em.expressplayInitDataTransform=function(a,b,c){return hm(a,b,c)};
491
493
  em.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ad(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Eb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return gm(a,d,b)};em.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ad(a).split(";").pop();return gm(a,c,b)};em.verimatrixInitDataTransform=function(a,b,c){return hm(a,b,c)};em.initDataTransform=gm;
492
- em.defaultGetContentId=fm;em.isFairPlaySupported=function(){var a;return O(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},wa(b,2),E(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);Aa(b);return b.return(!1)})};function jm(){}
493
- function km(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Xf(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,p){td()&&"skd"==n&&(n=p.serverCertificate,p=fm(m),m=gm(m,p,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Xc(),minHdcpVersion:"",ignoreDuplicateInitData:!ad()};
494
- (Xc()||hd())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;ad()||$c()||Yc("Tizen 4")||Yc("Tizen 5")||Yc("Tizen 6")||cd()||bd()&&53===dd()||bd()&&68===dd()||!(!ed()||ed()&&md()||ed()&&Yc("Fuchsia"))||ld()&&Wc()||(c="smooth",d=!0);d={retryParameters:Xf(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",
495
- 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","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
494
+ em.defaultGetContentId=fm;em.isFairPlaySupported=function(){var a;return O(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},wa(b,2),E(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);za(b);return b.return(!1)})};function jm(){}
495
+ function km(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Xf(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,p){pd()&&"skd"==n&&(n=p.serverCertificate,p=fm(m),m=gm(m,p,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Xc(),minHdcpVersion:"",ignoreDuplicateInitData:!ad()};
496
+ (Xc()||hd())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;!pb()||ad()||$c()||Yc("Tizen 4")||Yc("Tizen 5")||Yc("Tizen 6")||cd()||bd()&&53===dd()||bd()&&68===dd()||hd()||id()||!(!ed()||ed()&&md()||ed()&&Yc("Fuchsia"))||ld()&&Wc()||(c="smooth",d=!0);d={retryParameters:Xf(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,
497
+ 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","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
496
498
  "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:lm,manifestPreprocessorTXml:mm,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',
497
499
  useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:$c()||ad()||cd()||hd()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:lm,manifestPreprocessorTXml:mm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Xf(),failureCallback:function(m){return cm([m])},
498
500
  rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:.01,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,
@@ -505,37 +507,37 @@ minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,max
505
507
  logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(nm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
506
508
  function om(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return am(a,b,c||km(),d,"")}
507
509
  function nm(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Ge(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return ze(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
508
- h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Ud&&"image"!=c.type||b.push(c);return b}function lm(a){return cm([a],a)}function mm(a){return cm([a],a)}S("shaka.util.PlayerConfiguration",jm);jm.mergeConfigObjects=om;jm.createDefault=km;function pm(a,b,c,d,e){ig.call(this);this.K=a;this.P=b;this.xa=e.networkingEngine;this.W=d;this.o=null;this.qb=c;this.ua=0;this.Ka=e.sc;this.B=e.gi;this.hb=e.hi;this.g=e.config;this.j=this.C=this.h=null;this.ea=!1;this.F=e.ri;this.na=!1;this.l=null;this.ba=!1;this.i=this.A=null;this.aa=!1;this.J=new Map;this.oa=!1;this.ya=e.pi;this.$=new Yk;this.m=new Zf;this.L=null;this.s=!1;this.Ea=e.jh;this.ha=null;this.Fa=e.ih;this.N=!1;this.H=[];this.G=[]}ra(pm,ig);
509
- function qm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function rm(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function sm(a,b){a.L=b;a.N=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}q=pm.prototype;q.getStartTime=function(){return this.W};q.xc=function(){return this.K};q.Qe=function(){return this.h};function tm(a){a.aa=!0;return a.i}function um(a){a.ea=!0;return a.j}function vm(a){a.na=!0;return a.F}q.getStats=function(){return this.$};
510
- function wm(a){a.ba=!0;return a.l}function xm(a){a.oa=!0;return a.J}
511
- q.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return wa(c,3),E(c,ym(a),5);case 5:return zm(a),E(c,Am(a),6);case 6:zm(a);a.o||(a.o=new Jf(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups));
512
- if(a.Fa){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Ea){d=a.h.presentationTimeline.U();var e=wf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.ha=e,e.video&&Bm(a,e.video,d),e.audio&&Bm(a,e.audio,d)}return E(c,void 0,7);case 7:zm(a);a.m.resolve();ya(c,0);break;case 3:b=Aa(c),a.m.reject(b),H(c)}})})()};q.dispatchEvent=function(a){return this.L?this.L.dispatchEvent(a):ig.prototype.dispatchEvent.call(this,a)};
513
- q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function zm(a){if(a.s)throw new T(2,7,7003);}function Cm(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))}
514
- function ym(a){var b,c,d,e;return O(function(f){if(1==f.g)return Cm(a,"manifest-parser"),a.j||(a.C=vi(a.K,a.P),a.j=a.C(),a.j.configure(a.g.manifest)),b=Date.now()/1E3,Cm(a,"manifest"),a.h?f.u(2):E(f,a.j.start(a.K,a.hb),3);2!=f.g&&(a.h=f.h);c=new U("manifestparsed",void 0);a.dispatchEvent(c);if(0==a.h.variants.length)throw new T(2,4,4036);Dm(a.h);d=Date.now()/1E3;e=d-b;a.$.F=e;H(f)})}
515
- function Am(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Cm(a,"drm-engine");a.ua=Date.now()/1E3;a.l=a.Ka();a.B.g=a.l;a.l.configure(a.g.drm);var h=a.B;b=Oe(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new U("trackschanged",void 0);return E(g,Promise.resolve(),3);case 3:zm(a),a.dispatchEvent(c);case 2:return d=wf(a.h.variants),E(g,Lh(a.l,d,a.h.offlineSessionIds),4);case 4:return zm(a),E(g,pi(a.B,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new U("trackschanged",void 0);return E(g,
516
- Promise.resolve(),7);case 7:a.dispatchEvent(f),H(g)}})}q.configure=function(a,b){a=bm(a,b);om(this.g,a)};q.getConfiguration=function(){return He(this.g)};
517
- function Bm(a,b,c){var d,e,f,g,h;O(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Zk(d,b,function(l,m,n){return Kl(l,m,n||null,a.g.streaming.retryParameters,a.xa)},!1),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.W||0;(h=(g=b.segmentIndex.zb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.da&&bl(e,h.da):al(e,h.startTime));H(k)})}q.Si=function(){return this.m};
518
- q.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.ea){e.u(2);break}return E(e,a.j.stop(),2);case 2:if(!a.i||a.aa){e.u(4);break}return E(e,a.i.stop(),4);case 4:a.F&&!a.na&&a.F.release();if(!a.l||a.ba){e.u(6);break}return E(e,a.l.destroy(),6);case 6:if(0<a.J.size&&!a.oa)for(b=t(a.J.values()),c=b.next();!c.done;c=b.next())d=c.value,hl(d);H(e)}})};
510
+ h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Ud&&"image"!=c.type||b.push(c);return b}function lm(a){return cm([a],a)}function mm(a){return cm([a],a)}S("shaka.util.PlayerConfiguration",jm);jm.mergeConfigObjects=om;jm.createDefault=km;function pm(a,b,c,d,e){ig.call(this);this.K=a;this.P=b;this.Ba=e.networkingEngine;this.U=d;this.o=null;this.rb=c;this.ua=0;this.hb=e.sc;this.B=e.gi;this.qb=e.hi;this.g=e.config;this.j=this.C=this.h=null;this.ha=!1;this.F=e.ri;this.oa=!1;this.l=null;this.ba=!1;this.i=this.A=null;this.aa=!1;this.J=new Map;this.ta=!1;this.Fa=e.pi;this.$=new Yk;this.ga=new Zf;this.m=new Zf;this.L=null;this.s=!1;this.Ka=e.jh;this.na=null;this.Ea=e.ih;this.N=!1;this.H=[];this.G=[]}ra(pm,ig);
511
+ function qm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function rm(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function sm(a,b){a.L=b;a.N=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=pm.prototype;r.getStartTime=function(){return this.U};r.xc=function(){return this.K};r.Qe=function(){return this.h};function tm(a){a.aa=!0;return a.i}function um(a){a.ha=!0;return a.j}function vm(a){a.oa=!0;return a.F}r.getStats=function(){return this.$};
512
+ function wm(a){a.ba=!0;return a.l}function xm(a){a.ta=!0;return a.J}
513
+ r.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return wa(c,3),E(c,ym(a),5);case 5:return zm(a),a.ga.resolve(),E(c,Am(a),6);case 6:zm(a);a.o||(a.o=new Jf(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups));
514
+ if(a.Ea){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Ka){d=a.h.presentationTimeline.V();var e=wf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.na=e,e.video&&Bm(a,e.video,d),e.audio&&Bm(a,e.audio,d)}return E(c,void 0,7);case 7:zm(a);a.m.resolve();ya(c,0);break;case 3:b=za(c),a.m.reject(b),H(c)}})})()};r.dispatchEvent=function(a){return this.L?this.L.dispatchEvent(a):ig.prototype.dispatchEvent.call(this,a)};
515
+ r.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function zm(a){if(a.s)throw new T(2,7,7003);}function Cm(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))}
516
+ function ym(a){var b,c,d,e;return O(function(f){if(1==f.g)return Cm(a,"manifest-parser"),a.j||(a.C=vi(a.K,a.P),a.j=a.C(),a.j.configure(a.g.manifest)),b=Date.now()/1E3,Cm(a,"manifest"),a.h?f.u(2):E(f,a.j.start(a.K,a.qb),3);2!=f.g&&(a.h=f.h);c=new U("manifestparsed",void 0);a.dispatchEvent(c);if(0==a.h.variants.length)throw new T(2,4,4036);Dm(a.h);d=Date.now()/1E3;e=d-b;a.$.F=e;H(f)})}
517
+ function Am(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Cm(a,"drm-engine");a.ua=Date.now()/1E3;a.l=a.hb();a.B.g=a.l;a.l.configure(a.g.drm);var h=a.B;b=Oe(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new U("trackschanged",void 0);return E(g,Promise.resolve(),3);case 3:zm(a),a.dispatchEvent(c);case 2:return d=wf(a.h.variants),E(g,Lh(a.l,d,a.h.offlineSessionIds),4);case 4:return zm(a),E(g,pi(a.B,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new U("trackschanged",void 0);return E(g,
518
+ Promise.resolve(),7);case 7:a.dispatchEvent(f),H(g)}})}r.configure=function(a,b){a=bm(a,b);om(this.g,a)};r.getConfiguration=function(){return He(this.g)};
519
+ function Bm(a,b,c){var d,e,f,g,h;O(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Zk(d,b,function(l,m,n){return Kl(l,m,n||null,a.g.streaming.retryParameters,a.Ba)},!1),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.U||0;(h=(g=b.segmentIndex.Ab(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.da&&bl(e,h.da):al(e,h.startTime));H(k)})}r.Si=function(){return this.m};
520
+ r.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.ha){e.u(2);break}return E(e,a.j.stop(),2);case 2:if(!a.i||a.aa){e.u(4);break}return E(e,a.i.stop(),4);case 4:a.F&&!a.oa&&a.F.release();if(!a.l||a.ba){e.u(6);break}return E(e,a.l.destroy(),6);case 6:if(0<a.J.size&&!a.ta)for(b=t(a.J.values()),c=b.next();!c.done;c=b.next())d=c.value,hl(d);H(e)}})};
519
521
  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))}S("shaka.media.PreloadManager",pm);pm.prototype.destroy=pm.prototype.destroy;pm.prototype.waitForFinish=pm.prototype.Si;function Em(a,b){ig.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{pc:null,oc:Fm,cc:function(d,e){return Gm(c,"enter",d,e)}},{pc:Hm,oc:Fm,cc:function(d,e){return Gm(c,"enter",d,e)}},{pc:Im,oc:Fm,cc:function(d,e){return Gm(c,"enter",d,e)}},{pc:Fm,oc:Hm,cc:function(d,e){return Gm(c,"exit",d,e)}},{pc:Fm,oc:Im,cc:function(d,e){return Gm(c,"exit",d,e)}},{pc:Hm,oc:Im,cc:function(d,e){return Gm(c,"skip",d,e)}},{pc:Im,oc:Hm,cc:function(d,e){return Gm(c,"skip",d,e)}}];this.h=new hb;this.h.D(this.i,
520
522
  "regionremove",function(d){c.g.delete(d.region)})}ra(Em,ig);Em.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;ig.prototype.release.call(this)};Em.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Hm:a>d.endTime?Im:Fm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.pc==e&&h.oc==f&&h.cc(d,b)}}};
521
- function Gm(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Hm=1,Fm=2,Im=3;function Jm(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:var n=(new sc(a)).Na.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Km[d])return m.return(e);f=0;g=qg([a],c);wa(m,2);g.method="HEAD";return E(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ya(m,3);break;case 2:k=Aa(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return E(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
523
+ function Gm(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Hm=1,Fm=2,Im=3;function Jm(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:var n=(new sc(a)).Na.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Km[d])return m.return(e);f=0;g=qg([a],c);wa(m,2);g.method="HEAD";return E(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ya(m,3);break;case 2:k=za(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return E(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
522
524
  e.toLowerCase().split(";").shift():"")}})}
523
525
  var Km={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",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa",
524
- jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};function $m(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return $m(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=an(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=an(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);
526
+ jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};function Lm(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Lm(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=an(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=an(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);
525
527
  h=k.next().value;k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
526
528
  function an(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
527
- case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function bn(a,b){var c=[];a=t(cn(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(bn(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=$m(d,b);c.push(e)}return c}
529
+ case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function bn(a,b){var c=[];a=t(cn(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(bn(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Lm(d,b);c.push(e)}return c}
528
530
  function cn(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={xe:void 0},c=a.next())d.xe=c.value,b.some(function(e){return function(f){return cc(e.xe,f)}}(d))||b.push(d.xe);return b}
529
531
  function dn(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
530
- (c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function en(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}q=en.prototype;q.configure=function(){};q.remove=function(a,b){if(!this.g)return!1;fn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
531
- q.append=function(a){var b=bn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={Ac:void 0},d=b.next())e.Ac=d.value,!a.some(function(f){return function(g){return g.startTime==f.Ac.startTime&&g.endTime==f.Ac.endTime&&g.text==f.Ac.payload?!0:!1}}(e))&&e.Ac.payload&&(d=dn(e.Ac))&&c.push(d);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):
532
- c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};q.destroy=function(){this.g&&(fn(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"};
533
- function fn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",en);en.prototype.setTextVisibility=en.prototype.setTextVisibility;en.prototype.isTextVisible=en.prototype.isTextVisible;en.prototype.destroy=en.prototype.destroy;en.prototype.append=en.prototype.append;en.prototype.remove=en.prototype.remove;en.prototype.configure=en.prototype.configure;function gn(){}q=gn.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",gn);gn.prototype.setTextVisibility=gn.prototype.setTextVisibility;gn.prototype.isTextVisible=gn.prototype.isTextVisible;gn.prototype.destroy=gn.prototype.destroy;gn.prototype.append=gn.prototype.append;gn.prototype.remove=gn.prototype.remove;gn.prototype.configure=gn.prototype.configure;function hn(){}function jn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",hn);hn.removeAllChildren=jn;function kn(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);c&&c.captionsUpdatePeriod||rb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Sc(function(){d.A.paused||
534
- ln(d)})).Va(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new hb;this.j.D(document,"fullscreenchange",function(){ln(d,!0)});this.j.D(this.A,"seeking",function(){ln(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){ln(d,!0)}),this.o.observe(this.g));this.B=new Map}q=kn.prototype;q.configure=function(a){this.C&&this.C.Va(a.captionsUpdatePeriod)};
535
- q.append=function(a){var b=[].concat(x(this.h));a=t(cn(a));for(var c=a.next(),d={};!c.done;d={ye:void 0},c=a.next())d.ye=c.value,b.some(function(e){return function(f){return cc(f,e.ye)}}(d))||this.h.push(d.ye);ln(this)};q.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
536
- q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});ln(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};function mn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
537
- function nn(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.$g:null;l&&(g.push(l.ze),l.jc&&g.push(l.jc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?mn(a,n)||(f=!0):(on(a,k,e),l=a.i.get(k),n=l.$g,f=!0));0<k.nestedCues.length&&n&&nn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=
538
- r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.jc?(d.jc.contains(c)&&d.jc.removeChild(c),c.appendChild(d.jc),d.jc.appendChild(d.ze)):c.appendChild(d.ze)}}function ln(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())jn(d.value);jn(a.g);a.i.clear();a.B.clear()}a.m&&nn(a,a.h,a.g,c,[])}}
532
+ (c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function en(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=en.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;fn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
533
+ r.append=function(a){var b=bn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={Ac:void 0},d=b.next())e.Ac=d.value,!a.some(function(f){return function(g){return g.startTime==f.Ac.startTime&&g.endTime==f.Ac.endTime&&g.text==f.Ac.payload?!0:!1}}(e))&&e.Ac.payload&&(d=dn(e.Ac))&&c.push(d);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):
534
+ c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};r.destroy=function(){this.g&&(fn(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
535
+ function fn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",en);en.prototype.setTextVisibility=en.prototype.setTextVisibility;en.prototype.isTextVisible=en.prototype.isTextVisible;en.prototype.destroy=en.prototype.destroy;en.prototype.append=en.prototype.append;en.prototype.remove=en.prototype.remove;en.prototype.configure=en.prototype.configure;function gn(){}r=gn.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",gn);gn.prototype.setTextVisibility=gn.prototype.setTextVisibility;gn.prototype.isTextVisible=gn.prototype.isTextVisible;gn.prototype.destroy=gn.prototype.destroy;gn.prototype.append=gn.prototype.append;gn.prototype.remove=gn.prototype.remove;gn.prototype.configure=gn.prototype.configure;function hn(){}function jn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",hn);hn.removeAllChildren=jn;function kn(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);c&&c.captionsUpdatePeriod||rb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Sc(function(){d.A.paused||
536
+ ln(d)})).Va(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new hb;this.j.D(document,"fullscreenchange",function(){ln(d,!0)});this.j.D(this.A,"seeking",function(){ln(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){ln(d,!0)}),this.o.observe(this.g));this.B=new Map}r=kn.prototype;r.configure=function(a){this.C&&this.C.Va(a.captionsUpdatePeriod)};
537
+ r.append=function(a){var b=[].concat(x(this.h));a=t(cn(a));for(var c=a.next(),d={};!c.done;d={ye:void 0},c=a.next())d.ye=c.value,b.some(function(e){return function(f){return cc(f,e.ye)}}(d))||this.h.push(d.ye);ln(this)};r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
538
+ r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});ln(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function mn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
539
+ function nn(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.$g:null;l&&(g.push(l.ze),l.jc&&g.push(l.jc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?mn(a,n)||(f=!0):(on(a,k,e),l=a.i.get(k),n=l.$g,f=!0));0<k.nestedCues.length&&n&&nn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,q){return p.startTime!=
540
+ q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.jc?(d.jc.contains(c)&&d.jc.removeChild(c),c.appendChild(d.jc),d.jc.appendChild(d.ze)):c.appendChild(d.ze)}}function ln(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())jn(d.value);jn(a.g);a.i.clear();a.B.clear()}a.m&&nn(a,a.h,a.g,c,[])}}
539
541
  function on(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&pn(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.l===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Lb?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Lb?"%":"px");if(a.B.has(c))c=a.B.get(c);else{e=document.createElement("span");var k=g.heightUnits==Lb?"%":"px",l=g.widthUnits==
540
542
  Lb?"%":"px",m=g.viewportAnchorUnits==Lb?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,p=g.width;2===g.heightUnits&&(n=5.33*g.height,k="%");2===g.widthUnits&&(p=g.width*h,l="%");e.style.height=n+k;e.style.width=p+l;2===g.viewportAnchorUnits?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.l===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*p/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-
541
543
  g.regionAnchorY*n/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*p/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=
@@ -544,178 +546,179 @@ function qn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Sb?c
544
546
  function pn(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=rn(c.linePadding,c,a.s);f.paddingRight=rn(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
545
547
  "url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=sn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}if(h&&!d[d.length-
546
548
  1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"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;
547
- f.fontSize=rn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Xb&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Wb?(f.width="100%",c.lineAlign==Yb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Yb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Yb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;
548
- a=qn(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Wb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Wb?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Wb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");f.textAlign=c.textAlign;f.textDecoration=
549
- c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Wb?f.width=c.size+"%":f.height=c.size+"%")}
549
+ f.fontSize=rn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Xb&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Vb?(f.width="100%",c.lineAlign==Yb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Yb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Yb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;
550
+ a=qn(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Vb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Vb?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Vb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");f.textAlign=c.textAlign;f.textDecoration=
551
+ c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Vb?f.width=c.size+"%":f.height=c.size+"%")}
550
552
  function rn(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}}function sn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",kn);kn.prototype.setTextVisibility=kn.prototype.setTextVisibility;
551
553
  kn.prototype.isTextVisible=kn.prototype.isTextVisible;kn.prototype.remove=kn.prototype.remove;kn.prototype.destroy=kn.prototype.destroy;kn.prototype.append=kn.prototype.append;kn.prototype.configure=kn.prototype.configure;function tn(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=bn(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
552
554
  break;case "right":g.push("align:right");break;case Tb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function un(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}un.prototype.configure=function(a){this.g=a};function vn(a){a.i=!1;a.l=!0;a.j=!1}
553
555
  function wn(a,b,c){try{if(!a.g.enabled)return b;var d=xn(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=yn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=zn;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=An;break a}e=void 0}d.ot=e;d.su=
554
556
  !0;var f=Bn(d);return Cn(b,f)}catch(g){return ab("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function xn(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.m,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
555
557
  function Dn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,xn(a));c.pr=a.h.Za();var e=c.ot===En||c.ot===zn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=Fn(a,c);if(d)d=Gn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=Bn(a);f&&(b.uris=b.uris.map(function(g){return Cn(g,f)}))}}}function Fn(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
556
- function Hn(a){if(0===a.type)return In;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?zn:En;if("audio"==b)return yn;if("text"==b)return"application/mp4"===a.mimeType?Jn:Kn}}function Ln(a,b){b=a.h.sb()[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}
557
- function Mn(a,b){b=a.h.sb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function Nn(a,b){var c=a.h.bc();if(!c.length)return NaN;a=c[0];c=t(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 En:return a.videoBandwidth||NaN;case yn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
558
+ function Hn(a){if(0===a.type)return In;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?zn:En;if("audio"==b)return yn;if("text"==b)return"application/mp4"===a.mimeType?Jn:Kn}}function Ln(a,b){b=a.h.ub()[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}
559
+ function Mn(a,b){b=a.h.ub()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function Nn(a,b){var c=a.h.bc();if(!c.length)return NaN;a=c[0];c=t(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 En:return a.videoBandwidth||NaN;case yn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
558
560
  function Bn(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=t(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"===
559
561
  l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Gn(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=t(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=Bn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
560
- function Cn(a,b){if(!b||a.includes("offline:"))return a;a=new sc(a);a.g.set("CMCD",b);return a.toString()}var An="m",yn="a",En="v",zn="av",In="i",Kn="c",Jn="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",vj:"s",OTHER:"o"});function On(a){this.h=a;this.g=null}q=On.prototype;q.configure=function(a){this.h=a};q.lg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Pn)?1E3*this.g.get(Pn):null};q.kg=function(){return this.h.enabled&&this.g&&this.g.has(Qn)?1E3*this.g.get(Qn):null};q.Lh=function(){return this.h.enabled&&this.g&&this.g.has(Rn)?this.g.get(Rn):null};q.Mh=function(){return this.h.enabled&&this.g&&this.g.has(Sn)?this.g.get(Sn):null};
561
- q.getBandwidthEstimate=function(a){var b=this.kg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Tn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",On);On.prototype.getBandwidthEstimate=On.prototype.getBandwidthEstimate;On.prototype.getRoundTripTime=On.prototype.Mh;On.prototype.getResponseDelay=On.prototype.Lh;On.prototype.getEstimatedThroughput=On.prototype.kg;
562
- On.prototype.getMaxBitrate=On.prototype.lg;var Qn="etp",Pn="mb",Rn="rd",Sn="rtt";function Un(){this.g=null;this.h=[]}function Vn(a,b){return O(function(c){if(1==c.g)return a.g?E(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;H(c)})}Un.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){ig.call(this);var c=this;this.l=Wn;this.Kd=this.h=null;this.ea=!1;this.ae=new hb;this.Rc=new hb;this.m=new hb;this.ya=new hb;this.Qc=new hb;this.C=this.F=this.A=this.G=null;this.ce=0;this.W=new Un;this.ha=this.qf=this.$=this.i=this.Fa=this.J=this.j=this.qb=this.K=this.ah=this.aa=this.N=this.Jb=this.L=this.Nd=this.H=this.hb=null;this.Ka=!1;this.ua=this.o=null;this.Of=1E9;this.cd=[];this.P=NaN;this.g=Xn(this);this.ba={width:Infinity,height:Infinity};this.Id=new oi(this.g,this.ba,null);
563
- this.wf=[];this.s=null;this.xa=new Jf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Ea=this.g.preferredTextLanguage;this.$c=this.g.preferredTextRole;this.Xc=this.g.preferForcedSubs;this.Sc=[];b&&b(this);this.N=Yn(this);this.aa=new On(this.g.cmsd);
562
+ function Cn(a,b){if(!b||a.includes("offline:"))return a;a=new sc(a);a.g.set("CMCD",b);return a.toString()}var An="m",yn="a",En="v",zn="av",In="i",Kn="c",Jn="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",vj:"s",OTHER:"o"});function On(a){this.h=a;this.g=null}r=On.prototype;r.configure=function(a){this.h=a};r.lg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Pn)?1E3*this.g.get(Pn):null};r.kg=function(){return this.h.enabled&&this.g&&this.g.has(Qn)?1E3*this.g.get(Qn):null};r.Lh=function(){return this.h.enabled&&this.g&&this.g.has(Rn)?this.g.get(Rn):null};r.Mh=function(){return this.h.enabled&&this.g&&this.g.has(Sn)?this.g.get(Sn):null};
563
+ r.getBandwidthEstimate=function(a){var b=this.kg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Tn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",On);On.prototype.getBandwidthEstimate=On.prototype.getBandwidthEstimate;On.prototype.getRoundTripTime=On.prototype.Mh;On.prototype.getResponseDelay=On.prototype.Lh;On.prototype.getEstimatedThroughput=On.prototype.kg;
564
+ On.prototype.getMaxBitrate=On.prototype.lg;var Qn="etp",Pn="mb",Rn="rd",Sn="rtt";function Un(){this.g=null;this.h=[]}function Vn(a,b){return O(function(c){if(1==c.g)return a.g?E(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;H(c)})}Un.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){ig.call(this);var c=this;this.l=Wn;this.Kd=this.h=null;this.ga=!1;this.ae=new hb;this.Rc=new hb;this.m=new hb;this.Ba=new hb;this.Qc=new hb;this.F=this.C=this.A=this.G=null;this.ce=0;this.U=new Un;this.ha=this.qf=this.$=this.i=this.Fa=this.J=this.j=this.qb=this.K=this.ah=this.aa=this.N=this.rb=this.L=this.Nd=this.H=this.hb=null;this.Ka=!1;this.ta=this.o=null;this.Of=1E9;this.dd=[];this.P=NaN;this.g=Xn(this);this.ba={width:Infinity,height:Infinity};this.Id=new oi(this.g,this.ba,null);
565
+ this.wf=[];this.s=null;this.ua=new Jf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Ea=this.g.preferredTextLanguage;this.ad=this.g.preferredTextRole;this.Yc=this.g.preferForcedSubs;this.Sc=[];b&&b(this);this.N=Yn(this);this.aa=new On(this.g.cmsd);
564
566
  this.G=Zn(this);this.G.Df(this.g.streaming.forceHTTP);this.G.Ef(this.g.streaming.forceHTTPS);this.Sf=this.na=this.B=null;this.Rf=new Sc(function(){return O(function(d){if(1==d.g)return c.na?E(d,c.qc(c.Sf,!0),3):d.u(0);if(4!=d.g)return E(d,c.load(c.na),4);c.Sf.play();c.na=null;H(d)})});$n&&(this.B=$n(),this.B.configure(this.g.ads),this.Qc.D(this.B,"ad-started",function(d){var e,f;return O(function(g){if(1==g.g){if(c.g.ads.supportsMultipleMediaElements)return g.return();e=d.originalEvent;if(!e)return g.return();
565
- f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return g.return();c.Rf.stop();if(c.na)return g.u(0);c.Sf=c.h;return E(g,c.dg(!0),3)}c.na=g.h;H(g)})}),this.Qc.D(this.B,"ad-stopped",function(d){c.g.ads.supportsMultipleMediaElements||(d=d.originalEvent)&&d.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&c.Rf.X(.1)}));this.ae.D(window,"online",function(){ao(c);c.vf()});this.Td=new Sc(function(){return bo(c)});this.oa=null;a&&(rb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),
566
- this.qc(a,!0))}ra(X,ig);function co(a){null!=a.K&&(Fj(a.K),a.K.release(),a.K=null)}function eo(a,b){b.lcevc.enabled?(co(a),null==a.K&&(a.K=new Ej(a.h,a.ah,b.lcevc),a.F&&(a.F.$=a.K))):co(a)}function fo(a,b){return new U(a,b)}q=X.prototype;
567
- q.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==go)return g.return();co(a);b=a.detach();a.l=go;return E(g,b,2);case 2:c=[];d=t(a.wf);for(e=d.next();!e.done;e=d.next())f=e.value,f.s||c.push(f.destroy());a.wf=[];return E(g,Promise.all(c),3);case 3:a.ae&&(a.ae.release(),a.ae=null);a.Rc&&(a.Rc.release(),a.Rc=null);a.m&&(a.m.release(),a.m=null);a.ya&&(a.ya.release(),a.ya=null);a.Qc&&(a.Qc.release(),a.Qc=null);a.ua=null;a.g=null;a.s=null;a.Kd=null;a.N=null;a.aa=
567
+ f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return g.return();c.Rf.stop();if(c.na)return g.u(0);c.Sf=c.h;return E(g,c.dg(!0),3)}c.na=g.h;H(g)})}),this.Qc.D(this.B,"ad-stopped",function(d){c.g.ads.supportsMultipleMediaElements||(d=d.originalEvent)&&d.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&c.Rf.Y(.1)}));this.ae.D(window,"online",function(){ao(c);c.vf()});this.Td=new Sc(function(){return bo(c)});this.oa=null;a&&(rb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),
568
+ this.qc(a,!0))}ra(X,ig);function co(a){null!=a.K&&(Fj(a.K),a.K.release(),a.K=null)}function eo(a,b){b.lcevc.enabled?(co(a),null==a.K&&(a.K=new Ej(a.h,a.ah,b.lcevc),a.C&&(a.C.U=a.K))):co(a)}function fo(a,b){return new U(a,b)}r=X.prototype;
569
+ r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==go)return g.return();co(a);b=a.detach();a.l=go;return E(g,b,2);case 2:c=[];d=t(a.wf);for(e=d.next();!e.done;e=d.next())f=e.value,f.s||c.push(f.destroy());a.wf=[];return E(g,Promise.all(c),3);case 3:a.ae&&(a.ae.release(),a.ae=null);a.Rc&&(a.Rc.release(),a.Rc=null);a.m&&(a.m.release(),a.m=null);a.Ba&&(a.Ba.release(),a.Ba=null);a.Qc&&(a.Qc.release(),a.Qc=null);a.ta=null;a.g=null;a.s=null;a.Kd=null;a.N=null;a.aa=
568
570
  null;if(!a.G){g.u(4);break}return E(g,a.G.destroy(),5);case 5:a.G=null;case 4:a.o&&(a.o.release(),a.o=null),ig.prototype.release.call(a),H(g)}})};function ho(a,b){a.dispatchEvent(fo("onstatechange",(new Map).set("state",b)))}
569
- q.qc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==go)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return E(g,c.detach(),2);case 2:return E(g,io(c,"attach"),4);case 4:if(g.h)return g.return();wa(g,5,6);d||(ho(c,"attach"),e=function(){var h=jo(c,!1);h&&ko(c,h)},c.Rc.D(a,"error",e),c.h=a);if(!b||!Tc()||c.F){g.u(6);break}return E(g,lo(c),6);case 6:Ba(g);c.W.release();Ca(g,0);break;case 5:return f=Aa(g),E(g,c.detach(),10);case 10:throw f;
570
- }})};q.kh=function(a){this.ah=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==go)throw new T(2,7,7E3);return E(c,b.mc(!1,a),2)}if(3!=c.g)return E(c,io(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Rc.nb(),b.h=null),ho(b,"detach"),b.B&&!a&&b.B.release()}finally{b.W.release()}H(c)})};function io(a,b){var c;return O(function(d){return 1==d.g?(c=++a.ce,E(d,Vn(a.W,b),2)):c!=a.ce?(a.W.release(),d.return(!0)):d.return(!1)})}
571
- q.mc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return O(function(r){switch(r.g){case 1:return c.l!=go&&(c.l=Wn),E(r,io(c,"unload"),2);case 2:if(r.h)return r.return();xa(r,3);c.Ka=!1;ho(c,"unload");a&&!Tc()&&(a=!1);co(c);d=c.Sc.map(function(u){return u()});c.Sc=[];return E(r,Promise.all(d),5);case 5:c.dispatchEvent(fo("unloading"));c.Jb&&(c.Jb.release(),c.Jb=null);c.h&&(c.m.nb(),c.ya.nb());c.Td.stop();c.hb&&(c.hb.release(),c.hb=null);c.Nd&&(c.Nd.stop(),c.Nd=null);
572
- if(!c.J){r.u(6);break}return E(r,c.J.stop(),7);case 7:c.J=null,c.Fa=null;case 6:if(!c.o){r.u(8);break}return E(r,c.o.stop(),8);case 8:if(!c.j){r.u(10);break}return E(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.C&&(c.C.release(),c.C=null);if(!td("webkit")||!c.A){r.u(12);break}return E(r,c.A.destroy(),13);case 13:c.A=null;case 12:if(!c.F){r.u(14);break}return E(r,c.F.destroy(),15);case 15:c.F=null;case 14:if(c.B&&!b)c.B.onAssetUnload();c.na&&!b&&(c.na.destroy(),c.na=
573
- null);b||c.Rf.stop();c.N&&vn(c.N);c.aa&&(c.aa.g=null);c.h&&jn(c.h);if(!c.h||!c.h.src){r.u(16);break}return E(r,new Promise(function(u){return(new Sc(u)).X(.1)}),17);case 17:c.h.removeAttribute("src"),c.h.load();case 16:if(!c.A){r.u(18);break}return E(r,c.A.destroy(),19);case 19:c.A=null;case 18:c.oa&&c.$!=c.oa.xc()&&(c.oa.s||c.oa.destroy(),c.oa=null);c.$=null;c.qf=null;c.L=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=
574
- k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(af={},Oc.clear());c.i=null;c.s=new Yk;c.Kf=null;c.cd=[];c.P=NaN;mo(c);case 3:Ba(r);c.W.release();Ca(r,4);break;case 4:if(a&&Tc()&&!c.F)return E(r,lo(c),0);r.u(0)}})};q.Ri=function(a){this.ha=a};
575
- q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==go)throw new T(2,7,7E3);e=null;f="";a instanceof pm?(e=a,f=e.xc()||""):f=a||"";return E(A,Vn(d.W,"load"),2);case 2:d.W.release();if(!d.h)throw new T(2,7,7002);if(!d.$){A.u(3);break}d.$=f;return E(A,d.mc(!1),3);case 3:g=++d.ce;h=function(){return O(function(y){if(1==y.g)return d.ce==g?y.u(0):e?E(y,e.destroy(),3):y.u(3);throw new T(2,7,7E3);})};k=function(y,C){return O(function(z){switch(z.g){case 1:return xa(z,
576
- 2),E(z,Vn(d.W,C),4);case 4:return E(z,h(),5);case 5:return E(z,y(),6);case 6:return E(z,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Ba(z),d.W.release(),Ca(z,0)}})};wa(A,5,6);null==b&&e&&(b=e.getStartTime());d.ha=b;d.Ka=!1;d.dispatchEvent(fo("loading"));if(e){c=e.P;A.u(8);break}if(c){A.u(8);break}return E(A,k(function(){return O(function(y){if(1==y.g)return E(y,no(d,f),2);c=y.h;H(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){sm(e,d);d.s=e.getStats();A.u(11);break}return E(A,oo(d,f,b,c,!0),12);case 12:(e=
577
- A.h)?(sm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new Yk;case 11:m=!e;n=e?e.qb:Date.now()/1E3;d.s=e?e.getStats():new Yk;d.$=f;d.qf=c||null;if(m)return E(A,k(function(){return O(function(y){return E(y,po(d,c),0)})},"initializeSrcEqualsDrmInner_"),20);if(d.F){A.u(15);break}return E(A,k(function(){return O(function(y){return E(y,lo(d),0)})},"initializeMediaSourceEngineInner_"),15);case 15:return E(A,k(function(){return O(function(y){return E(y,e.m,0)})},"waitForFinish"),17);case 17:d.g=
578
- e.getConfiguration();d.Id=e.B;d.Fa=e.C;d.J=um(e);d.Jb=vm(e);d.qb=e.ya;d.i=e.Qe();if(p=e.o)d.xa=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(qo(d),d.configure("manifest.disableVideo",!0));d.A=wm(e);return E(A,k(function(){return O(function(y){return E(y,d.A.qc(d.h),0)})},"drmEngine_.attach"),18);case 18:return!(r=e.A)||d.ua&&d.ua==r||(d.o=tm(e),d.ua=e.A,"function"!=typeof d.o.setMediaElement&&(rb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=
579
- function(){}),"function"!=typeof d.o.setCmsdManager&&(rb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(rb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),u=xm(e),v=e.ha,E(A,k(function(){return O(function(y){return E(y,ro(d,n,v,u),0)})},"loadInner_"),19);case 19:rm(e);A.u(14);break;case 20:return E(A,
580
- k(function(){return O(function(y){return E(y,so(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(fo("loaded"));case 6:Ba(A);if(!e){A.u(22);break}return E(A,e.destroy(),22);case 22:d.oa=null;Ca(A,0);break;case 5:w=Aa(A);if(!w||7E3==w.code){A.u(24);break}return E(A,d.mc(!1),24);case 24:throw w;}})};
581
- function qo(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}q.Ni=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?E(e,to(c),2):3!=e.g?(d=e.h,E(e,c.mc(a,b),3)):e.return(d)})};
582
- q.dg=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?E(d,to(b),2):3!=d.g?(c=d.h,E(d,b.detach(a),3)):d.return(c)})};
583
- function to(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.Fa&&a.$))return e.u(2);c=a.h.currentTime;a.U()&&(c=null);d=Date.now()/1E3;return E(e,uo(a,a.$,c,a.qf,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.J,h=a.Fa;f.h=a.i;f.j=g;f.C=h;f=b;g=a.ua;f.i=a.o;f.A=g;b.o=a.xa;b.start();a.i=null;a.J=null;a.Fa=null;a.o=null;a.ua=null}return e.return(b)})}
584
- q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return E(f,oo(d,a,b,c),2);(e=f.h)?e.start():ko(d,new T(2,7,7005));return f.return(e)})};function oo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return O(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.u(2):E(l,no(a,b),3);2!=l.g&&(d=l.h);if(g=vo(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.ua==a.g.abrFactory&&(k=!1),a.h&&"AUDIO"===a.h.nodeName&&(h=!0));return l.return(uo(a,b,c,d||null,f,!e,h,k))})}
585
- function uo(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,p,r,u,v,w,A,y,C,z,B,D;return O(function(I){if(1==I.g)return k=null,l=He(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.N&&k.s?null:k},n=function(){return m()?m().getConfiguration():a.g},p=function(F,J){m()?k.configure(F,J):a.configure(F,J)},Infinity!=a.ba.width||Infinity!=a.ba.height?I.u(2):E(I,vd(),3);2!=I.g&&(r=I.h,a.ba.width=r.width,a.ba.height=r.height);u=new oi(l,a.ba,null);v={networkingEngine:a.G,
571
+ r.qc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==go)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return E(g,c.detach(),2);case 2:return E(g,io(c,"attach"),4);case 4:if(g.h)return g.return();wa(g,5,6);d||(ho(c,"attach"),e=function(){var h=jo(c,!1);h&&ko(c,h)},c.Rc.D(a,"error",e),c.h=a);if(!b||!Tc()||c.C){g.u(6);break}return E(g,lo(c),6);case 6:Ba(g);c.U.release();Ca(g,0);break;case 5:return f=za(g),E(g,c.detach(),10);case 10:throw f;
572
+ }})};r.kh=function(a){this.ah=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==go)throw new T(2,7,7E3);return E(c,b.mc(!1,a),2)}if(3!=c.g)return E(c,io(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Rc.nb(),b.h=null),ho(b,"detach"),b.B&&!a&&b.B.release()}finally{b.U.release()}H(c)})};function io(a,b){var c;return O(function(d){return 1==d.g?(c=++a.ce,E(d,Vn(a.U,b),2)):c!=a.ce?(a.U.release(),d.return(!0)):d.return(!1)})}
573
+ r.mc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return O(function(q){switch(q.g){case 1:return c.l!=go&&(c.l=Wn),E(q,io(c,"unload"),2);case 2:if(q.h)return q.return();xa(q,3);c.Ka=!1;ho(c,"unload");a&&!Tc()&&(a=!1);co(c);d=c.Sc.map(function(u){return u()});c.Sc=[];return E(q,Promise.all(d),5);case 5:c.dispatchEvent(fo("unloading"));c.rb&&(c.rb.release(),c.rb=null);c.h&&(c.m.nb(),c.Ba.nb());c.Td.stop();c.hb&&(c.hb.release(),c.hb=null);c.Nd&&(c.Nd.stop(),c.Nd=null);
574
+ if(!c.J){q.u(6);break}return E(q,c.J.stop(),7);case 7:c.J=null,c.Fa=null;case 6:if(!c.o){q.u(8);break}return E(q,c.o.stop(),8);case 8:if(!c.j){q.u(10);break}return E(q,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.F&&(c.F.release(),c.F=null);if(!pd("webkit")||!c.A){q.u(12);break}return E(q,c.A.destroy(),13);case 13:c.A=null;case 12:if(!c.C){q.u(14);break}return E(q,c.C.destroy(),15);case 15:c.C=null;case 14:if(c.B&&!b)c.B.onAssetUnload();c.na&&!b&&(c.na.destroy(),c.na=
575
+ null);b||c.Rf.stop();c.N&&vn(c.N);c.aa&&(c.aa.g=null);c.h&&jn(c.h);c.h&&c.h.src&&(c.h.removeAttribute("src"),c.h.load());if(!c.A){q.u(16);break}return E(q,c.A.destroy(),17);case 17:c.A=null;case 16:c.oa&&c.$!=c.oa.xc()&&(c.oa.s||c.oa.destroy(),c.oa=null);c.$=null;c.qf=null;c.L=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=
576
+ m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(af={},Oc.clear());c.i=null;c.s=new Yk;c.Kf=null;c.dd=[];c.P=NaN;mo(c);case 3:Ba(q);c.U.release();Ca(q,4);break;case 4:if(a&&Tc()&&!c.C)return E(q,lo(c),0);q.u(0)}})};r.Ri=function(a){this.ha=a};
577
+ r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,q,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==go)throw new T(2,7,7E3);e=null;f="";a instanceof pm?(e=a,f=e.xc()||""):f=a||"";return E(A,Vn(d.U,"load"),2);case 2:d.U.release();if(!d.h)throw new T(2,7,7002);if(!d.$){A.u(3);break}d.$=f;return E(A,d.mc(!1),3);case 3:g=++d.ce;h=function(){return O(function(y){if(1==y.g)return d.ce==g?y.u(0):e?E(y,e.destroy(),3):y.u(3);throw new T(2,7,7E3);})};k=function(y,C){return O(function(z){switch(z.g){case 1:return xa(z,
578
+ 2),E(z,Vn(d.U,C),4);case 4:return E(z,h(),5);case 5:return E(z,y(),6);case 6:return E(z,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Ba(z),d.U.release(),Ca(z,0)}})};wa(A,5,6);null==b&&e&&(b=e.getStartTime());d.ha=b;d.Ka=!1;d.dispatchEvent(fo("loading"));if(e){c=e.P;A.u(8);break}if(c){A.u(8);break}return E(A,k(function(){return O(function(y){if(1==y.g)return E(y,no(d,f),2);c=y.h;H(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){sm(e,d);d.s=e.getStats();A.u(11);break}return E(A,oo(d,f,b,c,!0),12);case 12:(e=
579
+ A.h)?(sm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new Yk;case 11:return m=!e,n=e?e.rb:Date.now()/1E3,d.s=e?e.getStats():new Yk,d.$=f,d.qf=c||null,m?E(A,k(function(){return O(function(y){return E(y,po(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):E(A,k(function(){return O(function(y){return E(y,Promise.race([e.ga,e.m]),0)})},"waitForFinish"),15);case 15:d.Fa=e.C;d.J=um(e);d.i=e.Qe();if(d.C){A.u(16);break}return E(A,k(function(){return O(function(y){return E(y,lo(d),0)})},"initializeMediaSourceEngineInner_"),
580
+ 16);case 16:return E(A,k(function(){return O(function(y){return E(y,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.Id=e.B;d.rb=vm(e);d.qb=e.Fa;if(p=e.o)d.ua=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(qo(d),d.configure("manifest.disableVideo",!0));d.A=wm(e);return E(A,k(function(){return O(function(y){return E(y,d.A.qc(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(q=e.A)||d.ta&&d.ta==q||(d.o=tm(e),d.ta=e.A,"function"!=typeof d.o.setMediaElement&&(rb("AbrManager w/o setMediaElement",
581
+ "Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(rb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(rb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),u=xm(e),v=e.na,E(A,k(function(){return O(function(y){return E(y,
582
+ ro(d,n,v,u),0)})},"loadInner_"),20);case 20:rm(e);A.u(14);break;case 21:return E(A,k(function(){return O(function(y){return E(y,so(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(fo("loaded"));case 6:Ba(A);if(!e){A.u(23);break}return E(A,e.destroy(),23);case 23:d.oa=null;Ca(A,0);break;case 5:w=za(A);if(!w||7E3==w.code){A.u(25);break}return E(A,d.mc(!1),25);case 25:throw w;}})};
583
+ function qo(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}r.Ni=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?E(e,to(c),2):3!=e.g?(d=e.h,E(e,c.mc(a,b),3)):e.return(d)})};
584
+ r.dg=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?E(d,to(b),2):3!=d.g?(c=d.h,E(d,b.detach(a),3)):d.return(c)})};
585
+ function to(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.Fa&&a.$))return e.u(2);c=a.h.currentTime;a.V()&&(c=null);d=Date.now()/1E3;return E(e,uo(a,a.$,c,a.qf,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.J,h=a.Fa;f.h=a.i;f.j=g;f.C=h;f=b;g=a.ta;f.i=a.o;f.A=g;b.o=a.ua;b.start();a.i=null;a.J=null;a.Fa=null;a.o=null;a.ta=null}return e.return(b)})}
586
+ r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return E(f,oo(d,a,b,c),2);(e=f.h)?e.start():ko(d,new T(2,7,7005));return f.return(e)})};function oo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return O(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.u(2):E(l,no(a,b),3);2!=l.g&&(d=l.h);if(g=vo(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.ta==a.g.abrFactory&&(k=!1),a.h&&"AUDIO"===a.h.nodeName&&(h=!0));return l.return(uo(a,b,c,d||null,f,!e,h,k))})}
587
+ function uo(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,p,q,u,v,w,A,y,C,z,B,D;return O(function(I){if(1==I.g)return k=null,l=He(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.N&&k.s?null:k},n=function(){return m()?m().getConfiguration():a.g},p=function(F,J){m()?k.configure(F,J):a.configure(F,J)},Infinity!=a.ba.width||Infinity!=a.ba.height?I.u(2):E(I,ud(),3);2!=I.g&&(q=I.h,a.ba.width=q.width,a.ba.height=q.height);u=new oi(l,a.ba,null);v={networkingEngine:a.G,
586
588
  filter:function(F){var J,K;return O(function(G){if(1==G.g)return E(G,pi(u,F),2);if(4!=G.g){J=G.h;if(!J)return G.u(0);K=fo("trackschanged");return E(G,Promise.resolve(),4)}k.dispatchEvent(K);H(G)})},makeTextStreamsForClosedCaptions:function(F){return wo(a,F)},onTimelineRegionAdded:function(F){var J=k.F;a:{var K=t(J.g);for(var G=K.next();!G.done;G=K.next())if(G=G.value,G.schemeIdUri==F.schemeIdUri&&G.id==F.id&&G.startTime==F.startTime&&G.endTime==F.endTime){K=G;break a}K=null}null==K&&(J.g.add(F),F=
587
589
  new U("regionadd",new Map([["region",F]])),J.dispatchEvent(F))},onEvent:function(F){return k.dispatchEvent(F)},onError:function(F){return k.onError(F)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){p("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.N&&a.j.updateDuration()},newDrmInfo:function(F){var J=k.l,K=J?J.g:null;K&&J.s&&ri(u,K.keySystem,F)},onManifestUpdated:function(){var F=
588
- (new Map).set("isLive",a.U());k.dispatchEvent(fo("manifestupdated",F));qm(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new kl(function(){return a.Ob()});w.addEventListener("regionadd",function(F){var J=F.region;xo(a,"timelineregionadded",J,k);qm(k,!1,function(){if(a.B)a.B.onDashTimedMetadata(J)})});A=null;l.streaming.observeQualityChanges&&(A=new ll(function(){return a.sb()}),A.addEventListener("qualitychange",function(F){var J=
589
- F.quality;F=F.position;J=(new Map).set("mediaQuality",{bandwidth:J.bandwidth,audioSamplingRate:J.audioSamplingRate,codecs:J.codecs,contentType:J.contentType,frameRate:J.frameRate,height:J.height,mimeType:J.mimeType,channelsCount:J.channelsCount,pixelAspectRatio:J.pixelAspectRatio,width:J.width}).set("position",F);a.dispatchEvent(fo("mediaqualitychanged",J))}));y=!0;C={Db:a.G,onError:function(F){return k.onError(F)},Xd:function(F){qm(k,!0,function(){a:{var J=F,K=fo("keystatuschanged");a.dispatchEvent(K);
590
+ (new Map).set("isLive",a.V());k.dispatchEvent(fo("manifestupdated",F));qm(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.V())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new kl(function(){return a.Ob()});w.addEventListener("regionadd",function(F){var J=F.region;xo(a,"timelineregionadded",J,k);qm(k,!1,function(){if(a.B)a.B.onDashTimedMetadata(J)})});A=null;l.streaming.observeQualityChanges&&(A=new ll(function(){return a.ub()}),A.addEventListener("qualitychange",function(F){var J=
591
+ F.quality;F=F.position;J=(new Map).set("mediaQuality",{bandwidth:J.bandwidth,audioSamplingRate:J.audioSamplingRate,codecs:J.codecs,contentType:J.contentType,frameRate:J.frameRate,height:J.height,mimeType:J.mimeType,channelsCount:J.channelsCount,pixelAspectRatio:J.pixelAspectRatio,width:J.width}).set("position",F);a.dispatchEvent(fo("mediaqualitychanged",J))}));y=!0;C={Eb:a.G,onError:function(F){return k.onError(F)},Xd:function(F){qm(k,!0,function(){a:{var J=F,K=fo("keystatuschanged");a.dispatchEvent(K);
590
592
  var G=Object.keys(J);1==G.length&&""==G[0]&&(G=["00"],J={"00":J[""]});K=1==G.length&&"00"==G[0];var M=!1;if(G.length){G=t(a.i.variants);for(var N=G.next();!N.done;N=G.next()){N=N.value;var L=[];N.audio&&L.push(N.audio);N.video&&L.push(N.video);L=t(L);for(var P=L.next();!P.done;P=L.next()){var R=P.value;P=N.allowedByKeySystem;if(R.keyIds.size){N.allowedByKeySystem=!0;R=t(R.keyIds);for(var Q=R.next();!Q.done;Q=R.next())if(Q=Q.value,(Q=J[K?"00":Q])||a.A.F)N.allowedByKeySystem=N.allowedByKeySystem&&!!Q&&
591
593
  !ti.includes(Q)}P!=N.allowedByKeySystem&&(M=!0)}}}if(M&&(yo(a),!zo(a)))break a;(J=a.j.j)&&!J.allowedByKeySystem&&Ao(a)}})},onExpirationUpdated:function(F,J){var K=fo("expirationupdated");k.dispatchEvent(K);if((K=k.j)&&K.onExpirationUpdated)K.onExpirationUpdated(F,J)},onEvent:function(F){k.dispatchEvent(F);"drmsessionupdate"==F.type&&y&&(y=!1,F=Date.now()/1E3-k.ua,(a.s||k.getStats()).j=F,a.K&&Fj(a.K))}};z=Zn(a,m);pg(a.G,z);B=function(){return a.sc(C)};D={config:l,hi:v,ri:w,pi:A,sc:B,gi:u,networkingEngine:z,
592
594
  jh:f,ih:h};k=new pm(b,d,e,c,D);a.wf.push(k);return I.return(k)})}function no(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,E(e,Jm(b,a.G,c),2);d=e.h;"application/x-mpegurl"==d&&fd()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
593
- function vo(a,b){if(!Tc())return!0;if(b){if(""==(a.h||Vc()).canPlayType(b))return!1;if(!(Tc()&&b in wi))return!0;if(le(b)){if(a.g.streaming.preferNativeHls)return!0;if(fd()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"]))return a.g.streaming.useNativeHlsForFairPlay;if(fd())return a.g.streaming.useNativeHlsOnSafari}}return!1}
594
- function lo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return ho(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Kf=b,d=Bo(a.h,c,{Ch:function(){return a.keySystem()},Yd:function(h,k,l){Co(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ha=f,E(g,d.L,2);a.F=d;H(g)})}
595
- function ro(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J;return O(function(K){switch(K.g){case 1:ho(a,"load");e=a.h;a.H=new Pk({Cd:function(){return e.playbackRate},Xb:function(){return e.defaultPlaybackRate},Ff:function(G){e.playbackRate=G},wg:function(G){e.currentTime+=G}});f=function(){return Do(a)};g=function(){return Eo(a)};a.m.D(e,"playing",f);a.m.D(e,"pause",f);a.m.D(e,"ended",f);a.m.D(e,"ratechange",g);eo(a,a.g);a.Ea=a.g.preferredTextLanguage;a.$c=a.g.preferredTextRole;a.Xc=a.g.preferForcedSubs;
596
- Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(G,M,N){a.i&&a.j&&G!=a.j.j&&Go(a,G,!0,void 0===M?!1:M,void 0===N?0:N)});a.o.setMediaElement(e);a.o.setCmsdManager(a.aa);a.j=Ho(a);a.j.configure(a.g.streaming);a.l=Io;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(G){if(G.track)switch(G=G.track,G.kind){case "chapters":Jo(a,G)}});a.dispatchEvent(fo("streaming"));h=c;(k=a.j.j)||h||(h=Ko(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(p=n.next();!p.done;p=n.next())(r=
597
- p.value)&&!r.segmentIndex&&l.push(r.createSegmentIndex());if(!(0<l.length)){K.u(2);break}return E(K,Promise.all(l),2);case 2:if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(m);Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);wl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(G){a.C=Lo(a,G);a.hb=Mo(a,G);No(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.ha);if(k){K.u(4);break}if(!a.g.streaming.startAtSegmentBoundary){K.u(5);
598
- break}v=a.i.presentationTimeline;w=a.ha||a.h.currentTime;A=v.Ab();y=v.ub();w<A?w=A:w>y&&(w=y);return E(K,Oo(h,w),6);case 6:C=K.h,u(C);case 5:Go(a,h,!0,!1,0);case 4:return a.C.ready(),z=a.yc().find(function(G){return G.active}),z||((B=xf(a.i.textStreams,a.Ea,a.$c,a.Xc)[0]||null)&&Xk(a.s.h,B,!0),h&&(B?(Po(a,h.audio,B)&&(a.ea=!0),a.ea&&a.F.F.setTextVisibility(!0),Qo(a)):a.ea=!1),B&&(a.g.streaming.alwaysStreamText||a.Ze())&&Fl(a.j,B)),E(K,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.o.enable(),Ro(a));yo(a);
599
- zo(a);a.i.variants.some(function(G){return G.primary});if((D=a.U())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)I=function(){return So(a)},a.m.D(e,"timeupdate",I);D||(F=function(){return To(a)},a.m.D(e,"timeupdate",F),To(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(J=function(){var G;return O(function(M){if(1==M.g){G=a.h.duration-a.h.currentTime;if(isNaN(G)||!(G<=a.g.streaming.preloadNextUrlWindow))return M.u(0);
600
- a.m.Hb(e,"timeupdate",J);return E(M,a.preload(a.i.nextUrl),4)}a.oa=M.h;H(M)})},a.m.D(e,"timeupdate",J)),a.m.D(e,"ended",function(){a.load(a.oa||a.i.nextUrl)})));if(a.B)a.B.onManifestUpdated(D);a.Ka=!0;a.m.sa(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});H(K)}})}
601
- function po(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Wd,d=Date.now()/1E3,e=!0,a.A=a.sc({Db:a.G,onError:function(k){ko(a,k)},Xd:function(){},onExpirationUpdated:function(){var k=fo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.A.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
602
- g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?ie(b):"",codecs:b?je(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.fa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(Yd(g.mimeType,
603
- g.codecs)),b.startsWith("audio/")?(g.type=c.V,f.audio=g):f.video=g,a.A.aa=!0,E(h,Lh(a.A,[f],[]),2)):E(h,a.A.qc(a.h),0)})}
604
- function so(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g)return ho(a,"src-equals"),d=a.h,a.C=new Fk(d),e=!1,a.Sc.push(function(){e=!0}),null!=a.ha&&a.C.qe(a.ha),a.H=new Pk({Cd:function(){return d.playbackRate},Xb:function(){return d.defaultPlaybackRate},Ff:function(w){d.playbackRate=w},wg:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,No(a,d,f),g=function(){return Do(a)},h=function(){return Eo(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
605
- "ratechange",h),"none"!=d.preload&&a.m.sa(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return yo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return yo(a)}),a.m.D(d.audioTracks,"change",function(){return yo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":Uo(a,w);break;case "chapters":Jo(a,w);break;default:yo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return yo(a)}),
606
- a.m.D(d.textTracks,"change",function(){return yo(a)})),k=wn(a.N,a.$,c),!k.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(k+="#t=",0<a.g.playRangeStart&&(k+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(k+=","+a.g.playRangeEnd)),d.src=k,(Zc()||bd())&&d.load(),"none"!=d.preload&&!d.autoplay&&le(c)&&kd()&&d.load(),a.l=Vo,a.dispatchEvent(fo("streaming")),l=new Zf,wk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.ready();l.resolve()}),wk(d,HTMLMediaElement.HAVE_CURRENT_DATA,
607
- a.m,function(){var w;return O(function(A){if(1==A.g)return Wo(a),w=Xo(a),w.find(function(y){return"disabled"!=y.mode})?(0<w.length&&(a.ea=!0),A.u(2)):E(A,new Promise(function(y){a.m.sa(d.textTracks,"change",y);(new Sc(y)).X(1)}),2);if(e)return A.return();Yo(a);H(A)})}),d.error?l.reject(jo(a)):"none"==d.preload&&($a('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.'),
608
- l.resolve()),a.m.sa(d,"error",function(){l.reject(jo(a))}),m=new Promise(function(w,A){(new Sc(A)).X(a.g.streaming.loadTimeout)}),E(v,Promise.race([l,m]),2);if((n=a.U())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)p=function(){return So(a)},a.m.D(d,"timeupdate",p);n||(r=function(){return To(a)},a.m.D(d,"timeupdate",r),To(a));a.B&&(a.B.onManifestUpdated(n),n&&(u=a.Ob().end,a.m.D(d,"progress",function(){var w=a.Ob().end;u!=w&&(a.B.onManifestUpdated(a.U()),
595
+ function vo(a,b){if(!Tc())return!0;if(b){if(""==(a.h||Vc()).canPlayType(b))return!1;if(!(Tc()&&b in wi))return!0;if(ke(b)){if(a.g.streaming.preferNativeHls)return!0;if(fd()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"]))return a.g.streaming.useNativeHlsForFairPlay;if(fd())return a.g.streaming.useNativeHlsOnSafari}}return!1}
596
+ function lo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return ho(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Kf=b,d=Bo(a.h,c,{Ch:function(){return a.keySystem()},Yd:function(h,k,l){Co(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ga=f,E(g,d.L,2);a.C=d;H(g)})}
597
+ function ro(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F,J;return O(function(K){switch(K.g){case 1:ho(a,"load");e=a.h;a.H=new Pk({Cd:function(){return e.playbackRate},Xb:function(){return e.defaultPlaybackRate},Ff:function(G){e.playbackRate=G},wg:function(G){e.currentTime+=G}});f=function(){return Do(a)};g=function(){return Eo(a)};a.m.D(e,"playing",f);a.m.D(e,"pause",f);a.m.D(e,"ended",f);a.m.D(e,"ratechange",g);eo(a,a.g);a.Ea=a.g.preferredTextLanguage;a.ad=a.g.preferredTextRole;a.Yc=a.g.preferForcedSubs;
598
+ Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(G,M,N){a.i&&a.j&&G!=a.j.j&&Go(a,G,!0,void 0===M?!1:M,void 0===N?0:N)});a.o.setMediaElement(e);a.o.setCmsdManager(a.aa);a.j=Ho(a);a.j.configure(a.g.streaming);a.l=Io;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(G){if(G.track)switch(G=G.track,G.kind){case "chapters":Jo(a,G)}});a.dispatchEvent(fo("streaming"));h=c;(k=a.j.j)||h||(h=Ko(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(p=n.next();!p.done;p=n.next())(q=
599
+ p.value)&&!q.segmentIndex&&l.push(q.createSegmentIndex());if(!(0<l.length)){K.u(2);break}return E(K,Promise.all(l),2);case 2:if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(m);Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);wl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(G){a.F=Lo(a,G);a.hb=Mo(a,G);No(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.ha);if(k){K.u(4);break}if(!a.g.streaming.startAtSegmentBoundary){K.u(5);
600
+ break}v=a.i.presentationTimeline;w=a.ha||a.h.currentTime;A=v.Bb();y=v.vb();w<A?w=A:w>y&&(w=y);return E(K,Oo(h,w),6);case 6:C=K.h,u(C);case 5:Go(a,h,!0,!1,0);case 4:return a.F.ready(),z=a.yc().find(function(G){return G.active}),z||((B=xf(a.i.textStreams,a.Ea,a.ad,a.Yc)[0]||null)&&Xk(a.s.h,B,!0),h&&(B?(Po(a,h.audio,B)&&(a.ga=!0),a.ga&&a.C.F.setTextVisibility(!0),Qo(a)):a.ga=!1),B&&(a.g.streaming.alwaysStreamText||a.Ze())&&Fl(a.j,B)),E(K,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.o.enable(),Ro(a));yo(a);
601
+ zo(a);a.i.variants.some(function(G){return G.primary});if((D=a.V())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)I=function(){return So(a)},a.m.D(e,"timeupdate",I);D||(F=function(){return To(a)},a.m.D(e,"timeupdate",F),To(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(J=function(){var G;return O(function(M){if(1==M.g){G=a.h.duration-a.h.currentTime;if(isNaN(G)||!(G<=a.g.streaming.preloadNextUrlWindow))return M.u(0);
602
+ a.m.Ib(e,"timeupdate",J);return E(M,a.preload(a.i.nextUrl),4)}a.oa=M.h;H(M)})},a.m.D(e,"timeupdate",J)),a.m.D(e,"ended",function(){a.load(a.oa||a.i.nextUrl)})));if(a.B)a.B.onManifestUpdated(D);a.Ka=!0;a.m.za(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});H(K)}})}
603
+ function po(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Wd,d=Date.now()/1E3,e=!0,a.A=a.sc({Eb:a.G,onError:function(k){ko(a,k)},Xd:function(){},onExpirationUpdated:function(){var k=fo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.A.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
604
+ g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?ie(b):"",codecs:b?je(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ea,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(Yd(g.mimeType,
605
+ g.codecs)),b.startsWith("audio/")?(g.type=c.W,f.audio=g):f.video=g,a.A.aa=!0,E(h,Lh(a.A,[f],[]),2)):E(h,a.A.qc(a.h),0)})}
606
+ function so(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u;return O(function(v){if(1==v.g)return ho(a,"src-equals"),d=a.h,a.F=new Fk(d),e=!1,a.Sc.push(function(){e=!0}),null!=a.ha&&a.F.qe(a.ha),a.H=new Pk({Cd:function(){return d.playbackRate},Xb:function(){return d.defaultPlaybackRate},Ff:function(w){d.playbackRate=w},wg:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,No(a,d,f),g=function(){return Do(a)},h=function(){return Eo(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
607
+ "ratechange",h),"none"!=d.preload&&a.m.za(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return yo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return yo(a)}),a.m.D(d.audioTracks,"change",function(){return yo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":Uo(a,w);break;case "chapters":Jo(a,w);break;default:yo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return yo(a)}),
608
+ a.m.D(d.textTracks,"change",function(){return yo(a)})),k=wn(a.N,a.$,c),!k.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(k+="#t=",0<a.g.playRangeStart&&(k+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(k+=","+a.g.playRangeEnd)),d.src=k,a.C&&window.ManagedMediaSource&&(d.disableRemotePlayback=!1),(Zc()||bd())&&d.load(),"none"!=d.preload&&!d.autoplay&&ke(c)&&kd()&&d.load(),a.l=Vo,a.dispatchEvent(fo("streaming")),l=new Zf,wk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.F.ready();
609
+ l.resolve()}),wk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var w;return O(function(A){if(1==A.g)return Wo(a),w=Xo(a),w.find(function(y){return"disabled"!=y.mode})?(0<w.length&&(a.ga=!0),A.u(2)):E(A,new Promise(function(y){a.m.za(d.textTracks,"change",y);(new Sc(y)).Y(1)}),2);if(e)return A.return();Yo(a);H(A)})}),d.error?l.reject(jo(a)):"none"==d.preload&&($a('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.'),
610
+ l.resolve()),a.m.za(d,"error",function(){l.reject(jo(a))}),m=new Promise(function(w,A){(new Sc(A)).Y(a.g.streaming.loadTimeout)}),E(v,Promise.race([l,m]),2);if((n=a.V())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)p=function(){return So(a)},a.m.D(d,"timeupdate",p);n||(q=function(){return To(a)},a.m.D(d,"timeupdate",q),To(a));a.B&&(a.B.onManifestUpdated(n),n&&(u=a.Ob().end,a.m.D(d,"progress",function(){var w=a.Ob().end;u!=w&&(a.B.onManifestUpdated(a.V()),
609
611
  u=w)})));a.Ka=!0;H(v)})}function Wo(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Hg(b,a.g.preferredVariantRole)}function Yo(a){var b=a.g.preferredTextLanguage;""!=b&&a.zf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
610
- function Uo(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Zo(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Sc(function(){var d=$o(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).lc().X(.5);a.Sc.push(function(){c.stop()})}}
612
+ function Uo(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Zo(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Sc(function(){var d=$o(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).lc().Y(.5);a.Sc.push(function(){c.stop()})}}
611
613
  function Co(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&"number"==typeof e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Zo(a,f,g,"org.id3",k.value);if(a.B)a.B.onHlsTimedMetadata(e,f)}}function Zo(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(fo("metadata",b))}
612
- function Jo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Sc(function(){b.mode="hidden"})).lc().X(.5);a.Sc.push(function(){c.stop()})}}q.vi=function(){for(var a=this.W;a.g;)a.release()};q.sc=function(a){return new Eh(a)};
614
+ function Jo(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Sc(function(){b.mode="hidden"})).lc().Y(.5);a.Sc.push(function(){c.stop()})}}r.vi=function(){for(var a=this.U;a.g;)a.release()};r.sc=function(a){return new Eh(a)};
613
615
  function Zn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?qm(b(),!0,e):e()}b||(b=function(){return null});return new lg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(fo("downloadheadersreceived",f));d(function(){if(a.aa){var h=a.aa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
614
- Tn(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");p.set(u[0],Tn(u[1]))}var v=p}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(fo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.N,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)Dn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
615
- "d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Dn(h,f,{ot:An,su:!h.i})}}catch(L){ab("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",L)}break;case wg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.U()?"l":"v"};n.ot=Hn(k);var p=n.ot===En||n.ot===yn||n.ot===zn||n.ot===Jn,r=k.stream;if(r){var u=h.h.Za();if(p&&(n.bl=Ln(h,r.type),n.ot!==Jn)){var v=Mn(h,r.type);n.dl=u?v/Math.abs(u):v}r.bandwidth&&(n.br=r.bandwidth/1E3);
616
- if(r.segmentIndex&&m){var w=r.segmentIndex.zb(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Qb(m.M(),A.M())){var y=A.M()[0],C=f.uris[0],z=new URL(y),B=new URL(C);if(z.origin!==B.origin)var D=y;else{for(var I=z.pathname.split("/").slice(1),F=B.pathname.split("/").slice(1,-1);I[0]===F[0];)I.shift(),F.shift();for(;F.length;)F.shift(),I.unshift("..");D=I.join("/")}n.nor=D}if((A.Da||A.pa)&&(m.Da!=A.Da||m.pa!=A.pa)){var J=A.Da+"-";A.pa&&(J+=A.pa);n.nrr=J}}}var K=h.h.Za()||1,G=Mn(h,r.type)||
617
- 500,M=r.bandwidth;var N=M?M*(m.endTime-m.startTime)/1E3/(G/K/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(N)||(n.rtp=N)}}p&&n.ot!==Jn&&(n.tb=Nn(h,n.ot)/1E3);Dn(h,f,n)}}catch(L){ab("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",L)}break;case 2:case 5:case 6:Dn(h,f,{ot:"k"});break;case 4:Dn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.s)&&(f.Sb=isNaN(f.Sb)?e:f.Sb+e)})}
616
+ Tn(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,q=l.split(";");for(l=1;l<q.length;l++){var u=q[l].split("=");p.set(u[0],Tn(u[1]))}var v=p}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(fo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.N,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)Dn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
617
+ "d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Dn(h,f,{ot:An,su:!h.i})}}catch(L){ab("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",L)}break;case wg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.V()?"l":"v"};n.ot=Hn(k);var p=n.ot===En||n.ot===yn||n.ot===zn||n.ot===Jn,q=k.stream;if(q){var u=h.h.Za();if(p&&(n.bl=Ln(h,q.type),n.ot!==Jn)){var v=Mn(h,q.type);n.dl=u?v/Math.abs(u):v}q.bandwidth&&(n.br=q.bandwidth/1E3);
618
+ if(q.segmentIndex&&m){var w=q.segmentIndex.Ab(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Qb(m.M(),A.M())){var y=A.M()[0],C=f.uris[0],z=new URL(y),B=new URL(C);if(z.origin!==B.origin)var D=y;else{for(var I=z.pathname.split("/").slice(1),F=B.pathname.split("/").slice(1,-1);I[0]===F[0];)I.shift(),F.shift();for(;F.length;)F.shift(),I.unshift("..");D=I.join("/")}n.nor=D}if((A.Da||A.pa)&&(m.Da!=A.Da||m.pa!=A.pa)){var J=A.Da+"-";A.pa&&(J+=A.pa);n.nrr=J}}}var K=h.h.Za()||1,G=Mn(h,q.type)||
619
+ 500,M=q.bandwidth;var N=M?M*(m.endTime-m.startTime)/1E3/(G/K/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(N)||(n.rtp=N)}}p&&n.ot!==Jn&&(n.tb=Nn(h,n.ot)/1E3);Dn(h,f,n)}}catch(L){ab("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",L)}break;case 2:case 5:case 6:Dn(h,f,{ot:"k"});break;case 4:Dn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.s)&&(f.Sb=isNaN(f.Sb)?e:f.Sb+e)})}
618
620
  function Lo(a,b){return new Gk(a.h,a.i,a.g.streaming,b,function(){a.hb&&Sk(a.hb,!0);a.j&&a.j.Hc();a.L&&ap(a)},function(c){return a.dispatchEvent(c)})}
619
- function Mo(a,b){b=new Em(a.Jb,a.U()||0<b);b.addEventListener("enter",function(d){xo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){xo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(xo(a,"timelineregionenter",e),xo(a,"timelineregionexit",e))});var c=new Rk(a.h);c.g.add(b);a.qb&&c.g.add(a.qb);return c}
621
+ function Mo(a,b){b=new Em(a.rb,a.V()||0<b);b.addEventListener("enter",function(d){xo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){xo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(xo(a,"timelineregionenter",e),xo(a,"timelineregionexit",e))});var c=new Rk(a.h);c.g.add(b);a.qb&&c.g.add(a.qb);return c}
620
622
  function No(a,b,c){a.L=new Sf;a.L.g=Uf;Vf(a.L,c,Math.min(.5,c/2));mo(a);a.Nd=(new Sc(function(){ap(a)})).Va(.25);a.m.D(b,"waiting",function(){return ap(a)});a.m.D(b,"stalled",function(){return ap(a)});a.m.D(b,"canplaythrough",function(){return ap(a)});a.m.D(b,"progress",function(){return ap(a)})}
621
- function ap(a){switch(a.l){case Vo:if(a.h.ended)var b=!0;else{var c=Li(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Io:a:if(a.h.ended||Qj(a.F))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Lb();var d=Li(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ni(a.h.buffered,a.h.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Tf:Uf;c.g=d;(b=b!=d)&&d===Tf&&(c.h=Date.now());b&&mo(a)}function Bo(a,b,c,d){return new Hj(a,b,c,d)}
622
- function Yn(a){return new un({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},sb:function(){return a.sb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Za:function(){return a.Za()},Zb:function(){return a.Zb()},bc:function(){return a.bc()},U:function(){return a.U()}},a.g.cmcd)}
623
- function Ho(a){return new ql(a.i,{Bd:function(){return a.C?a.C.nd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},Za:function(){return a.Za()},Y:a.F,Db:a.G,onError:function(b){return ko(a,b)},onEvent:function(b){return a.dispatchEvent(b)},mi:function(){a.J&&a.J.update&&a.J.update()},lf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type,g=c.codecs.includes(",");if(a.C){a.C.xg();var h=Rj(a.F,f);!a.U()&&a.h.paused&&null!=h&&f!=Ud&&0<h&&a.C.nd()<h&&a.C.qe(h)}ap(a);d=(new Map).set("start",
624
- d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(fo("segmentappended",d));a.o&&c.fastSwitching&&b.gd&&b.Ld&&a.o.trySuggestStreams()},li:function(b,c){(c=c.gf)&&a.qb&&nl(a.qb,c,b)},Yf:function(b,c){var d=a.A;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){b=new Wg(Bb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,
625
- e),e+=f.length;Uh(d,"cenc",c);d=d.l}}else d=Promise.resolve();return d},Yd:function(b,c,d){Co(a,b,c,d)},wd:function(b,c){return a.wd(b,c)}})}
626
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=bm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(rb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(rb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
623
+ function ap(a){switch(a.l){case Vo:if(a.h.ended)var b=!0;else{var c=Li(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Io:a:if(a.h.ended||Qj(a.C))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.Lb();var d=Li(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ni(a.h.buffered,a.h.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Tf:Uf;c.g=d;(b=b!=d)&&d===Tf&&(c.h=Date.now());b&&mo(a)}function Bo(a,b,c,d){return new Hj(a,b,c,d)}
624
+ function Yn(a){return new un({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},ub:function(){return a.ub()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Za:function(){return a.Za()},Zb:function(){return a.Zb()},bc:function(){return a.bc()},V:function(){return a.V()}},a.g.cmcd)}
625
+ function Ho(a){return new ql(a.i,{Vc:function(){return a.F?a.F.od():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},Za:function(){return a.Za()},X:a.C,Eb:a.G,onError:function(b){return ko(a,b)},onEvent:function(b){return a.dispatchEvent(b)},mi:function(){a.J&&a.J.update&&a.J.update()},lf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type,g=c.codecs.includes(",");if(f!=Ud){if(a.F){a.F.xg();var h=Rj(a.C,f);!a.V()&&a.h.paused&&null!=h&&0<h&&a.F.od()<h&&a.F.qe(h)}ap(a)}d=(new Map).set("start",
626
+ d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(fo("segmentappended",d));a.o&&c.fastSwitching&&b.hd&&b.Ld&&a.o.trySuggestStreams()},li:function(b,c){(c=c.gf)&&a.qb&&nl(a.qb,c,b)},Yf:function(b,c){var d=a.A;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){b=new Wg(Bb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,
627
+ e),e+=f.length;Uh(d,"cenc",c);d=d.l}}else d=Promise.resolve();return d},Yd:function(b,c,d){Co(a,b,c,d)},xd:function(b,c){return a.xd(b,c)}})}
628
+ r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=bm(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(rb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(rb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
627
629
  a.streaming&&"useNativeHlsOnSafari"in a.streaming&&rb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){rb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var c=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return c};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&
628
630
  a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==
629
631
  a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&
630
632
  (a.drm.retryParameters.baseDelay=100));var d=om(this.g,a,Xn(this));bp(this);return d};
631
- function bp(a){a.Id=new oi(a.g,a.ba,a.A);if(a.J){var b=He(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.A&&a.A.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=go&&qi(a.Id,a.i)&&yo(a)}catch(f){ko(a,f)}a.o&&zo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Ao(a)}a.G&&(a.G.Df(a.g.streaming.forceHTTP),a.G.Ef(a.g.streaming.forceHTTPS));if(a.F)if(a.F.configure(a.g.mediaSource),a.F.ha=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
632
- a.Kf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Kf=b;a.j&&(b=a.j,(c=b.i.get(Ud))&&Dl(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),Ro(a));a.L&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
633
- Vf(a.L,b,Math.min(.5,b/2)));a.i&&Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.B&&a.B.configure(a.g.ads);a.N&&a.N.configure(a.g.cmcd);a.aa&&a.aa.configure(a.g.cmsd)}q.getConfiguration=function(){var a=Xn(this);om(a,this.g,Xn(this));return a};q.Hh=function(){var a=Xn(this);om(a,this.g,Xn(this));return dm(this.g,Xn(this))};
634
- q.ig=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Ob().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.zi=function(){for(var a in this.g)delete this.g[a];om(this.g,Xn(this),Xn(this));bp(this)};q.Dh=function(){return this.l};q.Re=function(){return this.i?this.i.type:null};q.Gh=function(){return this.h};
635
- q.Zb=function(){return this.G};q.xc=function(){return this.$};q.hg=function(){return this.B?this.B:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.h&&this.h.src?Infinity==this.h.duration:!1};q.dc=function(){return this.i?this.i.presentationTimeline.dc():!1};q.Yh=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
636
- q.Ob=function(){if(this.i){if(!this.Ka&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Ab(),end:a.ub()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Vh=function(){this.U()&&(this.h.currentTime=this.Ob().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.A?this.A.g:null};q.Uc=function(){return this.A?this.A.Uc():Infinity};
637
- q.Pe=function(){return this.A?this.A.Pe():[]};q.zd=function(){return this.A?this.A.zd():{}};q.Xe=function(){return this.L?this.L.g==Uf:!1};q.Za=function(){return this.h?this.H?this.H.i:1:0};
638
- q.ld=function(a){var b=this;0==a?$a("A trick play rate of 0 is unsupported!"):(this.ya.nb(),this.h.paused&&this.h.play(),this.H.set(a),this.l==Io&&(this.o.playbackRateChanged(a),Cl(this.j,1<Math.abs(a))),this.U()&&this.ya.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Ob(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Kc():Math.floor(c)<=Math.floor(d.start+e)&&b.Kc()}))};
639
- q.Kc=function(){var a=this.H.Xb();this.l==Vo&&this.H.set(a);this.l==Io&&(this.H.set(a),this.o.playbackRateChanged(a),Cl(this.j,!1));this.ya.nb()};
640
- q.bc=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,rf(e)){var f=gf(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.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return qf(g)}):[]};
641
- q.yc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=hf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Xo(this).map(function(f){return of(f)}):[]};q.Ah=function(){var a=this.cd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return lf(b)})};
642
- q.th=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Io&&b.l!=Vo)return g.return(null);c=b.cd;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):E(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Ub(function(h){var k=cp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Tb;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.ng(a,h.startTime+l*m/k))}}),E(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
633
+ function bp(a){a.Id=new oi(a.g,a.ba,a.A);if(a.J){var b=He(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.A&&a.A.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=go&&qi(a.Id,a.i)&&yo(a)}catch(f){ko(a,f)}a.o&&zo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Ao(a)}a.G&&(a.G.Df(a.g.streaming.forceHTTP),a.G.Ef(a.g.streaming.forceHTTPS));if(a.C)if(a.C.configure(a.g.mediaSource),a.C.ga=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
634
+ a.Kf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.C,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Kf=b;a.j&&(b=a.j,(c=b.i.get(Ud))&&Dl(b,c.stream,!0,0,!0))}else b=a.C.F,b.configure&&b.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),Ro(a));a.L&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
635
+ Vf(a.L,b,Math.min(.5,b/2)));a.i&&Fo(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.B&&a.B.configure(a.g.ads);a.N&&a.N.configure(a.g.cmcd);a.aa&&a.aa.configure(a.g.cmsd)}r.getConfiguration=function(){var a=Xn(this);om(a,this.g,Xn(this));return a};r.Hh=function(){var a=Xn(this);om(a,this.g,Xn(this));return dm(this.g,Xn(this))};
636
+ r.ig=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Ob().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};r.zi=function(){for(var a in this.g)delete this.g[a];om(this.g,Xn(this),Xn(this));bp(this)};r.Dh=function(){return this.l};r.Re=function(){return this.i?this.i.type:null};r.Gh=function(){return this.h};
637
+ r.Zb=function(){return this.G};r.xc=function(){return this.$};r.hg=function(){return this.B?this.B:null};r.V=function(){return this.i?this.i.presentationTimeline.V():this.h&&this.h.src?Infinity==this.h.duration:!1};r.dc=function(){return this.i?this.i.presentationTimeline.dc():!1};r.Yh=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
638
+ r.Ob=function(){if(this.i){if(!this.Ka&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Bb(),end:a.vb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Vh=function(){this.V()&&(this.h.currentTime=this.Ob().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.A?this.A.g:null};r.Uc=function(){return this.A?this.A.Uc():Infinity};
639
+ r.Pe=function(){return this.A?this.A.Pe():[]};r.Bd=function(){return this.A?this.A.Bd():{}};r.Xe=function(){return this.L?this.L.g==Uf:!1};r.Za=function(){return this.h?this.H?this.H.i:1:0};
640
+ r.md=function(a){var b=this;0==a?$a("A trick play rate of 0 is unsupported!"):(this.Ba.nb(),this.h.paused&&this.h.play(),this.H.set(a),this.l==Io&&(this.o.playbackRateChanged(a),Cl(this.j,1<Math.abs(a))),this.V()&&this.Ba.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Ob(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Kc():Math.floor(c)<=Math.floor(d.start+e)&&b.Kc()}))};
641
+ r.Kc=function(){var a=this.H.Xb();this.l==Vo&&this.H.set(a);this.l==Io&&(this.H.set(a),this.o.playbackRateChanged(a),Cl(this.j,!1));this.Ba.nb()};
642
+ r.bc=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,rf(e)){var f=gf(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.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return qf(g)}):[]};
643
+ r.yc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=hf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Xo(this).map(function(f){return of(f)}):[]};r.Ah=function(){var a=this.dd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return lf(b)})};
644
+ r.th=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Io&&b.l!=Vo)return g.return(null);c=b.dd;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):E(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Ub(function(h){var k=cp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Tb;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.ng(a,h.startTime+l*m/k))}}),E(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
643
645
  function cp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Tb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
644
- q.ng=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z;return O(function(B){if(1==B.g){if(c.l!=Io&&c.l!=Vo)return B.return(null);d=c.cd;c.i&&(d=c.i.imageStreams);return(e=d.find(function(D){return D.id==a}))?e.segmentIndex?B.u(2):E(B,e.createSegmentIndex(),2):B.return(null)}f=e.segmentIndex.find(b);if(null==f)return B.return(null);g=e.segmentIndex.get(f);h=cp(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.Tb;n=l/h.rows;p=h.Tb*h.rows;r=g.j-g.startTime;
645
- u=g.A||r/p;v=g.startTime;A=w=0;1<p&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,w=y%h.Tb*m,A=Math.floor(y/h.Tb)*n);C=!1;if(z=g.s)C=!0,n=z.height,w=z.positionX,A=z.positionY,m=z.width;return B.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:A,startTime:v,duration:u,uris:g.M(),width:m,sprite:C})})};
646
- q.Ig=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&&(Xk(this.s.h,b,!1),Fl(this.j,b),dp(this),this.Ea=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=Xo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,mf(c)==a.id?c.mode=this.ea?"showing":"hidden":c.mode="disabled";dp(this)}};
647
- q.Af=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&rf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&$a("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Go(this,d,!1,b,c);this.xa=new If(d,
648
- this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);zo(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,mf(c)==a.id){ep(this,c);break}};q.vh=function(){return fp(this.bc())};q.Oh=function(){return fp(this.yc())};q.uh=function(){return Array.from(gp(this.bc()))};q.Nh=function(){return Array.from(gp(this.yc()))};
649
- q.Hg=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.xa=new Jf(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.xa.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
650
- b))c=f;c!=b&&(c?(a=gf(c),this.Af(a,!0,d)):Ao(this))}else this.h&&this.h.audioTracks&&(d=xf(this.bc(),a,b||"",!1)[0])&&this.Af(d)};q.zf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Ea=a,this.$c=b||"",this.Xc=c,(a=xf(this.i.textStreams,this.Ea,this.$c,this.Xc)[0]||null)&&a!=this.j.s&&(Xk(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.Ze()))Fl(this.j,a),dp(this)}else(a=xf(this.yc(),a,b||"",c)[0])&&this.Ig(a)};
651
- q.Fi=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.xa=new Jf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),Ao(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&ep(this,b)}};
652
- q.Ze=function(){var a=this.ea;return this.F&&this.l==Io?this.F.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?Xo(this).some(function(b){return"showing"==b.mode}):a};q.jg=function(){return this.h&&this.h.src&&this.h.textTracks?hp(this).map(function(a){return of(a)}):[]};
653
- q.wh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=ze(a),c=hp(this).filter(function(h){return ze(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
646
+ r.ng=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z;return O(function(B){if(1==B.g){if(c.l!=Io&&c.l!=Vo)return B.return(null);d=c.dd;c.i&&(d=c.i.imageStreams);return(e=d.find(function(D){return D.id==a}))?e.segmentIndex?B.u(2):E(B,e.createSegmentIndex(),2):B.return(null)}f=e.segmentIndex.find(b);if(null==f)return B.return(null);g=e.segmentIndex.get(f);h=cp(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.Tb;n=l/h.rows;p=h.Tb*h.rows;q=g.j-g.startTime;
647
+ u=g.A||q/p;v=g.startTime;A=w=0;1<p&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,w=y%h.Tb*m,A=Math.floor(y/h.Tb)*n);C=!1;if(z=g.s)C=!0,n=z.height,w=z.positionX,A=z.positionY,m=z.width;return B.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:A,startTime:v,duration:u,uris:g.M(),width:m,sprite:C})})};
648
+ r.Ig=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&&(Xk(this.s.h,b,!1),Fl(this.j,b),dp(this),this.Ea=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=Xo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,mf(c)==a.id?c.mode=this.ga?"showing":"hidden":c.mode="disabled";dp(this)}};
649
+ r.Af=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&rf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&$a("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Go(this,d,!1,b,c);this.ua=new If(d,
650
+ this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);zo(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,mf(c)==a.id){ep(this,c);break}};r.vh=function(){return fp(this.bc())};r.Oh=function(){return fp(this.yc())};r.uh=function(){return Array.from(gp(this.bc()))};r.Nh=function(){return Array.from(gp(this.yc()))};
651
+ r.Hg=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.F){this.ua=new Jf(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.ua.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
652
+ b))c=f;c!=b&&(c?(a=gf(c),this.Af(a,!0,d)):Ao(this))}else this.h&&this.h.audioTracks&&(d=xf(this.bc(),a,b||"",!1)[0])&&this.Af(d)};r.zf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Ea=a,this.ad=b||"",this.Yc=c,(a=xf(this.i.textStreams,this.Ea,this.ad,this.Yc)[0]||null)&&a!=this.j.s&&(Xk(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.Ze()))Fl(this.j,a),dp(this)}else(a=xf(this.yc(),a,b||"",c)[0])&&this.Ig(a)};
653
+ r.Fi=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.F){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.ua=new Jf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),Ao(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&ep(this,b)}};
654
+ r.Ze=function(){var a=this.ga;return this.C&&this.l==Io?this.C.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?Xo(this).some(function(b){return"showing"==b.mode}):a};r.jg=function(){return this.h&&this.h.src&&this.h.textTracks?hp(this).map(function(a){return of(a)}):[]};
655
+ r.wh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=ze(a),c=hp(this).filter(function(h){return ze(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
654
656
  function Xo(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function $o(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function hp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
655
- q.Og=function(a){a=!!a;if(this.ea!=a){this.ea=a;if(this.l==Io)this.F.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=xf(this.i.textStreams,this.Ea,this.$c,this.Xc),0<a.length&&(Fl(this.j,a[0]),dp(this))):Bl(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=Xo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Qo(this)}};
656
- q.Jh=function(){if(this.C)var a=this.C.nd();else{if(null==this.ha)return new Date;a=this.ha}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.B||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};q.mg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.B||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
657
- q.Dd=function(){return this.U()?this.i?this.i.presentationTimeline.Dd():null:null};q.sb=function(){if(this.l==Io)return this.F.sb();var a={total:[],audio:[],video:[],text:[]};this.l==Vo&&(a.total=Oi(this.h.buffered));return a};
658
- q.getStats=function(){if(this.l!=Io&&this.l!=Vo)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,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};Do(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&
659
- !this.U()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=this.C.Tf(),this.s.N=this.C.Uf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.J=d;this.s.H=Number(c.corruptedVideoFrames)}this.A?(c=this.A,c=c.J?c.J:NaN):c=NaN;this.s.s=c;if(this.l==Io){c=this.j.j;b=this.j.s;if(c){d=this.H?this.H.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=
660
- this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.mg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==Vo&&(c=this.s,c.Sb=isNaN(c.Sb)?NaN:c.Sb+NaN,c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.J;e=f.K;var g=f.H,h=f.N,k=f.L,l=f.A,m=f.i,n=f.m,p=f.F,r=f.j,u=Uk(f.g,"playing"),v=Uk(f.g,"paused"),
661
- w=Uk(f.g,"buffering"),A=f.s,y=f.C,C=f.G,z=f.Sb,B=Vk(f.g),D=[];f=t(f.h.g);for(var I=f.next();!I.done;I=f.next())I=I.value,D.push({timestamp:I.timestamp,id:I.id,type:I.type,fromAdaptation:I.fromAdaptation,bandwidth:I.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:r,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:A,liveLatency:y,
657
+ r.Og=function(a){a=!!a;if(this.ga!=a){this.ga=a;if(this.l==Io)this.C.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=xf(this.i.textStreams,this.Ea,this.ad,this.Yc),0<a.length&&(Fl(this.j,a[0]),dp(this))):Bl(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=Xo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Qo(this)}};
658
+ r.Jh=function(){if(this.F)var a=this.F.od();else{if(null==this.ha)return new Date;a=this.ha}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.B||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};r.mg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.B||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
659
+ r.Dd=function(){return this.V()?this.i?this.i.presentationTimeline.Dd():null:null};r.ub=function(){if(this.l==Io)return this.C.ub();var a={total:[],audio:[],video:[],text:[]};this.l==Vo&&(a.total=Oi(this.h.buffered));return a};
660
+ r.getStats=function(){if(this.l!=Io&&this.l!=Vo)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,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};Do(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&
661
+ !this.V()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.s.L=this.F.Tf(),this.s.N=this.F.Uf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.J=d;this.s.H=Number(c.corruptedVideoFrames)}this.A?(c=this.A,c=c.J?c.J:NaN):c=NaN;this.s.s=c;if(this.l==Io){c=this.j.j;b=this.j.s;if(c){d=this.H?this.H.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=
662
+ this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.mg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==Vo&&(c=this.s,c.Sb=isNaN(c.Sb)?NaN:c.Sb+NaN,c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.J;e=f.K;var g=f.H,h=f.N,k=f.L,l=f.A,m=f.i,n=f.m,p=f.F,q=f.j,u=Uk(f.g,"playing"),v=Uk(f.g,"paused"),
663
+ w=Uk(f.g,"buffering"),A=f.s,y=f.C,C=f.G,z=f.Sb,B=Vk(f.g),D=[];f=t(f.h.g);for(var I=f.next();!I.done;I=f.next())I=I.value,D.push({timestamp:I.timestamp,id:I.id,type:I.type,fromAdaptation:I.fromAdaptation,bandwidth:I.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:q,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:A,liveLatency:y,
662
664
  maxSegmentDuration:C,bytesDownloaded:z,stateHistory:B,switchHistory:D}};
663
- q.fh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:if(h.l!=Io&&h.l!=Vo)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&$a("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){z.u(2);break}return E(z,ip(h,a),3);case 3:d=z.h;case 2:k=[];h.B&&(k=h.B.getCuePoints());if(h.l!=Vo){z.u(4);break}g&&(c="forced");return E(z,jp(h,a,b,c,d,f||"",k),5);case 5:l=ze(b);m=h.yc();if(n=m.find(function(B){return ze(B.language)==
664
- l&&B.label==(f||"")&&B.kind==c}))return yo(h),z.return(n);throw new T(1,2,2012);case 4:p=Wd;r=h.h.duration;h.i&&(r=h.i.presentationTimeline.getDuration());if(Infinity==r)throw new T(1,4,4033);if(!k.length){z.u(6);break}return E(z,kp(h,a,h.G,h.g.streaming.retryParameters),7);case 7:u=z.h,v=lp(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=Kj(w),d="text/vtt";case 6:A={id:h.Of++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Nk(0,r,[a]),mimeType:d||"",
665
+ r.fh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:if(h.l!=Io&&h.l!=Vo)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&$a("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){z.u(2);break}return E(z,ip(h,a),3);case 3:d=z.h;case 2:k=[];h.B&&(k=h.B.getCuePoints());if(h.l!=Vo){z.u(4);break}g&&(c="forced");return E(z,jp(h,a,b,c,d,f||"",k),5);case 5:l=ze(b);m=h.yc();if(n=m.find(function(B){return ze(B.language)==
666
+ l&&B.label==(f||"")&&B.kind==c}))return yo(h),z.return(n);throw new T(1,2,2012);case 4:p=Wd;q=h.h.duration;h.i&&(q=h.i.presentationTimeline.getDuration());if(Infinity==q)throw new T(1,4,4033);if(!k.length){z.u(6);break}return E(z,kp(h,a,h.G,h.g.streaming.retryParameters),7);case 7:u=z.h,v=lp(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=Kj(w),d="text/vtt";case 6:A={id:h.Of++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Nk(0,q,[a]),mimeType:d||"",
665
667
  codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.qa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Yd(d||"",e||"")])};y=Yd(A.mimeType,A.codecs);C=ne(y);if(!C)throw new T(2,2,2014,d);h.i.textStreams.push(A);yo(h);return z.return(hf(A))}})};
666
- q.gh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:if(c.l!=Io&&c.l!=Vo)throw new T(1,7,7004);if(b){z.u(2);break}return E(z,ip(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Wd;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return E(z,kp(c,a,c.G,c.g.streaming.retryParameters),4);case 4:f=z.h;g=oe[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
667
- vttOffset:0};l=Bb(f);m=h.parseMedia(l,k,a);n=[];p=t(m);r=p.next();for(u={};!r.done;u={me:void 0,tc:void 0},r=p.next())u.tc=r.value,u.me=null,v=function(B){return function(){null==B.me&&(B.me=Od([a],[B.tc.payload]));return B.me||[]}}(u),w=new Gi(u.tc.startTime,u.tc.endTime,v,0,null,null,0,0,Infinity),u.tc.payload.includes("#xywh")&&(A=u.tc.payload.split("#xywh=")[1].split(","),4===A.length&&w.Pg({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
668
+ r.gh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:if(c.l!=Io&&c.l!=Vo)throw new T(1,7,7004);if(b){z.u(2);break}return E(z,ip(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Wd;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return E(z,kp(c,a,c.G,c.g.streaming.retryParameters),4);case 4:f=z.h;g=oe[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
669
+ vttOffset:0};l=Bb(f);m=h.parseMedia(l,k,a);n=[];p=t(m);q=p.next();for(u={};!q.done;u={me:void 0,tc:void 0},q=p.next())u.tc=q.value,u.me=null,v=function(B){return function(){null==B.me&&(B.me=Od([a],[B.tc.payload]));return B.me||[]}}(u),w=new Gi(u.tc.startTime,u.tc.endTime,v,0,null,null,0,0,Infinity),u.tc.payload.includes("#xywh")&&(A=u.tc.payload.split("#xywh=")[1].split(","),4===A.length&&w.Pg({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
668
670
  n.push(w);y=b;if(!n.length){z.u(5);break}return E(z,Jm(n[0].M()[0],c.G,c.g.manifest.retryParameters),6);case 6:y=z.h;case 5:return C={id:c.Of++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Lk(n),mimeType:y||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.pe,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
669
- closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Yd(y||"","")])},c.l==Vo?c.cd.push(C):c.i.imageStreams.push(C),yo(c),z.return(lf(C))}})};
670
- q.eh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=Io&&d.l!=Vo)throw new T(1,7,7004);if(c){k.u(2);break}return E(k,ip(d,a),3);case 3:c=k.h;case 2:return e=[],d.B&&(e=d.B.getCuePoints()),E(k,jp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.jg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return E(k,new Promise(function(l,m){d.m.sa(f,"load",l);d.m.sa(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return yo(d),k.return(h);case 5:throw new T(1,
671
- 2,2012);}})};function ip(a,b){var c;return O(function(d){switch(d.g){case 1:return wa(d,2),E(d,Jm(b,a.G,a.g.streaming.retryParameters),4);case 4:c=d.h;ya(d,3);break;case 2:Aa(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
672
- function jp(a,b,c,d,e,f,g){var h,k,l,m;return O(function(n){if(1==n.g)return"text/vtt"!=e||g.length?E(n,kp(a,b,a.G,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=lp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Kj(l),e="text/vtt");m=document.createElement("track");var p=a.N,r=b;try{if(p.g.enabled){var u=xn(p);u.ot=Kn;u.su=!0;var v=Bn(u);var w=Cn(r,v)}else w=r}catch(A){ab("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),w=r}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
671
+ closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Yd(y||"","")])},c.l==Vo?c.dd.push(C):c.i.imageStreams.push(C),yo(c),z.return(lf(C))}})};
672
+ r.eh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=Io&&d.l!=Vo)throw new T(1,7,7004);if(c){k.u(2);break}return E(k,ip(d,a),3);case 3:c=k.h;case 2:return e=[],d.B&&(e=d.B.getCuePoints()),E(k,jp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.jg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return E(k,new Promise(function(l,m){d.m.za(f,"load",l);d.m.za(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return yo(d),k.return(h);case 5:throw new T(1,
673
+ 2,2012);}})};function ip(a,b){var c;return O(function(d){switch(d.g){case 1:return wa(d,2),E(d,Jm(b,a.G,a.g.streaming.retryParameters),4);case 4:c=d.h;ya(d,3);break;case 2:za(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
674
+ function jp(a,b,c,d,e,f,g){var h,k,l,m;return O(function(n){if(1==n.g)return"text/vtt"!=e||g.length?E(n,kp(a,b,a.G,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=lp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Kj(l),e="text/vtt");m=document.createElement("track");var p=a.N,q=b;try{if(p.g.enabled){var u=xn(p);u.ot=Kn;u.su=!0;var v=Bn(u);var w=Cn(q,v)}else w=q}catch(A){ab("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),w=q}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
673
675
  a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function kp(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=wg;f=qg([b],d);f.method="GET";var k=a.N;try{k.g.enabled&&Dn(k,f,{ot:Kn,su:!0})}catch(l){ab("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return E(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
674
- function lp(a,b,c,d){var e=oe[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Bb(b),b=c.parseMedia(b,a,null),tn(b,d);throw new T(2,2,2014,c);}q.Ki=function(a,b){this.ba.width=a;this.ba.height=b};q.vf=function(a){if(this.l==Io){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Zc||d.Ia||d.pb||(d.Zc=!1,Al(b,d,a));b=!0}}else b=!1;return b};
675
- q.Qe=function(){$a("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.Eh=function(){return this.Fa};
676
- function Xn(a){var b=km();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.vf(d))}};b.textDisplayFactory=function(){if(a.Kd){var c=a.getConfiguration();return new kn(a.h,a.Kd,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new en(a.h,"Shaka Player TextTrack"):new gn};return b}q.Sg=function(a){this.Kd=a};
676
+ function lp(a,b,c,d){var e=oe[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Bb(b),b=c.parseMedia(b,a,null),tn(b,d);throw new T(2,2,2014,c);}r.Ki=function(a,b){this.ba.width=a;this.ba.height=b};r.vf=function(a){if(this.l==Io){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.$c||d.Ia||d.pb||(d.$c=!1,Al(b,d,a));b=!0}}else b=!1;return b};
677
+ r.Qe=function(){$a("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};r.Eh=function(){return this.Fa};
678
+ function Xn(a){var b=km();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.vf(d))}};b.textDisplayFactory=function(){if(a.Kd){var c=a.getConfiguration();return new kn(a.h,a.Kd,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new en(a.h,"Shaka Player TextTrack"):new gn};return b}r.Sg=function(a){this.Kd=a};
677
679
  function wo(a,b){for(var c=new Set,d=t(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=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(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 Ok,l=e.closedCaptions.get(g);h={id:a.Of++,originalId:g,groupId:null,
678
680
  createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Ud,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Yd(h,"")])};b.textStreams.push(h);c.add(g)}}
679
- function Oo(a,b){var c,d,e,f,g;return O(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return O(function(r){if(1==r.g)return k?E(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.zb(l))?m.next().value:null;if(!n)return r.return(null);p=n.startTime;return r.return(p)})},E(h,e(c,b),2);if(3!=h.g)return f=h.h,E(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)})}
680
- function mo(a){var b=a.Xe();if(a.s&&a.L&&a.C){var c=a.H;c.j=b;Qk(c);a.N&&(c=a.N,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Do(a)}b=(new Map).set("buffering",b);a.dispatchEvent(fo("buffering",b))}function Eo(a){var b=a.h.playbackRate;0!=b&&(a.H&&a.H.set(b),b=fo("ratechange"),a.dispatchEvent(b))}
681
+ function Oo(a,b){var c,d,e,f,g;return O(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return O(function(q){if(1==q.g)return k?E(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.Ab(l))?m.next().value:null;if(!n)return q.return(null);p=n.startTime;return q.return(p)})},E(h,e(c,b),2);if(3!=h.g)return f=h.h,E(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)})}
682
+ function mo(a){var b=a.Xe();if(a.s&&a.L&&a.F){var c=a.H;c.j=b;Qk(c);a.N&&(c=a.N,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Do(a)}b=(new Map).set("buffering",b);a.dispatchEvent(fo("buffering",b))}function Eo(a){var b=a.h.playbackRate;0!=b&&(a.H&&a.H.set(b),b=fo("ratechange"),a.dispatchEvent(b))}
681
683
  function Do(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Uf?c="buffering":a.h.ended?c="ended":a.h.paused&&(c="paused");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(fo("statechanged",c)))}}
682
- function So(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.ig();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.ld(d):1==e&&b!==a.H.Xb()&&a.Kc()}if(c&&(e=a.Ob(),Number.isFinite(e.end)&&!(a.h.currentTime<e.start))){if(a.g.streaming.liveSync){var f=a.g.streaming.liveSyncMaxLatency;var g=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.g.streaming.liveSyncMaxLatency,null!=a.i.serviceDescription.targetLatency?
684
+ function So(a){var b=a.h.playbackRate,c=a.V();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.ig();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.md(d):1==e&&b!==a.H.Xb()&&a.Kc()}if(c&&(e=a.Ob(),Number.isFinite(e.end)&&!(a.h.currentTime<e.start))){if(a.g.streaming.liveSync){var f=a.g.streaming.liveSyncMaxLatency;var g=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.g.streaming.liveSyncMaxLatency,null!=a.i.serviceDescription.targetLatency?
683
685
  f=a.i.serviceDescription.targetLatency+a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.maxLatency&&(f=a.i.serviceDescription.maxLatency),g=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSyncPlaybackRate);if(a.g.streaming.liveSync){var h=a.g.streaming.liveSyncMinLatency;var k=a.g.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.g.streaming.liveSyncMinLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency-
684
- a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.minLatency&&(h=a.i.serviceDescription.minLatency),k=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSyncMinPlaybackRate);c=e.end-a.h.currentTime;d=0;if(a.l==Vo){var l=a.h.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.g.streaming.liveSyncPanicMode;l=1E3*a.g.streaming.liveSyncPanicThreshold;var m=Date.now()-a.L.h;e&&!k&&(k=a.g.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.ld(k):f&&g&&c-
685
- d>f?b!=g&&a.ld(g):h&&k&&c-d<h?b!=k&&a.ld(k):b!==a.H.Xb()&&a.Kc()}}function To(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.P)?(a.P=c,b=!0):(c=Math.max(a.P,c),a.P!=c&&(a.P=c,b=!0)));if(b){var d;0==a.P?d=fo("started"):25==a.P?d=fo("firstquartile"):50==a.P?d=fo("midpoint"):75==a.P?d=fo("thirdquartile"):100==a.P&&(d=fo("complete"));d&&a.dispatchEvent(d)}}}
686
- function zo(a){try{si(a.Id,a.i)}catch(c){return ko(a,c),!1}var b=wf(a.i.variants);b=a.xa.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Ko(a,b){b=void 0===b?!1:b;return zo(a)?a.o.chooseVariant(b):null}
686
+ a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.minLatency&&(h=a.i.serviceDescription.minLatency),k=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSyncMinPlaybackRate);c=e.end-a.h.currentTime;d=0;if(a.l==Vo){var l=a.h.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.g.streaming.liveSyncPanicMode;l=1E3*a.g.streaming.liveSyncPanicThreshold;var m=Date.now()-a.L.h;e&&!k&&(k=a.g.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.md(k):f&&g&&c-
687
+ d>f?b!=g&&a.md(g):h&&k&&c-d<h?b!=k&&a.md(k):b!==a.H.Xb()&&a.Kc()}}function To(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.P)?(a.P=c,b=!0):(c=Math.max(a.P,c),a.P!=c&&(a.P=c,b=!0)));if(b){var d;0==a.P?d=fo("started"):25==a.P?d=fo("firstquartile"):50==a.P?d=fo("midpoint"):75==a.P?d=fo("thirdquartile"):100==a.P&&(d=fo("complete"));d&&a.dispatchEvent(d)}}}
688
+ function zo(a){try{si(a.Id,a.i)}catch(c){return ko(a,c),!1}var b=wf(a.i.variants);b=a.ua.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Ko(a,b){b=void 0===b?!1:b;return zo(a)?a.o.chooseVariant(b):null}
687
689
  function bo(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,fb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.Td.stop();d&&Ao(a,!1,void 0,!1,!1)}
688
- function Ao(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=Ko(a);f&&Go(a,f,e,b,c,d)}function Go(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&El(a.j,b,d,e,!0);else{var h=a.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));El(a.j,b,d,e,f,c);d=null;g&&(d=gf(g));b=gf(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&Gj(a.K,b,a.Re()),c=fo("adaptation",c),mp(a,c)):np(a,d,b)}}
690
+ function Ao(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=Ko(a);f&&Go(a,f,e,b,c,d)}
691
+ function Go(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&El(a.j,b,d,e,!0);else{var h=a.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));El(a.j,b,d,e,f,c);d=null;g&&(d=gf(g));b=gf(b);b.active=!0;c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&Gj(a.K,b,a.Re()),c=fo("adaptation",c),mp(a,c)):np(a,d,b)}}
689
692
  function ep(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=qf(c),b=qf(b),np(a,c,b))}function Po(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=ze(a.g.preferredTextLanguage);c=ze(c.language);if(2==a.g.autoShowText)return ye(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=ze(b.language);return ye(c,d)&&!ye(a,c)}$a("Invalid autoShowText setting!");return!1}
690
693
  function yo(a){var b=fo("trackschanged");mp(a,b)}function np(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&Gj(a.K,c,a.Re());c=fo("variantchanged",b);mp(a,c)}function dp(a){var b=fo("textchanged");mp(a,b)}function Qo(a){var b=fo("texttrackvisibility");mp(a,b)}function Ro(a){a.g.abr.enabled||ao(a);var b=(new Map).set("newStatus",a.g.abr.enabled);mp(a,fo("abrstatuschanged",b))}
691
694
  function ao(a,b){b=void 0===b?!0:b;if(a.l==Io){a.Td.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&zo(a)}}
692
- q.wd=function(a,b){if(!this.g.abr.enabled||this.l===go||!navigator.onLine||0==b)return!1;if(this.i.variants.some(function(h){return(h=h[a.type])&&h.id!==a.id?"audio"==a.type?a.language===h.language:!0:!1})){for(var c=!1,d=!1,e=t(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.Td.Va(1);b=this.sb().video.reduce(function(h,k){return h+k.end-
693
- k.start},0);Ao(this,!1,b,!0,!1);return!0}return!1};function ko(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==go)return f.return();c=!0;if(!(a.Ka&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}wa(f,3);return E(f,Zl(a.j),5);case 5:d=f.h;c=!d;ya(f,2);break;case 3:Aa(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&ao(a,!1);e=fo("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);H(f)}})}
695
+ r.xd=function(a,b){if(!this.g.abr.enabled||this.l===go||!navigator.onLine||0==b)return!1;if(this.i.variants.some(function(h){return(h=h[a.type])&&h.id!==a.id?"audio"==a.type?a.language===h.language:!0:!1})){for(var c=!1,d=!1,e=t(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.Td.Va(1);b=this.ub().video.reduce(function(h,k){return h+k.end-
696
+ k.start},0);Ao(this,!1,b,!0,!1);return!0}return!1};function ko(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==go)return f.return();c=!0;if(!(a.Ka&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}wa(f,3);return E(f,Zl(a.j),5);case 5:d=f.h;c=!d;ya(f,2);break;case 3:za(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&ao(a,!1);e=fo("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);H(f)}})}
694
697
  function xo(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(fo(b,a))}function jo(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new T(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new T(2,3,3016,c,b,a.h.error.message)}
695
- function Fo(a,b,c){0<b&&(a.U()||a.Rg(b));b=a.getDuration();c<b&&(a.U()||a.Ua(c))}function mp(a,b){O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);a.l!=go&&a.dispatchEvent(b);H(c)})}function gp(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(ze(c.language)):b.add("und");return b}
698
+ function Fo(a,b,c){0<b&&(a.V()||a.Rg(b));b=a.getDuration();c<b&&(a.V()||a.Ua(c))}function mp(a,b){O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);a.l!=go&&a.dispatchEvent(b);H(c)})}function gp(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(ze(c.language)):b.add("und");return b}
696
699
  function fp(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=ze(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(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=t(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));
697
700
  h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Sg;X.prototype.getManifestParserFactory=X.prototype.Eh;X.prototype.getManifest=X.prototype.Qe;X.prototype.retryStreaming=X.prototype.vf;X.prototype.setMaxHardwareResolution=X.prototype.Ki;X.prototype.addChaptersTrack=X.prototype.eh;X.prototype.addThumbnailsTrack=X.prototype.gh;X.prototype.addTextTrackAsync=X.prototype.fh;X.prototype.getStats=X.prototype.getStats;
698
- X.prototype.getBufferedInfo=X.prototype.sb;X.prototype.getSegmentAvailabilityDuration=X.prototype.Dd;X.prototype.getPresentationStartTimeAsDate=X.prototype.mg;X.prototype.getPlayheadTimeAsDate=X.prototype.Jh;X.prototype.setTextTrackVisibility=X.prototype.Og;X.prototype.getChapters=X.prototype.wh;X.prototype.getChaptersTracks=X.prototype.jg;X.prototype.isTextTrackVisible=X.prototype.Ze;X.prototype.selectVariantsByLabel=X.prototype.Fi;X.prototype.selectTextLanguage=X.prototype.zf;
701
+ X.prototype.getBufferedInfo=X.prototype.ub;X.prototype.getSegmentAvailabilityDuration=X.prototype.Dd;X.prototype.getPresentationStartTimeAsDate=X.prototype.mg;X.prototype.getPlayheadTimeAsDate=X.prototype.Jh;X.prototype.setTextTrackVisibility=X.prototype.Og;X.prototype.getChapters=X.prototype.wh;X.prototype.getChaptersTracks=X.prototype.jg;X.prototype.isTextTrackVisible=X.prototype.Ze;X.prototype.selectVariantsByLabel=X.prototype.Fi;X.prototype.selectTextLanguage=X.prototype.zf;
699
702
  X.prototype.selectAudioLanguage=X.prototype.Hg;X.prototype.getTextLanguages=X.prototype.Nh;X.prototype.getAudioLanguages=X.prototype.uh;X.prototype.getTextLanguagesAndRoles=X.prototype.Oh;X.prototype.getAudioLanguagesAndRoles=X.prototype.vh;X.prototype.selectVariantTrack=X.prototype.Af;X.prototype.selectTextTrack=X.prototype.Ig;X.prototype.getThumbnails=X.prototype.ng;X.prototype.getAllThumbnails=X.prototype.th;X.prototype.getImageTracks=X.prototype.Ah;X.prototype.getTextTracks=X.prototype.yc;
700
- X.prototype.getVariantTracks=X.prototype.bc;X.prototype.cancelTrickPlay=X.prototype.Kc;X.prototype.trickPlay=X.prototype.ld;X.prototype.getPlaybackRate=X.prototype.Za;X.prototype.isBuffering=X.prototype.Xe;X.prototype.getKeyStatuses=X.prototype.zd;X.prototype.getActiveSessionsMetadata=X.prototype.Pe;X.prototype.getExpiration=X.prototype.Uc;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Vh;X.prototype.seekRange=X.prototype.Ob;
701
- X.prototype.isAudioOnly=X.prototype.Yh;X.prototype.isInProgress=X.prototype.dc;X.prototype.isLive=X.prototype.U;X.prototype.getAdManager=X.prototype.hg;X.prototype.getAssetUri=X.prototype.xc;X.prototype.getNetworkingEngine=X.prototype.Zb;X.prototype.getMediaElement=X.prototype.Gh;X.prototype.getManifestType=X.prototype.Re;X.prototype.getLoadMode=X.prototype.Dh;X.prototype.resetConfiguration=X.prototype.zi;X.prototype.getBufferFullness=X.prototype.ig;X.prototype.getNonDefaultConfiguration=X.prototype.Hh;
703
+ X.prototype.getVariantTracks=X.prototype.bc;X.prototype.cancelTrickPlay=X.prototype.Kc;X.prototype.trickPlay=X.prototype.md;X.prototype.getPlaybackRate=X.prototype.Za;X.prototype.isBuffering=X.prototype.Xe;X.prototype.getKeyStatuses=X.prototype.Bd;X.prototype.getActiveSessionsMetadata=X.prototype.Pe;X.prototype.getExpiration=X.prototype.Uc;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Vh;X.prototype.seekRange=X.prototype.Ob;
704
+ X.prototype.isAudioOnly=X.prototype.Yh;X.prototype.isInProgress=X.prototype.dc;X.prototype.isLive=X.prototype.V;X.prototype.getAdManager=X.prototype.hg;X.prototype.getAssetUri=X.prototype.xc;X.prototype.getNetworkingEngine=X.prototype.Zb;X.prototype.getMediaElement=X.prototype.Gh;X.prototype.getManifestType=X.prototype.Re;X.prototype.getLoadMode=X.prototype.Dh;X.prototype.resetConfiguration=X.prototype.zi;X.prototype.getBufferFullness=X.prototype.ig;X.prototype.getNonDefaultConfiguration=X.prototype.Hh;
702
705
  X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.vi;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.dg;X.prototype.unloadAndSavePreload=X.prototype.Ni;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Ri;X.prototype.unload=X.prototype.mc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.kh;X.prototype.attach=X.prototype.qc;
703
706
  X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return E(k,li(),3);case 3:b=k.h;case 2:var l={};if(Tc())for(var m in wi)l[m]=!0;m=t(["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,l[n]=Tc()?!!wi[n]:Uc(n);c=l;m='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",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",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(x(Zd));
704
- l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=ne(n)?!0:Tc()?nb(n)||(mc(n)?!0:!1):Uc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,vd(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=op;for(h in g)f[h]=g[h]();return k.return(f)}})};
707
+ l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=ne(n)?!0:Tc()?nb(n)||(mc(n)?!0:!1):Uc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return E(k,ud(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=op;for(h in g)f[h]=g[h]();return k.return(f)}})};
705
708
  X.isBrowserSupported=function(){window.Promise||$a("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Yc("Trident/"))return!1;var a=kd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Tc()?!0:Uc("application/x-mpegurl")};X.setAdManagerFactory=function(a){$n=a};
706
- X.registerSupportPlugin=function(a,b){op[a]=b};X.prototype.destroy=X.prototype.destroy;var go=0,Wn=1,Io=2,Vo=3;X.LoadMode={DESTROYED:go,NOT_LOADED:Wn,MEDIA_SOURCE:Io,SRC_EQUALS:Vo};X.version="v4.9.28";var pp=["4","9"];sb=new function(a){this.g=a;this.i=tb;this.h=ub}(new qb(Number(pp[0]),Number(pp[1])));var op={},$n=null;function qp(){this.h=[];this.j=this.i=this.g=0};function rp(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new hb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=rp.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
707
- q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
708
- q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
709
- q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
710
- q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",rp);rp.prototype.release=rp.prototype.release;
709
+ X.registerSupportPlugin=function(a,b){op[a]=b};X.prototype.destroy=X.prototype.destroy;var go=0,Wn=1,Io=2,Vo=3;X.LoadMode={DESTROYED:go,NOT_LOADED:Wn,MEDIA_SOURCE:Io,SRC_EQUALS:Vo};X.version="v4.9.30";var pp=["4","9"];sb=new function(a){this.g=a;this.i=tb;this.h=ub}(new qb(Number(pp[0]),Number(pp[1])));var op={},$n=null;function qp(){this.h=[];this.j=this.i=this.g=0};function rp(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new hb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=rp.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
710
+ r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
711
+ r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
712
+ r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
713
+ r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",rp);rp.prototype.release=rp.prototype.release;
711
714
  rp.prototype.getPodIndex=rp.prototype.getPodIndex;rp.prototype.getTimeOffset=rp.prototype.getTimeOffset;rp.prototype.getMediaUrl=rp.prototype.getMediaUrl;rp.prototype.getAdvertiserName=rp.prototype.getAdvertiserName;rp.prototype.getCreativeAdId=rp.prototype.getCreativeAdId;rp.prototype.getAdId=rp.prototype.getAdId;rp.prototype.getVastMediaWidth=rp.prototype.getVastMediaWidth;rp.prototype.getVastMediaHeight=rp.prototype.getVastMediaHeight;rp.prototype.getVastMediaBitrate=rp.prototype.getVastMediaBitrate;
712
715
  rp.prototype.getDescription=rp.prototype.getDescription;rp.prototype.getTitle=rp.prototype.getTitle;rp.prototype.getPositionInSequence=rp.prototype.getPositionInSequence;rp.prototype.getSequenceLength=rp.prototype.getSequenceLength;rp.prototype.setMuted=rp.prototype.setMuted;rp.prototype.resize=rp.prototype.resize;rp.prototype.isLinear=rp.prototype.isLinear;rp.prototype.isMuted=rp.prototype.isMuted;rp.prototype.setVolume=rp.prototype.setVolume;rp.prototype.getVolume=rp.prototype.getVolume;
713
- rp.prototype.play=rp.prototype.play;rp.prototype.pause=rp.prototype.pause;rp.prototype.skip=rp.prototype.skip;rp.prototype.canSkipNow=rp.prototype.canSkipNow;rp.prototype.getTimeUntilSkippable=rp.prototype.getTimeUntilSkippable;rp.prototype.isSkippable=rp.prototype.isSkippable;rp.prototype.isPaused=rp.prototype.isPaused;rp.prototype.getRemainingTime=rp.prototype.getRemainingTime;rp.prototype.getMinSuggestedDuration=rp.prototype.getMinSuggestedDuration;rp.prototype.getDuration=rp.prototype.getDuration;function sp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new hb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.28");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
714
- google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){tp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){up(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.sa(this.i,"play",function(){f.F=!0})}sp.prototype.configure=function(a){this.s=a};sp.prototype.stop=function(){this.g&&this.g.stop();this.o&&jn(this.o)};
716
+ rp.prototype.play=rp.prototype.play;rp.prototype.pause=rp.prototype.pause;rp.prototype.skip=rp.prototype.skip;rp.prototype.canSkipNow=rp.prototype.canSkipNow;rp.prototype.getTimeUntilSkippable=rp.prototype.getTimeUntilSkippable;rp.prototype.isSkippable=rp.prototype.isSkippable;rp.prototype.isPaused=rp.prototype.isPaused;rp.prototype.getRemainingTime=rp.prototype.getRemainingTime;rp.prototype.getMinSuggestedDuration=rp.prototype.getMinSuggestedDuration;rp.prototype.getDuration=rp.prototype.getDuration;function sp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new hb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.30");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
717
+ google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){tp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){up(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.za(this.i,"play",function(){f.F=!0})}sp.prototype.configure=function(a){this.s=a};sp.prototype.stop=function(){this.g&&this.g.stop();this.o&&jn(this.o)};
715
718
  sp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.C.destroy()};function up(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new U("ad-error",b));vp(a,null);a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
716
719
  function tp(a,b){a.m(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.m(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
717
720
  a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}wp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,xp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,xp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
718
- a.i.offsetHeight,xp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,xp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.s.skipPlayDetection?a.g.start():a.h.sa(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){vp(a,null)}}
721
+ a.i.offsetHeight,xp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,xp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.s.skipPlayDetection?a.g.start():a.h.za(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){vp(a,null)}}
719
722
  function xp(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
720
723
  function wp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new U(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){up(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){yp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){yp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
721
724
  function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){vp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){vp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
@@ -723,49 +726,49 @@ a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paus
723
726
  a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
724
727
  google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
725
728
  function yp(a,b){var c=b.getAd();c?(a.j=new rp(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new U("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):$a("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
726
- function vp(a,b){a.m(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function zp(a){this.h=a||"";this.g=0}function Ap(a){Bp(a,/[ \t]+/gm)}function Bp(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 Cp(a){return a.g==a.h.length?null:(a=Bp(a,/[^ \t\n]*/gm))?a[0]:null};function Dp(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=Bp(new zp(a),Ep),null==a)a=null;else{var f=Number(a[2]),g=Number(a[3]);a=59<f||59<g?null:(Number(a[4])||0)/1E3+g+60*f+3600*(Number(a[1])||0)}else a=null;this.j=a;this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}q=Dp.prototype;q.getDuration=function(){return this.h.durationInSeconds};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
727
- q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return"number"==typeof this.j?!0:!1};q.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};
728
- 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 this.o};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.l?this.l:1};q.getPositionInSequence=function(){return this.i?this.i:1};q.getTitle=function(){return this.h.adTitle};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};
729
- q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return this.h.adId};q.getCreativeAdId=function(){return this.h.creativeId};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",Dp);Dp.prototype.release=Dp.prototype.release;Dp.prototype.getPodIndex=Dp.prototype.getPodIndex;Dp.prototype.getTimeOffset=Dp.prototype.getTimeOffset;
729
+ function vp(a,b){a.m(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function zp(a){this.h=a||"";this.g=0}function Ap(a){Bp(a,/[ \t]+/gm)}function Bp(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 Cp(a){return a.g==a.h.length?null:(a=Bp(a,/[^ \t\n]*/gm))?a[0]:null};function Dp(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=Bp(new zp(a),Ep),null==a)a=null;else{var f=Number(a[2]),g=Number(a[3]);a=59<f||59<g?null:(Number(a[4])||0)/1E3+g+60*f+3600*(Number(a[1])||0)}else a=null;this.j=a;this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}r=Dp.prototype;r.getDuration=function(){return this.h.durationInSeconds};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
730
+ r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return"number"==typeof this.j?!0:!1};r.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};
731
+ r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.isLinear=function(){return this.o};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){return this.l?this.l:1};r.getPositionInSequence=function(){return this.i?this.i:1};r.getTitle=function(){return this.h.adTitle};r.getDescription=function(){return""};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return 0};
732
+ r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.h.adId};r.getCreativeAdId=function(){return this.h.creativeId};r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",Dp);Dp.prototype.release=Dp.prototype.release;Dp.prototype.getPodIndex=Dp.prototype.getPodIndex;Dp.prototype.getTimeOffset=Dp.prototype.getTimeOffset;
730
733
  Dp.prototype.getMediaUrl=Dp.prototype.getMediaUrl;Dp.prototype.getAdvertiserName=Dp.prototype.getAdvertiserName;Dp.prototype.getCreativeAdId=Dp.prototype.getCreativeAdId;Dp.prototype.getAdId=Dp.prototype.getAdId;Dp.prototype.getVastMediaWidth=Dp.prototype.getVastMediaWidth;Dp.prototype.getVastMediaHeight=Dp.prototype.getVastMediaHeight;Dp.prototype.getVastMediaBitrate=Dp.prototype.getVastMediaBitrate;Dp.prototype.getDescription=Dp.prototype.getDescription;Dp.prototype.getTitle=Dp.prototype.getTitle;
731
734
  Dp.prototype.getPositionInSequence=Dp.prototype.getPositionInSequence;Dp.prototype.getSequenceLength=Dp.prototype.getSequenceLength;Dp.prototype.setMuted=Dp.prototype.setMuted;Dp.prototype.resize=Dp.prototype.resize;Dp.prototype.isLinear=Dp.prototype.isLinear;Dp.prototype.isMuted=Dp.prototype.isMuted;Dp.prototype.setVolume=Dp.prototype.setVolume;Dp.prototype.getVolume=Dp.prototype.getVolume;Dp.prototype.play=Dp.prototype.play;Dp.prototype.pause=Dp.prototype.pause;Dp.prototype.skip=Dp.prototype.skip;
732
- Dp.prototype.canSkipNow=Dp.prototype.canSkipNow;Dp.prototype.getTimeUntilSkippable=Dp.prototype.getTimeUntilSkippable;Dp.prototype.isSkippable=Dp.prototype.isSkippable;Dp.prototype.isPaused=Dp.prototype.isPaused;Dp.prototype.getRemainingTime=Dp.prototype.getRemainingTime;Dp.prototype.getMinSuggestedDuration=Dp.prototype.getMinSuggestedDuration;Dp.prototype.getDuration=Dp.prototype.getDuration;var Ep=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Fp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.W=NaN;this.i=d;this.J=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.P=!0;this.H="";this.o=new hb}Fp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Hb(b.target,b.type,b.listener);Gp(this);this.m=[];this.s=[];this.G="";this.P=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
735
+ Dp.prototype.canSkipNow=Dp.prototype.canSkipNow;Dp.prototype.getTimeUntilSkippable=Dp.prototype.getTimeUntilSkippable;Dp.prototype.isSkippable=Dp.prototype.isSkippable;Dp.prototype.isPaused=Dp.prototype.isPaused;Dp.prototype.getRemainingTime=Dp.prototype.getRemainingTime;Dp.prototype.getMinSuggestedDuration=Dp.prototype.getMinSuggestedDuration;Dp.prototype.getDuration=Dp.prototype.getDuration;var Ep=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Fp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.U=NaN;this.i=d;this.J=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.P=!0;this.H="";this.o=new hb}Fp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Ib(b.target,b.type,b.listener);Gp(this);this.m=[];this.s=[];this.G="";this.P=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
733
736
  Fp.prototype.release=function(){this.stop();this.o&&this.o.release()};Fp.prototype.onManifestUpdated=function(a){this.J=a;""!=this.G&&(Hp(this,this.G,this.P),this.P=!1)};Fp.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
734
- function Ip(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;O(function(u){if(1==u.g)return d=qg([b],Xf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Bd(e)),f=a.K.request(7,d),wa(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=xd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new sc(b),m=new sc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.W,a.i(new U("ads-loaded",(new Map).set("loadTime",p))),r=new sc(k.manifestUrl),a.l.resolve(l.resolve(r).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
735
- return ya(u,0)}Aa(u);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.H);a.l=null;H(u)})}
736
- function Hp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A;O(function(y){if(1==y.g)return d=qg([b],Xf()),e=a.K.request(7,d),wa(y,2),E(y,e.promise,4);if(2!=y.g){f=y.h;g=[];h=xd(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=t(n.nonLinearAdsList),r=p.next();!r.done;r=p.next())for(u=r.value,v=t(u.nonLinearAdList),w=v.next();!w.done;w=v.next())A=w.value,Jp(a,A);g=a.getCuePoints();a.i(new U("ad-cue-points-changed",
737
- (new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),Gp(a),a.j=[];c&&(a.J||0<g.length)&&Kp(a);return ya(y,0)}Aa(y);H(y)})}
738
- function Jp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=Lp(b);if(d=a.F.get(c))return m.return();e=qg([b.staticResource],Xf());f=a.K.request(7,e);wa(m,2);a.F.set(c,[]);return E(m,f.promise,4)}if(2!=m.g)return g=m.h,h=xd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),ya(m,0);Aa(m);a.F.delete(c);H(m)})}
737
+ function Ip(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;O(function(u){if(1==u.g)return d=qg([b],Xf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Bd(e)),f=a.K.request(7,d),wa(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=xd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new sc(b),m=new sc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,p=n-a.U,a.i(new U("ads-loaded",(new Map).set("loadTime",p))),q=new sc(k.manifestUrl),a.l.resolve(l.resolve(q).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
738
+ return ya(u,0)}za(u);if(!a.H.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.H);a.l=null;H(u)})}
739
+ function Hp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A;O(function(y){if(1==y.g)return d=qg([b],Xf()),e=a.K.request(7,d),wa(y,2),E(y,e.promise,4);if(2!=y.g){f=y.h;g=[];h=xd(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=t(n.nonLinearAdsList),q=p.next();!q.done;q=p.next())for(u=q.value,v=t(u.nonLinearAdList),w=v.next();!w.done;w=v.next())A=w.value,Jp(a,A);g=a.getCuePoints();a.i(new U("ad-cue-points-changed",
740
+ (new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),Gp(a),a.j=[];c&&(a.J||0<g.length)&&Kp(a);return ya(y,0)}za(y);H(y)})}
741
+ function Jp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=Lp(b);if(d=a.F.get(c))return m.return();e=qg([b.staticResource],Xf());f=a.K.request(7,e);wa(m,2);a.F.set(c,[]);return E(m,f.promise,4)}if(2!=m.g)return g=m.h,h=xd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),ya(m,0);za(m);a.F.delete(c);H(m)})}
739
742
  function Lp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function Kp(a){Mp(a);a.J||(Np(a),a.o.D(a.h,"seeked",function(){Np(a)}),a.o.D(a.h,"ended",function(){Gp(a)}));a.o.D(a.h,"timeupdate",function(){Mp(a)})}
740
743
  function Np(a){var b=a.h.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}}
741
744
  function Mp(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),Op(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),Op(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),Op(a,"thirdQuartile"));d=a.g.getRemainingTime();
742
745
  e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&Op(a,"skipStateChanged");0<e&&(0>=d||d>e)&&Gp(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}Gp(a);a.L=e;a.g=new Dp(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&Op(a,"breakStart");Pp(a);break}}}if(!a.g)for(d=
743
746
  t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(Lp(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Gp(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||
744
747
  0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.g=new Dp(g,f+1,e.ads.length,!1,a.h);a.C=g;0===f&&Op(a,"breakStart");Pp(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
745
- function Gp(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.J||a.N.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?Op(a,"skip"):Op(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.Hb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&Op(a,"breakEnd");a.g=null;a.C=null;a.L=null}}
748
+ function Gp(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.J||a.N.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?Op(a,"skip"):Op(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.Ib(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&Op(a,"breakEnd");a.g=null;a.C=null;a.L=null}}
746
749
  function Pp(a){var b=!1;a.h.paused?b=!0:(Op(a,"impression"),Op(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&Op(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||Op(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(Op(a,"impression"),Op(a,"start"),b=!1):Op(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){Op(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
747
750
  d.type,d.listener)}
748
751
  function Op(a,b){var c=a.C.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=qg([d],Xf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new U("ad-impression"));break;case "start":a.i(new U("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new U("ad-muted"));break;case "unmute":a.i(new U("ad-volume-changed"));break;
749
752
  case "resume":a.i(new U("ad-resumed"));break;case "pause":a.i(new U("ad-paused"));break;case "firstQuartile":a.i(new U("ad-first-quartile"));break;case "midpoint":a.i(new U("ad-midpoint"));break;case "thirdQuartile":a.i(new U("ad-third-quartile"));break;case "complete":a.i(new U("ad-complete"));a.i(new U("ad-stopped"));break;case "skip":a.i(new U("ad-skipped"));a.i(new U("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active");
750
- break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function Qp(a,b){this.g=a;this.i=null;this.h=b}q=Qp.prototype;q.getDuration=function(){return this.i?this.i.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};q.isPaused=function(){return this.h.paused};q.isSkippable=function(){return this.g.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
751
- q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.h.currentTime+=this.getRemainingTime()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.play()};q.getVolume=function(){return this.h.volume};q.setVolume=function(a){this.h.volume=a};q.isMuted=function(){return this.h.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.h.muted=a};
752
- q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};q.getAdId=function(){return this.g.getAdId()};
753
- q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",Qp);Qp.prototype.release=Qp.prototype.release;Qp.prototype.getPodIndex=Qp.prototype.getPodIndex;
753
+ break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function Qp(a,b){this.g=a;this.i=null;this.h=b}r=Qp.prototype;r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
754
+ r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.h.currentTime+=this.getRemainingTime()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.play()};r.getVolume=function(){return this.h.volume};r.setVolume=function(a){this.h.volume=a};r.isMuted=function(){return this.h.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.h.muted=a};
755
+ r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};r.getAdId=function(){return this.g.getAdId()};
756
+ r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",Qp);Qp.prototype.release=Qp.prototype.release;Qp.prototype.getPodIndex=Qp.prototype.getPodIndex;
754
757
  Qp.prototype.getTimeOffset=Qp.prototype.getTimeOffset;Qp.prototype.getMediaUrl=Qp.prototype.getMediaUrl;Qp.prototype.getAdvertiserName=Qp.prototype.getAdvertiserName;Qp.prototype.getCreativeAdId=Qp.prototype.getCreativeAdId;Qp.prototype.getAdId=Qp.prototype.getAdId;Qp.prototype.getVastMediaWidth=Qp.prototype.getVastMediaWidth;Qp.prototype.getVastMediaHeight=Qp.prototype.getVastMediaHeight;Qp.prototype.getVastMediaBitrate=Qp.prototype.getVastMediaBitrate;Qp.prototype.getDescription=Qp.prototype.getDescription;
755
758
  Qp.prototype.getTitle=Qp.prototype.getTitle;Qp.prototype.getPositionInSequence=Qp.prototype.getPositionInSequence;Qp.prototype.getSequenceLength=Qp.prototype.getSequenceLength;Qp.prototype.setMuted=Qp.prototype.setMuted;Qp.prototype.resize=Qp.prototype.resize;Qp.prototype.isLinear=Qp.prototype.isLinear;Qp.prototype.isMuted=Qp.prototype.isMuted;Qp.prototype.setVolume=Qp.prototype.setVolume;Qp.prototype.getVolume=Qp.prototype.getVolume;Qp.prototype.play=Qp.prototype.play;Qp.prototype.pause=Qp.prototype.pause;
756
759
  Qp.prototype.skip=Qp.prototype.skip;Qp.prototype.canSkipNow=Qp.prototype.canSkipNow;Qp.prototype.getTimeUntilSkippable=Qp.prototype.getTimeUntilSkippable;Qp.prototype.isSkippable=Qp.prototype.isSkippable;Qp.prototype.isPaused=Qp.prototype.isPaused;Qp.prototype.getRemainingTime=Qp.prototype.getRemainingTime;Qp.prototype.getMinSuggestedDuration=Qp.prototype.getMinSuggestedDuration;Qp.prototype.getDuration=Qp.prototype.getDuration;function Rp(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new hb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new U("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Sp(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
757
760
  e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Qp(f,e.l);e.A&&(e.m.i=e.A);e.i(new U("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
758
761
  var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new U("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new U("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new U("ad-third-quartile"))});
759
762
  this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new U("ad-complete"));e.i(new U("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new U("ad-skipped"));e.i(new U("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
760
- f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=Rp.prototype;q.configure=function(){};q.stop=function(){this.B="";this.o=null;this.C=[]};q.release=function(){this.stop();this.h&&this.h.release()};q.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};q.getCuePoints=function(){return this.C};
761
- function Sp(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(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.o=c,a.l.currentTime=d.start)}})};function Y(){ig.call(this);this.g=this.h=this.i=null;this.j=new qp;this.m=navigator.language;this.l=null}ra(Y,ig);q=Y.prototype;q.setLocale=function(a){this.m=a};q.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.i&&this.i.release();this.i=new sp(a,b,this.m,c,function(e){return Tp(d,e)});this.i.configure(this.l)};
762
- q.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);ig.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.j=new qp};q.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.G=Date.now()/1E3;b.l.requestAds(a)};
763
- q.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};q.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Fp(a,b,c,function(e){return Tp(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new Zf,Ip(d,a,b),d.H=c||"",d.W=Date.now()/1E3,a=d.l);return a};
764
- q.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new Rp(a,b,this.m,function(d){return Tp(c,d)});this.g.configure(this.l)};
765
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&$a('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.9.28";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
766
- (c.G=!0),c.j=new Zf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&$a('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.9.28";this.g.g.replaceAdTagParameters(a)};
767
- q.getServerSideCuePoints=function(){rb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
768
- q.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,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)};
763
+ f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=Rp.prototype;r.configure=function(){};r.stop=function(){this.B="";this.o=null;this.C=[]};r.release=function(){this.stop();this.h&&this.h.release()};r.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};r.getCuePoints=function(){return this.C};
764
+ function Sp(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(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.o=c,a.l.currentTime=d.start)}})};function Y(){ig.call(this);this.g=this.h=this.i=null;this.j=new qp;this.m=navigator.language;this.l=null}ra(Y,ig);r=Y.prototype;r.setLocale=function(a){this.m=a};r.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.i&&this.i.release();this.i=new sp(a,b,this.m,c,function(e){return Tp(d,e)});this.i.configure(this.l)};
765
+ r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);ig.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.j=new qp};r.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.G=Date.now()/1E3;b.l.requestAds(a)};
766
+ r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Fp(a,b,c,function(e){return Tp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new Zf,Ip(d,a,b),d.H=c||"",d.U=Date.now()/1E3,a=d.l);return a};
767
+ r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new Rp(a,b,this.m,function(d){return Tp(c,d)});this.g.configure(this.l)};
768
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&$a('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.9.30";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
769
+ (c.G=!0),c.j=new Zf,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&$a('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.9.30";this.g.g.replaceAdTagParameters(a)};
770
+ r.getServerSideCuePoints=function(){rb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
771
+ r.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
769
772
  function Tp(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}S("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
770
773
  Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.addMediaTailorTrackingUrl=Y.prototype.addMediaTailorTrackingUrl;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;
771
774
  Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";
@@ -777,19 +780,19 @@ function Wp(a){return{length:a.length,start:function(b){return a.start[b]},end:f
777
780
  var Xp="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Yp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Zp=["loop","playbackRate"],$p=["pause","play"],aq={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
778
781
  isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},bq={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},cq={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},dq=[["getConfiguration","configure"]],eq=[["isTextTrackVisible","setTextTrackVisibility"]],fq="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
779
782
  gq=["attach","attachCanvas","detach","load","unload"];function hq(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Sc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.J="";this.o=null;this.B=function(){return iq(h)};this.C=function(k,l){k=Vp(l);switch(k.type){case "event":var m=k.targetName,n=gg(k.event);h.A(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.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new T(p.severity,p.category,
780
- p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;jq.add(this)}q=hq.prototype;q.destroy=function(){jq.delete(this);kq(this);lq&&mq(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};q.$a=function(){return this.h};q.rf=function(){return this.J};
781
- q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.lc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(jq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Zf;d.s=!0;nq(d,e)}},function(b){for(var c=t(jq),d=c.next();!d.done;d=c.next())d=d.value,oq="available"==b,d.l.lc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});oq&&this.l.X(pq);(a=lq)&&
782
- a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Zf,this.s=!0,nq(this,a)):lq=null}else window.__onGCastApiAvailable!==qq&&(rq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=qq)};q.Bf=function(a){this.o=a;this.h&&sq(this,{type:"appData",appData:this.o})};
783
- q.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!oq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new Zf;chrome.cast.requestSession(function(c){return nq(a,c)},function(c){return tq(a,c)});return E(b,a.j,0)})};function uq(a){a.h&&chrome.cast.requestSession(function(b){return nq(a,b)},function(b){return tq(a,b)})}q.wc=function(){if(this.h){kq(this);if(lq){mq(this);try{lq.stop(function(){},function(){})}catch(a){}lq=null}iq(this)}};
784
- q.get=function(a,b){var c=this;if("video"==a){if($p.includes(b))return function(){return c.Eg.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))}}else if("player"==a){if(cq[b]&&!this.get("player","isLive")())return function(){};if(fq.includes(b))return function(){return c.Eg.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))};if(gq.includes(b))return function(){return c.wi.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))};if(aq[b]||bq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
785
- q.set=function(a,b,c){this.g[a][b]=c;sq(this,{type:"set",targetName:a,property:b,value:c})};function nq(a,b){var c=a.N();lq=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);iq(a);sq(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function tq(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new T(2,8,c,b))}
786
- q.Eg=function(a,b){sq(this,{type:"call",targetName:a,methodName:b,args:Ja.apply(2,arguments)})};q.wi=function(a,b){var c=Ja.apply(2,arguments),d=new Zf,e=this.H.toString();this.H++;this.i[e]=d;try{sq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function mq(a){var b=lq;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
783
+ p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;jq.add(this)}r=hq.prototype;r.destroy=function(){jq.delete(this);kq(this);lq&&mq(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.$a=function(){return this.h};r.rf=function(){return this.J};
784
+ r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.lc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(jq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Zf;d.s=!0;nq(d,e)}},function(b){for(var c=t(jq),d=c.next();!d.done;d=c.next())d=d.value,oq="available"==b,d.l.lc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});oq&&this.l.Y(pq);(a=lq)&&
785
+ a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Zf,this.s=!0,nq(this,a)):lq=null}else window.__onGCastApiAvailable!==qq&&(rq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=qq)};r.Bf=function(a){this.o=a;this.h&&sq(this,{type:"appData",appData:this.o})};
786
+ r.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!oq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new Zf;chrome.cast.requestSession(function(c){return nq(a,c)},function(c){return tq(a,c)});return E(b,a.j,0)})};function uq(a){a.h&&chrome.cast.requestSession(function(b){return nq(a,b)},function(b){return tq(a,b)})}r.wc=function(){if(this.h){kq(this);if(lq){mq(this);try{lq.stop(function(){},function(){})}catch(a){}lq=null}iq(this)}};
787
+ r.get=function(a,b){var c=this;if("video"==a){if($p.includes(b))return function(){return c.Eg.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))}}else if("player"==a){if(cq[b]&&!this.get("player","isLive")())return function(){};if(fq.includes(b))return function(){return c.Eg.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))};if(gq.includes(b))return function(){return c.wi.apply(c,[a,b].concat(x(Ja.apply(0,arguments))))};if(aq[b]||bq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
788
+ r.set=function(a,b,c){this.g[a][b]=c;sq(this,{type:"set",targetName:a,property:b,value:c})};function nq(a,b){var c=a.N();lq=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);iq(a);sq(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function tq(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new T(2,8,c,b))}
789
+ r.Eg=function(a,b){sq(this,{type:"call",targetName:a,methodName:b,args:Ja.apply(2,arguments)})};r.wi=function(a,b){var c=Ja.apply(2,arguments),d=new Zf,e=this.H.toString();this.H++;this.i[e]=d;try{sq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function mq(a){var b=lq;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
787
790
  function iq(a){var b=lq?"connected"==lq.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};kq(a)}a.h=b;a.J=b?lq.receiver.friendlyName:"";a.l.lc()}function kq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function sq(a,b){b=Up(b);var c=lq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},db)}catch(d){throw b=new T(2,8,8005,d),c=new U("error",(new Map).set("detail",b)),a.A("player",c),a.wc(),b;}}var pq=.02,oq=!1,lq=null,rq=null,jq=new Set;
788
- function qq(a){rq?window.__onGCastApiAvailable=rq:delete window.__onGCastApiAvailable;rq=null;if(a)for(var b=t(jq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function vq(a,b,c,d){d=void 0===d?!1:d;ig.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new hq(c,function(){return wq(e)},function(){return xq(e)},function(f,g){return yq(e,f,g)},function(){return zq(e)},function(){return Aq(e)},d);Bq(this)}ra(vq,ig);q=vq.prototype;
789
- q.destroy=function(a){a&&this.g.wc();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.s=this.l=this.i=null;ig.prototype.release.call(this);return Promise.all(a)};q.Th=function(){return this.l};q.Ih=function(){return this.s};q.lh=function(){return this.g.m&&oq};q.$a=function(){return this.g.$a()};q.rf=function(){return this.g.rf()};
790
- q.cast=function(){var a=this;return O(function(b){return 1==b.g?E(b,a.g.cast(),2):a.h?E(b,a.h.mc(),0):b.return()})};q.Bf=function(a){this.g.Bf(a)};q.Mi=function(){uq(this.g)};q.wc=function(){this.g.wc()};
791
- q.mh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.wc();return E(d,c.g.destroy(),2)}c.g=null;c.g=new hq(a,function(){return wq(c)},function(){return xq(c)},function(e,f){return yq(c,e,f)},function(){return zq(c)},function(){return Aq(c)},b);c.g.init();H(d)})};
792
- function Bq(a){a.g.init();a.m=new hb;for(var b=t(Xp),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.$a()||(f=gg(f),a.j.dispatchEvent(f))});for(var d in hg)a.m.D(a.h,hg[d],function(f){a.g.$a()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={dd:b.dd},b.dd=e,Object.defineProperty(a.l,b.dd,{configurable:!1,enumerable:!0,get:function(f){return function(){return Cq(a,f.dd)}}(b),set:function(f){return function(g){var h=f.dd;a.g.$a()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};Dq(a,
791
+ function qq(a){rq?window.__onGCastApiAvailable=rq:delete window.__onGCastApiAvailable;rq=null;if(a)for(var b=t(jq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function vq(a,b,c,d){d=void 0===d?!1:d;ig.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new hq(c,function(){return wq(e)},function(){return xq(e)},function(f,g){return yq(e,f,g)},function(){return zq(e)},function(){return Aq(e)},d);Bq(this)}ra(vq,ig);r=vq.prototype;
792
+ r.destroy=function(a){a&&this.g.wc();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.s=this.l=this.i=null;ig.prototype.release.call(this);return Promise.all(a)};r.Th=function(){return this.l};r.Ih=function(){return this.s};r.lh=function(){return this.g.m&&oq};r.$a=function(){return this.g.$a()};r.rf=function(){return this.g.rf()};
793
+ r.cast=function(){var a=this;return O(function(b){return 1==b.g?E(b,a.g.cast(),2):a.h?E(b,a.h.mc(),0):b.return()})};r.Bf=function(a){this.g.Bf(a)};r.Mi=function(){uq(this.g)};r.wc=function(){this.g.wc()};
794
+ r.mh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.wc();return E(d,c.g.destroy(),2)}c.g=null;c.g=new hq(a,function(){return wq(c)},function(){return xq(c)},function(e,f){return yq(c,e,f)},function(){return zq(c)},function(){return Aq(c)},b);c.g.init();H(d)})};
795
+ function Bq(a){a.g.init();a.m=new hb;for(var b=t(Xp),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.$a()||(f=gg(f),a.j.dispatchEvent(f))});for(var d in hg)a.m.D(a.h,hg[d],function(f){a.g.$a()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={ed:b.ed},b.ed=e,Object.defineProperty(a.l,b.ed,{configurable:!1,enumerable:!0,get:function(f){return function(){return Cq(a,f.ed)}}(b),set:function(f){return function(g){var h=f.ed;a.g.$a()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};Dq(a,
793
796
  function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Eq(a,f)}})});Fq(a);a.j=new ig;a.j.Wd=a.l;a.o=new ig;a.o.Wd=a.s}function Fq(a){var b=new Map;Dq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
794
797
  function Dq(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=t(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)}}
795
798
  function Aq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.xc(),startTime:null};a.i.pause();for(var c=t(Zp),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=t(dq);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=t(eq);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 wq(a){var b=new U("caststatuschanged");a.dispatchEvent(b)}
@@ -800,23 +803,23 @@ function Cq(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addE
800
803
  function Eq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.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.Zb()};if("getDrmEngine"==b)return function(){return a.h.A};if("getAdManager"==b)return function(){return a.h.hg()};
801
804
  if("setVideoContainer"==b)return function(c){return a.h.Sg(c)};if(a.g.$a()){if("getManifest"==b||"drmInfo"==b)return function(){$a(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){$a(b+"() does not work while casting!");return Promise.resolve()}}return a.g.$a()&&0==Object.keys(a.g.g.video).length&&(aq[b]||bq[b])||!a.g.$a()?a.h[b].bind(a.h):a.g.get("player",b)}
802
805
  function yq(a,b,c){a.g.$a()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",vq);vq.prototype.changeReceiverId=vq.prototype.mh;vq.prototype.forceDisconnect=vq.prototype.wc;vq.prototype.suggestDisconnect=vq.prototype.Mi;vq.prototype.setAppData=vq.prototype.Bf;vq.prototype.cast=vq.prototype.cast;vq.prototype.receiverName=vq.prototype.rf;vq.prototype.isCasting=vq.prototype.$a;vq.prototype.canCast=vq.prototype.lh;vq.prototype.getPlayer=vq.prototype.Ih;
803
- vq.prototype.getVideo=vq.prototype.Th;vq.prototype.destroy=vq.prototype.destroy;function Gq(a,b,c,d){ig.call(this);var e=this;this.g=a;this.h=b;this.j=new hb;this.H={video:a,player:b};this.C=c||function(){};this.J=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.G=new Sc(function(){Hq(e)});Iq(this)}ra(Gq,ig);q=Gq.prototype;q.isConnected=function(){return this.F};q.Zh=function(){return this.o};q.Ii=function(a){this.i=a};q.qh=function(){this.i=null};
804
- q.Ji=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Hi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Gi=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
805
- q.destroy=function(){var a=this,b,c;return O(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.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,ig.prototype.release.call(a),E(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();H(d)})};
806
+ vq.prototype.getVideo=vq.prototype.Th;vq.prototype.destroy=vq.prototype.destroy;function Gq(a,b,c,d){ig.call(this);var e=this;this.g=a;this.h=b;this.j=new hb;this.H={video:a,player:b};this.C=c||function(){};this.J=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.G=new Sc(function(){Hq(e)});Iq(this)}ra(Gq,ig);r=Gq.prototype;r.isConnected=function(){return this.F};r.Zh=function(){return this.o};r.Ii=function(a){this.i=a};r.qh=function(){this.i=null};
807
+ r.Ji=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Hi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Gi=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
808
+ r.destroy=function(){var a=this,b,c;return O(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.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,ig.prototype.release.call(a),E(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();H(d)})};
806
809
  function Iq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Jq(a)};b.onSenderDisconnected=function(){return Jq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Kq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Kq(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return Lq(a,
807
810
  e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Mq(a,e)};b.start();b=t(Xp);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return Nq(a,"video",e)});for(var d in hg)a.j.D(a.h,hg[d],function(e){return Nq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;Oq(a)});a.j.D(a.g,"playing",function(){a.o=!1;Oq(a)});a.j.D(a.g,"pause",function(){Oq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;Oq(a)});
808
- a.j.D(a.g,"ended",function(){(new Sc(function(){a.g&&a.g.ended&&(a.o=!0,Oq(a))})).X(Pq)})}function Jq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Oq(a)}function Oq(a){var b;O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);if(!a.h)return c.return();b=new U("caststatuschanged");a.dispatchEvent(b);Qq(a)||Rq(a);H(c)})}
809
- function Sq(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,wa(r,5),E(r,a.h.load(b.manifest,b.startTime),7)):E(r,Promise.resolve(),3);case 7:ya(r,3);break;case 5:return g=Aa(r),h=(new Map).set("detail",g),k=new U("error",h),a.h&&a.h.dispatchEvent(k),r.return();case 3:if(!a.h)return r.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);
810
- a.g.autoplay=f;b.manifest&&(a.g.play(),Rq(a));H(r)}})}function Nq(a,b,c){a.h&&(Hq(a),Kq(a,{type:"event",targetName:b,event:c},a.l))}
811
- function Hq(a){a.G.X(Tq);for(var b={video:{},player:{}},c=t(Yp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in cq)0==a.m%cq[e]&&(b.player[e]=a.h[e]());for(var f in aq)0==a.m%aq[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Kq(a,{type:"update",update:b},a.l);for(var g in bq)0==a.m%bq[g]&&(b={player:{}},b.player[g]=a.h[g](),Kq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
812
- 1);Qq(a)}function Qq(a){return a.A&&(a.g.duration||a.h.U())?(Uq(a),a.A=!1,!0):!1}function Uq(a,b){var c={contentId:a.h.xc(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Rq(a,void 0===b?0:b,c)}
811
+ a.j.D(a.g,"ended",function(){(new Sc(function(){a.g&&a.g.ended&&(a.o=!0,Oq(a))})).Y(Pq)})}function Jq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Oq(a)}function Oq(a){var b;O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);if(!a.h)return c.return();b=new U("caststatuschanged");a.dispatchEvent(b);Qq(a)||Rq(a);H(c)})}
812
+ function Sq(a,b,c){var d,e,f,g,h,k,l,m,n,p;O(function(q){switch(q.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,wa(q,5),E(q,a.h.load(b.manifest,b.startTime),7)):E(q,Promise.resolve(),3);case 7:ya(q,3);break;case 5:return g=za(q),h=(new Map).set("detail",g),k=new U("error",h),a.h&&a.h.dispatchEvent(k),q.return();case 3:if(!a.h)return q.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);
813
+ a.g.autoplay=f;b.manifest&&(a.g.play(),Rq(a));H(q)}})}function Nq(a,b,c){a.h&&(Hq(a),Kq(a,{type:"event",targetName:b,event:c},a.l))}
814
+ function Hq(a){a.G.Y(Tq);for(var b={video:{},player:{}},c=t(Yp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.V())for(var e in cq)0==a.m%cq[e]&&(b.player[e]=a.h[e]());for(var f in aq)0==a.m%aq[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Kq(a,{type:"update",update:b},a.l);for(var g in bq)0==a.m%bq[g]&&(b={player:{}},b.player[g]=a.h[g](),Kq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
815
+ 1);Qq(a)}function Qq(a){return a.A&&(a.g.duration||a.h.V())?(Uq(a),a.A=!1,!0):!1}function Uq(a,b){var c={contentId:a.h.xc(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Rq(a,void 0===b?0:b,c)}
813
816
  function Mq(a,b){var c=Vp(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;Sq(a,c.initState,c.appData);Hq(a);break;case "appData":a.C(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.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
814
817
  "player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return Vq(a,g,f,null)},function(h){return Vq(a,g,f,h)})}}
815
818
  function Lq(a,b){var c=Vp(b.data);switch(c.type){case "PLAY":a.g.play();Rq(a);break;case "PAUSE":a.g.pause();Rq(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(),Rq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Rq(a));break;case "STOP":a.h.mc().then(function(){a.h&&Rq(a)});break;case "GET_STATUS":Uq(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));
816
819
  null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Rq(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Uq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Kq(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:Kq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
817
820
  function Vq(a,b,c,d){a.h&&Kq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Kq(a,b,c,d){a.F&&(a=Up(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Rq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Wq:a.h.Xe()?Xq:a.g.paused?Yq:Zq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Kq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
818
- S("shaka.cast.CastReceiver",Gq);Gq.prototype.destroy=Gq.prototype.destroy;Gq.prototype.setContentArtist=Gq.prototype.Gi;Gq.prototype.setContentImage=Gq.prototype.Hi;Gq.prototype.setContentTitle=Gq.prototype.Ji;Gq.prototype.clearContentMetadata=Gq.prototype.qh;Gq.prototype.setContentMetadata=Gq.prototype.Ii;Gq.prototype.isIdle=Gq.prototype.Zh;Gq.prototype.isConnected=Gq.prototype.isConnected;var Tq=.5,Pq=5,Wq="IDLE",Zq="PLAYING",Xq="BUFFERING",Yq="PAUSED";function $q(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(z){return null!=z&&""!=z.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=ar(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,v=0;v<p.length;v++)if(null!=p[v]&&""!==p[v].g.trim()){r=v;break}for(v=p.length-1;0<=v;v--)if(null!=p[v]&&""!==p[v].g.trim()){u=v;break}if(-1===
819
- r||-1===u)p=br(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(v=p[r]){var w=v.l,A=v.i,y=v.j,C=v.h;if(w!=h||A!=k||y!=l||C!=m)n.payload&&a.nestedCues.push(n),n=ar(d,e,w,A,y,C),h=w,k=A,l=y,m=C;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=br(d,e),a.nestedCues.push(n));n=ar(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
821
+ S("shaka.cast.CastReceiver",Gq);Gq.prototype.destroy=Gq.prototype.destroy;Gq.prototype.setContentArtist=Gq.prototype.Gi;Gq.prototype.setContentImage=Gq.prototype.Hi;Gq.prototype.setContentTitle=Gq.prototype.Ji;Gq.prototype.clearContentMetadata=Gq.prototype.qh;Gq.prototype.setContentMetadata=Gq.prototype.Ii;Gq.prototype.isIdle=Gq.prototype.Zh;Gq.prototype.isConnected=Gq.prototype.isConnected;var Tq=.5,Pq=5,Wq="IDLE",Zq="PLAYING",Xq="BUFFERING",Yq="PAUSED";function $q(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(z){return null!=z&&""!=z.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=ar(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,u=-1,v=0;v<p.length;v++)if(null!=p[v]&&""!==p[v].g.trim()){q=v;break}for(v=p.length-1;0<=v;v--)if(null!=p[v]&&""!==p[v].g.trim()){u=v;break}if(-1===
822
+ q||-1===u)p=br(d,e),a.nestedCues.push(p);else{for(;q<=u;q++)if(v=p[q]){var w=v.l,A=v.i,y=v.j,C=v.h;if(w!=h||A!=k||y!=l||C!=m)n.payload&&a.nestedCues.push(n),n=ar(d,e,w,A,y,C),h=w,k=A,l=y,m=C;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=br(d,e),a.nestedCues.push(n));n=ar(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
820
823
  function ar(a,b,c,d,e,f){a=new Rb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function br(a,b){a=new Rb(a,b,"");a.lineBreak=!0;return a}function cr(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function dr(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";er(this)}function fr(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Rb(b,c,"");e.lineInterpretation=1;var f=gr.get(a.g);f&&(e.line=f);(b=$q(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=gr.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function er(a){hr(a,0,15);a.g=1}
821
824
  function ir(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=jr.has(c)?jr.get(c):String.fromCharCode(c);break;case 1:d=kr.get(c);break;case 2:a.i[a.g].pop();d=lr.get(c);break;case 3:a.i[a.g].pop(),d=mr.get(c)}d&&a.i[a.g].push(new cr(d,a.m,a.j,a.o,a.l))}}function nr(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 hr(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
822
825
  var jr=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"]]),kr=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),lr=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,"\u00da"],[36,"\u00dc"],
@@ -830,21 +833,21 @@ b.skip(1),d=Dr(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&
830
833
  function Gr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Hr(a,b,c){var d=null;b=t(Gr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=zr(f,c,a.i));a.h[e]=null}return d}function Ir(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Jr(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Kr[a<<2|b<<1|c]}
831
834
  var Lr=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"]]),Kr="black blue green cyan red magenta yellow white".split(" ");function Mr(){this.h=[];this.g=[];this.i=new Ar;this.l=0;this.m=new Map([["CC1",new or(0,0)],["CC2",new or(0,1)],["CC3",new or(1,0)],["CC4",new or(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;Nr(this)}Mr.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Nr(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Ir(b.value)};
832
835
  function Nr(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,er(c.i),er(c.j),er(c.o);a.B=!0}
833
- Mr.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Gg(a,0);if(!(8>a.getLength())&&181===a.S()&&49===a.ka()&&1195456820===a.O()&&3===a.S()&&(c=a.S(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.S(),f=(e&4)>>2,g=a.S(),h=a.S();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Xa:g,xb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
836
+ Mr.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Gg(a,0);if(!(8>a.getLength())&&181===a.S()&&49===a.ka()&&1195456820===a.O()&&3===a.S()&&(c=a.S(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.S(),f=(e&4)>>2,g=a.S(),h=a.S();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Xa:g,yb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
834
837
  Mr.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=Or(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())Br(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Pr(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
835
- function Or(a,b){var c=b.type;if(16===(b.Xa&112)){var d=b.Xa>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Xa&&255===b.xb||!b.Xa&&!b.xb||!Qr(b.Xa)||!Qr(b.xb))return 45<=++a.l&&Nr(a),null;a.l=0;b.Xa&=127;b.xb&=127;var e=b.Xa;if(1<=e&&15>=e||!b.Xa&&!b.xb)return null;e=null;if(16===(b.Xa&112))a:{a.A.add(d),d=b.Xa;a=b.xb;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 f=(a&30)>>1;d=
838
+ function Or(a,b){var c=b.type;if(16===(b.Xa&112)){var d=b.Xa>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Xa&&255===b.yb||!b.Xa&&!b.yb||!Qr(b.Xa)||!Qr(b.yb))return 45<=++a.l&&Nr(a),null;a.l=0;b.Xa&=127;b.yb&=127;var e=b.Xa;if(1<=e&&15>=e||!b.Xa&&!b.yb)return null;e=null;if(16===(b.Xa&112))a:{a.A.add(d),d=b.Xa;a=b.yb;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 f=(a&30)>>1;d=
836
839
  "white";e=!1;7>f?d=tr[f]:7===f&&(e=!0);a=1===(a&1);4!==c.h&&(f=c.g,3===c.h&&b!==f.g&&(c=1+b-f.h,nr(f,c,1+f.g-f.h,f.h),hr(f,0,c-1),hr(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",ir(c.g,0,32),d=!1,b=tr[(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=sr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))ir(c.g,
837
- 1,a);else if(18===(d&246)&&32===(a&224))ir(c.g,d&1?3:2,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.xb){case 32:qr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=pr(c,2,a);break;case 38:d=pr(c,3,a);break;case 39:d=pr(c,4,a);break;case 40:ir(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:er(c.o);rr(c);break;case 43:rr(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=fr(b,c.l,a));hr(b,0,15);break;case 45:b=c.g;3!==c.h?d=null:(d=fr(b,c.l,a),e=b.g-b.h+1,nr(b,e-1,e,
838
- b.h),hr(b,0,e-1),hr(b,b.g,15-b.g),c.l=a);break;case 46:hr(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=fr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,qr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.xb,ir(c.g,0,b.Xa),ir(c.g,0,a);return e}
839
- function Pr(a,b){var c=[];try{for(;b.ma();){var d=Dr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Dr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Er(e));for(var g=a.j.get(e),h=b.ra();b.ra()-h<f;){e=g;var k=b,l=Dr(k),m=l.value,n=l.pts;if(16===m){var p=Dr(k);m=m<<16|p.value}if(0<=m&&31>=m){k=e;var r=m,u=n;if(k.g){var v=k.g;e=null;switch(r){case 8:!yr(v)||0>=v.g&&0>=v.h||(0>=v.g?(v.g=v.m-1,v.h--):v.g--,v.i[v.h][v.g]=null);break;case 13:v.isVisible()&&(e=zr(v,u,k.i));if(v.h+1>=v.o){k=
840
- v;r=0;for(u=1;16>u;u++,r++)k.i[r]=k.i[u];for(u=0;1>u;u++,r++)k.i[r]=wr()}else v.h++;v.g=0;break;case 14:v.isVisible()&&(e=zr(v,u,k.i));v.i[v.h]=wr();v.g=0;break;case 12:v.isVisible()&&(e=zr(v,u,k.i)),vr(v),k=v,k.h=0,k.g=0}var w=e}else w=null}else if(128<=m&&159>=m)w=Fr(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m&255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&
840
+ 1,a);else if(18===(d&246)&&32===(a&224))ir(c.g,d&1?3:2,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.yb){case 32:qr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=pr(c,2,a);break;case 38:d=pr(c,3,a);break;case 39:d=pr(c,4,a);break;case 40:ir(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:er(c.o);rr(c);break;case 43:rr(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=fr(b,c.l,a));hr(b,0,15);break;case 45:b=c.g;3!==c.h?d=null:(d=fr(b,c.l,a),e=b.g-b.h+1,nr(b,e-1,e,
841
+ b.h),hr(b,0,e-1),hr(b,b.g,15-b.g),c.l=a);break;case 46:hr(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=fr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,qr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.yb,ir(c.g,0,b.Xa),ir(c.g,0,a);return e}
842
+ function Pr(a,b){var c=[];try{for(;b.ma();){var d=Dr(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Dr(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Er(e));for(var g=a.j.get(e),h=b.ra();b.ra()-h<f;){e=g;var k=b,l=Dr(k),m=l.value,n=l.pts;if(16===m){var p=Dr(k);m=m<<16|p.value}if(0<=m&&31>=m){k=e;var q=m,u=n;if(k.g){var v=k.g;e=null;switch(q){case 8:!yr(v)||0>=v.g&&0>=v.h||(0>=v.g?(v.g=v.m-1,v.h--):v.g--,v.i[v.h][v.g]=null);break;case 13:v.isVisible()&&(e=zr(v,u,k.i));if(v.h+1>=v.o){k=
843
+ v;q=0;for(u=1;16>u;u++,q++)k.i[q]=k.i[u];for(u=0;1>u;u++,q++)k.i[q]=wr()}else v.h++;v.g=0;break;case 14:v.isVisible()&&(e=zr(v,u,k.i));v.i[v.h]=wr();v.g=0;break;case 12:v.isVisible()&&(e=zr(v,u,k.i)),vr(v),k=v,k.h=0,k.g=0}var w=e}else w=null}else if(128<=m&&159>=m)w=Fr(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m&255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&
841
844
  (127===k?xr(e.g,"\u266a"):xr(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&xr(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(Lr.has(k)){var A=Lr.get(k);xr(e.g,A)}else xr(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?xr(e.g,"_"):xr(e.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(y){if(y instanceof T&&3E3===y.code)ab("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}
842
845
  function Qr(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}Mr.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",Mr);Jb=function(){return new Mr};function Rr(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function Sr(){this.j=new Map;this.i=this.h=0;this.g=Tr}
843
846
  Sr.prototype.init=function(a){function b(f){f=f.name;f in Ur&&(c.g=Ur[f])}var c=this,d=[],e=[];(new Jg).box("moov",Qg).box("mvex",Qg).R("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.O();g=g.O();c.h=f;c.i=g}).box("trak",Qg).R("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.O();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.ka();g.ka();g.ka();g.ka();d.push(h)}).box("mdia",Qg).R("mdhd",
844
847
  function(f){f=Zi(f.reader,f.version);e.push(f.timescale)}).box("minf",Qg).box("stbl",Qg).R("stsd",Sg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",b).box("dvh1",b).box("dvhe",b).box("encv",Tg).box("sinf",Qg).box("frma",function(f){f=bj(f.reader).codec;f in Ur&&(c.g=Ur[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==Tr&&$a("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
845
- Sr.prototype.parse=function(a){var b=this;if(this.g==Tr)return[];var c=[],d=0,e=[];(new Jg).box("moof",function(f){d=f.start;e=[];Qg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Pc:b.h,vd:b.i,zg:[],timescale:9E4});Qg(f)}).R("trun",function(f){var g=e[e.length-1];f=$i(f.reader,f.version,f.flags);g.zg.push(f)}).R("tfhd",function(f){var g=e[e.length-1];f=Xi(f.reader,f.flags);g.Pc=f.Pc||b.h;g.vd=f.vd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).R("tfdt",function(f){var g=e[e.length-
846
- 1];f=Yi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.ra(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw $a("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);Vr(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Pc,l.vd,g,l.zg,c)}}).parse(a,!1);return c};
847
- function Vr(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Gg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].sh);b.ma();){g=b.O();var p=b.S(),r=null;r=!1;h=1;switch(a.g){case Wr:r=p&31;r=6==r;break;case Xr:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].ee||0),p=(c+p)/d,h=t(Rr(b.mb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
848
+ Sr.prototype.parse=function(a){var b=this;if(this.g==Tr)return[];var c=[],d=0,e=[];(new Jg).box("moof",function(f){d=f.start;e=[];Qg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Pc:b.h,wd:b.i,zg:[],timescale:9E4});Qg(f)}).R("trun",function(f){var g=e[e.length-1];f=$i(f.reader,f.version,f.flags);g.zg.push(f)}).R("tfhd",function(f){var g=e[e.length-1];f=Xi(f.reader,f.flags);g.Pc=f.Pc||b.h;g.wd=f.wd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).R("tfdt",function(f){var g=e[e.length-
849
+ 1];f=Yi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.ra(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw $a("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);Vr(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Pc,l.wd,g,l.zg,c)}}).parse(a,!1);return c};
850
+ function Vr(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Gg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].sh);b.ma();){g=b.O();var p=b.S(),q=null;q=!1;h=1;switch(a.g){case Wr:q=p&31;q=6==q;break;case Xr:h=2;b.skip(1);q=p>>1&63;q=39==q||40==q;break;default:return}if(q)for(p=0,l<n.length&&(p=n[l].ee||0),p=(c+p)/d,h=t(Rr(b.mb(g-h))),q=h.next();!q.done;q=h.next())k.push({packet:q.value,pts:p});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
848
851
  c+(n[l].xf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",Sr);var Tr=0,Wr=1,Xr=2,Ur={avc1:Wr,avc3:Wr,hev1:Xr,hvc1:Xr,dvav:Wr,dva1:Wr,dvh1:Xr,dvhe:Xr};Ib["video/mp4"]=function(){return new Sr};function Yr(){this.g=null}Yr.prototype.init=function(){};Yr.prototype.parse=function(a){this.g?this.g.clearData():this.g=new wj;var b=[];a=Bb(a);if(!Dj(a))return b;a=this.g.parse(a);var c=a.Tc(),d=a.Ed();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(Rr(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
849
852
  S("shaka.cea.TsCeaParser",Yr);Ib["video/mp2t"]=function(){return new Yr};function Zr(a,b,c){var d=$r(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new T(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Gc});if(1<f.length)throw new T(2,4,4050);f.length&&(g=as(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Gc}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Gc?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
850
853
  l.Gc});f.length&&(a=bs(e,k,f,c,h),0==a.length&&(a=[Pd("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Pd(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{bg:h,Pj:e,drmInfos:a,re:g,gg:!0}}
@@ -855,66 +858,66 @@ function bs(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=
855
858
  172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:Xg(p,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Pd(h,b,g.init||a||k||l);if(h=hs.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function $r(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=is(c.value))&&b.push(c);return b}
856
859
  function is(a){var b=a.attributes.schemeIdUri,c=nh(a,"urn:mpeg:cenc:2013","default_KID"),d=lh(a,"urn:mpeg:cenc:2013","pssh").map(hh),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new T(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Id(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,Gc:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
857
860
  function as(a){if(!window.crypto||!window.crypto.subtle)throw $a("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var b=kh(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new T(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new T(2,4,4051);b=kh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new T(2,4,4051);a=b.attributes.IV;b=Ed(b.attributes.keyUriTemplate);
858
- if(!a||!b)throw new T(2,4,4051);a=Ld(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{ei:b,iv:a}}
861
+ if(!a||!b)throw new T(2,4,4051);a=Jd(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{ei:b,iv:a}}
859
862
  var gs=1,hs=(new Map).set("com.widevine.alpha",function(a){var b=kh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=gh(b))?b:(a=kh(a.node,"urn:microsoft","laurl"))?Ed(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",fs).set("com.microsoft.playready.recommendation",fs).set("com.microsoft.playready.software",fs).set("com.microsoft.playready.hardware",fs).set("org.w3.clearkey",function(a){var b=kh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=gh(b))?b:(a=kh(a.node,"http://dashif.org/guidelines/clearKey",
860
863
  "Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=gh(a))?a:""});function js(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&$a("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
861
864
  break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
862
- function ks(a,b){var c=ls(a,b,"timescale"),d=1;c&&(d=th(c)||1);c=ls(a,b,"duration");(c=th(c||""))&&(c/=d);var e=ls(a,b,"startNumber"),f=Number(ls(a,b,"presentationTimeOffset"))||0,g=uh(e||"");if(null==e||null==g)g=1;e=null;if(b=ms(a,b,"SegmentTimeline")){b=fh(b,"S");e=d;a=a.ca.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],r=mh(n,"t",uh),u=mh(n,"d",uh),v=mh(n,"r",sh);n=mh(n,"k",sh)||0;null!=r&&(r-=f);if(u){r=null!=r?r:l;v=v||0;if(0>v)if(p){p=mh(p,"t",uh);if(null==
863
- p)break;else if(r>=p)break;v=Math.ceil((p-r)/u)-1}else{if(Infinity==a)break;else if(r/e>=a)break;v=Math.ceil((a*e-r)/u)-1}0<k.length&&r!=l&&(k[k.length-1].end=r/e);for(p=0;p<=v;++p)l=r+u,k.push({start:r/e,end:l/e,Qf:r,vb:n,Ei:k.length+h}),r=l}}e=k}return{timescale:d,Ja:c,kd:g,Fb:f/d||0,Pf:f,timeline:e}}function ns(a,b){return[b(a.I),b(a.ia),b(a.ja)].filter(we)}function ls(a,b,c){b=ns(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
865
+ function ks(a,b){var c=ls(a,b,"timescale"),d=1;c&&(d=th(c)||1);c=ls(a,b,"duration");(c=th(c||""))&&(c/=d);var e=ls(a,b,"startNumber"),f=Number(ls(a,b,"presentationTimeOffset"))||0,g=uh(e||"");if(null==e||null==g)g=1;e=null;if(b=ms(a,b,"SegmentTimeline")){b=fh(b,"S");e=d;a=a.ca.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],p=b[m+1],q=mh(n,"t",uh),u=mh(n,"d",uh),v=mh(n,"r",sh);n=mh(n,"k",sh)||0;null!=q&&(q-=f);if(u){q=null!=q?q:l;v=v||0;if(0>v)if(p){p=mh(p,"t",uh);if(null==
866
+ p)break;else if(q>=p)break;v=Math.ceil((p-q)/u)-1}else{if(Infinity==a)break;else if(q/e>=a)break;v=Math.ceil((a*e-q)/u)-1}0<k.length&&q!=l&&(k[k.length-1].end=q/e);for(p=0;p<=v;++p)l=q+u,k.push({start:q/e,end:l/e,Qf:q,wb:n,Ei:k.length+h}),q=l}}e=k}return{timescale:d,Ja:c,ld:g,Gb:f/d||0,Pf:f,timeline:e}}function ns(a,b){return[b(a.I),b(a.ia),b(a.ja)].filter(we)}function ls(a,b,c){b=ns(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
864
867
  function ms(a,b,c){b=ns(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=jh(d.value,c));d=b.next());return a}
865
- function os(a,b,c,d,e,f){for(var g=nh(a,"http://www.w3.org/1999/xlink","href"),h=nh(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=ah("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return ag(new T(2,4,4028));if("onLoad"!=h)return ag(new T(2,4,4027));var p=Od([d],[g]);return e.request(0,qg(p,b)).za(function(r){r=Yg(r.data,a.tagName);if(!r)return ag(new T(2,4,4001,g));for(a.children=
866
- [];r.children.length;){var u=r.children.shift();a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return ps(a,b,c,p[0],e,f+1)})}
867
- function ps(a,b,c,d,e,f){f=void 0===f?0:f;if(nh(a,"http://www.w3.org/1999/xlink","href")){var g=os(a,b,c,d,e,f);c&&(g=g.za(void 0,function(){return ps(a,b,c,d,e,f)}));return g}g=[];for(var h=t(eh(a)),k=h.next(),l={};!k.done;l={Lc:void 0},k=h.next())l.Lc=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==nh(l.Lc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Lc}}(l)):"SegmentTimeline"!=l.Lc.tagName&&g.push(ps(l.Lc,b,c,d,e,f));return eg(g).za(function(){return a})}
868
+ function os(a,b,c,d,e,f){for(var g=nh(a,"http://www.w3.org/1999/xlink","href"),h=nh(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=ah("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return ag(new T(2,4,4028));if("onLoad"!=h)return ag(new T(2,4,4027));var p=Od([d],[g]);return e.request(0,qg(p,b)).xa(function(q){q=Yg(q.data,a.tagName);if(!q)return ag(new T(2,4,4001,g));for(a.children=
869
+ [];q.children.length;){var u=q.children.shift();a.children.push(u)}u=t(Object.keys(q.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=q.attributes[v];return ps(a,b,c,p[0],e,f+1)})}
870
+ function ps(a,b,c,d,e,f){f=void 0===f?0:f;if(nh(a,"http://www.w3.org/1999/xlink","href")){var g=os(a,b,c,d,e,f);c&&(g=g.xa(void 0,function(){return ps(a,b,c,d,e,f)}));return g}g=[];for(var h=t(eh(a)),k=h.next(),l={};!k.done;l={Lc:void 0},k=h.next())l.Lc=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==nh(l.Lc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Lc}}(l)):"SegmentTimeline"!=l.Lc.tagName&&g.push(ps(l.Lc,b,c,d,e,f));return eg(g).xa(function(){return a})}
868
871
  ;function qs(a,b,c,d,e,f,g){var h,k=(new Jg).R("sidx",function(l){h=rs(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
869
- function rs(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Fc(),m=g.reader.Fc();g.reader.skip(2);var n=g.reader.ka();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.O(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.O();g.reader.skip(4);if(1==r)throw new T(2,3,3006);h.push(new Gi(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function ss(a){this.h=Fb(a);this.g=new Gg(this.h,0)}ss.prototype.ma=function(){return this.g.ma()};
872
+ function rs(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Fc(),m=g.reader.Fc();g.reader.skip(2);var n=g.reader.ka();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.O(),q=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.O();g.reader.skip(4);if(1==q)throw new T(2,3,3006);h.push(new Gi(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function ss(a){this.h=Fb(a);this.g=new Gg(this.h,0)}ss.prototype.ma=function(){return this.g.ma()};
870
873
  function ts(a){var b=us(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=us(a);a:{d=t(vs);for(var e=d.next();!e.done;e=d.next())if(yb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ra();else{if(8==b.length&&b[1]&224)throw new T(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.ra()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ra();d=Fb(a.h,a.g.ra(),b);a.g.skip(b);return new ws(c,
871
874
  d)}function us(a){var b=a.g.ra(),c=a.g.S();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Bb(a.h,b,c)}var vs=[[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 ws(a,b){this.id=a;this.g=b}
872
- function xs(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(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 ys(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ss(a.g);for(var n=null,p=null;a.ma();){var r=ts(a);if(187==r.id){var u=zs(r);u&&(r=c*u.Qi,u=b+u.ui,null!=n&&m.push(new Gi(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new Gi(n+g,d+g,l,p,null,f,g,h,k));return m}
875
+ function xs(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(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 ys(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ss(a.g);for(var n=null,p=null;a.ma();){var q=ts(a);if(187==q.id){var u=zs(q);u&&(q=c*u.Qi,u=b+u.ui,null!=n&&m.push(new Gi(n+g,q+g,l,p,u-1,f,g,h,k)),n=q,p=u)}}null!=n&&m.push(new Gi(n+g,d+g,l,p,null,f,g,h,k));return m}
873
876
  function zs(a){var b=new ss(a.g);a=ts(b);if(179!=a.id)throw new T(2,3,3013);a=xs(a);b=ts(b);if(183!=b.id)throw new T(2,3,3012);b=new ss(b.g);for(var c=0;b.ma();){var d=ts(b);if(241==d.id){c=xs(d);break}}return{Qi:a,ui:c}};function As(a,b,c){b=ms(a,b,"Initialization");if(!b)return null;var d=a.I.La(),e=b.attributes.sourceURL;e&&(d=Od(d,[Ed(e)]));e=0;var f=null;if(b=mh(b,"range",rh))e=b.start,f=b.end;c=new Bi(function(){return d},e,f,Bs(a),null,null,c);c.codecs=a.I.codecs;c.mimeType=a.I.mimeType;return c}
874
877
  function Cs(a,b,c){var d=Number(ls(a,Ds,"presentationTimeOffset"))||0,e=ls(a,Ds,"timescale"),f=1;e&&(f=th(e)||1);var g=d/f||0,h=As(a,Ds,c);Es(a,h);var k=Ie(a);return{Wb:function(){var l=ms(k,Ds,"RepresentationIndex");var m=k.I.La();l&&(l=Ed(l.attributes.sourceURL))&&(m=Od(m,[l]));l=Fs(k);return Gs(k,b,h,m,l.start,l.end,g)}}}
875
- function Gs(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F;return O(function(J){if(1==J.g)return h=a.presentationTimeline,k=!a.rb||!a.ca.Ye,l=a.ca.start,m=a.ca.duration,n=a.I.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.M(),c.Da,c.pa,!0):null],p=null,E(J,Promise.all(u),2);v=J.h;w=v[0];A=v[1]||null;y=null;C=l-g;z=l;B=m?l+m:Infinity;if("mp4"==n)var K=qs(w,e,d,c,C,z,B);else{K=w;var G=new ss(A);if(440786851!=ts(G).id)throw new T(2,3,3008);var M=ts(G);if(408125543!=M.id)throw new T(2,
878
+ function Gs(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F;return O(function(J){if(1==J.g)return h=a.presentationTimeline,k=!a.sb||!a.ca.Ye,l=a.ca.start,m=a.ca.duration,n=a.I.mimeType.split("/")[1],p=b,q=null,u=[p(d,e,f,!1),"webm"==n?p(c.M(),c.Da,c.pa,!0):null],p=null,E(J,Promise.all(u),2);v=J.h;w=v[0];A=v[1]||null;y=null;C=l-g;z=l;B=m?l+m:Infinity;if("mp4"==n)var K=qs(w,e,d,c,C,z,B);else{K=w;var G=new ss(A);if(440786851!=ts(G).id)throw new T(2,3,3008);var M=ts(G);if(408125543!=M.id)throw new T(2,
876
879
  3,3009);G=M.g.byteOffset;M=new ss(M.g);for(var N=null;M.ma();){var L=ts(M);if(357149030==L.id){N=L;break}}if(!N)throw new T(2,3,3010);N=new ss(N.g);L=1E6;for(M=null;N.ma();){var P=ts(N);if(2807729==P.id)L=xs(P);else if(17545==P.id)if(4==P.g.byteLength)M=P.g.getFloat32(0);else if(8==P.g.byteLength)M=P.g.getFloat64(0);else throw new T(2,3,3003);}if(null==M)throw new T(2,3,3011);N=L/1E9;M*=N;K=ts(new ss(K));if(475249515!=K.id)throw new T(2,3,3007);K=ys(K,G,N,M,d,c,C,z,B)}y=K;D=t(y);for(I=D.next();!I.done;I=
877
- D.next())F=I.value,F.codecs=a.I.codecs,F.mimeType=a.I.mimeType;h.fd(y);r=new Lk(y);k&&r.vc(z,B,!0);return J.return(r)})}function Ds(a){return a.Ic}function Fs(a){var b=ms(a,Ds,"RepresentationIndex");a=ls(a,Ds,"indexRange");a=rh(a||"");b&&(a=mh(b,"range",rh,a));return a}function Es(a,b){Hs(a,b);if(!Fs(a))throw new T(2,4,4002);}function Hs(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=Ud&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
878
- function Bs(a){var b=a.I;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.Vd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Is(a,b,c){var d=As(a,Js,c),e=Ks(a);if(!e.Ja&&!e.timeline&&1<e.Bc.length)throw new T(2,4,4002);if(!e.Ja&&!a.ca.duration&&!e.timeline&&1==e.Bc.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.ja.id&&a.I.id&&(g=b[a.ja.id+","+a.I.id])&&(f=g.segmentIndex);var h=Ls(a.ca.start,a.ca.duration,a.I.La,e,d,c,a.I.mimeType,a.I.codecs);b=!f;f?f.ed(h,a.presentationTimeline.ib()):f=new Lk(h);a.presentationTimeline.fd(h);a.rb&&a.ca.Ye||f.vc(a.ca.start,
879
- a.ca.duration?a.ca.start+a.ca.duration:Infinity,b);g&&(g.segmentIndex=f);return{Wb:function(){f&&0!=f.getNumReferences()||f.Qd(h);return Promise.resolve(f)}}}function Js(a){return a.Gb}function Ks(a){var b=Ms(a);a=ks(a,Js);var c=a.kd;0==c&&(c=1);var d=0;a.Ja?d=a.Ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ja:a.Ja,startTime:d,kd:c,Fb:a.Fb,timeline:a.timeline,Bc:b}}
880
- function Ls(a,b,c,d,e,f,g,h){var k=d.Bc.length;d.timeline&&d.timeline.length!=d.Bc.length&&(k=Math.min(d.timeline.length,d.Bc.length));for(var l=a-d.Fb,m=b?a+b:Infinity,n=[],p=d.startTime,r={},u=0;u<k;r={je:void 0,fe:void 0},u++){r.fe=d.Bc[u];var v=p;p=void 0;p=null!=d.Ja?v+d.Ja:d.timeline?d.timeline[u].end:v+b;r.je=null;r=new Gi(a+v,a+p,function(w){return function(){null==w.je&&(w.je=Od(c(),[w.fe.ki]));return w.je}}(r),r.fe.start,r.fe.end,e,l,a,m,[],"",null,null,Hi,f);r.codecs=h;r.mimeType=g;n.push(r)}return n}
881
- function Ms(a){return[a.I.Gb,a.ia.Gb,a.ja.Gb].filter(we).map(function(b){return fh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.Ue&&(a.Ue=!0);var c=Ed(b.attributes.media);b=mh(b,"mediaRange",rh,{start:0,end:null});return{ki:c,start:b.start,end:b.end}})};function Ns(a,b,c,d,e,f,g,h,k){k||a.I.Hd||(a.I.Hd=ls(a,Os,"initialization"));var l=a.I.Hd?Ps(a,g):null,m=Qs(a);Rs(m);var n=Ie(a);if(m.ad)return Hs(a,l),{Wb:function(){var w=js(m.ad,n.I.id,null,null,n.bandwidth||null,null);w=Od(n.I.La(),[w]);return Gs(n,b,l,w,0,null,m.Fb)}};if(m.Ja)return d||"image"===a.ia.contentType||(a.presentationTimeline.hf(m.Ja),a.presentationTimeline.Ud(a.ca.start)),{Wb:function(){return Ss(n,m,e,l,f,g,h)}};var p=null;d=d=null;a.ja.id&&a.I.id&&(d=a.ja.id+","+a.I.id,d=c[d])&&
882
- (p=d.segmentIndex);var r=a.ca.start,u=a.ca.duration?r+a.ca.duration:Infinity,v=!(a.rb&&a.ca.Ye);p?(c=p,Ts(c,m,r,u,v,l),c.Ca(a.presentationTimeline.ib())):p=new Us(m,a.I.id,a.bandwidth,a.I.La,r,u,l,v,g,a.I.yf);m.timeline&&"image"!==a.ia.contentType&&a.presentationTimeline.yg(m.timeline,r);d&&a.rb&&(d.segmentIndex=p);return{Wb:function(){p instanceof Us&&0==p.getNumReferences()&&Ts(p,m,r,u,v,l);return Promise.resolve(p)}}}function Os(a){return a.Pb}
883
- function Qs(a){var b=ks(a,Os),c=ls(a,Os,"media"),d=ls(a,Os,"index");return{Ja:b.Ja,timescale:b.timescale,kd:b.kd,Fb:b.Fb,Pf:b.Pf,timeline:b.timeline,Mb:c&&Ed(c),ad:d,mimeType:a.I.mimeType,codecs:a.I.codecs}}function Rs(a){var b=a.ad?1:0;b+=a.timeline?1:0;b+=a.Ja?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.ad&&(a.timeline=null),a.Ja=null);if(!a.ad&&!a.Mb)throw new T(2,4,4002);}
884
- function Ss(a,b,c,d,e,f,g){function h(G){var M=(G-v)*u,N=M+b.Fb,L=M+n;M=L+u;var P=Math.min(M,l());L=new Gi(L,P,function(){var R=N*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(N)*BigInt(w));R=js(A,C,G,null,y,R);return Od(z(),[R])},0,null,d,B,n,l(),[],"",null,null,Hi,f);L.codecs=a.I.codecs;L.mimeType=a.I.mimeType;L.j=M;return L}function k(){var G=[Math.max(m.ib(),n),Math.min(m.Lb(),l())].map(function(M){return M-n});G=[Math.ceil(G[0]/u),Math.ceil(G[1]/u)-1];a.I.Oa&&G[1]++;return G.map(function(M){return M+
885
- v})}function l(){var G=null!=p&&e[p]||r;return G?n+G:Infinity}var m=a.presentationTimeline,n=a.ca.start,p=a.ja.id,r=a.ca.duration,u=b.Ja,v=b.kd,w=b.timescale,A=b.Mb,y=a.bandwidth||null,C=a.I.id,z=a.I.La,B=n-b.Fb,D=k();c=a.rb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var I=c;I<=g;++I){var F=h(I);D.push(F)}var J=new Lk(D);D=m.Lb()<l();I=m.U();if(D||I){var K=Math.max(c,g+1);c=u;a.I.Oa&&(c=.1);J.ie(c,function(){var G=m.ib();J.Ca(G);var M=t(k());M.next();M=M.next().value;for(var N=[];K<=M;){var L=
880
+ D.next())F=I.value,F.codecs=a.I.codecs,F.mimeType=a.I.mimeType;h.gd(y);q=new Lk(y);k&&q.vc(z,B,!0);return J.return(q)})}function Ds(a){return a.Ic}function Fs(a){var b=ms(a,Ds,"RepresentationIndex");a=ls(a,Ds,"indexRange");a=rh(a||"");b&&(a=mh(b,"range",rh,a));return a}function Es(a,b){Hs(a,b);if(!Fs(a))throw new T(2,4,4002);}function Hs(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=Ud&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
881
+ function Bs(a){var b=a.I;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.Vd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Is(a,b,c){var d=As(a,Js,c),e=Ks(a);if(!e.Ja&&!e.timeline&&1<e.Bc.length)throw new T(2,4,4002);if(!e.Ja&&!a.ca.duration&&!e.timeline&&1==e.Bc.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.ja.id&&a.I.id&&(g=b[a.ja.id+","+a.I.id])&&(f=g.segmentIndex);var h=Ls(a.ca.start,a.ca.duration,a.I.La,e,d,c,a.I.mimeType,a.I.codecs);b=!f;f?f.fd(h,a.presentationTimeline.ib()):f=new Lk(h);a.presentationTimeline.gd(h);a.sb&&a.ca.Ye||f.vc(a.ca.start,
882
+ a.ca.duration?a.ca.start+a.ca.duration:Infinity,b);g&&(g.segmentIndex=f);return{Wb:function(){f&&0!=f.getNumReferences()||f.Qd(h);return Promise.resolve(f)}}}function Js(a){return a.Hb}function Ks(a){var b=Ms(a);a=ks(a,Js);var c=a.ld;0==c&&(c=1);var d=0;a.Ja?d=a.Ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ja:a.Ja,startTime:d,ld:c,Gb:a.Gb,timeline:a.timeline,Bc:b}}
883
+ function Ls(a,b,c,d,e,f,g,h){var k=d.Bc.length;d.timeline&&d.timeline.length!=d.Bc.length&&(k=Math.min(d.timeline.length,d.Bc.length));for(var l=a-d.Gb,m=b?a+b:Infinity,n=[],p=d.startTime,q={},u=0;u<k;q={je:void 0,fe:void 0},u++){q.fe=d.Bc[u];var v=p;p=void 0;p=null!=d.Ja?v+d.Ja:d.timeline?d.timeline[u].end:v+b;q.je=null;q=new Gi(a+v,a+p,function(w){return function(){null==w.je&&(w.je=Od(c(),[w.fe.ki]));return w.je}}(q),q.fe.start,q.fe.end,e,l,a,m,[],"",null,null,Hi,f);q.codecs=h;q.mimeType=g;n.push(q)}return n}
884
+ function Ms(a){return[a.I.Hb,a.ia.Hb,a.ja.Hb].filter(we).map(function(b){return fh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.Ue&&(a.Ue=!0);var c=Ed(b.attributes.media);b=mh(b,"mediaRange",rh,{start:0,end:null});return{ki:c,start:b.start,end:b.end}})};function Ns(a,b,c,d,e,f,g,h,k){k||a.I.Hd||(a.I.Hd=ls(a,Os,"initialization"));var l=a.I.Hd?Ps(a,g):null,m=Qs(a);Rs(m);var n=Ie(a);if(m.bd)return Hs(a,l),{Wb:function(){var w=js(m.bd,n.I.id,null,null,n.bandwidth||null,null);w=Od(n.I.La(),[w]);return Gs(n,b,l,w,0,null,m.Gb)}};if(m.Ja)return d||"image"===a.ia.contentType||(a.presentationTimeline.hf(m.Ja),a.presentationTimeline.Ud(a.ca.start)),{Wb:function(){return Ss(n,m,e,l,f,g,h)}};var p=null;d=d=null;a.ja.id&&a.I.id&&(d=a.ja.id+","+a.I.id,d=c[d])&&
885
+ (p=d.segmentIndex);var q=a.ca.start,u=a.ca.duration?q+a.ca.duration:Infinity,v=!(a.sb&&a.ca.Ye);p?(c=p,Ts(c,m,q,u,v,l),c.Ca(a.presentationTimeline.ib())):p=new Us(m,a.I.id,a.bandwidth,a.I.La,q,u,l,v,g,a.I.yf);m.timeline&&"image"!==a.ia.contentType&&a.presentationTimeline.yg(m.timeline,q);d&&a.sb&&(d.segmentIndex=p);return{Wb:function(){p instanceof Us&&0==p.getNumReferences()&&Ts(p,m,q,u,v,l);return Promise.resolve(p)}}}function Os(a){return a.Pb}
886
+ function Qs(a){var b=ks(a,Os),c=ls(a,Os,"media"),d=ls(a,Os,"index");return{Ja:b.Ja,timescale:b.timescale,ld:b.ld,Gb:b.Gb,Pf:b.Pf,timeline:b.timeline,Mb:c&&Ed(c),bd:d,mimeType:a.I.mimeType,codecs:a.I.codecs}}function Rs(a){var b=a.bd?1:0;b+=a.timeline?1:0;b+=a.Ja?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.bd&&(a.timeline=null),a.Ja=null);if(!a.bd&&!a.Mb)throw new T(2,4,4002);}
887
+ function Ss(a,b,c,d,e,f,g){function h(G){var M=(G-v)*u,N=M+b.Gb,L=M+n;M=L+u;var P=Math.min(M,l());L=new Gi(L,P,function(){var R=N*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(N)*BigInt(w));R=js(A,C,G,null,y,R);return Od(z(),[R])},0,null,d,B,n,l(),[],"",null,null,Hi,f);L.codecs=a.I.codecs;L.mimeType=a.I.mimeType;L.j=M;return L}function k(){var G=[Math.max(m.ib(),n),Math.min(m.Lb(),l())].map(function(M){return M-n});G=[Math.ceil(G[0]/u),Math.ceil(G[1]/u)-1];a.I.Oa&&G[1]++;return G.map(function(M){return M+
888
+ v})}function l(){var G=null!=p&&e[p]||q;return G?n+G:Infinity}var m=a.presentationTimeline,n=a.ca.start,p=a.ja.id,q=a.ca.duration,u=b.Ja,v=b.ld,w=b.timescale,A=b.Mb,y=a.bandwidth||null,C=a.I.id,z=a.I.La,B=n-b.Gb,D=k();c=a.sb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var I=c;I<=g;++I){var F=h(I);D.push(F)}var J=new Lk(D);D=m.Lb()<l();I=m.V();if(D||I){var K=Math.max(c,g+1);c=u;a.I.Oa&&(c=.1);J.ie(c,function(){var G=m.ib();J.Ca(G);var M=t(k());M.next();M=M.next().value;for(var N=[];K<=M;){var L=
886
889
  h(K);N.push(L);K++}return G>l()&&!N.length?null:N})}return Promise.resolve(J)}function Ps(a,b){var c=a.I.Hd;c||(c=ls(a,Os,"initialization"));if(!c)return null;c=Ed(c);var d=a.I.id,e=a.bandwidth||null,f=a.I.La;b=new Bi(function(){var g=js(c,d,null,null,e,null);return Od(f(),[g])},0,null,Bs(a),null,null,b);b.codecs=a.I.codecs;b.mimeType=a.I.mimeType;return b}
887
- function Us(a,b,c,d,e,f,g,h,k,l){Lk.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.j=e;this.l=f;this.s=g;this.A=k;this.G=l;h&&Vs(this)}ra(Us,Lk);q=Us.prototype;q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){Lk.prototype.release.call(this);this.h=null};
888
- q.Ca=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
889
- function Ts(a,b,c,d,e,f){Ws(a,f);if(a.h){c=a.h.timeline;a.h.Mb!==b.Mb&&(a.h.Mb=b.Mb);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;e&&Vs(a)}function Ws(a,b){if(a.s!==b){a.s=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Ji(c,b)}}
890
- function Vs(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.Ca(a.j)}}q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:Infinity===this.l?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
891
- q.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Ei,f=this.h.Pf+d.Qf;c=this.j-this.h.Fb;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=[],n=(d.end-d.start)/d.vb,p={},r=0;r<d.vb;p={ke:void 0,Ug:void 0},r++){var u=d.start+n*r,v=u+n;p.Ug=r+1;p.ke=null;p=new Gi(this.j+u,this.j+v,function(w){return function(){if(!b.h)return[];
892
- null==w.ke&&(w.ke=Xs(b.h.Mb,b.F,e,b.B,f,w.Ug,b.C));return w.ke}}(p),0,null,this.s,c,this.j,this.l,[],"",null,null,Hi,this.A);p.codecs=k;p.mimeType=l;0==this.G?0<r&&p.Od():0!=r%this.G&&p.Od();m.push(p)}c=new Gi(this.j+d.start,h,function(){return 0<d.vb||!b.h?[]:Xs(b.h.Mb,b.F,e,b.B,f,null,b.C)},0,null,this.s,c,this.j,this.l,m,"",null,null,Hi,this.A,0<d.vb);c.codecs=k;c.mimeType=l;c.j=g;this.g[a]=c}return c};
893
- function Xs(a,b,c,d,e,f,g){a=js(a,b,c,f,d||null,e);return Od(g(),[a]).map(function(h){return h.toString()})};function Ys(a){var b=ie(a),c=b.split("/")[0];a=je(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,md:null,colorGamut:null}}
894
- function Zs(a,b){function c(z){w=z.name;var B=z.reader;B.skip(24);var D=B.ka(),I=B.ka();B.skip(50);n=String(D);m=String(I);z.reader.ma()&&Qg(z)}function d(z){var B=aj(z.reader);p=B.channelCount;r=B.sampleRate;e(z.name)}function e(z){z=z.toLowerCase();switch(z){case "avc1":case "avc3":g.push(z+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(z+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(z+".05.04");k=!0;break;case "vp09":g.push(z+".00.10.08");k=!0;break;case "av01":g.push(z+".0.01M.08");
895
- k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(z),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,r=null,u=null,v=null,w;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).R("mdhd",function(z){l=Zi(z.reader,z.version).language}).box("minf",Qg).box("stbl",Qg).R("stsd",Sg).box("mp4a",function(z){var B=aj(z.reader);p=B.channelCount;r=B.sampleRate;z.reader.ma()?Qg(z):e(z.name)}).box("esds",function(z){z=z.reader;for(var B=
890
+ function Us(a,b,c,d,e,f,g,h,k,l){Lk.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.j=e;this.l=f;this.s=g;this.A=k;this.G=l;h&&Vs(this)}ra(Us,Lk);r=Us.prototype;r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Lk.prototype.release.call(this);this.h=null};
891
+ r.Ca=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
892
+ function Ts(a,b,c,d,e,f){Ws(a,f);if(a.h){c=a.h.timeline;a.h.Mb!==b.Mb&&(a.h.Mb=b.Mb);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;e&&Vs(a)}function Ws(a,b){if(a.s!==b){a.s=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Ji(c,b)}}
893
+ function Vs(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.Ca(a.j)}}r.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:Infinity===this.l?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
894
+ r.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Ei,f=this.h.Pf+d.Qf;c=this.j-this.h.Gb;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=[],n=(d.end-d.start)/d.wb,p={},q=0;q<d.wb;p={ke:void 0,Ug:void 0},q++){var u=d.start+n*q,v=u+n;p.Ug=q+1;p.ke=null;p=new Gi(this.j+u,this.j+v,function(w){return function(){if(!b.h)return[];
895
+ null==w.ke&&(w.ke=Xs(b.h.Mb,b.F,e,b.B,f,w.Ug,b.C));return w.ke}}(p),0,null,this.s,c,this.j,this.l,[],"",null,null,Hi,this.A);p.codecs=k;p.mimeType=l;0==this.G?0<q&&p.Od():0!=q%this.G&&p.Od();m.push(p)}c=new Gi(this.j+d.start,h,function(){return 0<d.wb||!b.h?[]:Xs(b.h.Mb,b.F,e,b.B,f,null,b.C)},0,null,this.s,c,this.j,this.l,m,"",null,null,Hi,this.A,0<d.wb);c.codecs=k;c.mimeType=l;c.j=g;this.g[a]=c}return c};
896
+ function Xs(a,b,c,d,e,f,g){a=js(a,b,c,f,d||null,e);return Od(g(),[a]).map(function(h){return h.toString()})};function Ys(a){var b=ie(a),c=b.split("/")[0];a=je(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,nd:null,colorGamut:null}}
897
+ function Zs(a,b){function c(z){w=z.name;var B=z.reader;B.skip(24);var D=B.ka(),I=B.ka();B.skip(50);n=String(D);m=String(I);z.reader.ma()&&Qg(z)}function d(z){var B=aj(z.reader);p=B.channelCount;q=B.sampleRate;e(z.name)}function e(z){z=z.toLowerCase();switch(z){case "avc1":case "avc3":g.push(z+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(z+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(z+".05.04");k=!0;break;case "vp09":g.push(z+".00.10.08");k=!0;break;case "av01":g.push(z+".0.01M.08");
898
+ k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(z),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,p=null,q=null,u=null,v=null,w;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).R("mdhd",function(z){l=Zi(z.reader,z.version).language}).box("minf",Qg).box("stbl",Qg).R("stsd",Sg).box("mp4a",function(z){var B=aj(z.reader);p=B.channelCount;q=B.sampleRate;z.reader.ma()?Qg(z):e(z.name)}).box("esds",function(z){z=z.reader;for(var B=
896
899
  "mp4a",D,I;z.ma();){D=z.S();for(var F=z.S();F&128;)F=z.S();if(3==D)z.ka(),F=z.S(),F&128&&z.ka(),F&64&&z.skip(z.S()),F&32&&z.ka();else if(4==D)I=z.S(),z.skip(12);else if(5==D)break}I&&(B+="."+dj(I),5==D&&z.ma()&&(D=z.S(),I=(D&248)>>3,31===I&&z.ma()&&(I=32+((D&7)<<3)+((z.S()&224)>>5)),B+="."+I));f.push(B);h=!0}).box("ac-3",d).box("ec-3",d).box("ac-4",d).box("Opus",d).box("fLaC",d).box("avc1",c).box("avc3",c).box("hev1",c).box("hvc1",c).box("dva1",c).box("dvav",c).box("dvh1",c).box("dvhe",c).box("vp09",
897
900
  c).box("av01",c).box("avcC",function(z){var B=w||"";switch(w){case "dvav":B="avc3";break;case "dva1":B="avc1"}z=z.reader;z.skip(1);z=B+"."+dj(z.S())+dj(z.S())+dj(z.S());g.push(z);k=!0}).box("hvcC",function(z){var B=w||"";switch(w){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var D=z.reader;D.skip(1);z=D.S();var I=["","A","B","C"][z>>6],F=z&31,J=D.O(),K=(z&32)>>5?"H":"L";z=[D.S(),D.S(),D.S(),D.S(),D.S(),D.S()];D=D.S();for(var G=0,M=0;32>M;M++){G|=J&1;if(31==M)break;G<<=1;J>>=1}B=B+("."+I+F)+("."+
898
901
  dj(G,!0));B+="."+K+D;I="";for(F=z.length;F--;)if((K=z[F])||I)I="."+K.toString(16).toUpperCase()+I;B+=I;g.push(B);k=!0}).box("dvcC",function(z){var B=w||"";switch(w){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav"}var D=z.reader;D.skip(2);z=D.S();D=D.S();g.push(B+"."+ej(z>>1&127)+"."+ej(z<<5&32|D>>3&31));k=!0}).R("vpcC",function(z){var B=w||"",D=z.reader;z=D.S();var I=D.S();D=D.S()>>4&15;g.push(B+"."+ej(z)+"."+ej(I)+"."+ej(D));k=!0}).box("av1C",
899
902
  function(z){var B=w||"",D=z.reader;D.skip(1);z=D.S();D=D.S();var I=z>>>5,F=(D&64)>>6;g.push(B+"."+I+"."+ej(z&31)+(D>>>7?"H":"M")+"."+ej(2===I&&F?(D&32)>>5?12:10:F?10:8)+"."+((D&16)>>4)+"."+((D&8)>>3)+((D&4)>>2)+(D&3)+"."+ej(1)+"."+ej(1)+"."+ej(1)+".0");k=!0}).box("enca",Ug).box("encv",Tg).box("sinf",Qg).box("frma",function(z){z=bj(z.reader).codec;e(z)}).box("colr",function(z){g=g.map(function(I){if(I.startsWith("av01.")){var F=z.reader,J=F.ra(),K=F.mb(4);var G=String.fromCharCode(K[0]);G+=String.fromCharCode(K[1]);
900
- G+=String.fromCharCode(K[2]);G+=String.fromCharCode(K[3]);if("nclx"===G){K=F.ka();G=F.ka();var M=F.ka(),N=F.S()>>7,L=I.split(".");10==L.length&&(L[6]=ej(K),L[7]=ej(G),L[8]=ej(M),L[9]=String(N),I=L.join("."))}F.seek(J)}return I});var B=cj(z.reader),D=B.colorGamut;u=B.md;v=D}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,y=new Map;if(k){var C=new Hb("video/mp4");a&&C.init(a);C.i(b);a=t(C.j());for(b=a.next();!b.done;b=a.next())b=b.value,y.set(b,b);C.g()}return{type:A?"audio":"video",
901
- mimeType:A?"audio/mp4":"video/mp4",codecs:$s(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:r,closedCaptions:y,md:u,colorGamut:v}}function $s(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=he(d);b.has(e)||(c.push(d),b.add(e))}b=Vd("audio",c);d=Vd("video",c);a=Vd(Ud,c);d=at(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
902
- function at(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?nb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function bt(a){var b=null;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).R("stsd",Sg).box("encv",Tg).box("enca",Ug).box("sinf",Qg).box("schi",Qg).R("tenc",function(c){c=c.reader;c.S();c.S();c.S();c.S();b=Md(c.mb(16))}).parse(a,!0);return b};function ct(a){this.o=null;this.A=a;this.G=new jg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}ct.prototype.configure=function(a){this.o=a};ct.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};ct.prototype.setManifestType=function(a){this.s=a};
903
- function dt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Od(a.i,[et(a,b)]),d=qg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),kg(a.G,e),wa(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=xd(f.data),h=JSON.parse(g),1==h.VERSION&&ft(a,h,f.uri),ya(l,0);if((k=Aa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Sc(function(){dt(a,b)});a.g.X(a.C);H(l)})}
904
- function et(a,b){if(!a.m.length)return b;b=new sc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hc(e)&&wc(b,e);return b.toString()}function ft(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Sc(function(){dt(a,d)});if(c=b.TTL)a.C=c;a.g.X(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
903
+ G+=String.fromCharCode(K[2]);G+=String.fromCharCode(K[3]);if("nclx"===G){K=F.ka();G=F.ka();var M=F.ka(),N=F.S()>>7,L=I.split(".");10==L.length&&(L[6]=ej(K),L[7]=ej(G),L[8]=ej(M),L[9]=String(N),I=L.join("."))}F.seek(J)}return I});var B=cj(z.reader),D=B.colorGamut;u=B.nd;v=D}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,y=new Map;if(k){var C=new Hb("video/mp4");a&&C.init(a);C.i(b);a=t(C.j());for(b=a.next();!b.done;b=a.next())b=b.value,y.set(b,b);C.g()}return{type:A?"audio":"video",
904
+ mimeType:A?"audio/mp4":"video/mp4",codecs:$s(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:p,sampleRate:q,closedCaptions:y,nd:u,colorGamut:v}}function $s(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=ge(d);b.has(e)||(c.push(d),b.add(e))}b=Vd("audio",c);d=Vd("video",c);a=Vd(Ud,c);d=at(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
905
+ function at(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?nb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function bt(a){var b=null;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).box("minf",Qg).box("stbl",Qg).R("stsd",Sg).box("encv",Tg).box("enca",Ug).box("sinf",Qg).box("schi",Qg).R("tenc",function(c){c=c.reader;c.S();c.S();c.S();c.S();b=Kd(c.mb(16))}).parse(a,!0);return b};function ct(a){this.o=null;this.A=a;this.G=new jg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}ct.prototype.configure=function(a){this.o=a};ct.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};ct.prototype.setManifestType=function(a){this.s=a};
906
+ function dt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Od(a.i,[et(a,b)]),d=qg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),kg(a.G,e),wa(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=xd(f.data),h=JSON.parse(g),1==h.VERSION&&ft(a,h,f.uri),ya(l,0);if((k=za(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Sc(function(){dt(a,b)});a.g.Y(a.C);H(l)})}
907
+ function et(a,b){if(!a.m.length)return b;b=new sc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Hc(e)&&wc(b,e);return b.toString()}function ft(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Sc(function(){dt(a,d)});if(c=b.TTL)a.C=c;a.g.Y(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
905
908
  function gt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}ct.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
906
909
  function ht(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Dc:void 0},f=e.next())if(g.Dc=f.value,f=b.get(g.Dc))d.push({pf:g.Dc,location:f});else if(f=a.F.find(function(k){return function(l){return l.hj==k.Dc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].bh?(h=new sc(h),uc(h,f["URI-REPLACEMENT"].bh),d.push({pf:g.Dc,location:h.toString()})):d.push({pf:g.Dc,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
907
- h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new sc(k.location)).yb))return!1;return!0});d.length&&(a.B=d[0].pf);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Od(a.i,d)};function it(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}q=it.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[]};q.Sh=function(){return this.l};q.Se=function(){return this.j.slice()};q.zh=function(){return this.i};
908
- q.cg=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a}));else if(a.type==Ud)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=
910
+ h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new sc(k.location)).zb))return!1;return!0});d.length&&(a.B=d[0].pf);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Od(a.i,d)};function it(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}r=it.prototype;r.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.s=this.o=!1;this.m.clear()};r.Sh=function(){return this.l};r.Se=function(){return this.j.slice()};r.zh=function(){return this.i};
911
+ r.cg=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a}));else if(a.type==Ud)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=
909
912
  d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};
910
913
  function jt(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[kt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[lt(n),n]})),l=new Map(h.textStreams.map(function(n){return[mt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[nt(n),n]}));if(b){var m=ot(Ud);l.set(mt(m),m);m=ot("image");h.set(nt(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Xf:c,Zg:d,Vg:e,pg:f}}
911
- q.ve=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q;return O(function(ca){if(1==ca.g){e=Wd;if(!b&&1==a.length)return f=jt(a,!1),g=f.Xf,h=f.Zg,k=f.Vg,l=f.pg,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),ca.u(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)r=a[p],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=p));if(-1==n)return ca.return();u=jt(a,!0);v=u.Xf;w=u.Zg;A=u.Vg;y=u.pg;
914
+ r.ve=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q;return O(function(ca){if(1==ca.g){e=Wd;if(!b&&1==a.length)return f=jt(a,!1),g=f.Xf,h=f.Zg,k=f.Vg,l=f.pg,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),ca.u(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)q=a[p],d.m.has(q.id)||(d.m.add(q.id),-1==n&&(n=p));if(-1==n)return ca.return();u=jt(a,!0);v=u.Xf;w=u.Zg;A=u.Vg;y=u.pg;
912
915
  return E(ca,Promise.all([pt(d,d.h,v,n,qt,rt,m),pt(d,d.g,w,n,qt,rt,m),pt(d,d.j,A,n,qt,rt,m),pt(d,d.i,y,n,qt,rt,m)]),2)}C=0;z=[];if(d.g.length&&d.h.length)for(K=t(d.h),G=K.next();!G.done;G=K.next())for(M=G.value,N=t(d.g),L=N.next();!L.done;L=N.next())P=L.value,R=Lc(M.drmInfos,P.drmInfos),M.drmInfos.length&&P.drmInfos.length&&!R.length||(Q=C++,z.push({id:Q,language:M.language,disabledUntilTime:0,primary:M.primary,audio:M,video:P,bandwidth:(M.bandwidth||0)+(P.bandwidth||0),drmInfos:R,allowedByApplication:!0,
913
- allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,D=t(B),I=D.next();!I.done;I=D.next())F=I.value,J=C++,z.push({id:J,language:F.language,disabledUntilTime:0,primary:F.primary,audio:F.type==e.V?F:null,video:F.type==e.fa?F:null,bandwidth:F.bandwidth||0,drmInfos:F.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.l=z;H(ca)})};
914
- function st(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L;return O(function(P){switch(P.g){case 1:b=Wd;if(1==a.length)return P.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.V}).map(function(Q){return[kt(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.fa}).map(function(Q){return[lt(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.qa}).map(function(Q){return[mt(Q),Q]}))});
915
- f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.pe}).map(function(Q){return[nt(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=tt(b.qa),k.set(mt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=tt(b.pe),p.set(nt(r),r);u=new it;return E(P,pt(u,[],c,0,ut,vt,0),2);case 2:return v=P.h,E(P,pt(u,[],d,0,ut,vt,0),3);case 3:return w=P.h,E(P,pt(u,[],e,0,ut,vt,0),4);case 4:return A=P.h,E(P,pt(u,[],f,0,ut,vt,0),5);case 5:y=P.h;C=0;if(w.length&&v.length)for(F=
916
+ allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,D=t(B),I=D.next();!I.done;I=D.next())F=I.value,J=C++,z.push({id:J,language:F.language,disabledUntilTime:0,primary:F.primary,audio:F.type==e.W?F:null,video:F.type==e.ea?F:null,bandwidth:F.bandwidth||0,drmInfos:F.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.l=z;H(ca)})};
917
+ function st(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L;return O(function(P){switch(P.g){case 1:b=Wd;if(1==a.length)return P.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.W}).map(function(Q){return[kt(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ea}).map(function(Q){return[lt(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.qa}).map(function(Q){return[mt(Q),Q]}))});
918
+ f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.pe}).map(function(Q){return[nt(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=tt(b.qa),k.set(mt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,q=tt(b.pe),p.set(nt(q),q);u=new it;return E(P,pt(u,[],c,0,ut,vt,0),2);case 2:return v=P.h,E(P,pt(u,[],d,0,ut,vt,0),3);case 3:return w=P.h,E(P,pt(u,[],e,0,ut,vt,0),4);case 4:return A=P.h,E(P,pt(u,[],f,0,ut,vt,0),5);case 5:y=P.h;C=0;if(w.length&&v.length)for(F=
916
919
  t(v),J=F.next();!J.done;J=F.next())for(K=J.value,G=t(w),M=G.next();!M.done;M=G.next())N=M.value,L=C++,N.variantIds.push(L),K.variantIds.push(L);else for(z=w.concat(v),B=t(z),D=B.next();!D.done;D=B.next())I=D.value,I.variantIds=[C++];return P.return(w.concat(v).concat(A).concat(y))}})}
917
- function pt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K;return O(function(G){switch(G.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){G.u(4);break}n=m.value;return E(G,wt(a,n,c,d,f,h,g),5);case 5:p=G.h;if(!p)throw new T(2,4,4037);m=l.next();G.u(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v),A=w.next();!A.done;A=w.next())y=A.value,(C=xt(a,y,c,e,f,h))&&b.push(C);z=t(h);for(B=z.next();!B.done;B=
920
+ function pt(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F,J,K;return O(function(G){switch(G.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){G.u(4);break}n=m.value;return E(G,wt(a,n,c,d,f,h,g),5);case 5:p=G.h;if(!p)throw new T(2,4,4037);m=l.next();G.u(2);break;case 4:q=t(h);for(u=q.next();!u.done;u=q.next())for(v=u.value,w=t(v),A=w.next();!A.done;A=w.next())y=A.value,(C=xt(a,y,c,e,f,h))&&b.push(C);z=t(h);for(B=z.next();!B.done;B=
918
921
  z.next())for(D=B.value,I=t(D),F=I.next(),J={};!F.done;J={Hf:void 0},F=I.next())if(J.Hf=F.value,!yt(J.Hf)&&(K=b.some(function(M){return function(N){return zt(a,M.Hf,N)}}(J))))throw new T(2,4,4037);return G.return(b)}})}function wt(a,b,c,d,e,f,g){return O(function(h){if(1==h.g)return At(a,c,b,0<g),b.matchedStreams?b.segmentIndex?E(h,Bt(b,d+g),2):h.u(2):h.return(!1);Ct(b,d,e,f,g);return h.return(!0)})}
919
922
  function Bt(a,b){var c,d,e,f,g,h;return O(function(k){if(1==k.g){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex());return E(k,Promise.all(c),2)}if(a.segmentIndex instanceof Ok)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);H(k)})}
920
923
  function xt(a,b,c,d,e,f){if(yt(b))return null;var g=d(b);At(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return O(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Ok;return E(h,Bt(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;Ct(g,0,e,f,0);return g}
@@ -927,7 +930,7 @@ for(var g=new Ok,h=t(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.nex
927
930
  function vt(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
928
931
  function At(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=Dt(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
929
932
  function Dt(a,b,c){var d={audio:kt,video:lt,text:mt,image:nt}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return zt(a,l,m)},video:function(l,m){return zt(a,l,m)},text:Et,image:Ft}[c.type];for(var g={audio:Gt,video:Ht,text:It,image:Jt}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.s&&!yt(e)&&b.delete(d(e));return e}
930
- function Kt(a,b){return a.mimeType!=b.mimeType?!1:Lt(a.codecs)===Lt(b.codecs)}q.Jg=function(a){this.o=a};q.Qg=function(a){this.s=a};function zt(a,b,c){return!Kt(b,c)&&!a.o||b.drmInfos&&!Kc(b.drmInfos,c.drmInfos)?!1:!0}function Et(a,b){return b.language?a.forced!==b.forced||0==De(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function Ft(){return!0}
933
+ function Kt(a,b){return a.mimeType!=b.mimeType?!1:Lt(a.codecs)===Lt(b.codecs)}r.Jg=function(a){this.o=a};r.Qg=function(a){this.s=a};function zt(a,b,c){return!Kt(b,c)&&!a.o||b.drmInfos&&!Kc(b.drmInfos,c.drmInfos)?!1:!0}function Et(a,b){return b.language?a.forced!==b.forced||0==De(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function Ft(){return!0}
931
934
  function Gt(a,b,c){var d=Kt(a,b),e=Kt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=De(a.language,b.language);e=De(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1;if(c.roles.length!==b.roles.length)return c.roles.length<
932
935
  b.roles.length}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Mt(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Nt)return!0;if(d==Ot)return!1;d=Mt(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Nt?!0:d==Ot?!1:a.bandwidth&&Pt(a.bandwidth,b.bandwidth,c.bandwidth)==Nt?!0:!1}
933
936
  function Ht(a,b,c){var d=Kt(a,b),e=Kt(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Mt(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Nt)return!0;if(d==Ot)return!1;if(a.frameRate){d=Mt(a.frameRate,b.frameRate,c.frameRate);if(d==Nt)return!0;if(d==Ot)return!1}return a.bandwidth&&Pt(a.bandwidth,b.bandwidth,c.bandwidth)==Nt?!0:!1}
@@ -939,93 +942,94 @@ function Mt(a,b,c){if(b==a&&a!=c)return Ot;if(c==a&&a!=b)return Nt;if(b>a){if(c<
939
942
  function lt(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,Lt(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function kt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,Lt(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function mt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
940
943
  function nt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function Lt(a){if(!Rt.has(a)){var b=ee(a);Rt.set(a,b)}return Rt.get(a)}S("shaka.util.PeriodCombiner",it);it.prototype.setUseStreamOnce=it.prototype.Qg;it.prototype.setAllowMultiTypeVariants=it.prototype.Jg;it.prototype.combinePeriods=it.prototype.ve;it.prototype.deleteStream=it.prototype.cg;it.prototype.getImageStreams=it.prototype.zh;it.prototype.getTextStreams=it.prototype.Se;it.prototype.getVariants=it.prototype.Sh;
941
944
  var Nt=1,Qt=0,Ot=-1,Rt=new Map;function St(a,b){var c=new DOMParser,d=Tt.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;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Ut(a,b){try{var c=Ad(a);return St(c,b)}catch(d){return null}}
942
- var Tt=new Jc(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 Vt(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.ba=1;this.F=[];this.l={Sd:"",type:"",profiles:[],Cb:null,Oa:0,La:null,hd:0};this.s=new Map;this.o={};this.B={};this.$={};this.m=new it;this.H=0;this.aa=new Va(5);this.J=new Sc(function(){Wt(a)});this.N=new jg;this.K=null;this.C=[];this.L=Infinity;this.G=!1;this.h=null;this.W=!1;this.P=[]}q=Vt.prototype;
943
- q.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.U()&&this.J.lc();this.h&&this.h.configure(this.g);this.m&&(this.m.Jg(this.g.dash.multiTypeVariantsAllowed&&pb()),this.m.Qg(this.g.dash.useStreamOnceInPeriodFlattening))};q.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.G=b.isLowLatencyMode(),c.A=[a],c.j=b,E(e,Xt(c),2);d=e.h;c.j&&Yt(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
944
- q.stop=function(){for(var a=t(Object.values(this.o)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.o={};this.B={};this.s.clear();this.l={Sd:"",type:"",profiles:[],Cb:null,Oa:0,La:null,hd:0};this.m=null;null!=this.J&&(this.J.stop(),this.J=null);this.h&&this.h.destroy();return this.N.destroy()};
945
- q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return wa(c,2),E(c,Xt(a),4);if(2!=c.g)return ya(c,0);b=Aa(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Lb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,Yt(this,0))}}};
946
- q.banLocation=function(a){this.h&&this.h.banLocation(a)};
945
+ var Tt=new Jc(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 Vt(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.ba=1;this.F=[];this.l={Sd:"",type:"",profiles:[],Db:null,Oa:0,La:null,jd:0};this.s=new Map;this.o={};this.B={};this.$={};this.m=new it;this.H=0;this.aa=new Va(5);this.J=new Sc(function(){Wt(a)});this.N=new jg;this.K=null;this.C=[];this.L=Infinity;this.G=!1;this.h=null;this.P=!1;this.U=[]}r=Vt.prototype;
946
+ r.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.V()&&this.J.lc();this.h&&this.h.configure(this.g);this.m&&(this.m.Jg(this.g.dash.multiTypeVariantsAllowed&&pb()),this.m.Qg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.G=b.isLowLatencyMode(),c.A=[a],c.j=b,E(e,Xt(c),2);d=e.h;c.j&&Yt(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
947
+ r.stop=function(){for(var a=t(Object.values(this.o)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.o={};this.B={};this.s.clear();this.l={Sd:"",type:"",profiles:[],Db:null,Oa:0,La:null,jd:0};this.m=null;null!=this.J&&(this.J.stop(),this.J=null);this.h&&this.h.destroy();return this.N.destroy()};
948
+ r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return wa(c,2),E(c,Xt(a),4);if(2!=c.g)return ya(c,0);b=za(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.V()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Lb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,Yt(this,0))}}};
949
+ r.banLocation=function(a){this.h&&this.h.banLocation(a)};
947
950
  function Xt(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=Zt(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=ht(a.h,"Location",!0),e.length&&(d=e)),f=qg(d,a.g.retryParameters),g=Date.now(),E(m,$t(a,f,0,{type:4}),2);if(3!=m.g){h=m.h;if(!a.j)return m.return(0);h.uri&&h.uri!=h.originalUri&&!a.A.includes(h.uri)&&a.A.unshift(h.uri);return E(m,au(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.aa.sample(1,l);return m.return(l)})}
948
- function au(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=lm;if(f!=g){rb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Ut(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Bd(h.outerHTML)}k=Yg(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=mm;l!=m&&l(k);if("Patch"===d)return v.return(bu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(cu(a,k,c));
949
- p=a.g.dash.xlinkFailGracefully;r=ps(k,a.g.retryParameters,p,c,a.j.networkingEngine);kg(a.N,r);return E(v,r.promise,2)}u=v.h;return v.return(cu(a,u,c))})}
950
- function cu(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q,ca,ea,la,Qa,ua,za,La,Ra,ma,bb,kb,pd,jf,qd,Pc,rd,ge,sd,kf,Di,Ei,xg,Fi,yg;return O(function(Vb){switch(Vb.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=fh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=hh(l))p=Od(d,[n])[0],m&&(a.h?gt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=ht(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Sd=b.attributes.id||
951
- "";a.l.hd=mh(b,"publishTime",ph)||0;a.F=fh(b,"PatchLocation");u=Promise.resolve();if((v=jh(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new ct(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=hh(v))(y=mh(v,"queryBeforeStart",wh,!1))?u=dt(a.h,A):dt(a.h,A);C=t(f.keys());for(z=C.next();!z.done;z=C.next())B=z.value,D=f.get(B),gt(a.h,"Location",B,D)}I=fh(b,"BaseURL");F=!1;if(a.h)for(J=t(I),K=J.next();!K.done;K=J.next())G=K.value,
952
- M=G.attributes.serviceLocation,N=hh(G),M&&N&&(gt(a.h,"BaseURL",M,N),F=!0);a.P=null;F&&a.h||(L=I.map(hh),a.P=Od(d,L));P=function(){return a.h&&F?ht(a.h,"BaseURL"):a.P?a.P:[]};a.l.La=P;R=0;I&&I.length&&(R=mh(I[0],"availabilityTimeOffset",vh)||0);a.l.Oa=R;Q=a.g.dash.ignoreMinBufferTime;ca=0;Q||(ca=mh(b,"minBufferTime",qh)||0);a.H=mh(b,"minimumUpdatePeriod",qh,-1);ea=mh(b,"availabilityStartTime",ph);la=mh(b,"timeShiftBufferDepth",qh);Qa=a.g.dash.ignoreSuggestedPresentationDelay;ua=null;Qa||(ua=mh(b,"suggestedPresentationDelay",
953
- qh));za=a.g.dash.ignoreMaxSegmentDuration;La=null;za||(La=mh(b,"maxSegmentDuration",qh));Ra=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.W=a.i.presentationTimeline.U()&&"static"==Ra);a.l.type=Ra;du(a);if(a.i)for(ma=a.i.presentationTimeline,bb=t(Object.values(a.o)),kb=bb.next();!kb.done;kb=bb.next())pd=kb.value,pd.segmentIndex&&pd.segmentIndex.Ca(ma.ib());else jf=a.g.defaultPresentationDelay||1.5*ca,qd=null!=ua?ua:jf,ma=new pk(ea,qd,a.g.dash.autoCorrectDrift);ma.kc("static"==Ra);(Pc=
954
- ma.U())&&!isNaN(a.g.availabilityWindowOverride)&&(la=a.g.availabilityWindowOverride);null==la&&(la=Infinity);ma.ge(la);rd=b.attributes.profiles||"";a.l.profiles=rd.split(",");ge={rb:"static"!=Ra,presentationTimeline:ma,ja:null,ca:null,ia:null,I:null,bandwidth:0,Ue:!1,Oa:R,Cb:null,profiles:rd.split(",")};sd=eu(a,ge,P,b,!1);kf=sd.duration;Di=sd.periods;("static"!=Ra||a.W)&&sd.eg||ma.Ua(kf||Infinity);a.L&&!a.G&&(Ei=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.G=a.j.isLowLatencyMode());
955
- a.G?ma.Kg(a.L):a.L&&$a("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.");ma.hf(La||1);return E(Vb,u,2);case 2:return a.G&&(ca=0,xg=null!=ua?ua:a.g.defaultPresentationDelay,ma.Cf(xg)),a.i?E(Vb,fu(a,sd.periods,!1),4):E(Vb,a.m.ve(Di,ge.rb),6);case 6:a.i={presentationTimeline:ma,variants:a.m.l,textStreams:a.m.Se(),imageStreams:a.m.i,offlineSessionIds:[],
956
- minBufferTime:ca||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:gu(b),nextUrl:hu(b)};if(!ma.Xg()){Vb.u(7);break}Fi=fh(b,"UTCTiming");return E(Vb,iu(a,P,Fi),8);case 8:yg=Vb.h;if(!a.j)return Vb.return();ma.Lg(yg);case 7:ma.Md();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(Vb)}})}
951
+ function au(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=lm;if(f!=g){rb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Ut(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Bd(h.outerHTML)}k=Yg(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=mm;l!=m&&l(k);if("Patch"===d)return v.return(bu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(cu(a,k,c));
952
+ p=a.g.dash.xlinkFailGracefully;q=ps(k,a.g.retryParameters,p,c,a.j.networkingEngine);kg(a.N,q);return E(v,q.promise,2)}u=v.h;return v.return(cu(a,u,c))})}
953
+ function cu(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q,ca,ea,la,Qa,ua,Aa,La,Ra,ma,bb,kb,qd,jf,rd,Pc,sd,he,td,kf,Ci,Di,yg,Ei,zg;return O(function(Wb){switch(Wb.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=fh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=hh(l))p=Od(d,[n])[0],m&&(a.h?gt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(q=ht(a.h,"Location",!0),0<q.length&&(d=a.A=q)):e.length&&(d=a.A=e);a.l.Sd=b.attributes.id||
954
+ "";a.l.jd=mh(b,"publishTime",ph)||0;a.F=fh(b,"PatchLocation");u=Promise.resolve();if((v=jh(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new ct(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=hh(v))(y=mh(v,"queryBeforeStart",wh,!1))?u=dt(a.h,A):dt(a.h,A);C=t(f.keys());for(z=C.next();!z.done;z=C.next())B=z.value,D=f.get(B),gt(a.h,"Location",B,D)}I=fh(b,"BaseURL");F=!1;if(a.h)for(J=t(I),K=J.next();!K.done;K=J.next())G=K.value,
955
+ M=G.attributes.serviceLocation,N=hh(G),M&&N&&(gt(a.h,"BaseURL",M,N),F=!0);a.U=null;F&&a.h||(L=I.map(hh),a.U=Od(d,L));P=function(){return a.h&&F?ht(a.h,"BaseURL"):a.U?a.U:[]};a.l.La=P;R=0;I&&I.length&&(R=mh(I[0],"availabilityTimeOffset",vh)||0);a.l.Oa=R;Q=a.g.dash.ignoreMinBufferTime;ca=0;Q||(ca=mh(b,"minBufferTime",qh)||0);a.H=mh(b,"minimumUpdatePeriod",qh,-1);ea=mh(b,"availabilityStartTime",ph);la=mh(b,"timeShiftBufferDepth",qh);Qa=a.g.dash.ignoreSuggestedPresentationDelay;ua=null;Qa||(ua=mh(b,"suggestedPresentationDelay",
956
+ qh));Aa=a.g.dash.ignoreMaxSegmentDuration;La=null;Aa||(La=mh(b,"maxSegmentDuration",qh));Ra=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.P=a.i.presentationTimeline.V()&&"static"==Ra);a.l.type=Ra;du(a);if(a.i)for(ma=a.i.presentationTimeline,bb=t(Object.values(a.o)),kb=bb.next();!kb.done;kb=bb.next())qd=kb.value,qd.segmentIndex&&qd.segmentIndex.Ca(ma.ib());else jf=a.g.defaultPresentationDelay||1.5*ca,rd=null!=ua?ua:jf,ma=new pk(ea,rd,a.g.dash.autoCorrectDrift);ma.kc("static"==Ra);(Pc=
957
+ ma.V())&&!isNaN(a.g.availabilityWindowOverride)&&(la=a.g.availabilityWindowOverride);null==la&&(la=Infinity);ma.ge(la);sd=b.attributes.profiles||"";a.l.profiles=sd.split(",");he={sb:"static"!=Ra,presentationTimeline:ma,ja:null,ca:null,ia:null,I:null,bandwidth:0,Ue:!1,Oa:R,Db:null,profiles:sd.split(",")};td=eu(a,he,P,b,!1);kf=td.duration;Ci=td.periods;("static"!=Ra||a.P)&&td.eg||ma.Ua(kf||Infinity);a.L&&!a.G&&(Di=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.G=a.j.isLowLatencyMode());
958
+ a.G?ma.Kg(a.L):a.L&&$a("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.");ma.hf(La||1);return E(Wb,u,2);case 2:return a.G&&(ca=0,yg=null!=ua?ua:a.g.defaultPresentationDelay,ma.Cf(yg)),a.i?E(Wb,fu(a,td.periods,!1),4):E(Wb,a.m.ve(Ci,he.sb),6);case 6:a.i={presentationTimeline:ma,variants:a.m.l,textStreams:a.m.Se(),imageStreams:a.m.i,offlineSessionIds:[],
959
+ minBufferTime:ca||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:gu(b),nextUrl:hu(b)};if(!ma.Xg()){Wb.u(7);break}Ei=fh(b,"UTCTiming");return E(Wb,iu(a,P,Ei),8);case 8:zg=Wb.h;if(!a.j)return Wb.return();ma.Lg(zg);case 7:ma.Md();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(Wb)}})}
957
960
  function fu(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.ve(b,!0,c),2);a.i.variants=a.m.l;d=a.m.Se();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
958
- function bu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M;return O(function(N){if(1==N.g){c=b.attributes.mpdId;d=mh(b,"originalPublishTime",ph);if(!c||c!==a.l.Sd||d!==a.l.hd)throw a.F=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(eh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=yh(l.attributes.sel||""),n=m[m.length-1],p=hh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Ib){r=hh(l)||"";var L=qh(r);if(null!=L){a.l.Cb=L;for(var P=t(a.s.values()),R=P.next();!R.done;R=P.next())R.value.Cb=
959
- L}}else if("type"===n.Ib){a.i.presentationTimeline.kc("static"==p);a.l.type=p;L=t(a.s.values());for(P=L.next();!P.done;P=L.next())P.value.rb="dynamic"==p;"static"==p&&(a.H=-1)}else"publishTime"===n.Ib?a.l.hd=ph(p)||0:null===n.Ib&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)zh(a.F,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&ju(a,n.id);else if("SegmentTemplate"===n.name){P=yh(l.attributes.sel||"");L=P[P.length-1];if(L.Ib){P=ku(a,P);R=hh(l)||
960
- "";for(var Q=t(P),ca=Q.next();!ca.done;ca=Q.next())ca=a.s.get(ca.value),Bh(ca.I.Pb,l.tagName,L.Ib,R);L=P}else L=[];u=L;v=t(u);for(w=v.next();!w.done;w=v.next())A=w.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){L=yh(l.attributes.sel||"");L=ku(a,L);P=t(L);for(R=P.next();!R.done;R=P.next())R=a.s.get(R.value),R=ms(R,Os,"SegmentTimeline"),Q=fh(R,"S"),zh(Q,l),R.children=Q;y=L;C=t(y);for(z=C.next();!z.done;z=C.next())B=z.value,g.add(B)}D=t(g);for(I=D.next();!I.done;I=D.next())F=I.value,
961
- lu(a,F);J=t(f);for(K=J.next();!K.done;K=J.next())G=K.value,e.push.apply(e,x(eu(a,{rb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,ja:null,ca:null,ia:null,I:null,bandwidth:0,Ue:!1,Oa:a.l.Oa,profiles:a.l.profiles,Cb:a.l.Cb},a.l.La,G,!0).periods));return e.length?E(N,fu(a,e,!0),2):N.u(2)}"static"==a.l.type&&(M=a.l.Cb,a.i.presentationTimeline.Ua(M||Infinity));H(N)})}
961
+ function bu(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M;return O(function(N){if(1==N.g){c=b.attributes.mpdId;d=mh(b,"originalPublishTime",ph);if(!c||c!==a.l.Sd||d!==a.l.jd)throw a.F=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(eh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=yh(l.attributes.sel||""),n=m[m.length-1],p=hh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Jb){q=hh(l)||"";var L=qh(q);if(null!=L){a.l.Db=L;for(var P=t(a.s.values()),R=P.next();!R.done;R=P.next())R.value.Db=
962
+ L}}else if("type"===n.Jb){a.i.presentationTimeline.kc("static"==p);a.l.type=p;L=t(a.s.values());for(P=L.next();!P.done;P=L.next())P.value.sb="dynamic"==p;"static"==p&&(a.H=-1)}else"publishTime"===n.Jb?a.l.jd=ph(p)||0:null===n.Jb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)zh(a.F,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&ju(a,n.id);else if("SegmentTemplate"===n.name){P=yh(l.attributes.sel||"");L=P[P.length-1];if(L.Jb){P=ku(a,P);R=hh(l)||
963
+ "";for(var Q=t(P),ca=Q.next();!ca.done;ca=Q.next())ca=a.s.get(ca.value),Bh(ca.I.Pb,l.tagName,L.Jb,R);L=P}else L=[];u=L;v=t(u);for(w=v.next();!w.done;w=v.next())A=w.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){L=yh(l.attributes.sel||"");L=ku(a,L);P=t(L);for(R=P.next();!R.done;R=P.next())R=a.s.get(R.value),R=ms(R,Os,"SegmentTimeline"),Q=fh(R,"S"),zh(Q,l),R.children=Q;y=L;C=t(y);for(z=C.next();!z.done;z=C.next())B=z.value,g.add(B)}D=t(g);for(I=D.next();!I.done;I=D.next())F=I.value,
964
+ lu(a,F);J=t(f);for(K=J.next();!K.done;K=J.next())G=K.value,e.push.apply(e,x(eu(a,{sb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,ja:null,ca:null,ia:null,I:null,bandwidth:0,Ue:!1,Oa:a.l.Oa,profiles:a.l.profiles,Db:a.l.Db},a.l.La,G,!0).periods));return e.length?E(N,fu(a,e,!0),2):N.u(2)}"static"==a.l.type&&(M=a.l.Db,a.i.presentationTimeline.Ua(M||Infinity));H(N)})}
962
965
  function ju(a,b){for(var c=t(a.s.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.s.get(d);ms(e,Os,"SegmentTimeline").children=[];lu(a,d);a.s.delete(d)}a.C=a.C.filter(function(f){return f!==b})}
963
966
  function ku(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.s.values()),a=e.next();!a.done;a=e.next())a=a.value,a.ja.id===c&&a.ia.id===d&&a.I.id&&b.push(c+","+a.I.id);else if(-1<e)for(d=t(a.s.values()),a=d.next();!a.done;a=d.next())a=a.value,a.ja.id===c&&a.ia.position===e&&a.I.id&&b.push(c+
964
967
  ","+a.I.id);return b}function lu(a,b){var c=a.s.get(b),d=a.o[b];d.segmentIndex&&d.segmentIndex.Ca(a.i.presentationTimeline.ib());try{var e=Ns(c,function(f,g,h,k){return mu(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.$,c.I.aesKey,null,!0);d.createSegmentIndex=function(){return O(function(f){if(1==f.g)return d.segmentIndex?f.u(0):E(f,e.Wb(),3);d.segmentIndex=f.h;H(f)})}}catch(f){if(b=c.I.contentType,b!=Ud&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
965
968
  function gu(a){var b=jh(a,"ServiceDescription");if(!b)return null;a=jh(b,"Latency");b=jh(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
966
969
  return c}function hu(a){a=fh(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
967
- function eu(a,b,c,d,e){var f=b.Cb;f||(f=mh(d,"mediaPresentationDuration",qh),a.l.Cb=f);var g=0;a.i&&a.i.presentationTimeline&&a.W&&(g=a.i.presentationTimeline.Ab());var h=[],k=g;d=fh(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=mh(m,"start",qh,k),r=m.attributes.id,u=mh(m,"duration",qh),v=null;if(n){var w=mh(n,"start",qh);null!=w&&(v=w-p)}else null!=f&&(v=f-p+g);null==v&&(v=u);if(!(null!==a.K&&null!==r&&null!==p&&p<a.K)||a.C.includes(r)||l+1==d.length){null!==p&&(null===a.K||p>a.K)&&
968
- (a.K=p);k=nu(a,b,c,{start:p,duration:v,node:m,Ye:null==v||!n});h.push(k);b.ja.id&&v&&(a.$[b.ja.id]=v);if(null==v){k=null;break}k=p+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.C.includes(c)||a.C.push(c);else a.C=h.map(function(A){return A.id});return null!=f?{periods:h,duration:f+g,eg:!1}:{periods:h,duration:k,eg:!0}}
970
+ function eu(a,b,c,d,e){var f=b.Db;f||(f=mh(d,"mediaPresentationDuration",qh),a.l.Db=f);var g=0;a.i&&a.i.presentationTimeline&&a.P&&(g=a.i.presentationTimeline.Bb());var h=[],k=g;d=fh(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=mh(m,"start",qh,k),q=m.attributes.id,u=mh(m,"duration",qh);p=0==l&&0==p&&a.P?g:p;var v=null;if(n){var w=mh(n,"start",qh);null!=w&&(v=w-p+g)}else null!=f&&(v=f-p+g);null==v&&(v=u);if(!(null!==a.K&&null!==q&&null!==p&&p<a.K)||a.C.includes(q)||l+1==d.length){null!==
971
+ p&&(null===a.K||p>a.K)&&(a.K=p);k=nu(a,b,c,{start:p,duration:v,node:m,Ye:null==v||!n});h.push(k);b.ja.id&&v&&(a.$[b.ja.id]=v);if(null==v){k=null;break}k=p+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.C.includes(c)||a.C.push(c);else a.C=h.map(function(A){return A.id});return null!=f?{periods:h,duration:f+g,eg:!1}:{periods:h,duration:k,eg:!0}}
969
972
  function du(a){var b=Object.keys(a.B).filter(function(f){return!a.C.includes(f)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=t(a.B[c]),e=d.next();!e.done;e=d.next())e=e.value,a.m&&a.m.cg(a.o[e],c),delete a.o[e];delete a.B[c]}}
970
- function nu(a,b,c,d){b.ja=ou(a,d.node,null,c);b.ca=d;b.ja.Oa=b.Oa;b.ja.id||(b.ja.id="__shaka_period_"+d.start);var e=fh(d.node,"EventStream");c=b.presentationTimeline.ib();e=t(e);for(var f=e.next();!f.done;f=e.next())pu(a,d.start,d.duration,f.value,c);c=fh(d.node,"AdaptationSet").map(function(m,n){return qu(a,b,n,m)}).filter(we);if(b.rb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.yi);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,
973
+ function nu(a,b,c,d){b.ja=ou(a,d.node,null,c);b.ca=d;b.ja.Oa=b.Oa;b.ja.id||(b.ja.id="__shaka_period_"+d.start);var e=fh(d.node,"EventStream");c=b.presentationTimeline.ib();e=t(e);for(var f=e.next();!f.done;f=e.next())pu(a,d.start,d.duration,f.value,c);c=fh(d.node,"AdaptationSet").map(function(m,n){return qu(a,b,n,m)}).filter(we);if(b.sb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.yi);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,
971
974
  4,4018);}d=c.filter(function(m){return!m.Nf});c=c.filter(function(m){return m.Nf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Nf.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id)){h=t(h.streams);for(var k=h.next(),l={};!k.done;l={Gf:void 0},k=h.next())l.Gf=k.value,l.Gf.trickModeVideo=e.streams.find(function(m){return function(n){return ee(m.Gf.codecs)==ee(n.codecs)}}(l))}}c=ru(a.g.disableAudio,d,"audio");e=ru(a.g.disableVideo,d,"video");f=ru(a.g.disableText,
972
975
  d,Ud);d=ru(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.ja.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function ru(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
973
976
  function qu(a,b,c,d){function e(G){switch(G){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function f(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ia=ou(a,d,b.ja,null);b.ia.position=c;var g=!1;c=fh(d,"Role");var h=c.map(function(G){return G.attributes.value}).filter(we),k=void 0,l=b.ia.contentType==Ud;l&&(k="subtitle");c=t(c);for(var m=c.next();!m.done;m=c.next()){m=m.value;var n=m.attributes.schemeIdUri;
974
- if(null==n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":g=!0;break;case "caption":case "subtitle":k=m}}var p,r;n=fh(d,"EssentialProperty");c=null;var u=!1;m=!1;n=t(n);for(var v=n.next();!v.done;v=n.next()){v=v.value;var w=v.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==w?c=v.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=f(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?r=e(parseInt(v.attributes.value,10)):
975
- "urn:mpeg:mpegB:cicp:MatrixCoefficients"!=w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=fh(d,"SupplementalProperty");n=t(n);for(v=n.next();!v.done;v=n.next())v=v.value,w=v.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==w?A=parseInt(v.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=f(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w&&(r=e(parseInt(v.attributes.value,10)));n=fh(d,"Accessibility");
977
+ if(null==n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":g=!0;break;case "caption":case "subtitle":k=m}}var p,q;n=fh(d,"EssentialProperty");c=null;var u=!1;m=!1;n=t(n);for(var v=n.next();!v.done;v=n.next()){v=v.value;var w=v.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==w?c=v.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=f(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?q=e(parseInt(v.attributes.value,10)):
978
+ "urn:mpeg:mpegB:cicp:MatrixCoefficients"!=w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=fh(d,"SupplementalProperty");n=t(n);for(v=n.next();!v.done;v=n.next())v=v.value,w=v.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==w?A=parseInt(v.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?p=f(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w&&(q=e(parseInt(v.attributes.value,10)));n=fh(d,"Accessibility");
976
979
  var y=new Map,C;n=t(n);for(v=n.next();!v.done;v=n.next())if(w=v.value,v=w.attributes.schemeIdUri,w=w.attributes.value,"urn:scte:dash:cc:cea-608:2015"==v)if(v=1,null!=w){w=w.split(";");for(var z=t(w),B=z.next();!B.done;B=z.next()){var D=B.value,I=B=void 0;D.includes("=")?(D=D.split("="),B=D[0].startsWith("CC")?D[0]:"CC"+D[0],I=D[1]||"und"):(B="CC"+v,2==w.length?v+=2:v++,I=D);y.set(B,ze(I))}}else y.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==v)if(v=1,null!=w)for(w=t(w.split(";")),z=w.next();!z.done;z=
977
980
  w.next())B=z.value,D=z=void 0,B.includes("=")?(B=B.split("="),z="svc"+B[0],D=B[1].split(",")[0].split(":").pop()):(z="svc"+v,v++,D=B),y.set(z,ze(D));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==v?null!=w&&(h.push(w),"captions"==w&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==v&&("1"==w?C="visually impaired":"2"==w&&(C="hard of hearing"));if(m)return null;m=fh(d,"ContentProtection");var F=Zr(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),J=ze(b.ia.language||"und"),K=d.attributes.label;
978
- (m=fh(d,"Label"))&&m.length&&(m=gh(m[0]))&&(K=m);m=fh(d,"Representation");d=m.map(function(G){if(G=su(a,b,F,k,J,K,g,h,y,G,C,A))G.hdr=G.hdr||p,G.colorGamut=G.colorGamut||r,G.fastSwitching=u;return G}).filter(function(G){return!!G});if(0==d.length){c="image"==b.ia.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||c)return null;throw new T(2,4,4003);}if(!b.ia.contentType||"application"==b.ia.contentType)for(b.ia.contentType=tu(d[0].mimeType,d[0].codecs),l=t(d),n=l.next();!n.done;n=l.next())n.value.type=
981
+ (m=fh(d,"Label"))&&m.length&&(m=gh(m[0]))&&(K=m);m=fh(d,"Representation");d=m.map(function(G){if(G=su(a,b,F,k,J,K,g,h,y,G,C,A))G.hdr=G.hdr||p,G.colorGamut=G.colorGamut||q,G.fastSwitching=u;return G}).filter(function(G){return!!G});if(0==d.length){c="image"==b.ia.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||c)return null;throw new T(2,4,4003);}if(!b.ia.contentType||"application"==b.ia.contentType)for(b.ia.contentType=tu(d[0].mimeType,d[0].codecs),l=t(d),n=l.next();!n.done;n=l.next())n.value.type=
979
982
  b.ia.contentType;l=b.ia.id||"__fake__"+a.ba++;n=t(d);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(F.drmInfos);for(z=w.next();!z.done;z=w.next())z=z.value,z.keyIds=z.keyIds&&v.keyIds?new Set([].concat(x(z.keyIds),x(v.keyIds))):z.keyIds||v.keyIds;a.g.dash.enableAudioGroups&&(v.groupId=l)}m=m.map(function(G){return G.attributes.id}).filter(we);return{id:l,contentType:b.ia.contentType,language:J,Qj:g,streams:d,drmInfos:F.drmInfos,Nf:c,yi:m}}
980
- function su(a,b,c,d,e,f,g,h,k,l,m,n){b.I=ou(a,l,b.ia,null);var p=b.I.id;a.L=Math.min(a.L,b.I.Oa);if(!uu(b.I))return null;var r=b.ca.start;b.bandwidth=mh(l,"bandwidth",th)||0;var u=b.I.contentType,v=u==Ud||"application"==u;u="image"==u;try{var w=void 0;if(c.re){var A=b.I.La,y=Od(A(),[c.re.ei]),C=qg(y,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.re.iv,firstMediaSequenceNumber:0,fetchKey:function(){var M,N,L;return O(function(P){if(1==P.g)return E(P,$t(a,C,6),2);if(3!=P.g){M=P.h;if(!M.data||
981
- 16!=M.data.byteLength)throw new T(2,4,4049);N={name:"AES-CBC"};L=w;return E(P,window.crypto.subtle.importKey("raw",M.data,N,!0,["decrypt"]),3)}L.cryptoKey=P.h;w.fetchKey=void 0;H(P)})}}}b.I.aesKey=w;A=function(M,N,L,P){return mu(a,M,N,L,P)};if(b.I.Ic)var z=Cs(b,A,w);else if(b.I.Gb)z=Is(b,a.o,w);else if(b.I.Pb)z=Ns(b,A,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.$,w,n,!1);else{var B=b.ca.duration||0,D=b.I.La,I=b.I.mimeType,F=b.I.codecs;z={Wb:function(){var M=Nk(r,B,D());M.Ub(function(N){N.mimeType=I;
983
+ function su(a,b,c,d,e,f,g,h,k,l,m,n){b.I=ou(a,l,b.ia,null);var p=b.I.id;a.L=Math.min(a.L,b.I.Oa);if(!uu(b.I))return null;var q=b.ca.start;b.bandwidth=mh(l,"bandwidth",th)||0;var u=b.I.contentType,v=u==Ud||"application"==u;u="image"==u;try{var w=void 0;if(c.re){var A=b.I.La,y=Od(A(),[c.re.ei]),C=qg(y,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.re.iv,firstMediaSequenceNumber:0,fetchKey:function(){var M,N,L;return O(function(P){if(1==P.g)return E(P,$t(a,C,6),2);if(3!=P.g){M=P.h;if(!M.data||
984
+ 16!=M.data.byteLength)throw new T(2,4,4049);N={name:"AES-CBC"};L=w;return E(P,window.crypto.subtle.importKey("raw",M.data,N,!0,["decrypt"]),3)}L.cryptoKey=P.h;w.fetchKey=void 0;H(P)})}}}b.I.aesKey=w;A=function(M,N,L,P){return mu(a,M,N,L,P)};if(b.I.Ic)var z=Cs(b,A,w);else if(b.I.Hb)z=Is(b,a.o,w);else if(b.I.Pb)z=Ns(b,A,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.$,w,n,!1);else{var B=b.ca.duration||0,D=b.I.La,I=b.I.mimeType,F=b.I.codecs;z={Wb:function(){var M=Nk(q,B,D());M.Ub(function(N){N.mimeType=I;
982
985
  N.codecs=F});return Promise.resolve(M)}}}}catch(M){if((v||u)&&4002==M.code)return null;throw M;}n=fh(l,"ContentProtection");n=cs(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;fh(l,"SupplementalProperty").some(function(M){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==M.attributes.schemeIdUri&&"JOC"==M.attributes.value})&&(A=!0);y=!1;v&&(y=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var J;if(u&&((l=fh(l,"EssentialProperty").find(function(M){return["http://dashif.org/thumbnail_tile",
983
986
  "http://dashif.org/guidelines/thumbnail_tile"].includes(M.attributes.schemeIdUri)}))&&(J=l.attributes.value),!J))return null;var K;v=b.I.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(v.includes("hvc1.2.4.L153.B0")||v.includes("hev1.2.4.L153.B0"))&&(K="PQ");l=b.I.id?b.ja.id+","+b.I.id:"";a.F.length&&p&&a.s.set(b.ja.id+","+p,vu(b));var G=l&&a.o[l]?a.o[l]:{id:a.ba++,originalId:b.I.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&
984
987
  (G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:v,frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.ia.language,label:f,type:b.ia.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:y,channelsCount:b.I.Vd,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:A,
985
- closedCaptions:k,hdr:K,colorGamut:void 0,videoLayout:void 0,tilesLayout:J,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Yd(b.I.mimeType,b.I.codecs)])};G.createSegmentIndex=function(){var M;return O(function(N){if(1==N.g){if(G.segmentIndex)return N.u(0);M=G;return E(N,z.Wb(),3)}M.segmentIndex=N.h;H(N)})};l&&b.rb&&!a.o[l]&&(b=b.ja.id||"",a.B[b]||(a.B[b]=[]),a.o[l]=G,a.B[b].push(l));return G}
986
- function vu(a){function b(c){if(!c)return null;c=Ie(c);c.Ic=null;c.Gb=null;c.Pb=Dh(c.Pb);return c}a=Ie(a);a.ja=b(a.ja);a.ia=b(a.ia);a.I=b(a.I);a.ca&&(a.ca=Ie(a.ca),a.ca.node=null);return a}
987
- function Wt(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,wa(d,2),E(d,Xt(a),4);case 4:b=d.h;ya(d,3);break;case 2:if(c=Aa(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();Yt(a,b);H(d)}})}function Yt(a,b){if(!(0>a.H)){var c=a.H;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.J.X(Math.max(c-b,Wa(a.aa)))}}
988
+ closedCaptions:k,hdr:K,colorGamut:void 0,videoLayout:void 0,tilesLayout:J,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Yd(b.I.mimeType,b.I.codecs)])};G.createSegmentIndex=function(){var M;return O(function(N){if(1==N.g){if(G.segmentIndex)return N.u(0);M=G;return E(N,z.Wb(),3)}M.segmentIndex=N.h;H(N)})};l&&b.sb&&!a.o[l]&&(b=b.ja.id||"",a.B[b]||(a.B[b]=[]),a.o[l]=G,a.B[b].push(l));return G}
989
+ function vu(a){function b(c){if(!c)return null;c=Ie(c);c.Ic=null;c.Hb=null;c.Pb=Dh(c.Pb);return c}a=Ie(a);a.ja=b(a.ja);a.ia=b(a.ia);a.I=b(a.I);a.ca&&(a.ca=Ie(a.ca),a.ca.node=null);return a}
990
+ function Wt(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,wa(d,2),E(d,Xt(a),4);case 4:b=d.h;ya(d,3);break;case 2:if(c=za(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();Yt(a,b);H(d)}})}function Yt(a,b){if(!(0>a.H)){var c=a.H;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.J.Y(Math.max(c-b,Wa(a.aa)))}}
988
991
  function ou(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Vd:null,audioSamplingRate:null,Oa:0,yf:0};d=d||c.La;var e=b.attributes.id,f=fh(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=hh(m);l&&m&&(gt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(hh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=nh(b,
989
- "urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=$s(m).join(",");n=mh(b,"frameRate",xh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,r=Iu(fh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=fh(b,"AudioChannelConfiguration");u=Ju(u)||c.Vd;var v=mh(b,"audioSamplingRate",uh)||c.audioSamplingRate;k||(k=tu(l,m));var w=jh(b,"SegmentBase"),A=jh(b,"SegmentTemplate"),y=w?mh(w,"availabilityTimeOffset",vh)||0:0,C=A?mh(A,"availabilityTimeOffset",vh)||0:0,z=f&&f.length?mh(f[0],"availabilityTimeOffset",
990
- vh)||0:0;y=c.Oa+z+y+C;C=null;(z=jh(b,"SegmentSequenceProperties"))&&(z=jh(z,"SAP"))&&(C=mh(z,"cadence",sh));return{La:function(){return Od(d(),f.length?a.h&&h?ht(a.h,e):g?g:[]:[])},Ic:w||c.Ic,Gb:jh(b,"SegmentList")||c.Gb,Pb:A||c.Pb,width:mh(b,"width",uh)||c.width,height:mh(b,"height",uh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,Vd:u,audioSamplingRate:v,Oa:y,Hd:null,yf:C||c.yf}}
991
- function Iu(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
992
- function Ju(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.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=
993
- 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 uu(a){var b=a.Ic?1:0;b+=a.Gb?1:0;b+=a.Pb?1:0;if(0==b)return a.contentType==Ud||"application"==a.contentType?!0:!1;1!=b&&(a.Ic&&(a.Gb=null),a.Pb=null);return!0}
992
+ "urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=$s(m).join(",");n=mh(b,"frameRate",xh)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,q=wu(fh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=fh(b,"AudioChannelConfiguration");u=Ju(u)||c.Vd;var v=mh(b,"audioSamplingRate",uh)||c.audioSamplingRate;k||(k=tu(l,m));var w=jh(b,"SegmentBase"),A=jh(b,"SegmentTemplate"),y=w?mh(w,"availabilityTimeOffset",vh)||0:0,C=A?mh(A,"availabilityTimeOffset",vh)||0:0,z=f&&f.length?mh(f[0],"availabilityTimeOffset",
993
+ vh)||0:0;y=c.Oa+z+y+C;C=null;(z=jh(b,"SegmentSequenceProperties"))&&(z=jh(z,"SAP"))&&(C=mh(z,"cadence",sh));return{La:function(){return Od(d(),f.length?a.h&&h?ht(a.h,e):g?g:[]:[])},Ic:w||c.Ic,Hb:jh(b,"SegmentList")||c.Hb,Pb:A||c.Pb,width:mh(b,"width",uh)||c.width,height:mh(b,"height",uh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:q,id:e,language:b.attributes.lang,Vd:u,audioSamplingRate:v,Oa:y,Hd:null,yf:C||c.yf}}
994
+ function wu(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
995
+ function Ju(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b,
996
+ 16);if(!b)continue;for(var d=0,e=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":c=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse();b=parseInt(b,16);if(!b)continue;for(e=d=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(c=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(b=parseInt(b,10))&&0<b&&b<c.length)return c[b]}}return null}
997
+ function uu(a){var b=a.Ic?1:0;b+=a.Hb?1:0;b+=a.Pb?1:0;if(0==b)return a.contentType==Ud||"application"==a.contentType?!0:!1;1!=b&&(a.Ic&&(a.Hb=null),a.Pb=null);return!0}
994
998
  function Ku(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Ed(c)],f=Od(b(),e),g=qg(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g),kg(a.N,h),E(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=xd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
995
999
  function iu(a,b,c){var d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.u(4);break}h=g.value;wa(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.u(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.u(8);
996
1000
  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":$a("NTP UTCTiming scheme is not supported");break;default:$a("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return E(n,Ku(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return E(n,Ku(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ya(n,
997
- 3);break;case 5:Aa(n);case 3:g=f.next();n.u(2);break;case 4:return $a("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
1001
+ 3);break;case 5:za(n);case 3:g=f.next();n.u(2);break;case 4:return $a("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
998
1002
  function pu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=mh(d,"timescale",uh)||1,k=mh(d,"presentationTimeOffset",uh)||0;d=t(fh(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=mh(l,"presentationTime",uh)||0,n=mh(l,"duration",uh)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",eventElement:Ch(l),eventNode:Dh(l)},a.j.onTimelineRegionAdded(l))}}
999
1003
  function mu(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=wg,g=e?0:1,h=pl(b,c,d,a.g.retryParameters),E(l,$t(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function tu(a,b){b=Yd(a,b);return ne(b)?Ud:a.split("/")[0]}function $t(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);kg(a.N,b);return b.promise}
1000
- function Zt(a){var b=a.l.hd;if(!a.l.Sd||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=uh(e.attributes.ttl);return!e||b+e>c}).map(hh).filter(we);return d.length?Od(a.A,d):[]}S("shaka.dash.DashParser",Vt);wi["application/dash+xml"]=function(){return new Vt};wi["video/vnd.mpeg.dash.mpd"]=function(){return new Vt};function Lu(){}S("shaka.dependencies",Lu);Lu.has=function(a){return Mu.has(a)};Lu.add=function(a,b){if(!Nu[a])throw Error(a+" is not supported");a==Ou?rb("mux.js","mux.js is no longer used in Shaka Player."):Mu.set(a,function(){return b})};var Ou="muxjs",Nu={Rj:Ou,ISOBoxer:"ISOBoxer"};Lu.Allowed=Nu;var Mu=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Pu(a,b,c){this.type=a;this.g=b;this.segments=c||null}function Qu(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Qu.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
1001
- function Ru(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Su(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=Su(a,b))?a.value:c||null}function Tu(a,b){a=Su(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function Uu(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.vb=c}function Vu(a,b){this.name=a;this.value=b};function Wu(a,b){return a.filter(function(c){return c.name==b})}function Xu(a,b){return a.filter(function(c){return Tu(c,"TYPE")==b})}function Yu(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Zu(a,b,c){c=void 0===c?0:c;return(a=Yu(a,b))?Number(a.value):c}function $u(a,b,c){return b?av(a,[b],c):[]}
1004
+ function Zt(a){var b=a.l.jd;if(!a.l.Sd||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=uh(e.attributes.ttl);return!e||b+e>c}).map(hh).filter(we);return d.length?Od(a.A,d):[]}S("shaka.dash.DashParser",Vt);wi["application/dash+xml"]=function(){return new Vt};wi["video/vnd.mpeg.dash.mpd"]=function(){return new Vt};function Lu(){}S("shaka.dependencies",Lu);Lu.has=function(a){return Mu.has(a)};Lu.add=function(a,b){if(!Nu[a])throw Error(a+" is not supported");a==Ou?rb("mux.js","mux.js is no longer used in Shaka Player."):Mu.set(a,function(){return b})};var Ou="muxjs",Nu={Rj:Ou,ISOBoxer:"ISOBoxer"};Lu.Allowed=Nu;var Mu=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Pu(a,b,c){this.type=a;this.g=b;this.segments=c||null}function Qu(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Qu.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
1005
+ function Ru(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Su(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=Su(a,b))?a.value:c||null}function Tu(a,b){a=Su(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function Uu(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.wb=c}function Vu(a,b){this.name=a;this.value=b};function Wu(a,b){return a.filter(function(c){return c.name==b})}function Xu(a,b){return a.filter(function(c){return Tu(c,"TYPE")==b})}function Yu(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Zu(a,b,c){c=void 0===c?0:c;return(a=Yu(a,b))?Number(a.value):c}function $u(a,b,c){return b?av(a,[b],c):[]}
1002
1006
  function av(a,b,c){if(!b.length)return[];b=Od(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new T(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function bv(){this.g=0}
1003
1007
  function cv(a,b){b=xd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new T(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=dv(a,f),--a.g,ev.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=dv(a,g);if(fv.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
1004
1008
  c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=dv(a,k),ev.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Z(k,"TYPE")?f.push(k):"MAP"==Z(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Uu(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Uu("",d,f)));return new Pu(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
1005
1009
  g.name&&(g.attributes.push(new Vu("URI",h)),d=!0)}}return new Pu(b,e)}function dv(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new zp(d);var f;(f=Bp(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Bp(d,g);)c.push(new Vu(f[1],f[2]||f[3])),Ap(d)}return new Qu(a,b,c,e)}
1006
1010
  var ev="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),fv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function gv(){}function hv(a){try{var b=iv(a);return cg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return ag(c)}}
1007
- function iv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Id(a):e=Bd(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",gv);gv.parse=hv;mg("data",hv);function jv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.H=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Ud,new Map);this.N.set("image",new Map);this.Ea=new Set;this.i=new Map;this.l=null;this.L="";this.ya=new bv;this.J=-1;this.aa=Infinity;this.$=this.qb=this.Jb=!1;this.A=new Sc(function(){kv(a)});this.oa=lv;this.o=null;this.Fa=0;this.m=Infinity;this.xa=this.ua=this.P=0;this.W=new jg;this.F=new Map;this.G=new Map;this.ba=new Map;this.ha=
1008
- new Map;this.K=new Map;this.wa=new Map;this.na=new Map;this.hb=this.C=!1;this.Ka=new Va(5);this.j=null;this.ea=!0}q=jv.prototype;q.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};q.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.C=b.isLowLatencyMode(),E(e,mv(c,[a]),2)):3!=e.g?(d=e.h,c.L=d.uri,E(e,nv(c,d.data,a),3)):e.return(c.o)})};
1009
- q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.W&&(a.push(this.W.destroy()),this.W=null);this.g=this.h=null;this.Ea.clear();this.o=null;this.i.clear();this.H.clear();this.G.clear();this.s.clear();this.ba.clear();this.ha.clear();this.K.clear();this.wa.clear();this.na.clear();this.j&&this.j.destroy();return Promise.all(a)};
1010
- q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!ov(a))return m.return();b=[];c=Array.from(a.i.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(pv(a,g));return E(m,Promise.all(b),2)}qv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Yc});d.length&&!h&&(k=rv,sv(a,k.dh),l=d.map(function(n){return n.Bb}),a.l.Ua(Math.min.apply(Math,x(l))),a.h.updateDuration());
1011
+ function iv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Id(a):e=Bd(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",gv);gv.parse=hv;mg("data",hv);function jv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.H=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Ud,new Map);this.N.set("image",new Map);this.Ea=new Set;this.i=new Map;this.l=null;this.L="";this.Ba=new bv;this.J=-1;this.aa=Infinity;this.$=this.qb=this.rb=!1;this.A=new Sc(function(){kv(a)});this.oa=lv;this.o=null;this.Fa=0;this.m=Infinity;this.ua=this.ta=this.P=0;this.U=new jg;this.F=new Map;this.G=new Map;this.ba=new Map;this.ha=
1012
+ new Map;this.K=new Map;this.wa=new Map;this.na=new Map;this.hb=this.C=!1;this.Ka=new Va(5);this.j=null;this.ga=!0}r=jv.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.C=b.isLowLatencyMode(),E(e,mv(c,[a]),2)):3!=e.g?(d=e.h,c.L=d.uri,E(e,nv(c,d.data,a),3)):e.return(c.o)})};
1013
+ r.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.U&&(a.push(this.U.destroy()),this.U=null);this.g=this.h=null;this.Ea.clear();this.o=null;this.i.clear();this.H.clear();this.G.clear();this.s.clear();this.ba.clear();this.ha.clear();this.K.clear();this.wa.clear();this.na.clear();this.j&&this.j.destroy();return Promise.all(a)};
1014
+ r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!ov(a))return m.return();b=[];c=Array.from(a.i.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(pv(a,g));return E(m,Promise.all(b),2)}qv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Zc});d.length&&!h&&(k=rv,sv(a,k.dh),l=d.map(function(n){return n.Cb}),a.l.Ua(Math.min.apply(Math,x(l))),a.h.updateDuration());
1011
1015
  h&&tv(a);H(m)})};function uv(a,b){return ov(a)?a.N.get(b.type):b.Pd}
1012
- function pv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P;return O(function(R){if(1==R.g){c=[];d=t(b.M());for(e=d.next();!e.done;e=d.next())f=e.value,g=new sc(f),h=g.g,b.sd&&(0<=b.kb&&h.add("_HLS_msn",String(b.kb)),0<=b.lb&&h.add("_HLS_part",String(b.lb))),b.td&&h.add("_HLS_skip","YES"),Hc(h)&&wc(g,h),c.push(g.toString());return E(R,mv(a,c,!0),2)}if(3!=R.g){k=R.h;if(!b.stream.segmentIndex)return R.return();l=cv(a.ya,k.data);if(1!=l.type)throw new T(2,4,4017);m=k.uri;m==k.originalUri||
1013
- b.M().includes(m)||b.Dg.push(m);n=Wu(l.g,"EXT-X-DEFINE");p=vv(a,n,m);r=b.stream;u=uv(a,b);return E(R,wv(a,l,r.mimeType,b.M,p),3)}v=R.h;w=v.keyIds;A=v.drmInfos;y=function(Q,ca){return Q.size===ca.size&&[].concat(x(Q)).every(function(ea){return ca.has(ea)})};y(r.keyIds,w)||(r.keyIds=w,r.drmInfos=A,a.h.newDrmInfo(r));C=xv(a,l,u,p,b.M,b.type);z=C.segments;if(B=C.bandwidth)r.bandwidth=B;r.segmentIndex.ed(z,a.l.ib());z.length&&(D=Zu(l.g,"EXT-X-MEDIA-SEQUENCE",0),F=(I=Yu(l.g,"EXT-X-SKIP"))?Number(Z(I,"SKIPPED-SEGMENTS")):
1014
- 0,J=yv(D,z),K=J.kb,G=J.lb,b.kb=K+F,b.lb=G,M=u.get(D),r.segmentIndex.Ca(M));N=r.segmentIndex.g[0]||null;b.fc=N.startTime;L=z[z.length-1];b.Bb=L.endTime;if(P=Yu(l.g,"EXT-X-ENDLIST"))b.Yc=!0;zv(a,l);H(R)})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(a){this.j&&this.j.banLocation(a)};
1016
+ function pv(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P;return O(function(R){if(1==R.g){c=[];d=t(b.M());for(e=d.next();!e.done;e=d.next())f=e.value,g=new sc(f),h=g.g,b.td&&(0<=b.kb&&h.add("_HLS_msn",String(b.kb)),0<=b.lb&&h.add("_HLS_part",String(b.lb))),b.ud&&h.add("_HLS_skip","YES"),Hc(h)&&wc(g,h),c.push(g.toString());return E(R,mv(a,c,!0),2)}if(3!=R.g){k=R.h;if(!b.stream.segmentIndex)return R.return();l=cv(a.Ba,k.data);if(1!=l.type)throw new T(2,4,4017);m=k.uri;m==k.originalUri||
1017
+ b.M().includes(m)||b.Dg.push(m);n=Wu(l.g,"EXT-X-DEFINE");p=vv(a,n,m);q=b.stream;u=uv(a,b);return E(R,wv(a,l,q.mimeType,b.M,p),3)}v=R.h;w=v.keyIds;A=v.drmInfos;y=function(Q,ca){return Q.size===ca.size&&[].concat(x(Q)).every(function(ea){return ca.has(ea)})};y(q.keyIds,w)||(q.keyIds=w,q.drmInfos=A,a.h.newDrmInfo(q));C=xv(a,l,u,p,b.M,b.type);z=C.segments;if(B=C.bandwidth)q.bandwidth=B;q.segmentIndex.fd(z,a.l.ib());z.length&&(D=Zu(l.g,"EXT-X-MEDIA-SEQUENCE",0),F=(I=Yu(l.g,"EXT-X-SKIP"))?Number(Z(I,"SKIPPED-SEGMENTS")):
1018
+ 0,J=yv(D,z),K=J.kb,G=J.lb,b.kb=K+F,b.lb=G,M=u.get(D),q.segmentIndex.Ca(M));N=q.segmentIndex.g[0]||null;b.fc=N.startTime;L=z[z.length-1];b.Cb=L.endTime;if(P=Yu(l.g,"EXT-X-ENDLIST"))b.Zc=!0;zv(a,l);H(R)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
1015
1019
  function Av(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.J,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=uv(a,f);if(g=g.g[0]||null){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.J=Math.max(a.J,l));f.Ae=l;break}}}}if(!(0>a.J))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,Bv(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.J-d.Ae,0<f&&(e.g.splice(0,f),e=e.g[0]||null))e=-e.startTime,d.stream.segmentIndex.offset(e),
1016
1020
  Cv(a,d,e)}
1017
1021
  function Dv(a,b){if(Infinity==a.aa){b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.stream.segmentIndex.g[0]||null,null!=c&&null!=c.h&&(a.aa=Math.min(a.aa,c.h))}b=a.aa;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!Bv(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(f)if(null==f.h)Za("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.M(),"Expect AV sync issues!");else for(Cv(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.Jf(b)}}}}
1018
- function Cv(a,b,c){b.fc+=c;b.Bb+=c;a=uv(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.M()}
1019
- function nv(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q,ca,ea,la,Qa,ua,za,La,Ra;return O(function(ma){switch(ma.g){case 1:d=cv(a.ya,b);e=Wu(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new pk(null,0);a.l.kc(!0);k=function(){return[c]};if(1==d.type)return a.ea=!1,w=Wu(d.g,"EXT-X-DEFINE"),A=vv(a,w,a.L),E(ma,Ev(a,d,k,A),7);Fv(a,e);l=Wu(d.g,"EXT-X-MEDIA");m=Wu(d.g,"EXT-X-STREAM-INF");n=Wu(d.g,"EXT-X-IMAGE-STREAM-INF");p=Wu(d.g,"EXT-X-I-FRAME-STREAM-INF");r=Wu(d.g,"EXT-X-SESSION-KEY");
1020
- u=Wu(d.g,"EXT-X-SESSION-DATA");v=Wu(d.g,"EXT-X-CONTENT-STEERING");Gv(a,u);return E(ma,Hv(a,v),4);case 4:return Iv(a,m),Jv(a,l),E(ma,Kv(a,m,r,l,k,a.s),5);case 5:return f=ma.h,g=Lv(a,l),E(ma,Mv(a,n,p),6);case 6:h=ma.h;ma.u(3);break;case 7:return y=ma.h,C=y.type,z=y.mimeType,B=y.codecs,D=y.language,I=y.height,F=y.width,J=y.channelCount,K=y.sampleRate,G=y.closedCaptions,M=y.md,N=y.colorGamut,E(ma,Nv(a,a.B++,A,d,k,B,C,D,!0,"Media Playlist",J,G,null,!1,K,!1,z),8);case 8:L=ma.h,a.i.set(c,L),"video"==C&&
1021
- Ov(L.stream,F,I,null,M,null,N),f.push({id:0,language:ze(D||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==C?L.stream:null,video:"video"==C?L.stream:null,bandwidth:L.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==d.type&&(ov(a)&&(Pv(a,d),P=a.m,a.A.X(P)),R=Array.from(a.i.values()),Qv(a,R),tv(a));a.o={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,
1022
+ function Cv(a,b,c){b.fc+=c;b.Cb+=c;a=uv(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.M()}
1023
+ function nv(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q,ca,ea,la,Qa,ua,Aa,La,Ra;return O(function(ma){switch(ma.g){case 1:d=cv(a.Ba,b);e=Wu(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new pk(null,0);a.l.kc(!0);k=function(){return[c]};if(1==d.type)return a.ga=!1,w=Wu(d.g,"EXT-X-DEFINE"),A=vv(a,w,a.L),E(ma,Ev(a,d,k,A),7);Fv(a,e);l=Wu(d.g,"EXT-X-MEDIA");m=Wu(d.g,"EXT-X-STREAM-INF");n=Wu(d.g,"EXT-X-IMAGE-STREAM-INF");p=Wu(d.g,"EXT-X-I-FRAME-STREAM-INF");q=Wu(d.g,"EXT-X-SESSION-KEY");
1024
+ u=Wu(d.g,"EXT-X-SESSION-DATA");v=Wu(d.g,"EXT-X-CONTENT-STEERING");Gv(a,u);return E(ma,Hv(a,v),4);case 4:return Iv(a,m),Jv(a,l),E(ma,Kv(a,m,q,l,k,a.s),5);case 5:return f=ma.h,g=Lv(a,l),E(ma,Mv(a,n,p),6);case 6:h=ma.h;ma.u(3);break;case 7:return y=ma.h,C=y.type,z=y.mimeType,B=y.codecs,D=y.language,I=y.height,F=y.width,J=y.channelCount,K=y.sampleRate,G=y.closedCaptions,M=y.nd,N=y.colorGamut,E(ma,Nv(a,a.B++,A,d,k,B,C,D,!0,"Media Playlist",J,G,null,!1,K,!1,z),8);case 8:L=ma.h,a.i.set(c,L),"video"==C&&
1025
+ Ov(L.stream,F,I,null,M,null,N),f.push({id:0,language:ze(D||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==C?L.stream:null,video:"video"==C?L.stream:null,bandwidth:L.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==d.type&&(ov(a)&&(Pv(a,d),P=a.m,a.A.Y(P)),R=Array.from(a.i.values()),Qv(a,R),tv(a));a.o={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,
1022
1026
  ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.$||!a.g.hls.disableCodecGuessing){ma.u(9);break}Q=[];ca=t(a.o.variants);for(ea=ca.next();!ea.done;ea=ca.next())la=ea.value,la.audio&&""===la.audio.codecs&&Q.push(la.audio.createSegmentIndex()),la.video&&""===la.video.codecs&&Q.push(la.video.createSegmentIndex());return E(ma,Promise.all(Q),9);case 9:a.h.makeTextStreamsForClosedCaptions(a.o);if(1==f.length){Qa=
1023
- [];ua=f[0];za=t([ua.video,ua.audio]);for(La=za.next();!La.done;La=za.next())(Ra=La.value)&&!Ra.segmentIndex&&Qa.push(Ra.createSegmentIndex());if(0<Qa.length)return E(ma,Promise.all(Qa),0)}ma.u(0)}})}
1024
- function Ev(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F;return O(function(J){switch(J.g){case 1:e=Ys(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return J.return(e);f=b.segments[0];g=$u(c(),f.h,d);h=g[0];k=new sc(h);l=k.Na.split(".").pop();if(m=Rv[l])return J.return(Ys(m));n=wg;p=null;r=Sv(a,b,f.g,c,d);a.ba.clear();if(!r){J.u(2);break}u=pl(r.M(),r.$b(),r.Yb(),a.g.retryParameters);return E(J,Tv(a,u,n,{type:0}),3);case 3:v=J.h,p=v.data;case 2:w=0;A=null;if(y=Yu(f.g,"EXT-X-BYTERANGE"))C=
1027
+ [];ua=f[0];Aa=t([ua.video,ua.audio]);for(La=Aa.next();!La.done;La=Aa.next())(Ra=La.value)&&!Ra.segmentIndex&&Qa.push(Ra.createSegmentIndex());if(0<Qa.length)return E(ma,Promise.all(Qa),0)}ma.u(0)}})}
1028
+ function Ev(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F;return O(function(J){switch(J.g){case 1:e=Ys(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return J.return(e);f=b.segments[0];g=$u(c(),f.h,d);h=g[0];k=new sc(h);l=k.Na.split(".").pop();if(m=Rv[l])return J.return(Ys(m));n=wg;p=null;q=Sv(a,b,f.g,c,d);a.ba.clear();if(!q){J.u(2);break}u=pl(q.M(),q.$b(),q.Yb(),a.g.retryParameters);return E(J,Tv(a,u,n,{type:0}),3);case 3:v=J.h,p=v.data;case 2:w=0;A=null;if(y=Yu(f.g,"EXT-X-BYTERANGE"))C=
1025
1029
  t(Uv(null,y.value)),w=C.next().value,A=C.next().value;z=pl(g,w,A,a.g.retryParameters);return E(J,Tv(a,z,n,{type:1}),4);case 4:B=J.h;(D=B.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==D){var K=B.data;var G=Bb(K);G=(new wj).parse(G);var M=G.Tc();G=G.Te();var N=[],L=!1,P=!1;switch(M.audio){case "aac":case "aac-loas":N.push("mp4a.40.2");L=!0;break;case "mp3":N.push("mp4a.40.34");L=!0;break;case "ac3":N.push("ac-3");L=!0;break;case "ec3":N.push("ec-3");L=!0;break;
1026
1030
  case "opus":N.push("opus"),L=!0}switch(M.video){case "avc":G.codec?N.push(G.codec):N.push("avc1.42E01E");P=!0;break;case "hvc":G.codec?N.push(G.codec):N.push("hvc1.1.6.L93.90");P=!0;break;case "av1":N.push("av01.0.01M.08"),P=!0}if(N.length){M=L&&!P;L=new Map;if(P){P=new Hb("video/mp2t");P.i(K);K=t(P.j());for(var R=K.next();!R.done;R=K.next())R=R.value,L.set(R,R);P.g()}G={type:M?"audio":"video",mimeType:"video/mp2t",codecs:N.join(", "),language:null,height:G.height,width:G.width,channelCount:null,
1027
- sampleRate:null,closedCaptions:L,md:null,colorGamut:null}}else G=null;if(I=G)return J.return(I)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(F=Zs(p,B.data))return J.return(F);return J.return(e)}})}
1028
- function tv(a){if(ov(a)){if(a.oa==Vv){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Bb),c=Math.min(c,e.fc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.ge(b)}}else a.l.Ua(Wv(a));if(!a.l.o)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
1031
+ sampleRate:null,closedCaptions:L,nd:null,colorGamut:null}}else G=null;if(I=G)return J.return(I)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(F=Zs(p,B.data))return J.return(F);return J.return(e)}})}
1032
+ function tv(a){if(ov(a)){if(a.oa==Vv){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Cb),c=Math.min(c,e.fc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.ge(b)}}else a.l.Ua(Wv(a));if(!a.l.o)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
1029
1033
  c.h&&a.l.Mg(c.h);a.l.Md()}function Fv(a,b){var c=(new sc(a.L)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.s.has(d)||a.s.set(d,f));e&&(d=c.get(e)[0])&&!a.s.has(d)&&a.s.set(e,d)}}
1030
1034
  function vv(a,b,c){c=(new sc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.s.get(f))&&d.set(f,e)}return d}
1031
1035
  function Iv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=Xv(a,d);if(f){var g=Sd(Ud,d);a.G.set(f,g);Ob(d,g)}e&&(f=Sd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Sd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
@@ -1033,65 +1037,65 @@ function Gv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z
1033
1037
  function Hv(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new ct(a.h);a.j.configure(a.g);a.j.i=[a.L];a.j.setManifestType("HLS");a.j.h=g;c=dt(a.j,h);break}return E(k,c,0)})}
1034
1038
  function Lv(a,b){var c=Xu(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Yv(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Tu(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Zv(Ud,d)||$v(Ud),aw(f.stream)}}return b.filter(function(g){return g})}
1035
1039
  function aw(a){var b=new Set([Yd(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Ub(function(c){c.mimeType&&b.add(Yd(c.mimeType,a.codecs))});a.fullMimeTypes=b}
1036
- function Mv(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);wa(m,2);return E(m,bw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=Aa(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Tu(g,"URI"),k=Z(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
1037
- p=Z(g,"CHARACTERISTICS"),r=cw(a,a.B++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Z(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),w=v.next().value,A=v.next().value;r.stream.width=Number(w)||void 0;r.stream.height=Number(A)||void 0;var y=Z(g,"BANDWIDTH");y&&(r.stream.bandwidth=Number(y));a.i.set(h,r);l=r}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(C){if(a.g.hls.ignoreImageStreamFailures)return null;throw C;}})),E(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
1040
+ function Mv(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);wa(m,2);return E(m,bw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=za(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Tu(g,"URI"),k=Z(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
1041
+ p=Z(g,"CHARACTERISTICS"),q=cw(a,a.B++,[h],k,"image",m,!1,n,null,null,p,!1,null,!1),u=Z(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),w=v.next().value,A=v.next().value;q.stream.width=Number(w)||void 0;q.stream.height=Number(A)||void 0;var y=Z(g,"BANDWIDTH");y&&(q.stream.bandwidth=Number(y));a.i.set(h,q);l=q}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(C){if(a.g.hls.ignoreImageStreamFailures)return null;throw C;}})),E(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
1038
1042
  function dw(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Ru(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Yv(a,d[g],c)}
1039
- function Kv(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q,ca,ea,la,Qa,ua,za,La;return O(function(Ra){switch(Ra.g){case 1:g=[];h=new Set;if(!(0<c.length)){Ra.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Ra.u(2);break}m=l.value;n=Tu(m,"METHOD");p=Z(m,"KEYFORMAT")||"identity";r=null;if("NONE"==n){Ra.u(4);break}if(ew(n)){u=$u(e(),Tu(m,"URI"),f);v=u.sort().join("");a.K.has(v)||(w=qg(u,a.g.retryParameters),A=Tv(a,w,6),a.K.set(v,A));Ra.u(4);break}if("identity"!=p){r=(y=fw[p])?
1040
- y(m,""):null;Ra.u(6);break}return E(Ra,gw(a,m,"",e,null,f),9);case 9:r=Ra.h;case 6:if(r){if(r.keyIds)for(C=t(r.keyIds),z=C.next();!z.done;z=C.next())B=z.value,h.add(B);g.push(r)}case 4:l=k.next();Ra.u(3);break;case 2:D={};I=t(b);for(F=I.next();!F.done;F=I.next())J=F.value,K=Ru(J,!a.j),D[K]?D[K].push(J):D[K]=[J];G=[];for(M in D)N=D[M],L=N[0],P=Z(L,"FRAME-RATE"),R=Number(Z(L,"AVERAGE-BANDWIDTH"))||Number(Tu(L,"BANDWIDTH")),Q=Z(L,"RESOLUTION"),ca=t(Q?Q.split("x"):[null,null]),ea=ca.next().value,la=ca.next().value,
1041
- Qa=Z(L,"VIDEO-RANGE"),(ua=Z(L,"REQ-VIDEO-LAYOUT"))&&ua.includes(",")&&(za=ua.split(",").filter(function(ma){return"CH-STEREO"==ma||"CH-MONO"==ma}),ua=za[0]),ua=ua||"CH-MONO",La=hw(a,N,d),G.push.apply(G,x(iw(a,La.audio,La.video,R,ea,la,P,Qa,ua,g,h)));return Ra.return(G.filter(function(ma){return null!=ma}))}})}
1042
- function hw(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Z(m,"AUDIO");var n=Z(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=Z(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(Tu(v,"GROUP-ID"))}),dw(a,k,e));k=(e=f.sort().join(","))&&a.H.has(e)?a.H.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var r=b.map(function(v){return Tu(v,
1043
- "URI")});h=d.audio.find(function(v){return v&&v.M().find(function(w){return r.includes(w)})});g=Xv(a,b[0]);n=Sd("video",g);(p=Sd("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&p&&n?(h="video",g=[[n,p].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=p=n=l=null;!k.length&&(c=c.find(function(v){var w=Z(v,"URI")||"",A=Z(v,"TYPE");v=Tu(v,"GROUP-ID");return"SUBTITLES"!=A&&""==w&&f.includes(v)}))&&(l=Z(c,"LANGUAGE"),
1043
+ function Kv(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q,ca,ea,la,Qa,ua,Aa,La;return O(function(Ra){switch(Ra.g){case 1:g=[];h=new Set;if(!(0<c.length)){Ra.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Ra.u(2);break}m=l.value;n=Tu(m,"METHOD");p=Z(m,"KEYFORMAT")||"identity";q=null;if("NONE"==n){Ra.u(4);break}if(ew(n)){u=$u(e(),Tu(m,"URI"),f);v=u.sort().join("");a.K.has(v)||(w=qg(u,a.g.retryParameters),A=Tv(a,w,6),a.K.set(v,A));Ra.u(4);break}if("identity"!=p){q=(y=fw[p])?
1044
+ y(m,""):null;Ra.u(6);break}return E(Ra,gw(a,m,"",e,null,f),9);case 9:q=Ra.h;case 6:if(q){if(q.keyIds)for(C=t(q.keyIds),z=C.next();!z.done;z=C.next())B=z.value,h.add(B);g.push(q)}case 4:l=k.next();Ra.u(3);break;case 2:D={};I=t(b);for(F=I.next();!F.done;F=I.next())J=F.value,K=Ru(J,!a.j),D[K]?D[K].push(J):D[K]=[J];G=[];for(M in D)N=D[M],L=N[0],P=Z(L,"FRAME-RATE"),R=Number(Z(L,"AVERAGE-BANDWIDTH"))||Number(Tu(L,"BANDWIDTH")),Q=Z(L,"RESOLUTION"),ca=t(Q?Q.split("x"):[null,null]),ea=ca.next().value,la=ca.next().value,
1045
+ Qa=Z(L,"VIDEO-RANGE"),(ua=Z(L,"REQ-VIDEO-LAYOUT"))&&ua.includes(",")&&(Aa=ua.split(",").filter(function(ma){return"CH-STEREO"==ma||"CH-MONO"==ma}),ua=Aa[0]),ua=ua||"CH-MONO",La=hw(a,N,d),G.push.apply(G,x(iw(a,La.audio,La.video,R,ea,la,P,Qa,ua,g,h)));return Ra.return(G.filter(function(ma){return null!=ma}))}})}
1046
+ function hw(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Z(m,"AUDIO");var n=Z(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=Z(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(Tu(v,"GROUP-ID"))}),dw(a,k,e));k=(e=f.sort().join(","))&&a.H.has(e)?a.H.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var q=b.map(function(v){return Tu(v,
1047
+ "URI")});h=d.audio.find(function(v){return v&&v.M().find(function(w){return q.includes(w)})});g=Xv(a,b[0]);n=Sd("video",g);(p=Sd("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&p&&n?(h="video",g=[[n,p].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=p=n=l=null;!k.length&&(c=c.find(function(v){var w=Z(v,"URI")||"",A=Z(v,"TYPE");v=Tu(v,"GROUP-ID");return"SUBTITLES"!=A&&""==w&&f.includes(v)}))&&(l=Z(c,"LANGUAGE"),
1044
1048
  n=Z(c,"NAME"),p=jw(c),kw(c),m=Z(c,"CHARACTERISTICS"),u=lw(c));a=mw(a,b,g,h,l,n,p,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
1045
1049
  function Xv(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.$=0<c.length;a.$||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,x(b)));return $s(a)}function jw(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
1046
1050
  function lw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function kw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
1047
- function iw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())Ov(p.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var r=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=r?r.stream:null)k.drmInfos=l,k.keyIds=m;k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);n=f?f.stream.drmInfos:null;p=r?r.stream.drmInfos:null;
1048
- r=r?r.M().sort().join(","):"";var u=f?f.M().sort().join(","):"";r=r+" - "+u;h&&k&&!Kc(n,p)||a.Ea.has(r)||(h={id:a.B++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Ea.add(r))}return e}
1049
- function Jv(a,b){b=Xu(b,"CLOSED-CAPTIONS");a.ea=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=ze(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=Tu(d,"GROUP-ID");d=Tu(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
1051
+ function iw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),p=n.next();!p.done;p=n.next())Ov(p.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var q=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=q?q.stream:null)k.drmInfos=l,k.keyIds=m;k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);n=f?f.stream.drmInfos:null;p=q?q.stream.drmInfos:null;
1052
+ q=q?q.M().sort().join(","):"";var u=f?f.M().sort().join(","):"";q=q+" - "+u;h&&k&&!Kc(n,p)||a.Ea.has(q)||(h={id:a.B++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Ea.add(q))}return e}
1053
+ function Jv(a,b){b=Xu(b,"CLOSED-CAPTIONS");a.ga=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=ze(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=Tu(d,"GROUP-ID");d=Tu(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
1050
1054
  function Yv(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Tu(k,"URI");k=Tu(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Tu(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Ud);if(k==Ud)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.B++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
1051
- m=n.next().value;n=n.next().value;(m=c.get(m))&&gt(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?jw(h):null;var p="audio"==k?kw(h):!1,r=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?lw(h):null;d=cw(a,l,d,b,k,c,m,f,n,null,r,u,h,p);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.i.set(e,d);return d}
1055
+ m=n.next().value;n=n.next().value;(m=c.get(m))&&gt(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?jw(h):null;var p="audio"==k?kw(h):!1,q=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?lw(h):null;d=cw(a,l,d,b,k,c,m,f,n,null,q,u,h,p);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.i.set(e,d);return d}
1052
1056
  function bw(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(p){if(1==p.g){c=Tu(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.i.has(c))return p.return(a.i.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=cw(a,a.B++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?E(p,h.stream.createSegmentIndex(),3):p.u(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])*
1053
1057
  Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
1054
- function mw(a,b,c,d,e,f,g,h,k){for(var l=a.B++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var r=p.value;p=Tu(r,"URI");r=Z(r,"PATHWAY-ID");a.j&&r&&gt(a.j,l,r,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.F.get(b);break a}a.ea=!1}else if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}b=null}c=Rd(d,c);d=cw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
1055
- function cw(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(B){var D,I,F,J,K,G,M,N,L,P,R,Q,ca,ea,la,Qa,ua,za,La,Ra,ma,bb;return O(function(kb){switch(kb.g){case 1:return D=Wd,I=y.M(),E(kb,mv(a,y.M(),!0),2);case 2:F=kb.h;if(B.aborted)return kb.return();J=F.uri;J==F.originalUri||I.includes(J)||A.push(J);K=cv(a.ya,F.data);if(1!=K.type)throw new T(2,4,4017);G=Wu(K.g,"EXT-X-DEFINE");M=vv(a,G,J);N=void 0;L=!1;if(!(!a.$&&a.g.hls.disableCodecGuessing||a.ea&&e==D.fa&&!a.g.hls.disableClosedCaptionsDetection)){kb.u(3);
1056
- break}if(P=0<K.segments.length)R=K.segments[0],Yu(R.g,"EXT-X-GAP")&&(P=!1);if(!P){kb.u(3);break}a.ea=!1;return E(kb,Ev(a,K,v,M),5);case 5:Q=kb.h,!Q.closedCaptions.size||l&&l.size==Q.closedCaptions.size||(l=Q.closedCaptions,L=!0),!a.$&&a.g.hls.disableCodecGuessing&&(N=Q.mimeType,d=Q.codecs);case 3:return ca=ov(a),E(kb,Nv(a,0,M,K,v,d,e,f,g,h,k,l,m,n,p,r,N),6);case 6:ea=kb.h;if(B.aborted)return kb.return();la=ea.stream;ov(a)&&!ca&&Pv(a,K);y.fc=ea.fc;y.Bb=ea.Bb;y.td=ea.td;y.sd=ea.sd;y.Yc=ea.Yc;y.Pd=ea.Pd;
1057
- y.kb=ea.kb;y.lb=ea.lb;y.ef=!0;w.segmentIndex=la.segmentIndex;w.encrypted=la.encrypted;w.drmInfos=la.drmInfos;w.keyIds=la.keyIds;w.mimeType=la.mimeType;w.bandwidth=w.bandwidth||la.bandwidth;w.codecs=w.codecs||la.codecs;w.closedCaptions=w.closedCaptions||la.closedCaptions;aw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&L&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==D.fa||e==D.V)for(Qa=t(a.i.values()),ua=Qa.next();!ua.done;ua=Qa.next())za=ua.value,za.ef||za.type!=e||(za.stream.mimeType=la.mimeType,
1058
- aw(za.stream));e==D.qa&&(La=la.segmentIndex.get(0))&&La.da&&(w.mimeType="application/mp4",aw(w));nw(a)&&(a.qb?Qv(a,[y]):(a.qb=!0,Ra=Array.from(a.i.values()),ma=Ra.filter(function(pd){return pd.stream.segmentIndex}),Qv(a,ma),tv(a),bb=a.m,0<bb&&a.A.X(bb)));H(kb)}})}function v(){return a.j&&1<c.length?ht(a.j,b):A.concat(av([a.L],c,a.s))}var w=ow(a,d,e,f,g,h,k,l,m,n,p,r),A=[],y={stream:w,type:e,Dg:A,M:v,fc:0,Bb:0,Pd:new Map,td:!1,sd:!1,Yc:!1,Ae:-1,kb:-1,lb:-1,ef:!1},C=null,z=new AbortController;w.createSegmentIndex=
1059
- function(){if(C)return C;z=new AbortController;return C=new Promise(function(B){B(u(z.signal))})};w.closeSegmentIndex=function(){C&&!w.segmentIndex&&z.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);C=null};return y}function Wv(a){var b=Infinity;a=t(a.i.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.Bb));return b}
1060
- function qv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Ub(function(e){c.push(e)});a.l.fd(c)}function Qv(a,b){if(!ov(a))for(var c=Wv(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.vc(0,c);qv(a,b.map(function(f){return f.stream}));c=ov(a)&&!a.Jb;a.g.hls.ignoreManifestProgramDateTime||c?Av(a,b,c):(Dv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Av(a,b))}
1058
+ function mw(a,b,c,d,e,f,g,h,k){for(var l=a.B++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var q=p.value;p=Tu(q,"URI");q=Z(q,"PATHWAY-ID");a.j&&q&&gt(a.j,l,q,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.F.get(b);break a}a.ga=!1}else if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}b=null}c=Rd(d,c);d=cw(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
1059
+ function cw(a,b,c,d,e,f,g,h,k,l,m,n,p,q){function u(B){var D,I,F,J,K,G,M,N,L,P,R,Q,ca,ea,la,Qa,ua,Aa,La,Ra,ma,bb;return O(function(kb){switch(kb.g){case 1:return D=Wd,I=y.M(),E(kb,mv(a,y.M(),!0),2);case 2:F=kb.h;if(B.aborted)return kb.return();J=F.uri;J==F.originalUri||I.includes(J)||A.push(J);K=cv(a.Ba,F.data);if(1!=K.type)throw new T(2,4,4017);G=Wu(K.g,"EXT-X-DEFINE");M=vv(a,G,J);N=void 0;L=!1;if(!(!a.$&&a.g.hls.disableCodecGuessing||a.ga&&e==D.ea&&!a.g.hls.disableClosedCaptionsDetection)){kb.u(3);
1060
+ break}if(P=0<K.segments.length)R=K.segments[0],Yu(R.g,"EXT-X-GAP")&&(P=!1);if(!P){kb.u(3);break}a.ga=!1;return E(kb,Ev(a,K,v,M),5);case 5:Q=kb.h,!Q.closedCaptions.size||l&&l.size==Q.closedCaptions.size||(l=Q.closedCaptions,L=!0),!a.$&&a.g.hls.disableCodecGuessing&&(N=Q.mimeType,d=Q.codecs);case 3:return ca=ov(a),E(kb,Nv(a,0,M,K,v,d,e,f,g,h,k,l,m,n,p,q,N),6);case 6:ea=kb.h;if(B.aborted)return kb.return();la=ea.stream;ov(a)&&!ca&&Pv(a,K);y.fc=ea.fc;y.Cb=ea.Cb;y.ud=ea.ud;y.td=ea.td;y.Zc=ea.Zc;y.Pd=ea.Pd;
1061
+ y.kb=ea.kb;y.lb=ea.lb;y.ef=!0;w.segmentIndex=la.segmentIndex;w.encrypted=la.encrypted;w.drmInfos=la.drmInfos;w.keyIds=la.keyIds;w.mimeType=la.mimeType;w.bandwidth=w.bandwidth||la.bandwidth;w.codecs=w.codecs||la.codecs;w.closedCaptions=w.closedCaptions||la.closedCaptions;aw(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&L&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==D.ea||e==D.W)for(Qa=t(a.i.values()),ua=Qa.next();!ua.done;ua=Qa.next())Aa=ua.value,Aa.ef||Aa.type!=e||(Aa.stream.mimeType=la.mimeType,
1062
+ aw(Aa.stream));e==D.qa&&(La=la.segmentIndex.get(0))&&La.da&&(w.mimeType="application/mp4",aw(w));nw(a)&&(a.qb?Qv(a,[y]):(a.qb=!0,Ra=Array.from(a.i.values()),ma=Ra.filter(function(qd){return qd.stream.segmentIndex}),Qv(a,ma),tv(a),bb=a.m,0<bb&&a.A.Y(bb)));H(kb)}})}function v(){return a.j&&1<c.length?ht(a.j,b):A.concat(av([a.L],c,a.s))}var w=ow(a,d,e,f,g,h,k,l,m,n,p,q),A=[],y={stream:w,type:e,Dg:A,M:v,fc:0,Cb:0,Pd:new Map,ud:!1,td:!1,Zc:!1,Ae:-1,kb:-1,lb:-1,ef:!1},C=null,z=new AbortController;w.createSegmentIndex=
1063
+ function(){if(C)return C;z=new AbortController;return C=new Promise(function(B){B(u(z.signal))})};w.closeSegmentIndex=function(){C&&!w.segmentIndex&&z.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);C=null};return y}function Wv(a){var b=Infinity;a=t(a.i.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.Cb));return b}
1064
+ function qv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Ub(function(e){c.push(e)});a.l.gd(c)}function Qv(a,b){if(!ov(a))for(var c=Wv(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.vc(0,c);qv(a,b.map(function(f){return f.stream}));c=ov(a)&&!a.rb;a.g.hls.ignoreManifestProgramDateTime||c?Av(a,b,c):(Dv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Av(a,b))}
1061
1065
  function Bv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function nw(a){if(!a.o)return!1;var b=[],c=[];a=t(a.o.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}
1062
- function Nv(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w){var A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q,ca,ea,la,Qa;return O(function(ua){switch(ua.g){case 1:var za=Yu(d.g,"EXT-X-PLAYLIST-TYPE"),La=Yu(d.g,"EXT-X-ENDLIST");La=za&&"VOD"==za.value||La;za=za&&"EVENT"==za.value&&!La;za=!La&&!za;La?sv(a,lv):za?sv(a,Vv):sv(a,pw);ov(a)&&zv(a,d);A=ov(a)?a.N.get(g):new Map;y=xv(a,d,A,c,e,g);C=y.segments;z=y.bandwidth;if(w){ua.u(2);break}return E(ua,qw(a,g,f,C),3);case 3:w=ua.h;case 2:return E(ua,wv(a,d,w,e,c),4);case 4:B=ua.h;
1063
- D=B.drmInfos;I=B.keyIds;F=B.encrypted;J=B.hh;if(F&&!D.length&&!J)throw new T(2,4,4026);K=ow(a,f,g,h,k,l,m,n,p,r,u,v);K.encrypted=F;K.drmInfos=D;K.keyIds=I;K.mimeType=w;z&&(K.bandwidth=z);aw(K);ov(a)&&zv(a,d);G=C[0].startTime;M=C[C.length-1];N=M.endTime;L=new Lk(C);K.segmentIndex=L;R=(P=Yu(d.g,"EXT-X-SERVER-CONTROL"))?null!=Su(P,"CAN-SKIP-UNTIL"):!1;Q=P?null!=Su(P,"CAN-BLOCK-RELOAD"):!1;ca=Zu(d.g,"EXT-X-MEDIA-SEQUENCE",0);ea=yv(ca,C);la=ea.kb;Qa=ea.lb;return ua.return({stream:K,type:g,Dg:[],M:e,fc:G,
1064
- Bb:N,td:R,sd:Q,Yc:!1,Ae:-1,kb:la,lb:Qa,Pd:A,ef:!1})}})}function yv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{kb:a,lb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{kb:a,lb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{kb:a,lb:c}}
1065
- function ow(a,b,c,d,e,f,g,h,k,l,m,n){var p=Zv(c,b)||$v(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==Ud?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.B++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1066
- segmentIndex:null,mimeType:p,codecs:b,kind:c==Ud?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:ze(d||"und"),originalLanguage: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:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
1066
+ function Nv(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u,v,w){var A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R,Q,ca,ea,la,Qa;return O(function(ua){switch(ua.g){case 1:var Aa=Yu(d.g,"EXT-X-PLAYLIST-TYPE"),La=Yu(d.g,"EXT-X-ENDLIST");La=Aa&&"VOD"==Aa.value||La;Aa=Aa&&"EVENT"==Aa.value&&!La;Aa=!La&&!Aa;La?sv(a,lv):Aa?sv(a,Vv):sv(a,pw);ov(a)&&zv(a,d);A=ov(a)?a.N.get(g):new Map;y=xv(a,d,A,c,e,g);C=y.segments;z=y.bandwidth;if(w){ua.u(2);break}return E(ua,qw(a,g,f,C),3);case 3:w=ua.h;case 2:return E(ua,wv(a,d,w,e,c),4);case 4:B=ua.h;
1067
+ D=B.drmInfos;I=B.keyIds;F=B.encrypted;J=B.hh;if(F&&!D.length&&!J)throw new T(2,4,4026);K=ow(a,f,g,h,k,l,m,n,p,q,u,v);K.encrypted=F;K.drmInfos=D;K.keyIds=I;K.mimeType=w;z&&(K.bandwidth=z);aw(K);ov(a)&&zv(a,d);G=C[0].startTime;M=C[C.length-1];N=M.endTime;L=new Lk(C);K.segmentIndex=L;R=(P=Yu(d.g,"EXT-X-SERVER-CONTROL"))?null!=Su(P,"CAN-SKIP-UNTIL"):!1;Q=P?null!=Su(P,"CAN-BLOCK-RELOAD"):!1;ca=Zu(d.g,"EXT-X-MEDIA-SEQUENCE",0);ea=yv(ca,C);la=ea.kb;Qa=ea.lb;return ua.return({stream:K,type:g,Dg:[],M:e,fc:G,
1068
+ Cb:N,ud:R,td:Q,Zc:!1,Ae:-1,kb:la,lb:Qa,Pd:A,ef:!1})}})}function yv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{kb:a,lb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{kb:a,lb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{kb:a,lb:c}}
1069
+ function ow(a,b,c,d,e,f,g,h,k,l,m,n){var p=Zv(c,b)||$v(c),q=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())q.push(u.value)}k=void 0;u=null;c==Ud?k=q.includes("public.accessibility.transcribes-spoken-dialog")&&q.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":q.includes("public.accessibility.describes-video")&&(u="visually impaired");q.length||"subtitle"!==k||q.push("subtitle");a={id:a.B++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1070
+ segmentIndex:null,mimeType:p,codecs:b,kind:c==Ud?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:ze(d||"und"),originalLanguage: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:q,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
1067
1071
  fullMimeTypes:new Set};aw(a);return a}
1068
- function wv(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R;return O(function(Q){switch(Q.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Wu(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Sv(a,b,k.g,d,e),n=t(l),p=n.next();!p.done;p=n.next())r=p.value,f.set(r,m);v=u=!1;w=[];A=new Set;y=t(f);C=y.next();case 2:if(C.done){Q.u(4);break}z=C.value;B=t(z);D=B.next().value;I=B.next().value;F=D;J=I;K=Tu(F,"METHOD");if("NONE"==K){Q.u(3);break}u=
1072
+ function wv(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P,R;return O(function(Q){switch(Q.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Wu(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Sv(a,b,k.g,d,e),n=t(l),p=n.next();!p.done;p=n.next())q=p.value,f.set(q,m);v=u=!1;w=[];A=new Set;y=t(f);C=y.next();case 2:if(C.done){Q.u(4);break}z=C.value;B=t(z);D=B.next().value;I=B.next().value;F=D;J=I;K=Tu(F,"METHOD");if("NONE"==K){Q.u(3);break}u=
1069
1073
  !0;G=Z(F,"KEYFORMAT")||"identity";M=null;if(ew(K)){v=!0;Q.u(3);break}if("identity"!=G){M=(N=fw[G])?N(F,c):null;Q.u(6);break}return E(Q,gw(a,F,c,d,J,e),8);case 8:M=Q.h;case 6:if(M){if(M.keyIds)for(L=t(M.keyIds),P=L.next();!P.done;P=L.next())R=P.value,A.add(R);w.push(M)}case 3:C=y.next();Q.u(2);break;case 4:return Q.return({drmInfos:w,keyIds:A,encrypted:u,hh:v})}})}
1070
- function rw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw $a("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=Ld(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=Zu(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ha.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Tu(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
1071
- 256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,u;return O(function(v){if(1==v.g)return l=$u(d(),Tu(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=qg(l,a.g.retryParameters),p=Tv(a,n,6),a.K.set(m,p)),E(v,a.K.get(m),2);if(3!=v.g){r=v.h;if(!r.data||r.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};return E(v,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}k.cryptoKey=v.h;k.fetchKey=void 0;H(v)})};
1074
+ function rw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw $a("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=Jd(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=Zu(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ha.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Tu(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
1075
+ 256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,q,u;return O(function(v){if(1==v.g)return l=$u(d(),Tu(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=qg(l,a.g.retryParameters),p=Tv(a,n,6),a.K.set(m,p)),E(v,a.K.get(m),2);if(3!=v.g){q=v.h;if(!q.data||q.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};return E(v,window.crypto.subtle.importKey("raw",q.data,u,!0,["decrypt"]),3)}k.cryptoKey=v.h;k.fetchKey=void 0;H(v)})};
1072
1076
  a.ha.set(c,k)}return a.ha.get(c)}
1073
- function zv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Yu(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Yu(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Yu(b.g,"EXT-X-PART-INF"))a.P=Number(Tu(e,"PART-TARGET"));b=Yu(b.g,"EXT-X-SERVER-CONTROL");a.C&&a.P?(a.m=a.hb?5*a.P<=c?Math.min(a.P,a.m):Math.min(c,a.m):Math.min(a.P,a.m),a.xa=b?Number(Tu(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
1074
- Su(b,"HOLD-BACK"):null,a.ua=c?Number(c.value):0);a.Fa=Math.max(d,a.Fa)}function Pv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.xa)b=a.xa;else if(a.ua)b=a.ua;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Fa*c}a.l.Ng(0);a.l.Cf(b);a.l.kc(!1)}
1077
+ function zv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Yu(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Yu(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Yu(b.g,"EXT-X-PART-INF"))a.P=Number(Tu(e,"PART-TARGET"));b=Yu(b.g,"EXT-X-SERVER-CONTROL");a.C&&a.P?(a.m=a.hb?5*a.P<=c?Math.min(a.P,a.m):Math.min(c,a.m):Math.min(a.P,a.m),a.ua=b?Number(Tu(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
1078
+ Su(b,"HOLD-BACK"):null,a.ta=c?Number(c.value):0);a.Fa=Math.max(d,a.Fa)}function Pv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ua)b=a.ua;else if(a.ta)b=a.ta;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Fa*c}a.l.Ng(0);a.l.Cf(b);a.l.kc(!1)}
1075
1079
  function Sv(a,b,c,d,e){var f=Yu(c,"EXT-X-MAP");if(!f)return null;var g=Tu(f,"URI"),h=$u(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.ba.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?ew(Tu(m,"METHOD"))&&m.id<f.id&&(k=rw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=sw(h,f,l,k);a.ba.set(g,b)}return a.ba.get(g)}
1076
1080
  function sw(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Bi(function(){return a},e,f,null,null,null,d)}
1077
- function tw(a,b,c,d,e,f,g,h,k){function l(ca){ca=(new sc(ca)).Na.split(".").pop();var ea=uw[g][ca];ea||(ea=Rv[ca]);return ea}var m=d.g,n=Yu(m,"EXTINF"),p=0,r=0,u=null;d.vb.length&&!a.C&&$a("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 w=Yu(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=ph(w.value),
1078
- a.Jb=!0)}var A=Hi;Yu(m,"EXT-X-GAP")&&(A=2);if(!n){if(0==d.vb.length)throw new T(2,4,4024,"EXTINF");if(!a.C)return null}var y=[];w=!1;var C=null,z=!1,B=!1;if(a.C&&d.vb.length){p=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=v,I={},F=0;F<d.vb.length;I={le:void 0,$d:void 0},F++){var J=d.vb[F],K=0==F?c:y[y.length-1],G=0==F?e:K.endTime,M=Number(Z(J,"DURATION"))||a.P;if(M){var N=G+M,L=0,P=null;"EXT-X-PRELOAD-HINT"==J.name?(L=(L=Z(J,"BYTERANGE-START"))?Number(L):0,(K=Z(J,
1081
+ function tw(a,b,c,d,e,f,g,h,k){function l(ca){ca=(new sc(ca)).Na.split(".").pop();var ea=uw[g][ca];ea||(ea=Rv[ca]);return ea}var m=d.g,n=Yu(m,"EXTINF"),p=0,q=0,u=null;d.wb.length&&!a.C&&$a("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 w=Yu(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=ph(w.value),
1082
+ a.rb=!0)}var A=Hi;Yu(m,"EXT-X-GAP")&&(A=2);if(!n){if(0==d.wb.length)throw new T(2,4,4024,"EXTINF");if(!a.C)return null}var y=[];w=!1;var C=null,z=!1,B=!1;if(a.C&&d.wb.length){p=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=v,I={},F=0;F<d.wb.length;I={le:void 0,$d:void 0},F++){var J=d.wb[F],K=0==F?c:y[y.length-1],G=0==F?e:K.endTime,M=Number(Z(J,"DURATION"))||a.P;if(M){var N=G+M,L=0,P=null;"EXT-X-PRELOAD-HINT"==J.name?(L=(L=Z(J,"BYTERANGE-START"))?Number(L):0,(K=Z(J,
1079
1083
  "BYTERANGE-LENGTH"))?P=L+Number(K)-1:L&&(P=Number.MAX_SAFE_INTEGER)):(L=Z(J,"BYTERANGE"),P=t(Uv(K,L)),L=P.next().value,P=P.next().value);I.$d=Z(J,"URI");if(I.$d){K=Hi;"YES"==Z(J,"GAP")&&(K=2,z=!0);I.le=null;var R=function(ca){return function(){null==ca.le&&(ca.le=$u(h(),ca.$d,f));return ca.le}}(I);p&&0<=L&&null!=P&&(C=R,w=!0);G=new Gi(G,N,R,L,P,b,0,0,Infinity,[],"",null,D,K,k);"EXT-X-PRELOAD-HINT"==J.name&&(G.ff(),B=!0);"YES"!=Z(J,"INDEPENDENT")&&0<F&&G.Od();if(I=l(I.$d))G.mimeType=I,vw.has(I)&&(G.da=
1080
- null);y.push(G);D&&(D+=M)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(y.length)p=y[y.length-1].endTime;else return null;w&&(z||0!=y[0].Da?(w=!1,C=null):y=[]);(n=Yu(m,"EXT-X-BYTERANGE"))?(u=t(Uv(c,n.value)),r=u.next().value,u=u.next().value):y.length&&(r=y[0].Da,u=y[y.length-1].pa);c="";n=null;"image"==g&&(c="1x1",m=Yu(m,"EXT-X-TILES"))&&(c=Tu(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new Gi(e,p,function(){if(C)return C();null==Q&&(Q=$u(h(),d.h,f));
1081
- return Q||[]},r,u,b,0,0,Infinity,y,c,n,v,A,k,0<y.length&&!!d.h);if(e=l(d.h))b.mimeType=e,vw.has(e)&&(b.da=null);w&&(a.hb=!0,b.tg(),B&&b.ff());return b}function Uv(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.pa+1,d=c+b-1);return[c,d]}
1082
- function xv(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Zu(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Zu(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Yu(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;ov(a)&&c.has(p)&&(r=c.get(p));0===r&&a.oa==Vv&&0<c.size&&!c.has(p)&&(r=a.l.ib());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var A=g[w],y=0==w?r:v.endTime;p=l+n+w;Yu(A.g,"EXT-X-DISCONTINUITY")&&k++;var C=t(A.g);for(var z=C.next();!z.done;z=C.next())z=z.value,"EXT-X-KEY"==z.name&&(ew(Tu(z,"METHOD"))?
1084
+ null);y.push(G);D&&(D+=M)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(y.length)p=y[y.length-1].endTime;else return null;w&&(z||0!=y[0].Da?(w=!1,C=null):y=[]);(n=Yu(m,"EXT-X-BYTERANGE"))?(u=t(Uv(c,n.value)),q=u.next().value,u=u.next().value):y.length&&(q=y[0].Da,u=y[y.length-1].pa);c="";n=null;"image"==g&&(c="1x1",m=Yu(m,"EXT-X-TILES"))&&(c=Tu(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new Gi(e,p,function(){if(C)return C();null==Q&&(Q=$u(h(),d.h,f));
1085
+ return Q||[]},q,u,b,0,0,Infinity,y,c,n,v,A,k,0<y.length&&!!d.h);if(e=l(d.h))b.mimeType=e,vw.has(e)&&(b.da=null);w&&(a.hb=!0,b.tg(),B&&b.ff());return b}function Uv(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.pa+1,d=c+b-1);return[c,d]}
1086
+ function xv(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Zu(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Zu(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Yu(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,p=l+n,q=0;ov(a)&&c.has(p)&&(q=c.get(p));0===q&&a.oa==Vv&&0<c.size&&!c.has(p)&&(q=a.l.ib());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var A=g[w],y=0==w?q:v.endTime;p=l+n+w;Yu(A.g,"EXT-X-DISCONTINUITY")&&k++;var C=t(A.g);for(var z=C.next();!z.done;z=C.next())z=z.value,"EXT-X-KEY"==z.name&&(ew(Tu(z,"METHOD"))?
1083
1087
  h=rw(a,z,b,e,d):h=void 0);c.set(p,y);C=Sv(a,b,A.g,e,d);!a.C&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());if(y=tw(a,C,v,A,y,d,f,e,h))(v=Zu(A.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:y.endTime-y.startTime}):m.length&&(v=m.pop(),v.duration+=y.endTime-y.startTime,m.push(v)),v=y,y.i=k,Bv(a,f)&&null!=a.J&&p<a.J||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(B,D){return B+D.duration},0),b=Math.round(m.reduce(function(B,D){return B+D.bitrate*D.duration},0)/
1084
- b*1E3));if(m=u.some(function(B){return null!=B.h}))for(c={},d=0;d<u.length;c={yd:void 0,xd:void 0,pd:void 0,ic:void 0,od:void 0},d++)if(c.ic=u[d],null==c.ic.h)for(c.xd=0,c.yd=d,e=function(B){return function(){var D=u[B.yd];if(D){if(null!=D.h)return D.h+B.xd;B.xd-=D.endTime-D.startTime;B.yd+=1}return null}}(c),c.od=0,c.pd=d,g=function(B){return function(){var D=u[B.pd];if(D){D!=B.ic&&(B.od+=D.endTime-D.startTime);if(null!=D.h)return D.h+B.od;--B.pd}return null}}(c);null==c.ic.h;)c.ic.h=g(),null==c.ic.h&&
1088
+ b*1E3));if(m=u.some(function(B){return null!=B.h}))for(c={},d=0;d<u.length;c={zd:void 0,yd:void 0,qd:void 0,ic:void 0,pd:void 0},d++)if(c.ic=u[d],null==c.ic.h)for(c.yd=0,c.zd=d,e=function(B){return function(){var D=u[B.zd];if(D){if(null!=D.h)return D.h+B.yd;B.yd-=D.endTime-D.startTime;B.zd+=1}return null}}(c),c.pd=0,c.qd=d,g=function(B){return function(){var D=u[B.qd];if(D){D!=B.ic&&(B.pd+=D.endTime-D.startTime);if(null!=D.h)return D.h+B.pd;--B.qd}return null}}(c);null==c.ic.h;)c.ic.h=g(),null==c.ic.h&&
1085
1089
  (c.ic.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.aa;if(m&&Infinity!=c&&!Bv(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.Jf(c);return{segments:u,bandwidth:b}}
1086
1090
  function Zv(a,b){if(a==Ud){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":"mjpg"==b?"application/mp4":null:"image/jpeg"}function $v(a){return a==Ud?"text/vtt":uw[a].mp4}
1087
- function qw(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,A;return O(function(y){switch(y.g){case 1:e=wg;f=Math.trunc((d.length-1)/2);for(g=d[f];2==g.status&&f<d.length;)f++,g=d[f];if(2==g.status)return y.return($v(b));h=g.M();k=new sc(h[0]);l=k.Na.split(".").pop();m=uw[b];if((n=m[l])||(n=Rv[l])||(n=Zv(b,c)))return y.return(n);r=1;u=qg(h,a.g.retryParameters);wa(y,2);u.method="HEAD";return E(y,Tv(a,u,e,{type:r}),4);case 4:v=y.h;p=v.headers["content-type"];ya(y,3);break;case 2:w=Aa(y);if(!w||1002!=w.code&&
1088
- 1001!=w.code){y.u(3);break}u.method="GET";return E(y,Tv(a,u,e,{type:r}),6);case 6:A=y.h,p=A.headers["content-type"];case 3:return p?y.return(p.toLowerCase().split(";")[0]):y.return($v(b))}})}function Ov(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function mv(a,b,c){return Tv(a,qg(b,a.g.retryParameters),0,{type:c?2:3})}
1089
- function kv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();wa(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();ov(a)&&(d=(c-b)/1E3,a.Ka.sample(1,d),e=a.m,f=Math.max(0,e-Wa(a.Ka)),a.A.X(f));ya(h,3);break;case 2:g=Aa(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.A.X(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();H(h)}})}
1090
- function ov(a){return a.oa!=lv}function sv(a,b){a.oa=b;a.l&&a.l.kc(!ov(a));ov(a)||a.A.stop()}function Tv(a,b,c,d){if(!a.W)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);kg(a.W,b);return b.promise}function ew(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1091
- function gw(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(td())throw new T(2,4,4041);g=Tu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=$u(d(),Tu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Md(Id(k[0].split("data:text/plain;base64,").pop()));B.u(2);break}m=k.sort().join("");a.wa.has(m)||(n=qg(k,a.g.retryParameters),p=Tv(a,n,6),a.wa.set(m,p));return E(B,a.wa.get(m),
1092
- 3);case 3:r=B.h,l=Md(r.data);case 2:u="00000000000000000000000000000000";if(!e){B.u(4);break}if(a.na.has(e)){v=a.na.get(e);B.u(5);break}w=pl(e.M(),e.$b(),e.Yb(),a.g.retryParameters);A=wg;return E(B,Tv(a,w,A,{type:0}),6);case 6:y=B.h,v=bt(y.data),a.na.set(e,v);case 5:v&&(u=v);case 4:return C=new Map,C.set(u,l),z="cenc","SAMPLE-AES"==g&&(z="cbcs"),B.return(Qd(C,z))}})}S("shaka.hls.HlsParser",jv);
1091
+ function qw(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,u,v,w,A;return O(function(y){switch(y.g){case 1:e=wg;f=Math.trunc((d.length-1)/2);for(g=d[f];2==g.status&&f<d.length;)f++,g=d[f];if(2==g.status)return y.return($v(b));h=g.M();k=new sc(h[0]);l=k.Na.split(".").pop();m=uw[b];if((n=m[l])||(n=Rv[l])||(n=Zv(b,c)))return y.return(n);q=1;u=qg(h,a.g.retryParameters);wa(y,2);u.method="HEAD";return E(y,Tv(a,u,e,{type:q}),4);case 4:v=y.h;p=v.headers["content-type"];ya(y,3);break;case 2:w=za(y);if(!w||1002!=w.code&&
1092
+ 1001!=w.code){y.u(3);break}u.method="GET";return E(y,Tv(a,u,e,{type:q}),6);case 6:A=y.h,p=A.headers["content-type"];case 3:return p?y.return(p.toLowerCase().split(";")[0]):y.return($v(b))}})}function Ov(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function mv(a,b,c){return Tv(a,qg(b,a.g.retryParameters),0,{type:c?2:3})}
1093
+ function kv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();wa(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();ov(a)&&(d=(c-b)/1E3,a.Ka.sample(1,d),e=a.m,f=Math.max(0,e-Wa(a.Ka)),a.A.Y(f));ya(h,3);break;case 2:g=za(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.A.Y(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();H(h)}})}
1094
+ function ov(a){return a.oa!=lv}function sv(a,b){a.oa=b;a.l&&a.l.kc(!ov(a));ov(a)||a.A.stop()}function Tv(a,b,c,d){if(!a.U)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);kg(a.U,b);return b.promise}function ew(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1095
+ function gw(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(pd())throw new T(2,4,4041);g=Tu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=$u(d(),Tu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Kd(Id(k[0].split("data:text/plain;base64,").pop()));B.u(2);break}m=k.sort().join("");a.wa.has(m)||(n=qg(k,a.g.retryParameters),p=Tv(a,n,6),a.wa.set(m,p));return E(B,a.wa.get(m),
1096
+ 3);case 3:q=B.h,l=Kd(q.data);case 2:u="00000000000000000000000000000000";if(!e){B.u(4);break}if(a.na.has(e)){v=a.na.get(e);B.u(5);break}w=pl(e.M(),e.$b(),e.Yb(),a.g.retryParameters);A=wg;return E(B,Tv(a,w,A,{type:0}),6);case 6:y=B.h,v=bt(y.data),a.na.set(e,v);case 5:v&&(u=v);case 4:return C=new Map,C.set(u,l),z="cenc","SAMPLE-AES"==g&&(z="cbcs"),B.return(Qd(C,z))}})}S("shaka.hls.HlsParser",jv);
1093
1097
  var Rv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},uw={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
1094
- vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},vw=new Set(["video/mp2t"].concat(x(Zd))),fw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(td())throw new T(2,4,4041);a=Tu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Pd("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),
1098
+ vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},vw=new Set(["video/mp2t"].concat(x(Zd))),fw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(pd())throw new T(2,4,4041);a=Tu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Pd("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),
1095
1099
  keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Tu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Tu(a,"URI");b=iv(b.split("?")[0]);b=Bb(b.data);c=Pd("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Tu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
1096
1100
  var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=Tu(a,"URI");a=iv(a.split("?")[0]);a=Bb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Xg(a,b,new Set,0);return Pd("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},lv="VOD",pw="EVENT",Vv="LIVE",rv={dh:lv,bj:pw,jj:Vv};wi["application/x-mpegurl"]=function(){return new jv};wi["application/vnd.apple.mpegurl"]=function(){return new jv};function ww(a){var b=0,c=Fb(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=Bb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function xw(a){if(a=yw(a))a:{a=t(ih(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=jh(b.value,"LA_URL")){a=gh(b);break a}a=""}else a="";return a}
1097
1101
  function yw(a){a=Id(gh(a));a=ww(a).filter(function(b){return b.type===zw})[0];if(!a)return null;a=yd(a.value,!0);return(a=Zg(a,"WRMHEADER"))?a:null}var zw=1,Aw=(new Map).set("com.microsoft.playready",xw).set("com.microsoft.playready.recommendation",xw).set("com.microsoft.playready.software",xw).set("com.microsoft.playready.hardware",xw);function Bw(a){if(!Cw){Cw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Dw=Ew("ftyp",b,d,b,c);b=Ew("dref",Fw);Gw=Ew("dinf",b)}this.g=a}
@@ -1100,52 +1104,52 @@ function Hw(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.
1100
1104
  case "audio":g=Ew("minf",Ew("smhd",Ow),Gw,Nw(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Nd.apply(Fd,x(b));f=a.g[0];c=Ew;d=f.duration*f.timescale;e=Math.floor(d/(Iw+1));d=Math.floor(d%(Iw+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Jw(f.timescale,4)),x(Jw(e,4)),x(Jw(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
1101
1105
  255]));e=Ew("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(Jw(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=Ew("trex",k),h.call(g,k);a=Nd.apply(Fd,x(d));a=Ew("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Nd.apply(Fd,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Dw.byteLength+
1102
1106
  a.byteLength);b.set(Dw);b.set(a,Dw.byteLength);return b}
1103
- function Nw(a){var b=Ew,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.ta.byteLength)var e=Ew("avcC",a.ta);else{e=Ew;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Wa.length;n++){var p=Pw(a.Wa[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
1107
+ function Nw(a){var b=Ew,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.sa.byteLength)var e=Ew("avcC",a.sa);else{e=Ew;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Wa.length;n++){var p=Pw(a.Wa[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
1104
1108
  0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Jw(c,2)),x(Jw(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=Qw(a);g=new Uint8Array([]);
1105
- a.encrypted&&(g=Rw(a),d="encv");c=Ew(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.ta.byteLength&&(c=Ew("hvcC",a.ta)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Jw(d,2)),x(Jw(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=Qw(a),g=new Uint8Array([]),a.encrypted&&(g=Rw(a),e="encv"),c=Ew(e,d,
1109
+ a.encrypted&&(g=Rw(a),d="encv");c=Ew(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.sa.byteLength&&(c=Ew("hvcC",a.sa)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Jw(d,2)),x(Jw(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=Qw(a),g=new Uint8Array([]),a.encrypted&&(g=Rw(a),e="encv"),c=Ew(e,d,
1106
1110
  c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Ew(".mp3",Sw(a));else if(a.codecs.includes("ac-3"))c=Ew("dac3",a.la),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Rw(a),d="enca"),a=Ew(d,Sw(a),c,e);else if(a.codecs.includes("ec-3"))c=Ew("dec3",a.la),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Rw(a),d="enca"),a=Ew(d,Sw(a),c,e);else if(a.codecs.includes("opus"))c=Ew("dOps",a.la),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Rw(a),d="enca"),a=Ew(d,Sw(a),c,e);else{if(0<a.la.byteLength)c=Ew("esds",
1107
1111
  a.la);else{c=Ew;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Rd("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(x(Jw(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=Rw(a),d="enca");
1108
- a=Ew(d,Sw(a),c,e)}c=a}a=Ew("stsd",Tw,c);return b("stbl",a,Ew("stts",Uw),Ew("stsc",Vw),Ew("stsz",Ww),Ew("stco",Xw))}function Qw(a){if(!a.Aa&&!a.Ba)return new Uint8Array([]);var b=a.Ba;a=new Uint8Array([].concat(x(Jw(a.Aa,4)),x(Jw(b,4))));return Ew("pasp",a)}function Sw(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(Jw(a.stream.audioSamplingRate||44100,2)),[0,0]))}
1112
+ a=Ew(d,Sw(a),c,e)}c=a}a=Ew("stsd",Tw,c);return b("stbl",a,Ew("stts",Uw),Ew("stsc",Vw),Ew("stsz",Ww),Ew("stco",Xw))}function Qw(a){if(!a.ya&&!a.Aa)return new Uint8Array([]);var b=a.Aa;a=new Uint8Array([].concat(x(Jw(a.ya,4)),x(Jw(b,4))));return Ew("pasp",a)}function Sw(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(Jw(a.stream.audioSamplingRate||44100,2)),[0,0]))}
1109
1113
  function Rw(a){var b=Ew;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(x(Jw(d,4))));c=Ew("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Ew("schm",d);e=Ew;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Pw(h.value)}a=new Uint8Array([0,
1110
1114
  0,0,0,0,0,1,8]);f=Ew("tenc",a,f);return b("sinf",c,d,e("schi",f))}
1111
1115
  function Yw(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Ew;var g=new Uint8Array([0,0,0,0].concat(x(Jw(c.data?c.data.ob:0,4))));g=Ew("mfhd",g);var h;var k=c.data?c.data.Ta:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Qa<<4|m.Sa<<2|m.Ra}k=Ew("sdtp",l);var n=k.length+92;l=Ew;h=new Uint8Array([0,0,0,58].concat(x(Jw(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Ew("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
1112
- 0;var p=Math.floor(m%(Iw+1));m=new Uint8Array([1,0,0,0].concat(x(Jw(Math.floor(m/(Iw+1)),4)),x(Jw(p,4))));m=Ew("tfdt",m);var r=n;n=c.data?c.data.Ta:[];p=n.length;var u=12+16*p,v=new Uint8Array(u);r+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(x(Jw(p,4)),x(Jw(r,4))),0);for(r=0;r<p;r++){var w=n[r];u=Jw(w.duration,4);var A=Jw(w.size,4),y=w.flags;w=Jw(w.Ya,4);v.set([].concat(x(u),x(A),[y.ab<<2|y.Qa,y.Sa<<6|y.Ra<<4|y.bb,y.Pa&61440,y.Pa&15],x(w)),12+16*r)}n=Ew("trun",v);k=l("traf",h,m,n,k);f=f("moof",
1116
+ 0;var p=Math.floor(m%(Iw+1));m=new Uint8Array([1,0,0,0].concat(x(Jw(Math.floor(m/(Iw+1)),4)),x(Jw(p,4))));m=Ew("tfdt",m);var q=n;n=c.data?c.data.Ta:[];p=n.length;var u=12+16*p,v=new Uint8Array(u);q+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(x(Jw(p,4)),x(Jw(q,4))),0);for(q=0;q<p;q++){var w=n[q];u=Jw(w.duration,4);var A=Jw(w.size,4),y=w.flags;w=Jw(w.Ya,4);v.set([].concat(x(u),x(A),[y.ab<<2|y.Qa,y.Sa<<6|y.Ra<<4|y.bb,y.Pa&61440,y.Pa&15],x(w)),12+16*q)}n=Ew("trun",v);k=l("traf",h,m,n,k);f=f("moof",
1113
1117
  g,k);e.call(d,b,[f,Zw(c)])}return Nd.apply(Fd,x(b))}function Zw(a){a=(a.data?a.data.Ta:[]).map(function(b){return b.data});a=Nd.apply(Fd,x(a));return Ew("mdat",a)}function Jw(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Pw(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
1114
1118
  function Ew(a){var b=Ja.apply(1,arguments),c=$w[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],$w[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
1115
1119
  var Cw=!1,Iw=Math.pow(2,32)-1,$w={},Kw=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Lw=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Uw=new Uint8Array([0,0,0,0,0,0,0,0]),Vw=new Uint8Array([0,0,0,0,0,0,0,0]),Xw=new Uint8Array([0,0,0,0,0,0,0,0]),Ww=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Mw=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Ow=new Uint8Array([0,
1116
- 0,0,0,0,0,0,0]),Tw=new Uint8Array([0,0,0,0,0,0,0,1]),Dw=new Uint8Array([]),Fw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Gw=new Uint8Array([]);function ax(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Va(5);this.o=new Sc(function(){bx(a)});this.A=new jg;this.m=new Map}q=ax.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,E(d,cx(c),2);if(!c.h)throw new T(2,7,7001);return d.return(c.j)})};
1117
- function bx(a){var b;O(function(c){switch(c.g){case 1:return wa(c,2),E(c,cx(a),4);case 4:ya(c,3);break;case 2:b=Aa(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();H(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
1118
- q.update=function(){var a=this,b;return O(function(c){if(1==c.g)return wa(c,2),E(c,cx(a),4);if(2!=c.g)return ya(c,0);b=Aa(c);if(!a.h||!b)return c.return();a.h.onError(b);H(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(){};
1120
+ 0,0,0,0,0,0,0]),Tw=new Uint8Array([0,0,0,0,0,0,0,1]),Dw=new Uint8Array([]),Fw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Gw=new Uint8Array([]);function ax(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Va(5);this.o=new Sc(function(){bx(a)});this.A=new jg;this.m=new Map}r=ax.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,E(d,cx(c),2);if(!c.h)throw new T(2,7,7001);return d.return(c.j)})};
1121
+ function bx(a){var b;O(function(c){switch(c.g){case 1:return wa(c,2),E(c,cx(a),4);case 4:ya(c,3);break;case 2:b=za(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();H(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
1122
+ r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return wa(c,2),E(c,cx(a),4);if(2!=c.g)return ya(c,0);b=za(c);if(!a.h||!b)return c.return();a.h.onError(b);H(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
1119
1123
  function cx(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=qg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),kg(a.A,e),E(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=lm){rb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Ut(m,"SmoothStreamingMedia");if(!m)throw new T(2,4,4046,
1120
- l);n(m);m=Bd(m.outerHTML)}var p=Yg(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=mm&&l(p);a.i||(a.i=new pk(null,0));if(l=mh(p,"IsLive",wh,!1))throw new T(2,4,4047);a.i.kc(!l);n=mh(p,"TimeScale",uh,1E7);m=mh(p,"DVRWindowLength",uh);l&&(0===m||isNaN(m))&&(m=Infinity);var r=mh(p,"CanSeek",wh,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.ge(r);m=mh(p,
1121
- "Duration",uh,Infinity);l||a.i.Ua(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;r=fh(p,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(fh(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),A=n[w];if(A){var y=yw(v);if(y)a:{y=t(ih(y,"DATA"));for(var C=y.next();!C.done;C=y.next())if(C=jh(C.value,"KID")){y=Id(gh(C));y=new Uint8Array([y[3],y[2],y[1],y[0],y[5],
1122
- y[4],y[7],y[6]].concat(x(y.slice(8))));y=Md(y);break a}y=null}else y=null;C=Id(gh(v));w=Ld(w.replace(/-/g,""));w=[{initData:Xg(C,w,new Set,0),initDataType:"cenc",keyId:y}];w=Pd(A,"cenc",w);y&&w.keyIds.add(y);if(A=Aw.get(A))w.licenseServerUri=A(v);r.push(w)}}n=r}else n=[];u=n;r=[];n=[];m=[];p=fh(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;A=fh(v,"QualityLevel");w=l.timescale;y=l.duration;C=fh(v,"c");for(var z=[],B=0,D=0;D<C.length;++D){var I=C[D],F=C[D+1],J=mh(I,"t",uh),K=
1123
- mh(I,"d",uh);I=mh(I,"r",sh);if(!K)break;J=null!=J?J:B;I=I||0;if(0>I)if(F){F=mh(F,"t",uh);if(null==F)break;else if(J>=F)break;I=Math.ceil((F-J)/K)-1}else{if(Infinity==y)break;else if(J/w>=y)break;I=Math.ceil((y*w-J)/K)-1}for(F=0;F<=I;++F)B=J+K,z.push({start:J/w,end:B/w,Qf:J}),J=B}w=z;A=t(A);for(y=A.next();!y.done;y=A.next())(y=dx(a,v,y.value,w,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Ud||a.g.disableText||m.push(y):n.push(y):r.push(y))}p=[];r=t(0<r.length?
1124
- r:[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,v=t(0<n.length?n:[null]),z=v.next();!z.done;z=v.next())A=p,w=A.push,y=a,C=u,z=z.value,D=0,C&&C.bandwidth&&0<C.bandwidth&&(D+=C.bandwidth),z&&z.bandwidth&&0<z.bandwidth&&(D+=z.bandwidth),y={id:y.s++,language:C?C.language:"und",disabledUntilTime:0,primary:!!C&&C.primary||!!z&&z.primary,audio:C,video:z,bandwidth:D,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(A,y);l.variants=p;l.textStreams=m;a.j?(a.j.variants=l.variants,
1124
+ l);n(m);m=Bd(m.outerHTML)}var p=Yg(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=mm&&l(p);a.i||(a.i=new pk(null,0));if(l=mh(p,"IsLive",wh,!1))throw new T(2,4,4047);a.i.kc(!l);n=mh(p,"TimeScale",uh,1E7);m=mh(p,"DVRWindowLength",uh);l&&(0===m||isNaN(m))&&(m=Infinity);var q=mh(p,"CanSeek",wh,!1);0===m&&q&&(m=Infinity);q=null;m&&0<m&&(q=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(q=a.g.availabilityWindowOverride);null==q&&(q=Infinity);a.i.ge(q);m=mh(p,
1125
+ "Duration",uh,Infinity);l||a.i.Ua(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;q=fh(p,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];q=t(q);for(u=q.next();!u.done;u=q.next())m=m.concat(fh(u.value,"ProtectionHeader"));if(m.length){q=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),A=n[w];if(A){var y=yw(v);if(y)a:{y=t(ih(y,"DATA"));for(var C=y.next();!C.done;C=y.next())if(C=jh(C.value,"KID")){y=Id(gh(C));y=new Uint8Array([y[3],y[2],y[1],y[0],y[5],
1126
+ y[4],y[7],y[6]].concat(x(y.slice(8))));y=Kd(y);break a}y=null}else y=null;C=Id(gh(v));w=Jd(w.replace(/-/g,""));w=[{initData:Xg(C,w,new Set,0),initDataType:"cenc",keyId:y}];w=Pd(A,"cenc",w);y&&w.keyIds.add(y);if(A=Aw.get(A))w.licenseServerUri=A(v);q.push(w)}}n=q}else n=[];u=n;q=[];n=[];m=[];p=fh(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;A=fh(v,"QualityLevel");w=l.timescale;y=l.duration;C=fh(v,"c");for(var z=[],B=0,D=0;D<C.length;++D){var I=C[D],F=C[D+1],J=mh(I,"t",uh),K=
1127
+ mh(I,"d",uh);I=mh(I,"r",sh);if(!K)break;J=null!=J?J:B;I=I||0;if(0>I)if(F){F=mh(F,"t",uh);if(null==F)break;else if(J>=F)break;I=Math.ceil((F-J)/K)-1}else{if(Infinity==y)break;else if(J/w>=y)break;I=Math.ceil((y*w-J)/K)-1}for(F=0;F<=I;++F)B=J+K,z.push({start:J/w,end:B/w,Qf:J}),J=B}w=z;A=t(A);for(y=A.next();!y.done;y=A.next())(y=dx(a,v,y.value,w,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Ud||a.g.disableText||m.push(y):n.push(y):q.push(y))}p=[];q=t(0<q.length?
1128
+ q:[null]);for(u=q.next();!u.done;u=q.next())for(u=u.value,v=t(0<n.length?n:[null]),z=v.next();!z.done;z=v.next())A=p,w=A.push,y=a,C=u,z=z.value,D=0,C&&C.bandwidth&&0<C.bandwidth&&(D+=C.bandwidth),z&&z.bandwidth&&0<z.bandwidth&&(D+=z.bandwidth),y={id:y.s++,language:C?C.language:"und",disabledUntilTime:0,primary:!!C&&C.primary||!!z&&z.primary,audio:C,video:z,bandwidth:D,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(A,y);l.variants=p;l.textStreams=m;a.j?(a.j.variants=l.variants,
1125
1129
  a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null},a.i.Md());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);H(k)})}
1126
- function dx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return $a("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=mh(c,"Bitrate",th),m=mh(c,"MaxWidth",th),n=mh(c,"MaxHeight",th),p=mh(c,"Channels",th),r=mh(c,"SamplingRate",th),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Ua(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1127
- closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:ze(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
1130
+ function dx(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return $a("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=mh(c,"Bitrate",th),m=mh(c,"MaxWidth",th),n=mh(c,"MaxHeight",th),p=mh(c,"Channels",th),q=mh(c,"SamplingRate",th),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Ua(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1131
+ closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:ze(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:q,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
1128
1132
  matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=ex[e])&&w.roles.push(e),"main"===e&&(w.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return $a('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!fx.includes(e.toUpperCase()))return $a("Codec not supported:",
1129
1133
  e),null;c=gx(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return $a("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=hx(e,c);break;case "video":if(!c)return $a("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=ix(c);break;case "text":if(w.type=Ud,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(Yd(w.mimeType,w.codecs));
1130
- w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var A=a.m.get(w.id);else A=[],"video"==w.type&&(A=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Wa:A,la:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:null,stream:w},A=Hw(new Bw([A])),a.m.set(w.id,A);A=jx(a,new Bi(function(){return[]},0,null,null,void 0,
1134
+ w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var A=a.m.get(w.id);else A=[],"video"==w.type&&(A=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Wa:A,la:new Uint8Array([]),sa:new Uint8Array([]),ya:0,Aa:0,data:null,stream:w},A=Hw(new Bw([A])),a.m.set(w.id,A);A=jx(a,new Bi(function(){return[]},0,null,null,void 0,
1131
1135
  A),w,b,d);w.segmentIndex=new Lk(A);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
1132
1136
  function gx(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
1133
1137
  b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function hx(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function ix(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
1134
1138
  function jx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={he:void 0},g=e.next())h.he=g.value,d.push(new Gi(h.he.start,h.he.end,function(k){return function(){return Od(a.l,[f.replace("{start time}",String(k.he.Qf))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",ax);var fx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),ex={CAPT:"main",SUBT:"alternate",DESC:"main"};
1135
- wi["application/vnd.ms-sstr+xml"]=function(){return new ax};function kx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=Ad(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function lx(){}function mx(a,b,c,d,e){var f=new nx;Eg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ox,h={Zf:!1,Wg:!1};a=px(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 $f(a,function(){h.Zf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Sc(function(){h.Wg=!0;g.abort()});k.X(b/1E3);a.finally(function(){k.stop()})}return a}
1136
- function px(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return h=qx,k=rx,p=n=0,r=Date.now(),wa(z,2),E(z,h(a,c),4);case 4:l=z.h;f(sx(l.headers));if("HEAD"==c.method){z.u(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(B){function D(){var I,F,J;return O(function(K){switch(K.g){case 1:return wa(K,2),E(K,u.read(),4);case 4:I=K.h;ya(K,3);break;case 2:return Aa(K),K.return();case 3:if(I.done){K.u(5);break}n+=
1137
- I.value.byteLength;if(!g){K.u(5);break}return E(K,g(I.value),5);case 5:F=Date.now();if(100<F-r||I.done)J=I.done?0:w-n,e(F-r,n-p,J),p=n,r=F;I.done?B.close():(B.enqueue(I.value),D());H(K)}})}D()};new k({start:A});return E(z,l.arrayBuffer(),6);case 6:m=z.h;case 5:ya(z,3);break;case 2:y=Aa(z);if(d.Zf)throw new T(1,1,7001,a,b);if(d.Wg)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,y,b);case 3:return C=sx(l.headers),z.return(kx(C,m,l.status,a,l.url,b))}})}
1139
+ wi["application/vnd.ms-sstr+xml"]=function(){return new ax};function kx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=Ad(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function lx(){}function mx(a,b,c,d,e){var f=new nx;Eg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ox,h={Zf:!1,Wg:!1};a=px(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 $f(a,function(){h.Zf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Sc(function(){h.Wg=!0;g.abort()});k.Y(b/1E3);a.finally(function(){k.stop()})}return a}
1140
+ function px(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return h=qx,k=rx,p=n=0,q=Date.now(),wa(z,2),E(z,h(a,c),4);case 4:l=z.h;f(sx(l.headers));if("HEAD"==c.method){z.u(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(B){function D(){var I,F,J;return O(function(K){switch(K.g){case 1:return wa(K,2),E(K,u.read(),4);case 4:I=K.h;ya(K,3);break;case 2:return za(K),K.return();case 3:if(I.done){K.u(5);break}n+=
1141
+ I.value.byteLength;if(!g){K.u(5);break}return E(K,g(I.value),5);case 5:F=Date.now();if(100<F-q||I.done)J=I.done?0:w-n,e(F-q,n-p,J),p=n,q=F;I.done?B.close():(B.enqueue(I.value),D());H(K)}})}D()};new k({start:A});return E(z,l.arrayBuffer(),6);case 6:m=z.h;case 5:ya(z,3);break;case 2:y=za(z);if(d.Zf)throw new T(1,1,7001,a,b);if(d.Wg)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,y,b);case 3:return C=sx(l.headers),z.return(kx(C,m,l.status,a,l.url,b))}})}
1138
1142
  function sx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function tx(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",lx);lx.isSupported=tx;lx.parse=mx;var qx=window.fetch,ox=window.AbortController,rx=window.ReadableStream,nx=window.Headers;
1139
1143
  tx()&&(mg("http",mx,2,!0),mg("https",mx,2,!0),mg("blob",mx,2,!0));function ux(){}
1140
- function vx(a,b,c,d,e){var f=new wx,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 T(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var r=xx(f);e(r);n=!0}};f.onload=function(r){var u=xx(f),v=f.response;try{d(Date.now()-g,r.loaded-h,0);var w=kx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(r){m(new T(1,
1141
- 1,1002,a,r,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(r){var u=Date.now();if(100<u-g||r.lengthComputable&&r.loaded==r.total)d(u-g,r.loaded-h,4==f.readyState?0:r.total-r.loaded),h=r.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new $f(k,function(){f.abort();return Promise.resolve()})}
1144
+ function vx(a,b,c,d,e){var f=new wx,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 T(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=xx(f);e(q);n=!0}};f.onload=function(q){var u=xx(f),v=f.response;try{d(Date.now()-g,q.loaded-h,0);var w=kx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(q){m(new T(1,
1145
+ 1,1002,a,q,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(q){var u=Date.now();if(100<u-g||q.lengthComputable&&q.loaded==q.total)d(u-g,q.loaded-h,4==f.readyState?0:q.total-q.loaded),h=q.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new $f(k,function(){f.abort();return Promise.resolve()})}
1142
1146
  function xx(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(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}S("shaka.net.HttpXHRPlugin",ux);ux.parse=vx;var wx=window.XMLHttpRequest;mg("http",vx,1,!0);mg("https",vx,1,!0);mg("blob",vx,1,!0);function yx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function zx(a){return a.M().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Da+":"+a.pa}function Ax(a,b){return pl(a.g.M(),a.g.Da,a.g.pa,b.streaming.retryParameters)};function Bx(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Cx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Bx.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 Dx(a){var b=this;this.o=a;this.j=new Map;this.i=new Ag(function(){return Ex(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Bx}Dx.prototype.destroy=function(){return this.i.destroy()};function Fx(a,b,c){a.m=b;a.l=c}function Ex(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
1143
- function Gx(a,b,c,d,e,f){Bg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return O(function(u){if(1==u.g)return E(u,Hx(a,c),2);h=u.h;if(a.i.g)throw new T(2,9,7001);if(e)for(m in k=Bb(h),l=new Wg(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(d,h.byteLength);var v=a.g;a.m(0==v.i?0:v.j/v.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function Ix(a){return O(function(b){return 1==b.g?E(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
1144
- function Hx(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=wg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),E(g,d.promise,2);f=g.h;Ob(a.h,e);return g.return(f.data)})};function Jx(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Zf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Jx.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}wa(b,2);return E(b,a.g,4)}if(2!=b.g)return ya(b,0);Aa(b);H(b)})};
1145
- function Kx(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return E(g,b(f.key,f.value,f),2)}f.continue();H(g)})}})}Jx.prototype.store=function(){return this.h};Jx.prototype.promise=function(){return this.g};function Lx(a){this.h=a;this.g=[]}Lx.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Mx(a,b){return Nx(a,b,"readwrite")}function Nx(a,b,c){c=a.h.transaction([b],c);var d=new Jx(c,b);a.g.push(d);d.promise().then(function(){Ob(a.g,d)},function(){Ob(a.g,d)});return d};function Ox(a,b,c){this.h=new Lx(a);this.i=b;this.g=c}q=Ox.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Px(this.i)};q.removeSegments=function(a,b){return Qx(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,Rx(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.$f(e)}))})};q.addManifests=function(){return Px(this.g)};
1146
- q.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function Sx(a,b,c){a=Mx(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=Mx(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 Qx(this,this.g,a,b)};
1147
- q.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,Rx(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Nc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=Nx(a.h,a.g,"readonly"),c=new Map,E(d,Kx(b,function(e,f){var g;return O(function(h){if(1==h.g)return E(h,a.Nc(f),2);g=h.h;c.set(e,g);H(h)})}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};q.$f=function(a){return a};q.Nc=function(a){return Promise.resolve(a)};
1148
- function Px(a){return Promise.reject(new T(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 O(function(m){if(1==m.g){d=Mx(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={uf:void 0},h=g.next())l=h.value,k.uf=e.add(l),k.uf.onsuccess=function(n){return function(){f.push(n.uf.result)}}(k);return E(m,d.promise(),2)}return m.return(f)})};
1147
+ function Gx(a,b,c,d,e,f){Bg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return O(function(u){if(1==u.g)return E(u,Hx(a,c),2);h=u.h;if(a.i.g)throw new T(2,9,7001);if(e)for(m in k=Bb(h),l=new Wg(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);a.g.close(d,h.byteLength);var v=a.g;a.m(0==v.i?0:v.j/v.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function Ix(a){return O(function(b){return 1==b.g?E(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
1148
+ function Hx(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=wg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),E(g,d.promise,2);f=g.h;Ob(a.h,e);return g.return(f.data)})};function Jx(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Zf;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Jx.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}wa(b,2);return E(b,a.g,4)}if(2!=b.g)return ya(b,0);za(b);H(b)})};
1149
+ function Kx(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return E(g,b(f.key,f.value,f),2)}f.continue();H(g)})}})}Jx.prototype.store=function(){return this.h};Jx.prototype.promise=function(){return this.g};function Lx(a){this.h=a;this.g=[]}Lx.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Mx(a,b){return Nx(a,b,"readwrite")}function Nx(a,b,c){c=a.h.transaction([b],c);var d=new Jx(c,b);a.g.push(d);d.promise().then(function(){Ob(a.g,d)},function(){Ob(a.g,d)});return d};function Ox(a,b,c){this.h=new Lx(a);this.i=b;this.g=c}r=Ox.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Px(this.i)};r.removeSegments=function(a,b){return Qx(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,Rx(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.$f(e)}))})};r.addManifests=function(){return Px(this.g)};
1150
+ r.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function Sx(a,b,c){a=Mx(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Mx(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()};r.removeManifests=function(a,b){return Qx(this,this.g,a,b)};
1151
+ r.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,Rx(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Nc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=Nx(a.h,a.g,"readonly"),c=new Map,E(d,Kx(b,function(e,f){var g;return O(function(h){if(1==h.g)return E(h,a.Nc(f),2);g=h.h;c.set(e,g);H(h)})}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};r.$f=function(a){return a};r.Nc=function(a){return Promise.resolve(a)};
1152
+ function Px(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=Mx(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={uf:void 0},h=g.next())l=h.value,k.uf=e.add(l),k.uf.onsuccess=function(n){return function(){f.push(n.uf.result)}}(k);return E(m,d.promise(),2)}return m.return(f)})};
1149
1153
  function Qx(a,b,c,d){a=Mx(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={$e:void 0},e=c.next())f.$e=e.value,b.delete(f.$e).onsuccess=function(g){return function(){return d(g.$e)}}(f);return a.promise()}
1150
1154
  function Rx(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=Nx(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={de:void 0,Jd:void 0},k=h.next())l.Jd=k.value,l.de=e.get(l.Jd),l.de.onsuccess=function(n){return function(){void 0==n.de.result&&g.push(n.Jd);f[n.Jd]=n.de.result}}(l);return E(m,d.promise(),2)}if(g.length)throw new T(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Tx(a){this.g=new Lx(a)}Tx.prototype.destroy=function(){return this.g.destroy()};Tx.prototype.getAll=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=Nx(a.g,"session-ids","readonly"),c=[],E(d,Kx(b,function(e,f){c.push(f)}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};Tx.prototype.add=function(a){var b=Mx(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
1151
1155
  Tx.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Mx(b.g,"session-ids"),E(d,Kx(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):E(d,c.promise(),0)})};function Ux(){this.g=new Map}Ux.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Ux.prototype.init=function(){var a=this;Vx.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
@@ -1162,52 +1166,52 @@ e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.l
1162
1166
  hy.prototype.Nc=function(a){var b,c,d,e,f,g;return O(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=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(iy(n,k.startTime,k.startTime+e));f=l;b.push(f)}return E(h,st(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
1163
1167
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
1164
1168
  function iy(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,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,
1165
- appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function jy(){Ox.apply(this,arguments)}ra(jy,Ox);q=jy.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 Sx(this,a,b)};q.Nc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ky(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=ky.prototype;
1166
- q.init=function(){var a=this,b=new Zf,c=!1,d=new Sc(function(){c=!0;b.reject(new T(2,9,9017))});d.X(5);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 cy(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new hy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
1169
+ appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function jy(){Ox.apply(this,arguments)}ra(jy,Ox);r=jy.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Sx(this,a,b)};r.Nc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ky(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=ky.prototype;
1170
+ r.init=function(){var a=this,b=new Zf,c=!1,d=new Sc(function(){c=!0;b.reject(new T(2,9,9017))});d.Y(5);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 cy(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new hy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
1167
1171
  new hy(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new jy(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Tx(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["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 T(2,
1168
- 9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return E(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),H(b)}})};
1169
- 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};
1170
- q.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),E(b,ly(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,E(b,a.init(),0)}})};
1172
+ 9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return E(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),H(b)}})};
1173
+ r.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};r.getEmeSessionCell=function(){return this.m};
1174
+ r.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),E(b,ly(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,E(b,a.init(),0)}})};
1171
1175
  function ly(){var a=new Zf,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new T(2,9,9001,b.error));c.preventDefault()};return a}by("idb",function(){return ed()||Xc()||!window.indexedDB?null:new ky});function my(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}my.prototype.jb=function(){return this.i};my.prototype.Ga=function(){return this.h};my.prototype.key=function(){return this.l};my.prototype.toString=function(){return this.j};
1172
1176
  function ny(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 my(b,c,d,Number(a[4])):null};function oy(a,b){this.h=a;this.g=b}
1173
1177
  function py(a,b){var c=new pk(null,0);c.Ua(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=qy(a,d,e,c);e=b.streams.filter(function(l){return l.type==Ud}).map(function(l){return ry(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ry(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
1174
1178
  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,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null}}
1175
1179
  function qy(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=t(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=t(b);for(e=b.next();!e.done;e=
1176
1180
  b.next())for(g=e.value,e=ry(a,g,d),g=t(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=ry(a,e,d),e=t(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f}
1177
- function ry(a,b,c){var d=b.segments.map(function(e){return sy(a,e,b)});c.fd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Lk(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,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
1181
+ function ry(a,b,c){var d=b.segments.map(function(e){return sy(a,e,b)});c.gd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Lk(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,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
1178
1182
  null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([Yd(b.mimeType,b.codecs)])}}
1179
- function sy(a,b,c){var d=new my("segment",a.h,a.g,b.dataKey);a=new Gi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?ty(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function ty(a,b){var c=new my("segment",a.h,a.g,b);return new Bi(function(){return[c.toString()]},0,null)};function uy(){this.g=null}q=uy.prototype;q.configure=function(){};
1180
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=ny(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new Ux;xa(m,2);return E(m,e.init(),4);case 4:return E(m,Yx(e,d.jb(),d.Ga()),5);case 5:return f=m.h,E(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new oy(d.jb(),d.Ga()),l=py(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Ba(m),E(m,e.destroy(),7);case 7:Ca(m,0)}})};q.stop=function(){return Promise.resolve()};
1181
- q.update=function(){};
1182
- q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new Ux,wa(m,2,3),E(m,e.init(),5);case 5:return E(m,Yx(e,d.jb(),d.Ga()),6);case 6:return f=m.h,E(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.u(3);break}return E(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ba(m),E(m,e.destroy(),10);case 10:Ca(m,0);break;case 2:Aa(m),m.u(3)}})};
1183
- q.onInitialVariantChosen=function(){};q.banLocation=function(){};wi["application/x-offline-manifest"]=function(){return new uy};function vy(){}function wy(a){var b=ny(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=cg(a)):a=b&&"segment"==b.g?xy(b.key(),b):ag(new T(2,1,9004,a));return a}
1184
- function xy(a,b){var c=new Ux;return cg(void 0).za(function(){return c.init()}).za(function(){return Yx(c,b.jb(),b.Ga())}).za(function(d){return d.getSegments([b.key()])}).za(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",vy);vy.plugin=wy;mg("offline",wy);function yy(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,zy(v.info,p)){v.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=Ay(a,b,g);return E(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
1185
- function Ay(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Eh({Db:b,onError:function(){},Xd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),wa(f,2),d.configure(a),E(f,Mh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ya(f,3);break;case 2:return Aa(f),E(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],E(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
1186
- h.g)return wa(h,2),E(h,Yh(d,g),4);if(2!=h.g)return e.push(g),ya(h,0);Aa(h);H(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function zy(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Pb(a.audioCapabilities,b.audioCapabilities,c)&&Pb(a.videoCapabilities,b.videoCapabilities,c)};function By(a,b,c){var d=b.presentationTimeline.getDuration();b=Cy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Dy(a,b){var c=py(new oy(a.jb(),a.Ga()),b),d=b.appMetadata||{};c=Cy(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}}
1183
+ function sy(a,b,c){var d=new my("segment",a.h,a.g,b.dataKey);a=new Gi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?ty(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function ty(a,b){var c=new my("segment",a.h,a.g,b);return new Bi(function(){return[c.toString()]},0,null)};function uy(){this.g=null}r=uy.prototype;r.configure=function(){};
1184
+ r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=ny(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new Ux;xa(m,2);return E(m,e.init(),4);case 4:return E(m,Yx(e,d.jb(),d.Ga()),5);case 5:return f=m.h,E(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new oy(d.jb(),d.Ga()),l=py(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Ba(m),E(m,e.destroy(),7);case 7:Ca(m,0)}})};r.stop=function(){return Promise.resolve()};
1185
+ r.update=function(){};
1186
+ r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new Ux,wa(m,2,3),E(m,e.init(),5);case 5:return E(m,Yx(e,d.jb(),d.Ga()),6);case 6:return f=m.h,E(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.u(3);break}return E(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ba(m),E(m,e.destroy(),10);case 10:Ca(m,0);break;case 2:za(m),m.u(3)}})};
1187
+ r.onInitialVariantChosen=function(){};r.banLocation=function(){};wi["application/x-offline-manifest"]=function(){return new uy};function vy(){}function wy(a){var b=ny(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=cg(a)):a=b&&"segment"==b.g?xy(b.key(),b):ag(new T(2,1,9004,a));return a}
1188
+ function xy(a,b){var c=new Ux;return cg(void 0).xa(function(){return c.init()}).xa(function(){return Yx(c,b.jb(),b.Ga())}).xa(function(d){return d.getSegments([b.key()])}).xa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",vy);vy.plugin=wy;mg("offline",wy);function yy(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,zy(v.info,p)){v.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=Ay(a,b,g);return E(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
1189
+ function Ay(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Eh({Eb:b,onError:function(){},Xd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),wa(f,2),d.configure(a),E(f,Mh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ya(f,3);break;case 2:return za(f),E(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],E(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
1190
+ h.g)return wa(h,2),E(h,Yh(d,g),4);if(2!=h.g)return e.push(g),ya(h,0);za(h);H(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function zy(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Pb(a.audioCapabilities,b.audioCapabilities,c)&&Pb(a.videoCapabilities,b.videoCapabilities,c)};function By(a,b,c){var d=b.presentationTimeline.getDuration();b=Cy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Dy(a,b){var c=py(new oy(a.jb(),a.Ga()),b),d=b.appMetadata||{};c=Cy(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}}
1187
1191
  function Cy(a){var b=[],c=wf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(gf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(hf(c.value));return b};function Ey(){this.g={}}function Fy(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 Gy(a,b){a.g[b.id]=b.bandwidth||2048}function Hy(a,b){a=a.g[b];null==a&&(a=0);return a};function Iy(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Zb()):(this.h=km(),this.g=new lg);this.i=[];this.j=[];var c=!a;this.l=new Ag(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return E(k,Promise.all(b.j.map(function(l){return Ex(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return E(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return E(k,b.g.destroy(),4);
1188
- case 4:b.h=null,b.g=null,H(k)}})})}function Jy(){if(Tc())a:{var a=t(Vx.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=Iy.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=bm(a,b));return om(this.h,a)};q.getConfiguration=function(){var a=km();om(a,this.h,km());return a};q.Zb=function(){return this.g};
1189
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Dx(this.g);this.j.push(f);b=Ky(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.u(2):E(h,Jm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=vi(a,c||null);return h.return(g())})},e,f);b=new $f(b,function(){return Ex(f)});b.finally(function(){Ob(d.j,f)});return Ly(this,b)};
1190
- function Ky(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return My(),h=g=null,k=new Ux,n=m=l=null,wa(z,2,3),E(z,d(),5);case 5:return g=z.h,E(z,Ny(a,b,g,e),6);case 6:p=z.h;Oy(a);r=!p.presentationTimeline.U()&&!p.presentationTimeline.dc();if(!r)throw new T(2,9,9005,b);return E(z,a.sc(p,function(B){n=n||B},e),7);case 7:h=z.h;Oy(a);if(n)throw n;return E(z,Py(p,h,e),8);case 8:return E(z,k.init(),9);case 9:return Oy(a),E(z,Wx(k),10);case 10:return l=z.h,Oy(a),u=Qy(h,
1191
- p,b,c,e,f),v=u.fi,w=u.Mf,E(z,l.Ga.addManifests([v]),11);case 11:A=z.h;Oy(a);m=A[0];Oy(a);if(n)throw n;return E(z,Ry(a,w,m,v,f,e,l.Ga,p,h),12);case 12:return Oy(a),Sy(p,v,h,e),E(z,l.Ga.updateManifest(m,v),13);case 13:return Oy(a),y=new my("manifest",l.path.jb,l.path.Ga,m),z.return(Dy(y,v));case 3:return Ba(z),E(z,k.destroy(),14);case 14:if(!g){z.u(15);break}return E(z,g.stop(),15);case 15:if(!h){z.u(17);break}return E(z,h.destroy(),17);case 17:Ca(z,0);break;case 2:C=Aa(z);if(null==m){z.u(19);break}return E(z,
1192
+ case 4:b.h=null,b.g=null,H(k)}})})}function Jy(){if(Tc())a:{var a=t(Vx.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}r=Iy.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=bm(a,b));return om(this.h,a)};r.getConfiguration=function(){var a=km();om(a,this.h,km());return a};r.Zb=function(){return this.g};
1193
+ r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Dx(this.g);this.j.push(f);b=Ky(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.u(2):E(h,Jm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=vi(a,c||null);return h.return(g())})},e,f);b=new $f(b,function(){return Ex(f)});b.finally(function(){Ob(d.j,f)});return Ly(this,b)};
1194
+ function Ky(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return My(),h=g=null,k=new Ux,n=m=l=null,wa(z,2,3),E(z,d(),5);case 5:return g=z.h,E(z,Ny(a,b,g,e),6);case 6:p=z.h;Oy(a);q=!p.presentationTimeline.V()&&!p.presentationTimeline.dc();if(!q)throw new T(2,9,9005,b);return E(z,a.sc(p,function(B){n=n||B},e),7);case 7:h=z.h;Oy(a);if(n)throw n;return E(z,Py(p,h,e),8);case 8:return E(z,k.init(),9);case 9:return Oy(a),E(z,Wx(k),10);case 10:return l=z.h,Oy(a),u=Qy(h,
1195
+ p,b,c,e,f),v=u.fi,w=u.Mf,E(z,l.Ga.addManifests([v]),11);case 11:A=z.h;Oy(a);m=A[0];Oy(a);if(n)throw n;return E(z,Ry(a,w,m,v,f,e,l.Ga,p,h),12);case 12:return Oy(a),Sy(p,v,h,e),E(z,l.Ga.updateManifest(m,v),13);case 13:return Oy(a),y=new my("manifest",l.path.jb,l.path.Ga,m),z.return(Dy(y,v));case 3:return Ba(z),E(z,k.destroy(),14);case 14:if(!g){z.u(15);break}return E(z,g.stop(),15);case 15:if(!h){z.u(17);break}return E(z,h.destroy(),17);case 17:Ca(z,0);break;case 2:C=za(z);if(null==m){z.u(19);break}return E(z,
1192
1196
  Ty(m),19);case 19:throw n||C;}})}
1193
- function Ry(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,A,y;return O(function(C){switch(C.g){case 1:l={};m=0;n=function(z,B){var D,I,F,J,K,G,M;return O(function(N){if(1==N.g){D=t(z);I=D.next();for(F={};!I.done;F={uc:void 0},I=D.next())F.uc=I.value,J=Ax(F.uc,f),K=F.uc.i,G=F.uc.h,M=function(L){return function(P){var R,Q,ca;return O(function(ea){if(1==ea.g)return E(ea,g.addSegments([{data:P}]),2);R=ea.h;Oy(a);Q=L.uc.g;ca=zx(Q);l[ca]=R[0];m+=P.byteLength;H(ea)})}}(F),Gx(e,F.uc.groupId,J,K,G,M);return E(N,
1194
- Ix(e),2)}if(!B)return N.u(0);Oy(a);Sy(h,d,k,f);return E(N,g.updateManifest(c,d),0)})};p=!1;wa(C,2);if(!Uy(h)||!p||Vy(h)){C.u(4);break}return E(C,n(b.filter(function(z){return z.h}),!0),5);case 5:return Oy(a),b=b.filter(function(z){return!z.h}),r=l,u=m,l={},m=0,E(C,Wy(g,c,d,r,u,function(){return Oy(a)}),6);case 6:Oy(a);case 4:if(p){C.u(7);break}return E(C,n(b,!1),8);case 8:return Oy(a),v=l,w=m,l={},m=0,E(C,Wy(g,c,d,v,w,function(){return Oy(a)}),9);case 9:Oy(a);case 7:ya(C,0);break;case 2:return A=
1195
- Aa(C),y=Object.values(l),E(C,g.removeSegments(y,function(){}),10);case 10:throw A;}})}function Ty(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new Ux,E(f,b.init(),2);case 2:return E(f,Wx(b),3);case 3:return c=f.h,d=new my("manifest",c.path.jb,c.path.Ga,a),E(f,b.destroy(),4);case 4:return e=new Iy,E(f,e.remove(d.toString()),0)}})}
1196
- function Wy(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w;return O(function(A){switch(A.g){case 1:g=!1;wa(A,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())r=p.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
1197
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();ya(A,0);break;case 2:return v=Aa(A),E(A,Ty(b),5);case 5:if(g){A.u(6);break}w=Object.values(d);return E(A,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
1198
- function Py(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P;return O(function(R){switch(R.g){case 1:return d={width:Infinity,height:Infinity},Me(a,c.restrictions,d),E(R,Qe(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Ke(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(gf(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,
1199
- e.push(hf(r));u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(lf(w));return E(R,c.offline.trackSelectionCallback(e),3);case 3:A=R.h;y=a.presentationTimeline.getDuration();C=0;z=t(A);for(B=z.next();!B.done;B=z.next())D=B.value,I=D.bandwidth*y/8,C+=I;wa(R,4);return E(R,c.offline.downloadSizeCallback(C),6);case 6:F=R.h;if(!F)throw new T(2,9,9014);ya(R,5);break;case 4:J=Aa(R);if(J instanceof T)throw J;throw new T(2,9,9015);case 5:K=new Set;G=new Set;M=new Set;N=t(A);for(L=N.next();!L.done;L=
1197
+ function Ry(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,u,v,w,A,y;return O(function(C){switch(C.g){case 1:l={};m=0;n=function(z,B){var D,I,F,J,K,G,M;return O(function(N){if(1==N.g){D=t(z);I=D.next();for(F={};!I.done;F={uc:void 0},I=D.next())F.uc=I.value,J=Ax(F.uc,f),K=F.uc.i,G=F.uc.h,M=function(L){return function(P){var R,Q,ca;return O(function(ea){if(1==ea.g)return E(ea,g.addSegments([{data:P}]),2);R=ea.h;Oy(a);Q=L.uc.g;ca=zx(Q);l[ca]=R[0];m+=P.byteLength;H(ea)})}}(F),Gx(e,F.uc.groupId,J,K,G,M);return E(N,
1198
+ Ix(e),2)}if(!B)return N.u(0);Oy(a);Sy(h,d,k,f);return E(N,g.updateManifest(c,d),0)})};p=!1;wa(C,2);if(!Uy(h)||!p||Vy(h)){C.u(4);break}return E(C,n(b.filter(function(z){return z.h}),!0),5);case 5:return Oy(a),b=b.filter(function(z){return!z.h}),q=l,u=m,l={},m=0,E(C,Wy(g,c,d,q,u,function(){return Oy(a)}),6);case 6:Oy(a);case 4:if(p){C.u(7);break}return E(C,n(b,!1),8);case 8:return Oy(a),v=l,w=m,l={},m=0,E(C,Wy(g,c,d,v,w,function(){return Oy(a)}),9);case 9:Oy(a);case 7:ya(C,0);break;case 2:return A=
1199
+ za(C),y=Object.values(l),E(C,g.removeSegments(y,function(){}),10);case 10:throw A;}})}function Ty(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new Ux,E(f,b.init(),2);case 2:return E(f,Wx(b),3);case 3:return c=f.h,d=new my("manifest",c.path.jb,c.path.Ga,a),E(f,b.destroy(),4);case 4:return e=new Iy,E(f,e.remove(d.toString()),0)}})}
1200
+ function Wy(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,u,v,w;return O(function(A){switch(A.g){case 1:g=!1;wa(A,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,u=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=u&&(q.dataKey=u,q.pendingSegmentRefId=void 0),u=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=u&&(q.initSegmentKey=u,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
1201
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();ya(A,0);break;case 2:return v=za(A),E(A,Ty(b),5);case 5:if(g){A.u(6);break}w=Object.values(d);return E(A,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
1202
+ function Py(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,u,v,w,A,y,C,z,B,D,I,F,J,K,G,M,N,L,P;return O(function(R){switch(R.g){case 1:return d={width:Infinity,height:Infinity},Me(a,c.restrictions,d),E(R,Qe(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Ke(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(gf(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
1203
+ e.push(hf(q));u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(lf(w));return E(R,c.offline.trackSelectionCallback(e),3);case 3:A=R.h;y=a.presentationTimeline.getDuration();C=0;z=t(A);for(B=z.next();!B.done;B=z.next())D=B.value,I=D.bandwidth*y/8,C+=I;wa(R,4);return E(R,c.offline.downloadSizeCallback(C),6);case 6:F=R.h;if(!F)throw new T(2,9,9014);ya(R,5);break;case 4:J=za(R);if(J instanceof T)throw J;throw new T(2,9,9015);case 5:K=new Set;G=new Set;M=new Set;N=t(A);for(L=N.next();!L.done;L=
1200
1204
  N.next())P=L.value,"variant"==P.type&&K.add(P.id),"text"==P.type&&G.add(P.id),"image"==P.type&&M.add(P.id);a.variants=a.variants.filter(function(Q){return K.has(Q.id)});a.textStreams=a.textStreams.filter(function(Q){return G.has(Q.id)});a.imageStreams=a.imageStreams.filter(function(Q){return M.has(Q.id)});Xy(a);H(R)}})}
1201
- function Qy(a,b,c,d,e,f){var g=By(c,b,d),h=e.offline.progressCallback;Fx(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&Uh(a,"cenc",r)});var k=Uy(b)&&!Vy(b),l=null;k&&(l=Yy.get(a.g.keySystem));for(var m=new Ey,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Gy(m,p.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())Fy(m,p.value);m=Zy(f,m,b,e);f=m.streams;m=m.Mf;n=a.g;p=e.offline.usePersistentLicense;
1205
+ function Qy(a,b,c,d,e,f){var g=By(c,b,d),h=e.offline.progressCallback;Fx(f,function(q,u){g.size=u;h(g,q)},function(q,u){k&&e.offline.usePersistentLicense&&l==u&&Uh(a,"cenc",q)});var k=Uy(b)&&!Vy(b),l=null;k&&(l=Yy.get(a.g.keySystem));for(var m=new Ey,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Gy(m,p.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())Fy(m,p.value);m=Zy(f,m,b,e);f=m.streams;m=m.Mf;n=a.g;p=e.offline.usePersistentLicense;
1202
1206
  n&&p&&(n.initData=[]);return{fi:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Uc(),streams:f,sessionIds:p?ci(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Mf:m}}function Uy(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
1203
- function Vy(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 Sy(a,b,c,d){b.expiration=c.Uc();c=ci(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Uy(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}q.remove=function(a){return $y(this,az(this,a))};
1207
+ function Vy(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 Sy(a,b,c,d){b.expiration=c.Uc();c=ci(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Uy(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}r.remove=function(a){return $y(this,az(this,a))};
1204
1208
  function az(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:My();c=ny(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new Ux;xa(k,2);return E(k,e.init(),4);case 4:return E(k,Yx(e,d.jb(),d.Ga()),5);case 5:return f=k.h,E(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],E(k,Promise.all([bz(a,h,e),cz(f,d,h)]),2);case 2:return Ba(k),E(k,e.destroy(),8);case 8:Ca(k,0)}})}
1205
1209
  function dz(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Yd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Yd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function bz(a,b,c){return O(function(d){return E(d,ez(a.g,a.h.drm,c,b),0)})}
1206
- function cz(a,b,c){function d(){}var e=fz(c);Dy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.xi=function(){return $y(this,gz(this))};
1210
+ function cz(a,b,c){function d(){}var e=fz(c);Dy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.xi=function(){return $y(this,gz(this))};
1207
1211
  function gz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return My(),b=a.g,c=a.h.drm,d=new Ux,e=!1,xa(n,2),E(n,d.init(),4);case 4:f=[],Zx(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return E(n,k.getAll(),8);case 8:return l=n.h,E(n,yy(c,b,l),9);case 9:return m=n.h,E(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return Ba(n),E(n,d.destroy(),11);case 11:Ca(n,3);break;case 3:return n.return(!e)}})}
1208
- q.list=function(){return $y(this,hz())};function hz(){var a,b,c;return O(function(d){switch(d.g){case 1:return My(),a=[],b=new Ux,xa(d,2),E(d,b.init(),4);case 4:return c=Promise.resolve(),Xx(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return E(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Dy(new my("manifest",e.jb,e.Ga,l),k);a.push(k)});H(h)})})}),E(d,c,2);case 2:return Ba(d),E(d,b.destroy(),6);case 6:Ca(d,3);break;case 3:return d.return(a)}})}
1212
+ r.list=function(){return $y(this,hz())};function hz(){var a,b,c;return O(function(d){switch(d.g){case 1:return My(),a=[],b=new Ux,xa(d,2),E(d,b.init(),4);case 4:return c=Promise.resolve(),Xx(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return E(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Dy(new my("manifest",e.jb,e.Ga,l),k);a.push(k)});H(h)})})}),E(d,c,2);case 2:return Ba(d),E(d,b.destroy(),6);case 6:Ca(d,3);break;case 3:return d.return(a)}})}
1209
1213
  function Ny(a,b,c,d){var e,f,g,h,k;return O(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,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(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
1210
- c.configure(d.manifest),Oy(a),E(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Oy(a),k=iz(h),E(l,Promise.all(Cg(k,function(m){return m.createSegmentIndex()})),3);Oy(a);if(e)throw e;return l.return(h)})}q.sc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Eh({Db:d.g,onError:b,Xd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),E(f,Jh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?E(f,Wh(e),3):f.return(e)})};
1214
+ c.configure(d.manifest),Oy(a),E(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Oy(a),k=iz(h),E(l,Promise.all(Cg(k,function(m){return m.createSegmentIndex()})),3);Oy(a);if(e)throw e;return l.return(h)})}r.sc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Eh({Eb:d.g,onError:b,Xd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),E(f,Jh(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?E(f,Wh(e),3):f.return(e)})};
1211
1215
  function Zy(a,b,c,d){var e=new Map,f=iz(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=jz(a,b,c,h,d,e);g.set(h.id,k)}a=t(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()),Mf:Array.from(e.values())}}
1212
1216
  function jz(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,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,
1213
1217
  audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;kz(d,c.presentationTimeline.ib(),function(l){var m=zx(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Hy(b,d.id)*p;p=Cx(a.g,p);f.set(m,new yx(l,p,k,!1))}l.da&&(n=zx(l.da),f.has(n)||(p=.5*Hy(b,d.id),p=Cx(a.g,p),f.set(n,new yx(l.da,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
@@ -1220,20 +1224,21 @@ function Xy(a){a.variants.map(function(f){return f.video});var b=new Set(a.varia
1220
1224
  Iy.prototype.list=Iy.prototype.list;Iy.prototype.removeEmeSessions=Iy.prototype.xi;Iy.prototype.remove=Iy.prototype.remove;Iy.prototype.store=Iy.prototype.store;Iy.prototype.getNetworkingEngine=Iy.prototype.Zb;Iy.prototype.getConfiguration=Iy.prototype.getConfiguration;Iy.prototype.configure=Iy.prototype.configure;Iy.prototype.destroy=Iy.prototype.destroy;Iy.support=Jy;
1221
1225
  var Yy=(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");op.offline=Jy;function lz(){}function mz(a,b){a={priority:b||0,callback:a};for(b=0;b<nz.length;b++)if(nz[b].priority<a.priority){nz.splice(b,0,a);return}nz.push(a)}S("shaka.polyfill",lz);lz.register=mz;lz.installAll=function(){for(var a=t(nz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){$a("Error installing polyfill!",c)}}};var nz=[];function oz(){this.g=new pz}function qz(){window.AbortController||(window.AbortController=oz,window.AbortSignal=pz)}oz.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 U("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};fa.Object.defineProperties(oz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});lz.AbortController=oz;oz.install=qz;
1222
1226
  function pz(){this.h=!1;this.g=void 0;this.onabort=null;this.i=new ig}pz.prototype.addEventListener=function(a,b,c){return this.i.addEventListener(a,b,c)};pz.prototype.removeEventListener=function(a,b,c){return this.i.removeEventListener(a,b,c)};pz.prototype.dispatchEvent=function(a){return this.i.dispatchEvent(a)};pz.prototype.throwIfAborted=function(){if(this.h)throw this.g;};
1223
- fa.Object.defineProperties(pz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});mz(qz);function rz(){}function sz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())tz(b.value)}function tz(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)}})}lz.Aria=rz;rz.install=sz;mz(sz);function uz(){}function vz(){wz()}lz.EncryptionScheme=uz;uz.install=vz;mz(vz,-2);function xz(){}
1227
+ fa.Object.defineProperties(pz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});mz(qz);function rz(){}function sz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())tz(b.value)}function tz(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)}})}lz.Aria=rz;rz.install=sz;mz(sz);function uz(){}function vz(){hd()||Yc("Sky_STB")||wz()}lz.EncryptionScheme=uz;uz.install=vz;mz(vz,-2);function xz(){}
1224
1228
  function yz(){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}}),
1225
1229
  Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",zz);document.addEventListener("webkitfullscreenerror",zz);document.addEventListener("mozfullscreenchange",zz);document.addEventListener("mozfullscreenerror",zz);document.addEventListener("MSFullscreenChange",zz);document.addEventListener("MSFullscreenError",zz)}}
1226
1230
  function zz(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)}lz.Fullscreen=xz;xz.install=yz;mz(yz);function Az(){}function Bz(){var a=!0;!ed()||ed()&&md()||ed()&&Yc("Fuchsia")||(a=!1);if(fd()||id()||hd()||bd()||Zc()||Yc("PC=EOS")||jd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Cz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Dz)}
1227
- function Dz(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=Uc(e),!f)||d&&(g=d.contentType,h=Uc(g),!h))return p.return(b)}else return p.return(b);p.u(2);break}if(!Tc())return p.return(b);if(!c){p.u(3);break}return E(p,Ez(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var r=d.contentType;ed()&&d.spatialRendering&&
1228
- (r+="; spatialRendering=true");l=nb(r);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return E(p,Fz(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
1231
+ function Dz(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=Uc(e),!f)||d&&(g=d.contentType,h=Uc(g),!h))return p.return(b)}else return p.return(b);p.u(2);break}if(!Tc())return p.return(b);if(!c){p.u(3);break}return E(p,Ez(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var q=d.contentType;ed()&&d.spatialRendering&&
1232
+ (q+="; spatialRendering=true");l=nb(q);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return E(p,Fz(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
1229
1233
  function Ez(a){var b,c;return O(function(d){return 1==d.g?ed()?E(d,Gz(a),3):Zc()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(nb(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(nb(a.contentType))})}
1230
- function Fz(a,b,c){var d,e,f,g,h,k,l,m,n;return O(function(p){switch(p.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},Zc()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h={initDataTypes:[c.initDataType],
1231
- distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=c.keySystem;n=null;wa(p,2);if(Oc.has(k+"#"+l+"#"+m)){n=Oc.get(k+"#"+l+"#"+m)||null;p.u(4);break}return E(p,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:n=p.h,Oc.set(k+"#"+l+"#"+m,n);case 4:ya(p,3);break;case 2:Aa(p);case 3:return p.return(n)}})}
1234
+ function Fz(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return O(function(u){switch(u.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},Zc()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h=
1235
+ {initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=ie(k)+";"+ge(k);n=ie(l)+";"+ge(l);p=c.keySystem;q=null;wa(u,2);if(Oc.has(m+"#"+n+"#"+p)){q=Oc.get(m+"#"+n+"#"+p)||null;u.u(4);break}return E(u,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:q=u.h,Oc.set(m+"#"+n+"#"+p,q);case 4:ya(u,
1236
+ 3);break;case 2:za(u);case 3:return u.return(q)}})}
1232
1237
  function Gz(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(nb(a.contentType));b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");c=!1;return b in Hz?(c=Hz[b],d.u(2)):E(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,Hz[b]=c);return d.return(c)})}lz.MediaCapabilities=Az;Az.install=Bz;
1233
1238
  var Cz=null;Az.originalMcap=Cz;var Hz={};Az.memoizedCanDisplayTypeRequests_=Hz;mz(Bz,-1);function Iz(){}function Jz(){var a=kd();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?10>=a?window.MediaSource=null:12>=a?(Kz(),Lz()):15>=a&&Kz():Yc("DT_STB_BCM")?(Kz(),Lz()):(ad()||$c()||Yc("Tizen 4"))&&Mz();(window.MediaSource||window.ManagedMediaSource)&&Nz();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Oz()}
1234
1239
  function Kz(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ja.apply(0,arguments));b.abort=function(){};return b}}function Lz(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
1235
1240
  function Nz(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=de(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=de(c)&&b(c)}}}
1236
- function Mz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=he(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=he(c)&&b(c)}}}
1241
+ function Mz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=ge(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=ge(c)&&b(c)}}}
1237
1242
  function Oz(){var a=MediaSource.isTypeSupported;bd()||(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)})}lz.MediaSource=Iz;Iz.install=Jz;mz(Jz);function Pz(){}function Qz(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Rz():void 0!=window.orientation&&Sz())}function Rz(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
1238
1243
  function Sz(){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 Tz;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new U("change");b.dispatchEvent(c)})}lz.Orientation=Pz;Pz.install=Qz;function Tz(){ig.call(this);this.type="";this.angle=0}ra(Tz,ig);
1239
1244
  Tz.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)};
@@ -1245,11 +1250,11 @@ aA;window.shakaMediaKeysPolyfill=gA}};
1245
1250
  function bA(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("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=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
1246
1251
  g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
1247
1252
  bA.prototype.createMediaKeys=function(){var a=new fA(this.keySystem);return Promise.resolve(a)};bA.prototype.getConfiguration=function(){return this.g};function fA(a){this.h=new WebKitMediaKeys(a);this.g=new hb}fA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new hA(this.h,a)};fA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1248
- function dA(a,b){a.g.nb();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",eA);try{return wk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}fA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function hA(a){ig.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new hb;this.sessionId="";this.expiration=NaN;this.closed=new Zf;this.keyStatuses=new iA}ra(hA,ig);q=hA.prototype;
1249
- q.generateRequest=function(a,b){var c=this;this.h=new Zf;try{var d=this.l.createSession("video/mp4",Bb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.ac()?"license-request":"license-renewal").set("message",Cb(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(jA(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1250
- 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:jA(c,"output-not-allowed");break;default:jA(c,"internal-error")}});jA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1251
- q.update=function(a){this.g=new Zf;try{this.i.update(Bb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}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 jA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}
1252
- function iA(){this.size=0;this.g=void 0}q=iA.prototype;q.ac=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Nc.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Nc.value();return this.g&&yb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var gA="apple";function kA(){}function lA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||$c()||Yc("Tizen 4")||Yc("Tizen 5.0")||cd())&&(MediaKeys.prototype.setServerCertificate=mA)}function mA(){return Promise.resolve(!1)}lz.PatchedMediaKeysCert=kA;kA.install=lA;mz(lA);function nA(){}function oA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=pA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=qA,window.MediaKeys=rA,window.MediaKeySystemAccess=sA,window.shakaMediaKeysPolyfill=tA)}function pA(){return Promise.reject(Error("The key system specified is not supported."))}
1253
+ function dA(a,b){a.g.nb();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",eA);try{return wk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}fA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function hA(a){ig.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new hb;this.sessionId="";this.expiration=NaN;this.closed=new Zf;this.keyStatuses=new iA}ra(hA,ig);r=hA.prototype;
1254
+ r.generateRequest=function(a,b){var c=this;this.h=new Zf;try{var d=this.l.createSession("video/mp4",Bb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.ac()?"license-request":"license-renewal").set("message",Cb(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(jA(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1255
+ 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:jA(c,"output-not-allowed");break;default:jA(c,"internal-error")}});jA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1256
+ r.update=function(a){this.g=new Zf;try{this.i.update(Bb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function jA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}
1257
+ function iA(){this.size=0;this.g=void 0}r=iA.prototype;r.ac=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Nc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Nc.value();return this.g&&yb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var gA="apple";function kA(){}function lA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||$c()||Yc("Tizen 4")||Yc("Tizen 5.0")||cd())&&(MediaKeys.prototype.setServerCertificate=mA)}function mA(){return Promise.resolve(!1)}lz.PatchedMediaKeysCert=kA;kA.install=lA;mz(lA);function nA(){}function oA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=pA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=qA,window.MediaKeys=rA,window.MediaKeySystemAccess=sA,window.shakaMediaKeysPolyfill=tA)}function pA(){return Promise.reject(Error("The key system specified is not supported."))}
1253
1258
  function qA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}lz.PatchedMediaKeysNop=nA;nA.install=oA;function rA(){throw new TypeError("Illegal constructor.");}rA.prototype.createSession=function(){};rA.prototype.setServerCertificate=function(){};rA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function sA(){this.keySystem="";throw new TypeError("Illegal constructor.");}sA.prototype.getConfiguration=function(){};
1254
1259
  sA.prototype.createMediaKeys=function(){};var tA="nop";mz(oA,-10);function uA(){}
1255
1260
  function vA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)wA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=xA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=yA;window.MediaKeys=zA;window.MediaKeySystemAccess=AA;window.shakaMediaKeysPolyfill=BA}}
@@ -1260,23 +1265,23 @@ d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||
1260
1265
  function DA(a,b){a.h=b;a.g.nb();var c=wA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Cb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=EA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.ac()?"licenserequest":"licenserenewal").set("message",d.message),d=new U("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){(d=EA(a,d.sessionId))&&d.ready()}),
1261
1266
  a.g.D(b,c+"keyerror",function(d){var e=EA(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?FA(e,"output-restricted"):1==f?FA(e,"expired"):FA(e,"internal-error"))}}))}
1262
1267
  zA.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 GA(b,this.l,a);this.i.push(a);return a};zA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};zA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1263
- function EA(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 GA(a,b,c){ig.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 Zf;this.keyStatuses=new HA}ra(GA,ig);q=GA.prototype;q.ready=function(){FA(this,"usable");this.g&&this.g.resolve();this.g=null};
1264
- function IA(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=Bb(Bd("LOAD_SESSION|"+c));else{var e=Bd("PERSISTENT|");d=Nd(e,b)}else d=Bb(b)}catch(g){return Promise.reject(g)}a.h=new Zf;var f=CA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Sc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h}
1268
+ function EA(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 GA(a,b,c){ig.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 Zf;this.keyStatuses=new HA}ra(GA,ig);r=GA.prototype;r.ready=function(){FA(this,"usable");this.g&&this.g.resolve();this.g=null};
1269
+ function IA(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=Bb(Bd("LOAD_SESSION|"+c));else{var e=Bd("PERSISTENT|");d=Nd(e,b)}else d=Bb(b)}catch(g){return Promise.reject(g)}a.h=new Zf;var f=CA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Sc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).Y(.01)}return a.h}
1265
1270
  function JA(a,b,c){if(a.g)a.g.then(function(){return JA(a,b,c)}).catch(function(){return JA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=xd(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=Id(e.keys[0].k);e=Id(e.keys[0].kid)}else d=Bb(c),e=null;var f=CA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1266
- function FA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return IA(this,b,null)};q.load=function(a){return"persistent-license"==this.l?IA(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Zf;JA(this,b,a);return b};
1267
- 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=CA("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 HA(){this.size=0;this.g=void 0}q=HA.prototype;q.ac=function(){return this.g};
1268
- q.forEach=function(a){this.g&&a(this.g,Nc.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Nc.value();return this.g&&yb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var wA="",BA="webkit";mz(vA);function KA(){}function LA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=MA,Object.defineProperty(a,"disablePictureInPicture",{get:NA,set:OA,enumerable:!0,configurable:!0}),document.exitPictureInPicture=PA,document.addEventListener("webkitpresentationmodechanged",QA,!0))}}
1271
+ function FA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}r.generateRequest=function(a,b){return IA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?IA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new Zf;JA(this,b,a);return b};
1272
+ r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=CA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function HA(){this.size=0;this.g=void 0}r=HA.prototype;r.ac=function(){return this.g};
1273
+ r.forEach=function(a){this.g&&a(this.g,Nc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Nc.value();return this.g&&yb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var wA="",BA="webkit";mz(vA);function KA(){}function LA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=MA,Object.defineProperty(a,"disablePictureInPicture",{get:NA,set:OA,enumerable:!0,configurable:!0}),document.exitPictureInPicture=PA,document.addEventListener("webkitpresentationmodechanged",QA,!0))}}
1269
1274
  function QA(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)}
1270
1275
  function MA(){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 PA(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1271
1276
  function NA(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function OA(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}lz.PiPWebkit=KA;KA.install=LA;mz(LA);function RA(){}function SA(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=TA))}function TA(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}lz.RandomUUID=RA;RA.install=SA;mz(SA);function UA(){}function VA(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:WA})}function WA(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}lz.Symbol=UA;UA.install=VA;mz(VA);function XA(){}function YA(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}lz.VideoPlayPromise=XA;XA.install=YA;mz(YA);function ZA(){}function $A(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||cd())&&(a.getVideoPlaybackQuality=aB)}}function aB(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}lz.VideoPlaybackQuality=ZA;ZA.install=$A;mz($A);function bB(){}function cB(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=dB;else if(6==b)a=eB;else{try{var c=!!dB(1,2,"")}catch(d){c=!1}c&&(a=dB)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function dB(a,b,c){return new window.TextTrackCue(a,b,c)}function eB(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}lz.VTTCue=bB;bB.install=cB;mz(cB);function fB(){}fB.prototype.parseInit=function(){};fB.prototype.setSequenceMode=function(){};fB.prototype.setManifestType=function(){};fB.prototype.parseMedia=function(a,b){var c=null,d=[];a=xd(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=gB.exec(e))){var f=hB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Rb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1272
1277
  S("shaka.text.LrcTextParser",fB);fB.prototype.parseMedia=fB.prototype.parseMedia;fB.prototype.setManifestType=fB.prototype.setManifestType;fB.prototype.setSequenceMode=fB.prototype.setSequenceMode;fB.prototype.parseInit=fB.prototype.parseInit;var gB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,hB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;oe["application/x-subtitle-lrc"]=function(){return new fB};function iB(){}iB.prototype.parseInit=function(){};iB.prototype.setSequenceMode=function(){};iB.prototype.setManifestType=function(){};
1273
1278
  iB.prototype.parseMedia=function(a,b,c){var d=xd(a);a=[];if(""==d)return a;var e=Zg(d,"tt",!0);if(!e)throw new T(2,2,2005,"Failed to parse TTML.");d=ih(e,"body")[0];if(!d)return[];var f=oh(e,jB,"frameRate"),g=oh(e,jB,"subFrameRate"),h=oh(e,jB,"frameRateMultiplier"),k=oh(e,jB,"tickRate"),l=oh(e,jB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=oh(e,kB,"extent");if("default"!=m&&"preserve"!=m)throw new T(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new lB(f,g,h,k);l=mB(l);g=
1274
- ih(e,"metadata")[0];g=(g?g.children:[]).filter(function(u){return"\n"!=u});h=ih(e,"style");e=ih(e,"region");k=[];for(var p=t(e),r=p.next();!r.done;r=p.next())(r=nB(r.value,h,n))&&k.push(r);if(fh(d,"p").length)throw new T(2,2,2001,"<p> can only be inside <div> in TTML");n=t(fh(d,"div"));for(p=n.next();!p.done;p=n.next())if(fh(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=oB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),
1279
+ ih(e,"metadata")[0];g=(g?g.children:[]).filter(function(u){return"\n"!=u});h=ih(e,"style");e=ih(e,"region");k=[];for(var p=t(e),q=p.next();!q.done;q=p.next())(q=nB(q.value,h,n))&&k.push(q);if(fh(d,"p").length)throw new T(2,2,2001,"<p> can only be inside <div> in TTML");n=t(fh(d,"div"));for(p=n.next();!p.done;p=n.next())if(fh(p.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=oB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),
1275
1280
  a.push(b);return a};
1276
- function oB(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(dh(a)){if(!m)return null;var r={tagName:"span",children:[gh(a)],attributes:{},parent:null}}else r=a;for(var u=null,v=t(pB),w=v.next();!w.done&&!(u=qB(r,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=null;var A=oh(r,pB,"backgroundImage");n&&A&&!A.startsWith("#")&&(w=new sc(n),A=new sc(A),(w=w.resolve(A).toString())&&(v=w));if("p"==a.tagName||u||v)m=!0;a=m;w="default"==(r.attributes["xml:space"]||(h?"default":"preserve"));A=r.children.every(dh);h=
1277
- [];if(!A)for(var y=t(r.children),C=y.next();!C.done;C=y.next())(C=oB(C.value,b,c,d,e,f,g,w,k,r,m,n))&&h.push(C);d=null!=l;n=gh(r);n=r.children.length&&n&&/\S/.test(n);C=r.attributes.begin||r.attributes.end||r.attributes.dur;if(!(C||n||"br"==r.tagName||0!=h.length||d&&!w))return null;y=rB(r,c);n=y.start;for(y=y.end;p&&p.tagName&&"tt"!=p.tagName;)y=sB(p,c,n,y),n=y.start,y=y.end,p=p.parent;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);
1278
- if(!C&&0<h.length)for(n=Infinity,y=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),y=Math.max(y,c.endTime);if("br"==r.tagName)return e=new Rb(n,y,""),e.lineBreak=!0,e;b="";A&&(b=Ed(gh(r)||""),w&&(b=b.replace(/\s+/g," ")));b=new Rb(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=qB(r,"region",f,"")[0];if(r.attributes.region&&k&&k.attributes["xml:id"]){var z=k.attributes["xml:id"];b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!r.attributes.region&&
1279
- !r.attributes.style&&(g=qB(l,"region",f,"")[0]);tB(b,r,g,u,v,e,a,0==h.length);return b}
1281
+ function oB(a,b,c,d,e,f,g,h,k,l,m,n){var p=l;if(dh(a)){if(!m)return null;var q={tagName:"span",children:[gh(a)],attributes:{},parent:null}}else q=a;for(var u=null,v=t(pB),w=v.next();!w.done&&!(u=qB(q,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=null;var A=oh(q,pB,"backgroundImage");n&&A&&!A.startsWith("#")&&(w=new sc(n),A=new sc(A),(w=w.resolve(A).toString())&&(v=w));if("p"==a.tagName||u||v)m=!0;a=m;w="default"==(q.attributes["xml:space"]||(h?"default":"preserve"));A=q.children.every(dh);h=
1282
+ [];if(!A)for(var y=t(q.children),C=y.next();!C.done;C=y.next())(C=oB(C.value,b,c,d,e,f,g,w,k,q,m,n))&&h.push(C);d=null!=l;n=gh(q);n=q.children.length&&n&&/\S/.test(n);C=q.attributes.begin||q.attributes.end||q.attributes.dur;if(!(C||n||"br"==q.tagName||0!=h.length||d&&!w))return null;y=rB(q,c);n=y.start;for(y=y.end;p&&p.tagName&&"tt"!=p.tagName;)y=sB(p,c,n,y),n=y.start,y=y.end,p=p.parent;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);
1283
+ if(!C&&0<h.length)for(n=Infinity,y=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),y=Math.max(y,c.endTime);if("br"==q.tagName)return e=new Rb(n,y,""),e.lineBreak=!0,e;b="";A&&(b=Ed(gh(q)||""),w&&(b=b.replace(/\s+/g," ")));b=new Rb(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=qB(q,"region",f,"")[0];if(q.attributes.region&&k&&k.attributes["xml:id"]){var z=k.attributes["xml:id"];b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!q.attributes.region&&
1284
+ !q.attributes.style&&(g=qB(l,"region",f,"")[0]);tB(b,q,g,u,v,e,a,0==h.length);return b}
1280
1285
  function nB(a,b,c){var d=new Kb,e=a.attributes["xml:id"];if(!e)return null;d.id=e;e=null;c&&(e=uB.exec(c)||vB.exec(c));c=e?Number(e[1]):null;e=e?Number(e[2]):null;var f,g=wB(a,b,"extent");if(g){var h=(f=uB.exec(g))||vB.exec(g);null!=h&&(d.width=Number(h[1]),d.height=Number(h[2]),f||(null!=c&&(d.width=100*d.width/c),null!=e&&(d.height=100*d.height/e)),d.widthUnits=f||null!=c?Lb:0,d.heightUnits=f||null!=e?Lb:0)}if(a=wB(a,b,"origin"))if(h=(f=uB.exec(a))||vB.exec(a),null!=h)d.viewportAnchorX=Number(h[1]),
1281
1286
  d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=Lb,d.height=100-d.viewportAnchorY,d.heightUnits=Lb):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?Lb:0;return d}function xB(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),4==b.length)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
1282
1287
  function tB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==yB(b,c,f,"direction",g)&&(a.direction="rtl");h=yB(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Ub);(h=yB(b,c,f,"textAlign",!0))?(a.positionAlign=zB[h],a.lineAlign=AB[h],a.textAlign=dc[h.toUpperCase()]):a.textAlign=Tb;if(h=yB(b,c,f,"displayAlign",!0))a.displayAlign=ec[h.toUpperCase()];if(h=yB(b,c,f,"color",g))a.color=xB(h);if(h=yB(b,c,f,"backgroundColor",
@@ -1298,8 +1303,8 @@ oe['application/mp4; codecs="stpp.ttml"']=function(){return new OB};oe['applicat
1298
1303
  PB.prototype.parseMedia=function(a,b){a=xd(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new T(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new T(2,2,2E3);a=QB(new zp(a[1]));if(null==a)throw new T(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=
1299
1304
  95443.7176888889,d+=8589934592;a=b.periodStart+d/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new zp(e);var f=new Kb;Cp(e);Ap(e);for(var g=Cp(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=
1300
1305
  Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Ap(e);g=Cp(e)}b.push(f)}d=new Map;RB(d);e=[];c=t(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]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=
1301
- t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Rb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var r=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=r;break;
1302
- case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=700;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=ac;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine="noWrap"!=r}}}m&&d.set(g,
1306
+ t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Rb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var q=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=q;break;case "color":m=!0;l.color=q;break;case "font-family":m=!0;l.fontFamily=q;break;
1307
+ case "font-size":m=!0;l.fontSize=q;break;case "font-weight":if(700<=parseInt(q,10)||"bold"==q)m=!0,l.fontWeight=700;break;case "font-style":switch(q){case "normal":m=!0;l.fontStyle=ac;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(q);break;case "text-combine-upright":m=!0;l.textCombineUpright=q;break;case "text-shadow":m=!0;l.textShadow=q;break;case "white-space":m=!0,l.wrapLine="noWrap"!=q}}}m&&d.set(g,
1303
1308
  l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new zp(l[0]),g=QB(h),n=Bp(h,/[ \t]+--\x3e[ \t]+/g),k=QB(h),null==g||null==n||null==k)$a("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;l=l.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=g,m.endTime=k,m.payload=""):m=new Rb(g,k,"");Ap(h);for(g=Cp(h);g;)SB(m,g,b),Ap(h),g=Cp(h);
1304
1309
  TB(l,m,d);null!=f&&(m.id=f);f=m}f&&e.push(f)}return e};function RB(a){for(var b=t(Object.entries(gc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Rb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(hc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Rb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1305
1310
  function TB(a,b,c){if(a.includes("<")){0===c.size&&RB(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(UB)&&a.push(e),e=-1);a=t(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
@@ -1313,7 +1318,7 @@ b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Sb);else if(d=/^regio
1313
1318
  function YB(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function QB(a){a=Bp(a,UB);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)}S("shaka.text.VttTextParser",PB);PB.prototype.parseMedia=PB.prototype.parseMedia;PB.prototype.setManifestType=PB.prototype.setManifestType;PB.prototype.setSequenceMode=PB.prototype.setSequenceMode;PB.prototype.parseInit=PB.prototype.parseInit;var UB=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
1314
1319
  oe["text/vtt"]=function(){return new PB};oe['text/vtt; codecs="vtt"']=function(){return new PB};oe['text/vtt; codecs="wvtt"']=function(){return new PB};function ZB(){this.g=null}ZB.prototype.parseInit=function(a){var b=this,c=!1;(new Jg).box("moov",Qg).box("trak",Qg).box("mdia",Qg).R("mdhd",function(d){d=Zi(d.reader,d.version);b.g=d.timescale}).box("minf",Qg).box("stbl",Qg).R("stsd",Sg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};ZB.prototype.setSequenceMode=function(){};ZB.prototype.setManifestType=function(){};
1315
1320
  ZB.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Jg).box("moof",Qg).box("traf",Qg).R("tfdt",function(C){g=!0;c=Yi(C.reader,C.version).baseMediaDecodeTime}).R("tfhd",function(C){l=Xi(C.reader,C.flags).Pc}).R("trun",function(C){h=!0;d=$i(C.reader,C.version,C.flags).Gg}).box("mdat",Vg(function(C){k=!0;e=C})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Gg(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
1316
- p.value;var r=p.xf||l,u=p.ee?c+p.ee:a;a=u+(r||0);var v=0;do{var w=m.O();v+=w;var A=m.O(),y=null;"vttc"==Pg(A)?8<w&&(y=m.mb(w-8)):m.skip(w-8);r&&y&&(w=$B(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(we)};function $B(a,b,c){var d,e,f;(new Jg).box("payl",Vg(function(g){d=xd(g)})).box("iden",Vg(function(g){e=xd(g)})).box("sttg",Vg(function(g){f=xd(g)})).parse(a);return d?aC(d,e,f,b,c):null}
1321
+ p.value;var q=p.xf||l,u=p.ee?c+p.ee:a;a=u+(q||0);var v=0;do{var w=m.O();v+=w;var A=m.O(),y=null;"vttc"==Pg(A)?8<w&&(y=m.mb(w-8)):m.skip(w-8);q&&y&&(w=$B(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(we)};function $B(a,b,c){var d,e,f;(new Jg).box("payl",Vg(function(g){d=xd(g)})).box("iden",Vg(function(g){e=xd(g)})).box("sttg",Vg(function(g){f=xd(g)})).parse(a);return d?aC(d,e,f,b,c):null}
1317
1322
  function aC(a,b,c,d,e){d=new Rb(d,e,"");TB(a,d,new Map);b&&(d.id=b);if(c)for(a=new zp(c),b=Cp(a);b;)SB(d,b,[]),Ap(a),b=Cp(a);return d}S("shaka.text.Mp4VttParser",ZB);ZB.prototype.parseMedia=ZB.prototype.parseMedia;ZB.prototype.setManifestType=ZB.prototype.setManifestType;ZB.prototype.setSequenceMode=ZB.prototype.setSequenceMode;ZB.prototype.parseInit=ZB.prototype.parseInit;oe['application/mp4; codecs="wvtt"']=function(){return new ZB};function bC(){}bC.prototype.parseInit=function(){};bC.prototype.setSequenceMode=function(){};bC.prototype.setManifestType=function(){};bC.prototype.parseMedia=function(a){var b=xd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new zp(c[0]),e=cC(d),f=Bp(d,/,/g);d=cC(d);if(null==e||null==f||null==d)throw new T(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Rb(e,d,c.slice(1).join("\n").trim()))}return a};
1318
1323
  function cC(a){a=Bp(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)}S("shaka.text.SbvTextParser",bC);bC.prototype.parseMedia=bC.prototype.parseMedia;bC.prototype.setManifestType=bC.prototype.setManifestType;bC.prototype.setSequenceMode=bC.prototype.setSequenceMode;bC.prototype.parseInit=bC.prototype.parseInit;oe["text/x-subviewer"]=function(){return new bC};function dC(){this.g=new PB}dC.prototype.parseInit=function(){};dC.prototype.setSequenceMode=function(){};dC.prototype.setManifestType=function(){};dC.prototype.parseMedia=function(a,b,c){a=xd(a);a=eC(a);a=Bb(Bd(a));return this.g.parseMedia(a,b,c)};
1319
1324
  function eC(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(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").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}S("shaka.text.SrtTextParser",dC);dC.srt2webvtt=eC;dC.prototype.parseMedia=dC.prototype.parseMedia;
@@ -1327,36 +1332,36 @@ function lC(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","
1327
1332
  var gC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,hC=/^\s*([^:]+):\s*(.*)/,iC=/\s*,\s*/,mC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;oe["text/x-ssa"]=function(){return new fC};function nC(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Fd:c,Z:a}:null}function oC(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}}
1328
1333
  function pC(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
1329
1334
  function qC(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
1330
- 2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function rC(a){this.i=a;this.h=0;this.g=new Map}q=rC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(je(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
1331
- q.transmux=function(a,b,c,d){for(var e=Bb(a),f=Wi(e),g=f.length;g<e.length&&!pC(e,g);g++);a=1E3*c.endTime;f=Vi(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=oC(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=nC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.Fd+k.Z;g+l<=e.length&&h.push({data:e.subarray(g+
1332
- k.Fd,g+l),size:k.Z,duration:1024,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Wa:[],la:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:h},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=Yw(d);this.h++;b=Nd(b,c);return Promise.resolve(b)};
1335
+ 2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function rC(a){this.i=a;this.h=0;this.g=new Map}r=rC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(je(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
1336
+ r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Wi(e),g=f.length;g<e.length&&!pC(e,g);g++);a=1E3*c.endTime;f=Vi(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=oC(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=nC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.Fd+k.Z;g+l<=e.length&&h.push({data:e.subarray(g+
1337
+ k.Fd,g+l),size:k.Z,duration:1024,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Wa:[],la:new Uint8Array([]),sa:new Uint8Array([]),ya:0,Aa:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:h},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=Yw(d);this.h++;b=Nd(b,c);return Promise.resolve(b)};
1333
1338
  S("shaka.transmuxer.AacTransmuxer",rC);rC.prototype.transmux=rC.prototype.transmux;rC.prototype.getOriginalMimeType=rC.prototype.getOriginalMimeType;rC.prototype.convertCodecs=rC.prototype.convertCodecs;rC.prototype.isSupported=rC.prototype.isSupported;rC.prototype.destroy=rC.prototype.destroy;kc("audio/aac",function(){return new rC("audio/aac")},qc);function sC(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1334
1339
  1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,la:a,Z:e}}
1335
- function tC(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function uC(a){this.i=a;this.h=0;this.g=new Map}q=uC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.i};
1336
- q.transmux=function(a,b,c,d){a=Bb(a);for(var e=Wi(a),f=e.length;f<a.length&&!tC(a,f);f++);var g=1E3*c.endTime;e=Vi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=sC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.la;k.push({data:a.subarray(f,f+l.Z),size:l.Z,duration:1536,
1337
- Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=l.Z}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Wa:[],la:h,ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:k},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=Yw(d);this.h++;b=Nd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",uC);uC.prototype.transmux=uC.prototype.transmux;
1338
- uC.prototype.getOriginalMimeType=uC.prototype.getOriginalMimeType;uC.prototype.convertCodecs=uC.prototype.convertCodecs;uC.prototype.isSupported=uC.prototype.isSupported;uC.prototype.destroy=uC.prototype.destroy;kc("audio/ac3",function(){return new uC("audio/ac3")},qc);function vC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new fj(a.subarray(b+2));hj(c,2);hj(c,3);var d=ij(c,11)+1<<1,e=ij(c,2);if(3==e){e=ij(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=ij(c,2);var g=ij(c,3),h=ij(c,1);c=ij(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,la:a,Z:d}};function wC(a){this.i=a;this.h=0;this.g=new Map}q=wC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.i};
1339
- q.transmux=function(a,b,c,d){a=Bb(a);for(var e=Wi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Vi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=vC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.la;k.push({data:a.subarray(f,f+l.Z),size:l.Z,
1340
- duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=l.Z}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Wa:[],la:h,ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:k},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=Yw(d);this.h++;b=Nd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",wC);wC.prototype.transmux=wC.prototype.transmux;
1341
- wC.prototype.getOriginalMimeType=wC.prototype.getOriginalMimeType;wC.prototype.convertCodecs=wC.prototype.convertCodecs;wC.prototype.isSupported=wC.prototype.isSupported;wC.prototype.destroy=wC.prototype.destroy;kc("audio/ec3",function(){return new wC("audio/ec3")},qc);function xC(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new fj(b.data),d=mj(c);mj(c);mj(c);kj(c);if(yC.includes(d)&&(d=V(c),3===d&&hj(c,1),kj(c),kj(c),hj(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?uj(c,16):uj(c,64))}kj(c);d=V(c);if(0===d)V(c);else if(1===d)for(hj(c,1),kj(c),kj(c),d=V(c),e=0;e<d;e++)kj(c);kj(c);hj(c,1);var f=V(c),g=V(c),h=ij(c,1);0===h&&hj(c,1);hj(c,1);var k=0,l=0,m=0,n=0;W(c)&&
1342
- (k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(W(c)&&W(c)){var p=mj(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=r[p-1],e=u[p-1]):255===p&&(d=ij(c,16),e=ij(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
1343
- 225].concat(k,[1],b));return{height:c,width:f,ta:a,Aa:d,Ba:e}}
1340
+ function tC(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function uC(a){this.i=a;this.h=0;this.g=new Map}r=uC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
1341
+ r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Wi(a),f=e.length;f<a.length&&!tC(a,f);f++);var g=1E3*c.endTime;e=Vi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=sC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.la;k.push({data:a.subarray(f,f+l.Z),size:l.Z,duration:1536,
1342
+ Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=l.Z}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Wa:[],la:h,sa:new Uint8Array([]),ya:0,Aa:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:k},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=Yw(d);this.h++;b=Nd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",uC);uC.prototype.transmux=uC.prototype.transmux;
1343
+ uC.prototype.getOriginalMimeType=uC.prototype.getOriginalMimeType;uC.prototype.convertCodecs=uC.prototype.convertCodecs;uC.prototype.isSupported=uC.prototype.isSupported;uC.prototype.destroy=uC.prototype.destroy;kc("audio/ac3",function(){return new uC("audio/ac3")},qc);function vC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new fj(a.subarray(b+2));hj(c,2);hj(c,3);var d=ij(c,11)+1<<1,e=ij(c,2);if(3==e){e=ij(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=ij(c,2);var g=ij(c,3),h=ij(c,1);c=ij(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,la:a,Z:d}};function wC(a){this.i=a;this.h=0;this.g=new Map}r=wC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
1344
+ r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Wi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Vi(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=vC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.la;k.push({data:a.subarray(f,f+l.Z),size:l.Z,
1345
+ duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=l.Z}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Wa:[],la:h,sa:new Uint8Array([]),ya:0,Aa:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:k},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=Yw(d);this.h++;b=Nd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",wC);wC.prototype.transmux=wC.prototype.transmux;
1346
+ wC.prototype.getOriginalMimeType=wC.prototype.getOriginalMimeType;wC.prototype.convertCodecs=wC.prototype.convertCodecs;wC.prototype.isSupported=wC.prototype.isSupported;wC.prototype.destroy=wC.prototype.destroy;kc("audio/ec3",function(){return new wC("audio/ec3")},qc);function xC(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new fj(b.data),d=tj(c);tj(c);tj(c);kj(c);if(yC.includes(d)&&(d=V(c),3===d&&hj(c,1),kj(c),kj(c),hj(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?uj(c,16):uj(c,64))}kj(c);d=V(c);if(0===d)V(c);else if(1===d)for(hj(c,1),kj(c),kj(c),d=V(c),e=0;e<d;e++)kj(c);kj(c);hj(c,1);var f=V(c),g=V(c),h=ij(c,1);0===h&&hj(c,1);hj(c,1);var k=0,l=0,m=0,n=0;W(c)&&
1347
+ (k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(W(c)&&W(c)){var p=tj(c),q=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=q[p-1],e=u[p-1]):255===p&&(d=ij(c,16),e=ij(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
1348
+ 225].concat(k,[1],b));return{height:c,width:f,sa:a,ya:d,Aa:e}}
1344
1349
  function zC(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=vj(new fj(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(h),c.push(f.fullData))}return c.length?
1345
- {data:Nd.apply(Fd,x(c)),bd:b}:null}var yC=[100,110,122,244,44,83,86,118,128,138,139,134];function AC(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=BC(b.fullData);a=CC(c.fullData);var f=DC(d.fullData);b=EC(b.fullData,c.fullData,d.fullData,{jf:e.jf,Lf:e.Lf,Ne:a.Ne,Oe:a.Oe,He:a.He,Me:a.Me,Ie:a.Ie,Je:a.Je,Ke:a.Ke,Le:a.Le,Be:a.Be,Ce:a.Ce,De:a.De,Ee:a.Ee,Fe:a.Fe,Ge:a.Ge,we:a.we,Rd:a.Rd,ue:a.ue,te:a.te,se:a.se,mf:f.mf});return{height:a.height,width:a.width,
1346
- ta:b,Aa:a.Di,Ba:a.Ci}}function BC(a){var b=new fj(a,!0);mj(b);mj(b);ij(b,4);ij(b,2);ij(b,6);a=ij(b,3);b=W(b);return{jf:a+1,Lf:b}}
1347
- function CC(a){a=new fj(a,!0);mj(a);mj(a);var b=0,c=0,d=0,e=0;ij(a,4);var f=ij(a,3);W(a);for(var g=ij(a,2),h=ij(a,1),k=ij(a,5),l=mj(a),m=mj(a),n=mj(a),p=mj(a),r=mj(a),u=mj(a),v=mj(a),w=mj(a),A=mj(a),y=mj(a),C=mj(a),z=[],B=[],D=0;D<f;D++)z.push(W(a)),B.push(W(a));if(0<f)for(D=f;8>D;D++)ij(a,2);for(D=0;D<f;D++)z[D]&&ij(a,88),B[D]&&mj(a);V(a);z=V(a);3==z&&ij(a,1);B=V(a);D=V(a);W(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var I=V(a),F=V(a),J=V(a);if(W(a))for(var K=0;K<=f;K++)V(a),V(a),V(a);else V(a),V(a),
1348
- V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(K=0;4>K;K++)for(var G=0;G<(3===K?2:6);G++)if(W(a)){var M=Math.min(64,1<<4+(K<<1));1<K&&lj(a);for(var N=0;N<M;N++)lj(a)}else V(a);W(a);W(a);W(a)&&(mj(a),V(a),V(a),W(a));K=V(a);for(M=G=0;M<K;M++)if(N=!1,0!==M&&(N=W(a)),N){M===K&&V(a);W(a);V(a);for(var L=N=0;L<=G;L++){var P=W(a),R=!1;P||(R=W(a));(P||R)&&N++}G=N}else{L=V(a);N=V(a);G=L+N;for(P=0;P<L;P++)V(a),W(a);for(L=0;L<N;L++)V(a),W(a)}if(W(a))for(K=V(a),G=0;G<K;G++){for(M=0;M<J+4;M++)ij(a,1);ij(a,
1349
- 1)}K=J=1;G=0;W(a);W(a);if(W(a)){W(a)&&(M=mj(a),N=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],L=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>=M?(J=N[M-1],K=L[M-1]):255===M&&(J=ij(a,16),K=ij(a,16)));W(a)&&W(a);W(a)&&(ij(a,3),W(a),W(a)&&(mj(a),mj(a),mj(a)));W(a)&&(V(a),V(a));W(a);W(a);W(a);if(M=W(a))V(a),V(a),V(a),V(a);if(W(a)&&(ij(a,32),ij(a,32),W(a)&&V(a),W(a))){L=!1;M=W(a);N=W(a);if(M||N){if(L=W(a))mj(a),ij(a,5),W(a),ij(a,5);ij(a,4);ij(a,4);L&&ij(a,4);ij(a,5);ij(a,5);ij(a,5)}for(P=0;P<=
1350
- f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var ca=!1;Q?V(a):ca=W(a);ca||(R=V(a)+1);if(M){for(Q=0;Q<R;Q++)V(a),V(a),L&&(V(a),V(a));W(a)}if(N){for(Q=0;Q<R;Q++)V(a),V(a),L&&(V(a),V(a));W(a)}}}W(a)&&(W(a),W(a),W(a),G=V(a),V(a),V(a),V(a),V(a))}return{He:C,Ne:g,Oe:h,Me:k,Ie:l,Je:m,Ke:n,Le:p,Be:r,Ce:u,De:v,Ee:w,Fe:A,Ge:y,Rd:G,we:0,ue:z,te:I,se:F,width:B-(b+c)*(1===z||2===z?2:1),height:D-(d+e)*(1===z?2:1),Di:J,Ci:K}}
1351
- function DC(a){var b=new fj(a,!0);mj(b);mj(b);V(b);V(b);W(b);W(b);ij(b,3);W(b);W(b);V(b);V(b);lj(b);W(b);W(b);W(b)&&V(b);lj(b);lj(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{mf:c}}
1350
+ {data:Nd.apply(Fd,x(c)),cd:b}:null}var yC=[100,110,122,244,44,83,86,118,128,138,139,134];function AC(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=BC(b.fullData);a=CC(c.fullData);var f=DC(d.fullData);b=EC(b.fullData,c.fullData,d.fullData,{jf:e.jf,Lf:e.Lf,Ne:a.Ne,Oe:a.Oe,He:a.He,Me:a.Me,Ie:a.Ie,Je:a.Je,Ke:a.Ke,Le:a.Le,Be:a.Be,Ce:a.Ce,De:a.De,Ee:a.Ee,Fe:a.Fe,Ge:a.Ge,we:a.we,Rd:a.Rd,ue:a.ue,te:a.te,se:a.se,mf:f.mf});return{height:a.height,width:a.width,
1351
+ sa:b,ya:a.Di,Aa:a.Ci}}function BC(a){var b=new fj(a,!0);tj(b);tj(b);ij(b,4);ij(b,2);ij(b,6);a=ij(b,3);b=W(b);return{jf:a+1,Lf:b}}
1352
+ function CC(a){a=new fj(a,!0);tj(a);tj(a);var b=0,c=0,d=0,e=0;ij(a,4);var f=ij(a,3);W(a);for(var g=ij(a,2),h=ij(a,1),k=ij(a,5),l=tj(a),m=tj(a),n=tj(a),p=tj(a),q=tj(a),u=tj(a),v=tj(a),w=tj(a),A=tj(a),y=tj(a),C=tj(a),z=[],B=[],D=0;D<f;D++)z.push(W(a)),B.push(W(a));if(0<f)for(D=f;8>D;D++)ij(a,2);for(D=0;D<f;D++)z[D]&&ij(a,88),B[D]&&tj(a);V(a);z=V(a);3==z&&ij(a,1);B=V(a);D=V(a);W(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var I=V(a),F=V(a),J=V(a);if(W(a))for(var K=0;K<=f;K++)V(a),V(a),V(a);else V(a),V(a),
1353
+ V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(K=0;4>K;K++)for(var G=0;G<(3===K?2:6);G++)if(W(a)){var M=Math.min(64,1<<4+(K<<1));1<K&&lj(a);for(var N=0;N<M;N++)lj(a)}else V(a);W(a);W(a);W(a)&&(tj(a),V(a),V(a),W(a));K=V(a);for(M=G=0;M<K;M++)if(N=!1,0!==M&&(N=W(a)),N){M===K&&V(a);W(a);V(a);for(var L=N=0;L<=G;L++){var P=W(a),R=!1;P||(R=W(a));(P||R)&&N++}G=N}else{L=V(a);N=V(a);G=L+N;for(P=0;P<L;P++)V(a),W(a);for(L=0;L<N;L++)V(a),W(a)}if(W(a))for(K=V(a),G=0;G<K;G++){for(M=0;M<J+4;M++)ij(a,1);ij(a,
1354
+ 1)}K=J=1;G=0;W(a);W(a);if(W(a)){W(a)&&(M=tj(a),N=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],L=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<M&&16>=M?(J=N[M-1],K=L[M-1]):255===M&&(J=ij(a,16),K=ij(a,16)));W(a)&&W(a);W(a)&&(ij(a,3),W(a),W(a)&&(tj(a),tj(a),tj(a)));W(a)&&(V(a),V(a));W(a);W(a);W(a);if(M=W(a))V(a),V(a),V(a),V(a);if(W(a)&&(ij(a,32),ij(a,32),W(a)&&V(a),W(a))){L=!1;M=W(a);N=W(a);if(M||N){if(L=W(a))tj(a),ij(a,5),W(a),ij(a,5);ij(a,4);ij(a,4);L&&ij(a,4);ij(a,5);ij(a,5);ij(a,5)}for(P=0;P<=
1355
+ f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var ca=!1;Q?V(a):ca=W(a);ca||(R=V(a)+1);if(M){for(Q=0;Q<R;Q++)V(a),V(a),L&&(V(a),V(a));W(a)}if(N){for(Q=0;Q<R;Q++)V(a),V(a),L&&(V(a),V(a));W(a)}}}W(a)&&(W(a),W(a),W(a),G=V(a),V(a),V(a),V(a),V(a))}return{He:C,Ne:g,Oe:h,Me:k,Ie:l,Je:m,Ke:n,Le:p,Be:q,Ce:u,De:v,Ee:w,Fe:A,Ge:y,Rd:G,we:0,ue:z,te:I,se:F,width:B-(b+c)*(1===z||2===z?2:1),height:D-(d+e)*(1===z?2:1),Di:J,Ci:K}}
1356
+ function DC(a){var b=new fj(a,!0);tj(b);tj(b);V(b);V(b);W(b);W(b);ij(b,3);W(b);W(b);V(b);V(b);lj(b);W(b);W(b);W(b)&&V(b);lj(b);lj(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{mf:c}}
1352
1357
  function EC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Ne&3)<<6|(d.Oe?1:0)<<5|d.Me&31;e[2]=d.Ie;e[3]=d.Je;e[4]=d.Ke;e[5]=d.Le;e[6]=d.Be;e[7]=d.Ce;e[8]=d.De;e[9]=d.Ee;e[10]=d.Fe;e[11]=d.Ge;e[12]=d.He;e[13]=240|(d.Rd&3840)>>8;e[14]=d.Rd&255;e[15]=252|d.mf&3;e[16]=252|d.ue&3;e[17]=248|d.te&7;e[18]=248|d.se&7;e[19]=0;e[20]=0;e[21]=(d.we&3)<<6|(d.jf&7)<<3|(d.Lf?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
1353
1358
  255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function FC(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*GC[14*(3===c?3-d:3===d?3:4)+e-1];f=HC[3*(3===c?0:2===c?1:2)+f];c=IC[c][d];var h=JC[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,Z:k,Bi:8*c*h}}return null}
1354
1359
  function KC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function LC(a,b){if(b+1<a.length&&KC(a,b)){var c=FC(a,b),d=4;c&&c.Z&&(d=c.Z);b+=d;return b===a.length||b+1<a.length&&KC(a,b)}return!1}
1355
- var GC=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],HC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],IC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],JC=[0,1,1,4];function MC(a){this.i=a;this.h=0;this.g=new Map}q=MC.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
1356
- q.transmux=function(a,b,c,d){for(var e=Bb(a),f=Wi(e).length;f<e.length&&!LC(e,f);f++);var g;for(a=[];f<e.length;){var h=FC(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.Z<=e.length&&a.push({data:e.subarray(f,f+h.Z),size:h.Z,duration:1152,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=h.Z}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));e=9E4*g.Bi/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
1357
- duration:d,Wa:[],la:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.h,baseMediaDecodeTime:e,Ta:a},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=Yw(d);this.h++;b=Nd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",MC);MC.prototype.transmux=MC.prototype.transmux;MC.prototype.getOriginalMimeType=MC.prototype.getOriginalMimeType;MC.prototype.convertCodecs=MC.prototype.convertCodecs;MC.prototype.isSupported=MC.prototype.isSupported;
1358
- MC.prototype.destroy=MC.prototype.destroy;kc("audio/mpeg",function(){return new MC("audio/mpeg")},qc);function NC(a){this.h=a;this.g=null}q=NC.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=je(a).split(","),c=Sd("audio",b);b=Sd("video",b);return!c||b||"mp3"!=ee(c)?!1:nb(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
1359
- q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new wj;a=Bb(a);a=this.g.parse(a);if("mp3"!=a.Tc().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=new Uint8Array([]);e=t(a.Kb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=FC(a,b))?(b+d.Z<=a.length&&(c=Nd(c,a.subarray(b,b+d.Z))),b+=d.Z):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",NC);NC.prototype.transmux=NC.prototype.transmux;
1360
+ var GC=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],HC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],IC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],JC=[0,1,1,4];function MC(a){this.i=a;this.h=0;this.g=new Map}r=MC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
1361
+ r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Wi(e).length;f<e.length&&!LC(e,f);f++);var g;for(a=[];f<e.length;){var h=FC(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.Z<=e.length&&a.push({data:e.subarray(f,f+h.Z),size:h.Z,duration:1152,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=h.Z}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));e=9E4*g.Bi/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
1362
+ duration:d,Wa:[],la:new Uint8Array([]),sa:new Uint8Array([]),ya:0,Aa:0,data:{ob:this.h,baseMediaDecodeTime:e,Ta:a},stream:b};d=new Bw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Hw(d),this.g.set(c,b));c=Yw(d);this.h++;b=Nd(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",MC);MC.prototype.transmux=MC.prototype.transmux;MC.prototype.getOriginalMimeType=MC.prototype.getOriginalMimeType;MC.prototype.convertCodecs=MC.prototype.convertCodecs;MC.prototype.isSupported=MC.prototype.isSupported;
1363
+ MC.prototype.destroy=MC.prototype.destroy;kc("audio/mpeg",function(){return new MC("audio/mpeg")},qc);function NC(a){this.h=a;this.g=null}r=NC.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=je(a).split(","),c=Sd("audio",b);b=Sd("video",b);return!c||b||"mp3"!=ee(c)?!1:nb(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
1364
+ r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new wj;a=Bb(a);a=this.g.parse(a);if("mp3"!=a.Tc().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=new Uint8Array([]);e=t(a.Kb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=FC(a,b))?(b+d.Z<=a.length&&(c=Nd(c,a.subarray(b,b+d.Z))),b+=d.Z):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",NC);NC.prototype.transmux=NC.prototype.transmux;
1360
1365
  NC.prototype.getOriginalMimeType=NC.prototype.getOriginalMimeType;NC.prototype.convertCodecs=NC.prototype.convertCodecs;NC.prototype.isSupported=NC.prototype.isSupported;NC.prototype.destroy=NC.prototype.destroy;kc("video/mp2t",function(){return new NC("video/mp2t")},pc);/*
1361
1366
  @license
1362
1367
  MSS Transmuxer
@@ -1366,30 +1371,30 @@ NC.prototype.getOriginalMimeType=NC.prototype.getOriginalMimeType;NC.prototype.c
1366
1371
  function OC(a){this.h=a;(this.g=Mu.get("ISOBoxer")())&&PC(this)}
1367
1372
  function PC(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
1368
1373
  "uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
1369
- "uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==QC[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=OC.prototype;q.destroy=function(){};
1370
- q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return nb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return nb(b)||nb(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h};
1371
- q.transmux=function(a,b,c){if(!c)return Promise.resolve(Bb(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.M()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
1372
- m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
1374
+ "uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==QC[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=OC.prototype;r.destroy=function(){};
1375
+ r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return nb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return nb(b)||nb(a)};r.convertCodecs=function(a,b){return b.replace("mss/","")};r.getOriginalMimeType=function(){return this.h};
1376
+ r.transmux=function(a,b,c){if(!c)return Promise.resolve(Bb(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.M()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
1377
+ m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var q=this.g.createFullBox("saiz",h);q.version=0;q.flags=0;q.sample_count=n.sample_count;q.default_sample_info_size=0;q.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)q.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else q.default_sample_info_size=
1373
1378
  8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=RC(u,"traf")+RC(h,"senc")+16);var w=Bb(e.write());return Promise.resolve(w)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.M()[0]:null))}};function RC(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}S("shaka.transmuxer.MssTransmuxer",OC);OC.prototype.transmux=OC.prototype.transmux;
1374
- OC.prototype.getOriginalMimeType=OC.prototype.getOriginalMimeType;OC.prototype.convertCodecs=OC.prototype.convertCodecs;OC.prototype.isSupported=OC.prototype.isSupported;OC.prototype.destroy=OC.prototype.destroy;var QC=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);kc("mss/audio/mp4",function(){return new OC("mss/audio/mp4")},qc);kc("mss/video/mp4",function(){return new OC("mss/video/mp4")},qc);function SC(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=SC.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1375
- q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=je(c).split(",");c=Sd("audio",d);d=Sd("video",d);if(c&&(c=ee(c),!TC.includes(c))||d&&(c=ee(d),!UC.includes(c)))return!1;if(b)return nb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return nb(b)||nb(a)};
1376
- q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=je(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return Ye(c,"audio/mp4")}).map(Xe).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
1377
- q.transmux=function(a,b,c,d,e){var f=Bb(a);if("audio"==e&&!Dj(f)){for(var g=Wi(f),h=g.length;h<f.length;h++)if(LC(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(pC(f,h))return this.h||(this.h=new rC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.j?this.j.clearData():this.j=new wj;var k=this.j.parse(f),l=[],m=k.Tc();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.zc();
1378
- if(!v.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],y=A.nalus;u.push.apply(u,x(y));var C=zC(y);if(C){null==r&&(r=A.dts);var z=void 0;z=w+1<v.length?(v[w+1].dts||0)-(A.dts||0):1<v.length?(A.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:C.data,size:C.data.byteLength,duration:z,Ya:Math.round((A.pts||0)-(A.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:C.bd?2:1,bb:C.bd?0:1}})}}var B=xC(u);if(!B||null==r)throw new T(2,3,3018,c?c.M()[0]:null);b.height=B.height;
1379
- b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],la:new Uint8Array([]),ta:B.ta,Aa:B.Aa,Ba:B.Ba,data:{ob:this.g,baseMediaDecodeTime:r,Ta:p},stream:b};break;case "hvc":var D=[],I=null,F=[],J=k.zc();if(!J.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var K=0;K<J.length;K++){var G=J[K],M=G.nalus;F.push.apply(F,x(M));for(var N=!1,L=[],P=!1,R=t(M),Q=R.next();!Q.done;Q=R.next()){var ca=Q.value;switch(ca.type){case 1:case 0:var ea=
1380
- P=!0;break;case 19:case 20:case 21:N=ea=P=!0;break;case 32:ea=!0;break;case 33:ea=!0;break;case 34:ea=!0;break;case 35:P=ea=!0;break;case 39:case 40:ea=!0;break;default:ea=!1}if(P&&ea){var la=ca.fullData.byteLength,Qa=new Uint8Array(4);Qa[0]=la>>24&255;Qa[1]=la>>16&255;Qa[2]=la>>8&255;Qa[3]=la&255;L.push(Qa);L.push(ca.fullData)}}var ua=L.length?{data:Nd.apply(Fd,x(L)),bd:N}:null;if(ua){null==I&&null!=G.dts&&(I=G.dts);var za=void 0;za=K+1<J.length?(J[K+1].dts||0)-(G.dts||0):1<J.length?(G.dts||0)-(J[K-
1381
- 1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:ua.data,size:ua.data.byteLength,duration:za,Ya:Math.round((G.pts||0)-(G.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:ua.bd?2:1,bb:ua.bd?0:1}})}}var La=AC(F);if(!La||null==I)throw new T(2,3,3018,c?c.M()[0]:null);b.height=La.height;b.width=La.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],la:new Uint8Array([]),ta:La.ta,Aa:La.Aa,Ba:La.Ba,data:{ob:this.g,baseMediaDecodeTime:I,Ta:D},stream:b}}n&&
1382
- (l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Ra=[],ma,bb=null,kb=t(k.Kb()),pd=kb.next();!pd.done;pd=kb.next()){var jf=pd.value,qd=jf.data;if(qd){var Pc=0;ma=oC(qd,Pc);if(!ma)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=ma.sampleRate;b.channelsCount=ma.channelCount;null==bb&&null!==jf.pts&&(bb=jf.pts);for(;Pc<qd.length;){var rd=nC(qd,Pc);if(rd){var ge=rd.Fd+rd.Z;Pc+ge<=qd.length&&Ra.push({data:qd.subarray(Pc+rd.Fd,Pc+ge),size:rd.Z,duration:1024,Ya:0,flags:{ab:0,
1383
- Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Pc+=ge}else Pc++}}}if(!ma||null==bb){if(!k.zc().length)throw new T(2,3,3018,c?c.M()[0]:null);bb=9E4*c.startTime;var sd=Sd("audio",b.codecs.split(","));if(!sd||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);ma={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:sd};var kf=qC(sd,b.channelsCount);if(!kf)throw new T(2,3,3018,c?c.M()[0]:null);for(var Di=bb+9E4*(c.endTime-c.startTime),Ei=bb;Ei<Di;)Ra.push({data:kf,size:kf.byteLength,
1384
- duration:1024,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),Ei+=1024/ma.sampleRate*9E4}var xg=ma.sampleRate,Fi=bb/9E4*xg;n={id:b.id,type:"audio",codecs:ma.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:xg,duration:d,Wa:[],la:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:Fi,Ta:Ra},stream:b};break;case "ac3":for(var yg=[],Vb=0,Lm=new Uint8Array([]),nj=null,wu=t(k.Kb()),Mm=wu.next();!Mm.done;Mm=wu.next()){var Nm=Mm.value,Om=Nm.data;null==nj&&null!==
1385
- Nm.pts&&(nj=Nm.pts);for(var sf=0;sf<Om.length;){var Jd=sC(Om,sf);Jd?(b.audioSamplingRate=Jd.sampleRate,b.channelsCount=Jd.channelCount,Vb=Jd.sampleRate,Lm=Jd.la,yg.push({data:Om.subarray(sf,sf+Jd.Z),size:Jd.Z,duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),sf+=Jd.Z):sf++}}if(0==Vb||0==Lm.byteLength||null==nj)throw new T(2,3,3018,c?c.M()[0]:null);var jD=nj/9E4*Vb;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Vb,duration:d,Wa:[],la:Lm,ta:new Uint8Array([]),
1386
- Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:jD,Ta:yg},stream:b};break;case "ec3":for(var xu=[],oj=0,Pm=new Uint8Array([]),pj=null,yu=t(k.Kb()),Qm=yu.next();!Qm.done;Qm=yu.next()){var Rm=Qm.value,Sm=Rm.data;null==pj&&null!==Rm.pts&&(pj=Rm.pts);for(var tf=0;tf<Sm.length;){var Kd=vC(Sm,tf);Kd?(b.audioSamplingRate=Kd.sampleRate,b.channelsCount=Kd.channelCount,oj=Kd.sampleRate,Pm=Kd.la,xu.push({data:Sm.subarray(tf,tf+Kd.Z),size:Kd.Z,duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),tf+=Kd.Z):
1387
- tf++}}if(0==oj||0==Pm.byteLength||null==pj)throw new T(2,3,3018,c?c.M()[0]:null);var kD=pj/9E4*oj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:oj,duration:d,Wa:[],la:Pm,ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:kD,Ta:xu},stream:b};break;case "mp3":for(var zu=[],qj,rj=null,Au=t(k.Kb()),Tm=Au.next();!Tm.done;Tm=Au.next()){var Um=Tm.value,Lg=Um.data;if(Lg){null==rj&&null!==Um.pts&&(rj=Um.pts);for(var ke=0;ke<Lg.length;){var uf=FC(Lg,
1388
- ke);uf?(qj||(qj=uf),ke+uf.Z<=Lg.length&&zu.push({data:Lg.subarray(ke,ke+uf.Z),size:uf.Z,duration:1152,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),ke+=uf.Z):ke++}}}if(!qj||null==rj)throw new T(2,3,3018,c?c.M()[0]:null);var Bu=qj.sampleRate,lD=rj/9E4*Bu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Bu,duration:d,Wa:[],la:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:lD,Ta:zu},stream:b};break;case "opus":var Cu=[],
1389
- sj=null,Rc=k.F;if(!Rc)throw new T(2,3,3018,c?c.M()[0]:null);var zb=[];switch(Rc.nh){case 1:case 2:zb=[0];break;case 0:zb=[255,1,1,0,1];break;case 128:zb=[255,2,0,0,1];break;case 3:zb=[1,2,1,0,2,1];break;case 4:zb=[1,2,2,0,1,2,3];break;case 5:zb=[1,3,2,0,4,1,2,3];break;case 6:zb=[1,4,2,0,4,1,2,3,5];break;case 7:zb=[1,4,2,0,4,1,2,3,5,6];break;case 8:zb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:zb=[1,1,2,0,1];break;case 131:zb=[1,1,3,0,1,2];break;case 132:zb=[1,1,4,0,1,2,3];break;case 133:zb=[1,1,5,0,1,
1390
- 2,3,4];break;case 134:zb=[1,1,6,0,1,2,3,4,5];break;case 135:zb=[1,1,7,0,1,2,3,4,5,6];break;case 136:zb=[1,1,8,0,1,2,3,4,5,6,7]}var Du=new Uint8Array([0,Rc.channelCount,0,0,Rc.sampleRate>>>24&255,Rc.sampleRate>>>17&255,Rc.sampleRate>>>8&255,Rc.sampleRate>>>0&255,0,0].concat(x(zb)));for(var Eu=Rc.sampleRate,Fu=t(k.Kb()),Vm=Fu.next();!Vm.done;Vm=Fu.next()){var Wm=Vm.value,vf=Wm.data;null==sj&&null!==Wm.pts&&(sj=Wm.pts);for(var Mg=0;Mg<vf.length;){for(var mD=0!==(vf[Mg+1]&16),nD=0!==(vf[Mg+1]&8),ud=Mg+
1391
- 2,tj=0;255===vf[ud];)tj+=255,ud+=1;tj+=vf[ud];ud+=1;ud+=mD?2:0;ud+=nD?2:0;var Gu=vf.slice(ud,ud+tj);Cu.push({data:Gu,size:Gu.byteLength,duration:960,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Mg=ud+tj}}if(0==Du.byteLength||null==sj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Rc.sampleRate;b.channelsCount=Rc.channelCount;var oD=sj/9E4*Eu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Eu,duration:d,Wa:[],la:Du,ta:new Uint8Array([]),Aa:0,Ba:0,
1392
- data:{ob:this.g,baseMediaDecodeTime:oD,Ta:Cu},stream:b}}n&&(l.push(n),n=null)}}catch(Xm){return Xm&&3023==Xm.code?Promise.resolve(new Uint8Array([])):Promise.reject(Xm)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var Hu=new Bw(l),Ym=b.id+"_"+c.i;if(this.i.has(Ym))var Zm=this.i.get(Ym);else Zm=Hw(Hu),this.i.set(Ym,Zm);var pD=Yw(Hu);this.g++;var qD=Nd(Zm,pD);return Promise.resolve(qD)};S("shaka.transmuxer.TsTransmuxer",SC);SC.prototype.transmux=SC.prototype.transmux;
1379
+ OC.prototype.getOriginalMimeType=OC.prototype.getOriginalMimeType;OC.prototype.convertCodecs=OC.prototype.convertCodecs;OC.prototype.isSupported=OC.prototype.isSupported;OC.prototype.destroy=OC.prototype.destroy;var QC=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);kc("mss/audio/mp4",function(){return new OC("mss/audio/mp4")},qc);kc("mss/video/mp4",function(){return new OC("mss/video/mp4")},qc);function SC(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=SC.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1380
+ r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=je(c).split(",");c=Sd("audio",d);d=Sd("video",d);if(c&&(c=ee(c),!TC.includes(c))||d&&(c=ee(d),!UC.includes(c)))return!1;if(b)return nb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return nb(b)||nb(a)};
1381
+ r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=je(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return Ye(c,"audio/mp4")}).map(Xe).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.getOriginalMimeType=function(){return this.l};
1382
+ r.transmux=function(a,b,c,d,e){var f=Bb(a);if("audio"==e&&!Dj(f)){for(var g=Wi(f),h=g.length;h<f.length;h++)if(LC(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(pC(f,h))return this.h||(this.h=new rC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.j?this.j.clearData():this.j=new wj;var k=this.j.parse(f),l=[],m=k.Tc();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],q=null,u=[],v=k.zc();
1383
+ if(!v.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],y=A.nalus;u.push.apply(u,x(y));var C=zC(y);if(C){null==q&&(q=A.dts);var z=void 0;z=w+1<v.length?(v[w+1].dts||0)-(A.dts||0):1<v.length?(A.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:C.data,size:C.data.byteLength,duration:z,Ya:Math.round((A.pts||0)-(A.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:C.cd?2:1,bb:C.cd?0:1}})}}var B=xC(u);if(!B||null==q)throw new T(2,3,3018,c?c.M()[0]:null);b.height=B.height;
1384
+ b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],la:new Uint8Array([]),sa:B.sa,ya:B.ya,Aa:B.Aa,data:{ob:this.g,baseMediaDecodeTime:q,Ta:p},stream:b};break;case "hvc":var D=[],I=null,F=[],J=k.zc();if(!J.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var K=0;K<J.length;K++){var G=J[K],M=G.nalus;F.push.apply(F,x(M));for(var N=!1,L=[],P=!1,R=t(M),Q=R.next();!Q.done;Q=R.next()){var ca=Q.value;switch(ca.type){case 1:case 0:var ea=
1385
+ P=!0;break;case 19:case 20:case 21:N=ea=P=!0;break;case 32:ea=!0;break;case 33:ea=!0;break;case 34:ea=!0;break;case 35:P=ea=!0;break;case 39:case 40:ea=!0;break;default:ea=!1}if(P&&ea){var la=ca.fullData.byteLength,Qa=new Uint8Array(4);Qa[0]=la>>24&255;Qa[1]=la>>16&255;Qa[2]=la>>8&255;Qa[3]=la&255;L.push(Qa);L.push(ca.fullData)}}var ua=L.length?{data:Nd.apply(Fd,x(L)),cd:N}:null;if(ua){null==I&&null!=G.dts&&(I=G.dts);var Aa=void 0;Aa=K+1<J.length?(J[K+1].dts||0)-(G.dts||0):1<J.length?(G.dts||0)-(J[K-
1386
+ 1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:ua.data,size:ua.data.byteLength,duration:Aa,Ya:Math.round((G.pts||0)-(G.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:ua.cd?2:1,bb:ua.cd?0:1}})}}var La=AC(F);if(!La||null==I)throw new T(2,3,3018,c?c.M()[0]:null);b.height=La.height;b.width=La.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],la:new Uint8Array([]),sa:La.sa,ya:La.ya,Aa:La.Aa,data:{ob:this.g,baseMediaDecodeTime:I,Ta:D},stream:b}}n&&
1387
+ (l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Ra=[],ma,bb=null,kb=t(k.Kb()),qd=kb.next();!qd.done;qd=kb.next()){var jf=qd.value,rd=jf.data;if(rd){var Pc=0;ma=oC(rd,Pc);if(!ma)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=ma.sampleRate;b.channelsCount=ma.channelCount;null==bb&&null!==jf.pts&&(bb=jf.pts);for(;Pc<rd.length;){var sd=nC(rd,Pc);if(sd){var he=sd.Fd+sd.Z;Pc+he<=rd.length&&Ra.push({data:rd.subarray(Pc+sd.Fd,Pc+he),size:sd.Z,duration:1024,Ya:0,flags:{ab:0,
1388
+ Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Pc+=he}else Pc++}}}if(!ma||null==bb){if(!k.zc().length)throw new T(2,3,3018,c?c.M()[0]:null);bb=9E4*c.startTime;var td=Sd("audio",b.codecs.split(","));if(!td||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);ma={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:td};var kf=qC(td,b.channelsCount);if(!kf)throw new T(2,3,3018,c?c.M()[0]:null);for(var Ci=bb+9E4*(c.endTime-c.startTime),Di=bb;Di<Ci;)Ra.push({data:kf,size:kf.byteLength,
1389
+ duration:1024,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),Di+=1024/ma.sampleRate*9E4}var yg=ma.sampleRate,Ei=bb/9E4*yg;n={id:b.id,type:"audio",codecs:ma.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:yg,duration:d,Wa:[],la:new Uint8Array([]),sa:new Uint8Array([]),ya:0,Aa:0,data:{ob:this.g,baseMediaDecodeTime:Ei,Ta:Ra},stream:b};break;case "ac3":for(var zg=[],Wb=0,Mm=new Uint8Array([]),mj=null,xu=t(k.Kb()),Nm=xu.next();!Nm.done;Nm=xu.next()){var Om=Nm.value,Pm=Om.data;null==mj&&null!==
1390
+ Om.pts&&(mj=Om.pts);for(var sf=0;sf<Pm.length;){var Ld=sC(Pm,sf);Ld?(b.audioSamplingRate=Ld.sampleRate,b.channelsCount=Ld.channelCount,Wb=Ld.sampleRate,Mm=Ld.la,zg.push({data:Pm.subarray(sf,sf+Ld.Z),size:Ld.Z,duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),sf+=Ld.Z):sf++}}if(0==Wb||0==Mm.byteLength||null==mj)throw new T(2,3,3018,c?c.M()[0]:null);var jD=mj/9E4*Wb;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Wb,duration:d,Wa:[],la:Mm,sa:new Uint8Array([]),
1391
+ ya:0,Aa:0,data:{ob:this.g,baseMediaDecodeTime:jD,Ta:zg},stream:b};break;case "ec3":for(var yu=[],nj=0,Qm=new Uint8Array([]),oj=null,zu=t(k.Kb()),Rm=zu.next();!Rm.done;Rm=zu.next()){var Sm=Rm.value,Tm=Sm.data;null==oj&&null!==Sm.pts&&(oj=Sm.pts);for(var tf=0;tf<Tm.length;){var Md=vC(Tm,tf);Md?(b.audioSamplingRate=Md.sampleRate,b.channelsCount=Md.channelCount,nj=Md.sampleRate,Qm=Md.la,yu.push({data:Tm.subarray(tf,tf+Md.Z),size:Md.Z,duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),tf+=Md.Z):
1392
+ tf++}}if(0==nj||0==Qm.byteLength||null==oj)throw new T(2,3,3018,c?c.M()[0]:null);var kD=oj/9E4*nj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:nj,duration:d,Wa:[],la:Qm,sa:new Uint8Array([]),ya:0,Aa:0,data:{ob:this.g,baseMediaDecodeTime:kD,Ta:yu},stream:b};break;case "mp3":for(var Au=[],pj,qj=null,Bu=t(k.Kb()),Um=Bu.next();!Um.done;Um=Bu.next()){var Vm=Um.value,Mg=Vm.data;if(Mg){null==qj&&null!==Vm.pts&&(qj=Vm.pts);for(var le=0;le<Mg.length;){var uf=FC(Mg,
1393
+ le);uf?(pj||(pj=uf),le+uf.Z<=Mg.length&&Au.push({data:Mg.subarray(le,le+uf.Z),size:uf.Z,duration:1152,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),le+=uf.Z):le++}}}if(!pj||null==qj)throw new T(2,3,3018,c?c.M()[0]:null);var Cu=pj.sampleRate,lD=qj/9E4*Cu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Cu,duration:d,Wa:[],la:new Uint8Array([]),sa:new Uint8Array([]),ya:0,Aa:0,data:{ob:this.g,baseMediaDecodeTime:lD,Ta:Au},stream:b};break;case "opus":var Du=[],
1394
+ rj=null,Rc=k.F;if(!Rc)throw new T(2,3,3018,c?c.M()[0]:null);var zb=[];switch(Rc.nh){case 1:case 2:zb=[0];break;case 0:zb=[255,1,1,0,1];break;case 128:zb=[255,2,0,0,1];break;case 3:zb=[1,2,1,0,2,1];break;case 4:zb=[1,2,2,0,1,2,3];break;case 5:zb=[1,3,2,0,4,1,2,3];break;case 6:zb=[1,4,2,0,4,1,2,3,5];break;case 7:zb=[1,4,2,0,4,1,2,3,5,6];break;case 8:zb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:zb=[1,1,2,0,1];break;case 131:zb=[1,1,3,0,1,2];break;case 132:zb=[1,1,4,0,1,2,3];break;case 133:zb=[1,1,5,0,1,
1395
+ 2,3,4];break;case 134:zb=[1,1,6,0,1,2,3,4,5];break;case 135:zb=[1,1,7,0,1,2,3,4,5,6];break;case 136:zb=[1,1,8,0,1,2,3,4,5,6,7]}var Eu=new Uint8Array([0,Rc.channelCount,0,0,Rc.sampleRate>>>24&255,Rc.sampleRate>>>17&255,Rc.sampleRate>>>8&255,Rc.sampleRate>>>0&255,0,0].concat(x(zb)));for(var Fu=Rc.sampleRate,Gu=t(k.Kb()),Wm=Gu.next();!Wm.done;Wm=Gu.next()){var Xm=Wm.value,vf=Xm.data;null==rj&&null!==Xm.pts&&(rj=Xm.pts);for(var Ng=0;Ng<vf.length;){for(var mD=0!==(vf[Ng+1]&16),nD=0!==(vf[Ng+1]&8),vd=Ng+
1396
+ 2,sj=0;255===vf[vd];)sj+=255,vd+=1;sj+=vf[vd];vd+=1;vd+=mD?2:0;vd+=nD?2:0;var Hu=vf.slice(vd,vd+sj);Du.push({data:Hu,size:Hu.byteLength,duration:960,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Ng=vd+sj}}if(0==Eu.byteLength||null==rj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Rc.sampleRate;b.channelsCount=Rc.channelCount;var oD=rj/9E4*Fu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Fu,duration:d,Wa:[],la:Eu,sa:new Uint8Array([]),ya:0,Aa:0,
1397
+ data:{ob:this.g,baseMediaDecodeTime:oD,Ta:Du},stream:b}}n&&(l.push(n),n=null)}}catch(Ym){return Ym&&3023==Ym.code?Promise.resolve(new Uint8Array([])):Promise.reject(Ym)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var Iu=new Bw(l),Zm=b.id+"_"+c.i;if(this.i.has(Zm))var $m=this.i.get(Zm);else $m=Hw(Iu),this.i.set(Zm,$m);var pD=Yw(Iu);this.g++;var qD=Nd($m,pD);return Promise.resolve(qD)};S("shaka.transmuxer.TsTransmuxer",SC);SC.prototype.transmux=SC.prototype.transmux;
1393
1398
  SC.prototype.getOriginalMimeType=SC.prototype.getOriginalMimeType;SC.prototype.convertCodecs=SC.prototype.convertCodecs;SC.prototype.isSupported=SC.prototype.isSupported;SC.prototype.destroy=SC.prototype.destroy;var TC=["aac","ac-3","ec-3","mp3","opus"],UC=["avc","hevc"];kc("video/mp2t",function(){return new SC("video/mp2t")},oc);/*
1394
1399
  @license
1395
1400
  EME Encryption Scheme Polyfill
@@ -1400,8 +1405,8 @@ function VC(){}var WC;
1400
1405
  function XC(){WC||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(WC=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=YC,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1401
1406
  function YC(a,b){var c=this,d;return O(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),E(e,WC.call(c,a,b),2);d=e.h;if(ZC(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=WC,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=$C;return e.return($C.call(c,
1402
1407
  a,b))})}
1403
- function $C(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u;return O(function(v){if(1==v.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=aD(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=bD(h.videoCapabilities,d),l=bD(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."),
1404
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(v,WC.call(c,a,e),2)}p=v.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new cD(p,r,u))})}function bD(a,b){return a?a.filter(function(c){return dD(c.encryptionScheme,b)}):a}S("EmeEncryptionSchemePolyfill",VC);VC.install=XC;function eD(){}var fD;
1408
+ function $C(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,u;return O(function(v){if(1==v.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=aD(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=bD(h.videoCapabilities,d),l=bD(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."),
1409
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(v,WC.call(c,a,e),2)}p=v.h;u=q=null;e[0]&&(e[0].videoCapabilities&&(q=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new cD(p,q,u))})}function bD(a,b){return a?a.filter(function(c){return dD(c.encryptionScheme,b)}):a}S("EmeEncryptionSchemePolyfill",VC);VC.install=XC;function eD(){}var fD;
1405
1410
  function gD(){fD||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(fD=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=hD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1406
1411
  function hD(a){var b=this,c,d;return O(function(e){switch(e.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),E(e,fD.call(b,a),2);case 2:c=e.h;if(!a.keySystemConfiguration)return e.return(c);if((d=c.keySystemAccess)&&ZC(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=fD,e.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1407
1412
  navigator.mediaCapabilities.decodingInfo=iD;if(d){e.u(3);break}return E(e,rD(a),4);case 4:return c.keySystemAccess=e.h,e.return(c);case 3:return e.return(iD.call(b,a))}})}