shaka-player 3.3.8 → 3.3.9

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.
Files changed (43) hide show
  1. package/.github/workflows/build-and-test.yaml +67 -15
  2. package/.github/workflows/compute-incremental-coverage.py +251 -0
  3. package/.github/workflows/report-incremental-coverage.yaml +39 -0
  4. package/.github/workflows/selenium-lab-tests.yaml +44 -1
  5. package/AUTHORS +1 -0
  6. package/CHANGELOG.md +15 -0
  7. package/CONTRIBUTORS +1 -0
  8. package/dist/controls.css +1 -1
  9. package/dist/locales.js +32 -32
  10. package/dist/shaka-player.compiled.d.ts +1 -1
  11. package/dist/shaka-player.compiled.debug.d.ts +1 -1
  12. package/dist/shaka-player.compiled.debug.externs.js +1 -1
  13. package/dist/shaka-player.compiled.debug.js +85 -79
  14. package/dist/shaka-player.compiled.debug.map +3 -3
  15. package/dist/shaka-player.compiled.externs.js +1 -1
  16. package/dist/shaka-player.compiled.js +317 -313
  17. package/dist/shaka-player.compiled.map +3 -3
  18. package/dist/shaka-player.ui.d.ts +1 -1
  19. package/dist/shaka-player.ui.debug.d.ts +1 -1
  20. package/dist/shaka-player.ui.debug.externs.js +1 -1
  21. package/dist/shaka-player.ui.debug.js +100 -94
  22. package/dist/shaka-player.ui.debug.map +3 -3
  23. package/dist/shaka-player.ui.externs.js +1 -1
  24. package/dist/shaka-player.ui.js +492 -489
  25. package/dist/shaka-player.ui.map +3 -3
  26. package/karma.conf.js +3 -11
  27. package/lib/ads/client_side_ad_manager.js +1 -1
  28. package/lib/media/drm_engine.js +1 -1
  29. package/lib/media/streaming_engine.js +1 -0
  30. package/lib/player.js +1 -6
  31. package/lib/polyfill/media_capabilities.js +2 -0
  32. package/lib/text/cue.js +0 -5
  33. package/lib/text/simple_text_displayer.js +21 -9
  34. package/lib/text/ui_text_displayer.js +83 -19
  35. package/lib/util/buffer_utils.js +3 -0
  36. package/lib/util/object_utils.js +1 -0
  37. package/lib/util/stream_utils.js +23 -3
  38. package/lib/util/string_utils.js +63 -16
  39. package/package.json +5 -2
  40. package/test/text/simple_text_displayer_unit.js +27 -0
  41. package/test/text/ui_text_displayer_unit.js +65 -0
  42. package/test/util/string_utils_unit.js +46 -8
  43. package/ui/text_selection.js +2 -2
@@ -15,19 +15,19 @@ ha("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
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]&&da(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(ca(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];return b?b.call(a):{next:ca(a)}}function ja(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 ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
17
17
  if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else{var ma;a:{var na={a:!0},oa={};try{oa.__proto__=na;ma=oa.a;break a}catch(a){}ma=!1}la=ma?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var pa=la;
18
- function qa(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(pa)pa(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.Ng=b.prototype}function ra(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ra.prototype.s=function(a){this.h=a};
19
- function ta(a,b){a.i={fe:b,me:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ra.prototype.B=function(a){this.g=a};function z(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function E(a){a.m=0;var b=a.i.fe;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
20
- function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.me?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new ra;this.h=a}function Aa(a,b){sa(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ca(a)}
18
+ function qa(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(pa)pa(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.Og=b.prototype}function ra(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ra.prototype.s=function(a){this.h=a};
19
+ function ta(a,b){a.i={ge:b,ne:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ra.prototype.B=function(a){this.g=a};function z(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function E(a){a.m=0;var b=a.i.ge;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
20
+ function ya(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.ne?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new ra;this.h=a}function Aa(a,b){sa(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ca(a)}
21
21
  function Ba(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,ta(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}
22
- function Ca(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,ta(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.me)throw b.fe;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
22
+ function Ca(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,ta(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.ne)throw b.ge;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
23
  function Ea(a){this.next=function(b){sa(a.g);a.g.l?b=Ba(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ca(a));return b};this["throw"]=function(b){sa(a.g);a.g.l?b=Ba(a,a.g.l["throw"],b,a.g.s):(ta(a.g,b),b=Ca(a));return b};this["return"]=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this}}
24
24
  function Ga(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function L(a){return Ga(new Ea(new za(a)))}function Ha(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
25
25
  ha("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=fa.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
26
26
  g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.I(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
27
27
  b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.L(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.u()};b.prototype.G=function(){var g=this;e(function(){if(g.C()){var h=fa.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.C=
28
28
  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.u=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;
29
- b.prototype.I=function(g){var h=this.j();g.wc(h.resolve,h.reject)};b.prototype.L=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(v){try{l(p(v))}catch(y){m(y)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.wc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.wc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
- 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).wc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).wc(n(p.length-1),m),k=h.next();
29
+ b.prototype.I=function(g){var h=this.j();g.xc(h.resolve,h.reject)};b.prototype.L=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(v){try{l(p(v))}catch(y){m(y)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.xc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.xc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
+ 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).xc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).xc(n(p.length-1),m),k=h.next();
31
31
  while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
32
  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(!Ja(k,g)){var l=new c;da(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({}),
33
33
  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(!Ja(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ja(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
@@ -39,7 +39,7 @@ h.ha.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g
39
39
  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});
40
40
  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||
41
41
  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;
42
- b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{ke:e,v:f}}return{ke:-1,v:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).ke}});ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
42
+ b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{le:e,v:f}}return{le:-1,v:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).le}});ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
43
43
  ha("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});function La(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
44
44
  ha("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});ha("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).v}});ha("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=La(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});
45
45
  function Ma(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ha("Array.prototype.keys",function(a){return a?a:function(){return Ma(this,function(b){return b})}});var Na="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ja(d,e)&&(a[e]=d[e])}return a};
@@ -52,7 +52,7 @@ ha("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(
52
52
  Copyright 2016 Google LLC
53
53
  SPDX-License-Identifier: Apache-2.0
54
54
  */
55
- function Pa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Pa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function Qa(a){return a.h/(1-Math.pow(a.g,a.i))};function Ra(){this.h=new Pa(2);this.j=new Pa(5);this.g=0;this.i=128E3;this.l=16E3}Ra.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)};Ra.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};Ra.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Qa(this.h),Qa(this.j))};function Sa(){}function Ta(){}function Ua(){}function Va(a){var b=Ha.apply(1,arguments);Wa.has(a)||(Wa.add(a),Ua.apply(Sa,ja(b)))}function Xa(){}function Za(){}function $a(){}function ab(){}var Wa=new Set;if(window.console&&window.console.log.bind){var bb={},db=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Ua=db[2];Ta=db[1]};function eb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function fb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function gb(a,b,c){c||(c=eb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Zc:d.Zc},e=a.next()){d.Zc=e.value;e=b.findIndex(function(f){return function(g){return c(f.Zc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
55
+ function Pa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Pa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function Qa(a){return a.h/(1-Math.pow(a.g,a.i))};function Ra(){this.h=new Pa(2);this.j=new Pa(5);this.g=0;this.i=128E3;this.l=16E3}Ra.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)};Ra.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};Ra.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Qa(this.h),Qa(this.j))};function Sa(){}function Ta(){}function Ua(){}function Va(a){var b=Ha.apply(1,arguments);Wa.has(a)||(Wa.add(a),Ua.apply(Sa,ja(b)))}function Xa(){}function Za(){}function $a(){}function ab(){}var Wa=new Set;if(window.console&&window.console.log.bind){var bb={},db=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Ua=db[2];Ta=db[1]};function eb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function fb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function gb(a,b,c){c||(c=eb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={$c:d.$c},e=a.next()){d.$c=e.value;e=b.findIndex(function(f){return function(g){return c(f.$c,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
56
56
  function hb(a,b,c){c||(c=eb);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function ib(a,b,c){this.startTime=a;this.direction=jb;this.endTime=b;this.payload=c;this.region=new kb;this.position=null;this.positionAlign=lb;this.size=0;this.textAlign=mb;this.writingMode=nb;this.lineInterpretation=ob;this.line=null;this.lineHeight="";this.lineAlign=pb;this.displayAlign=qb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=rb;this.fontStyle=sb;this.linePadding=this.letterSpacing=this.fontFamily=
57
57
  "";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}ib.prototype.clone=function(){var a=new ib(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
58
58
  function tb(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(!hb(a.nestedCues,b.nestedCues,tb))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(!hb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",ib);var lb="auto";
@@ -82,15 +82,17 @@ r.toString=function(){var a=[],b=this.Ea;b&&a.push(cc(b,dc,!0),":");if(b=this.Fa
82
82
  r.resolve=function(a){var b=this.clone();"data"===b.Ea&&(b=new Xb);var c=!!a.Ea;c?Yb(b,a.Ea):c=!!a.pb;c?b.pb=a.pb:c=!!a.Fa;c?b.Fa=a.Fa:c=null!=a.Hb;var d=a.va;if(c)Zb(b,a.Hb);else if(c=!!a.va){if("/"!=d.charAt(0))if(this.Fa&&!this.va)d="/"+d;else{var e=b.va.lastIndexOf("/");-1!=e&&(d=b.va.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(""):".."==
83
83
  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.va=d:c=""!==a.g.toString();c?$b(b,a.g.clone()):c=!!a.eb;c&&(b.eb=a.eb);return b};r.clone=function(){return new Xb(this)};function Yb(a,b,c){a.Ea=c?ac(b,!0):b;a.Ea&&(a.Ea=a.Ea.replace(/:$/,""))}function Zb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Hb=b}else a.Hb=null}function $b(a,b,c){b instanceof bc?a.g=b:(c||(b=cc(b,hc)),a.g=new bc(b))}
84
84
  function ac(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function cc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,ic),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function ic(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var dc=/[#\/\?@]/g,fc=/[#\?:]/g,ec=/[#\?]/g,hc=/[#\?@]/g,gc=/#/g;function bc(a){this.g=a||null}
85
- function jc(a){if(!a.na&&(a.na={},a.yc=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=bc.prototype;r.na=null;r.yc=null;r.add=function(a,b){jc(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.yc++;return this};
86
- r.set=function(a,b){jc(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new bc;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.yc=this.yc}return a};function kc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Xb(d)});return a.map(function(d){return new Xb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Ob,[]).map(function(d){return d.toString()})}function lc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
87
- function mc(a,b){if(1==b.length)return b[0];var c=nc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function nc(a,b){for(var c=t(oc[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==pc?"":null}var pc="text",qc={Na:"video",bb:"audio",Z:pc,Rb:"image",dg:"application"},oc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function rc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}rc.prototype.resolve=function(){};rc.prototype.reject=function(){};function sc(a){this.h=a;this.g=void 0}sc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function tc(a){this.h=a;this.g=null}tc.prototype.S=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};tc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Lb=function(){this.stop();this.h();return this};O.prototype.S=function(a){var b=this;this.stop();this.g=(new tc(function(){b.h()})).S(a);return this};O.prototype.Ca=function(a){var b=this;this.stop();this.g=(new tc(function(){b.g.S(a);b.h()})).S(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Ca;O.prototype.tickAfter=O.prototype.S;
88
- O.prototype.tickNow=O.prototype.Lb;function uc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function vc(a){return""!=wc().canPlayType(a)}function xc(){return yc("Xbox One")}function zc(){return yc("Tizen")}function Ac(){return yc("CrKey")}function Bc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!zc()&&!yc("PC=EOS")&&!Cc()}function Cc(){return yc("PlayStation 4")}
89
- function Dc(){if(!Bc())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 yc(a){return(navigator.userAgent||"").includes(a)}function wc(){if(Ec)return Ec;Gc||(Gc=new O(function(){Ec=null}));(Ec=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Ec=document.createElement("video"));Gc.S(1);return Ec}var Gc=null,Ec=null;function Hc(){}function Ic(a){if(!a)return"";a=Fb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Cc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ta('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;a=Jc(a);a=escape(a);try{return decodeURIComponent(a)}catch(b){throw new N(2,2,2004);}}
90
- function Kc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ib(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Jc(d)}
91
- function Lc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Fb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Ic(c);if(254==c[0]&&255==c[1])return Kc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Kc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Kc(a,!1);if(0==c[1]&&0==c[3])return Kc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Ic(a);throw new N(2,2,2003);}
92
- function Mc(a){if(window.TextEncoder&&!Cc()){var b=new TextEncoder;return Gb(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 Gb(b)}function Nc(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 Jc(a){return Oc.value()(a)}M("shaka.util.StringUtils",Hc);Hc.resetFromCharCode=function(){Oc.g=void 0};Hc.toUTF16=Nc;Hc.toUTF8=Mc;
93
- Hc.fromBytesAutoDetect=Lc;Hc.fromUTF16=Kc;Hc.fromUTF8=Ic;var Oc=new sc(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={Ua:65536};0<b.Ua;b={Ua:b.Ua},b.Ua/=2)if(a(b.Ua))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ua)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ua));return e}}(b);return null});function Pc(){}function Qc(a){a=Jc(Fb(a));return btoa(a)}function Rc(a,b){b=void 0==b?!0:b;var c=Qc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Sc(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 Tc(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}
85
+ function jc(a){if(!a.na&&(a.na={},a.zc=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=bc.prototype;r.na=null;r.zc=null;r.add=function(a,b){jc(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.zc++;return this};
86
+ r.set=function(a,b){jc(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new bc;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.zc=this.zc}return a};function kc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Xb(d)});return a.map(function(d){return new Xb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Ob,[]).map(function(d){return d.toString()})}function lc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
87
+ function mc(a,b){if(1==b.length)return b[0];var c=nc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function nc(a,b){for(var c=t(oc[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==pc?"":null}var pc="text",qc={Na:"video",bb:"audio",Z:pc,Rb:"image",eg:"application"},oc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function rc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}rc.prototype.resolve=function(){};rc.prototype.reject=function(){};function sc(a){this.h=a;this.g=void 0}sc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function tc(a){this.h=a;this.g=null}tc.prototype.S=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};tc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Lb=function(){this.stop();this.h();return this};O.prototype.S=function(a){var b=this;this.stop();this.g=(new tc(function(){b.h()})).S(a);return this};O.prototype.Ca=function(a){var b=this;this.stop();this.g=(new tc(function(){b.g.S(a);b.h()})).S(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Ca;O.prototype.tickAfter=O.prototype.S;
88
+ O.prototype.tickNow=O.prototype.Lb;function uc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function vc(a){return""!=wc().canPlayType(a)}function xc(){return yc("Xbox One")}function zc(){return yc("Tizen")}function Ac(){return yc("Web0S")}function Bc(){return yc("CrKey")}function Cc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!zc()&&!yc("PC=EOS")&&!Dc()}function Dc(){return yc("PlayStation 4")}
89
+ function Ec(){if(!Cc())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 yc(a){return(navigator.userAgent||"").includes(a)}function wc(){if(Gc)return Gc;Hc||(Hc=new O(function(){Gc=null}));(Gc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Gc=document.createElement("video"));Hc.S(1);return Gc}var Hc=null,Gc=null;function Ic(){}
90
+ function Jc(a){if(!a)return"";a=Fb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Dc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ta('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==
91
+ (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}
92
+ function Kc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ib(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Lc.value()(d)}
93
+ function Mc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Fb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Jc(c);if(254==c[0]&&255==c[1])return Kc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Kc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Kc(a,!1);if(0==c[1]&&0==c[3])return Kc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Jc(a);throw new N(2,2,2003);}
94
+ function Nc(a){if(window.TextEncoder&&!Dc()){var b=new TextEncoder;return Gb(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 Gb(b)}function Oc(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}M("shaka.util.StringUtils",Ic);Ic.resetFromCharCode=function(){Lc.g=void 0};Ic.toUTF16=Oc;Ic.toUTF8=Nc;Ic.fromBytesAutoDetect=Mc;Ic.fromUTF16=Kc;
95
+ Ic.fromUTF8=Jc;var Lc=new sc(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={Ua:65536};0<b.Ua;b={Ua:b.Ua},b.Ua/=2)if(a(b.Ua))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ua)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ua));return e}}(b);return null});function Pc(){}function Qc(a){a=Fb(a);a=Lc.value()(a);return btoa(a)}function Rc(a,b){b=void 0==b?!0:b;var c=Qc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Sc(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 Tc(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}
94
96
  function Uc(a){var b=Fb(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 Vc(){for(var a=Ha.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Fb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",Pc);Pc.concat=Vc;Pc.toHex=Uc;Pc.fromHex=Tc;Pc.fromBase64=Sc;Pc.toBase64=Rc;Pc.toStandardBase64=Qc;
95
97
  Pc.equal=function(a,b){Kb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Db(a,b)};function Wc(){var a=this;this.o=Ub.get("muxjs")();this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Vc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Vc.apply(Pc,ja(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Wc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
96
98
  function Xc(a,b){if(!Ub.get("muxjs")()||!Yc(a))return!1;if(b)return MediaSource.isTypeSupported(Zc(b,a));var c=Zc("audio",a),d=Zc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Yc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
@@ -113,7 +115,7 @@ var ud=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
113
115
  "sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
114
116
  "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function zd(){this.g={}}r=zd.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])};function Ad(a,b){for(var c in a.g)b(c,a.g[c])}r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function Bd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Cd(f,b,c);f=Dd(f,d);b=Ed(f);b=Fd(b);var g=Gd(b,e);a.variants=a.variants.filter(function(h){return Hd(h)==g?!0:!1})}function Ed(a){var b=new zd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Hd(c);b.push(d,c)}return b}
115
117
  function Fd(a){var b=0,c=new Map,d=a.size();Ad(a,function(e,f){for(var g=t(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new zd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
116
- function Cd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={kd:d.kd},e=b.next())if(d.kd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.kd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Wc:d.Wc},b=c.next())if(d.Wc=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Wc)}}(d)),b.length){a=b;break}return a}
118
+ function Cd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={ld:d.ld},e=b.next())if(d.ld=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.ld)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Xc:d.Xc},b=c.next())if(d.Xc=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Xc)}}(d)),b.length){a=b;break}return a}
117
119
  function Gd(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Id||d==Jd){if(a=Kd(a,d),1==a.size())return a.keys()[0]}else if(d==Ld)break;return Md(a)}function Kd(a,b){var c=0,d=new zd;Ad(a,function(e,f){for(var g=0,h=0,k=t(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
118
120
  function Md(a){var b="",c=Infinity;Ad(a,function(d,e){for(var f=0,g=0,h=t(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Hd(a){var b="";a.video&&(b=cd(a.video.codecs));var c="";a.audio&&(c=cd(a.audio.codecs));return b+"-"+c}function Nd(a,b,c){a.variants=a.variants.filter(function(d){return Od(d,b,c)})}
119
121
  function Od(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
@@ -122,11 +124,11 @@ function Qd(a,b){return L(function(c){if(1==c.g)return u(c,Ud(a.variants,b,!1),2
122
124
  1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Za(Xd(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Za(Xd(d));return e});z(c)})}
123
125
  function Ud(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return L(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,w){var x;return L(function(D){if(1==D.g)return C(D,2),u(D,e.decodingInfo(w),4);if(2!=D.g)return x=D.h,y.decodingInfos.push(x),va(D,0);E(D);JSON.stringify(w);z(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Yd(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,f.push(g(l,q));return u(v,Promise.all(f),
124
126
  0)})}
125
- function Yd(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=mc("video",g);f=Vd(f);g=mc("audio",g);g=bd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Vd(f);f=bd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
127
+ function Yd(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=mc("video",g);f=Vd(f);g=mc("audio",g);g=bd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Vd(f);f=bd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
126
128
  break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Wd(d.codecs),f=bd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
127
129
  f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,q=t(h.initData),v=q.next();!v.done;v=q.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
128
130
  (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function Wd(a){return zc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
129
- function Vd(a){return"vp9"==a?"vp09.00.10.08":a}function Rd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Zd(d,a.audio)||c&&a&&a.video&&!Zd(c,a.video)?!1:!0})}function Sd(a){a.textStreams=a.textStreams.filter(function(b){return gd(ad(b.mimeType,b.codecs))})}function Td(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(yc("Web0S")||zc()||Ac())&&c.push("image/webp");return c.includes(b.mimeType)})}
131
+ function Vd(a){return"vp9"==a?"vp09.00.41.08":a}function Rd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Zd(d,a.audio)||c&&a&&a.video&&!Zd(c,a.video)?!1:!0})}function Sd(a){a.textStreams=a.textStreams.filter(function(b){return gd(ad(b.mimeType,b.codecs))})}function Td(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Ac()||zc()||Bc())&&c.push("image/webp");return c.includes(b.mimeType)})}
130
132
  function Zd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
131
133
  function $d(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=t(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=t(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
132
134
  frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
@@ -137,9 +139,9 @@ function be(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.
137
139
  audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function ce(a){a.__shaka_id||(a.__shaka_id=de++);return a.__shaka_id}
138
140
  function ee(a){var b=fe(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function ge(a){var b=fe(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
139
141
  function fe(a){return{id:ce(a),active:!1,type:"",bandwidth:0,language:rd(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null}}
140
- function he(a){return a.allowedByApplication&&a.allowedByKeySystem}function je(a){return a.filter(function(b){return he(b)})}
142
+ function he(a){return a.allowedByApplication&&a.allowedByKeySystem}function ie(a){return a.filter(function(b){return he(b)})}
141
143
  function Dd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ja(e))):d.get(Math.min.apply(Math,ja(c)))}
142
- function ke(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=yd(rd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return rd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=le(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(Ob,[]);return a.length?
144
+ function je(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=yd(rd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return rd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=le(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(Ob,[]);return a.length?
143
145
  le(e,a[0]):e}function le(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Xd(a){var b=[];a.audio&&b.push(me(a.audio));a.video&&b.push(me(a.video));return b.join(", ")}
144
146
  function me(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"}var de=0,Id="smooth",Jd="powerEfficient",Ld="bandwidth";function ne(){var a=this;this.l=null;this.j=!1;this.h=new Ra;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.j){a.h=new Ra;a.g&&a.h.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.i=[];this.o=1;this.s=!1;this.g=this.m=null}r=ne.prototype;r.stop=function(){this.l=null;this.j=!1;this.i=[];this.o=1;this.m=null};r.init=function(a){this.l=a};
145
147
  r.chooseVariant=function(){var a=oe(this.g.restrictions,this.i),b=this.h.getBandwidthEstimate(pe(this));this.i.length&&!a.length&&(a=oe(null,this.i),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.o)?1:Math.abs(this.o),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=e)}this.m=Date.now();return c};
@@ -154,70 +156,70 @@ function Fe(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,
154
156
  function Le(a){return new Ge(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ge.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
155
157
  Ge.prototype.$=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Me(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new rc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Ge(f,function(){return d()})};
156
158
  function Me(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()}}}M("shaka.util.AbortableOperation",Ge);Ge.prototype.chain=Ge.prototype.$;Ge.prototype["finally"]=Ge.prototype["finally"];Ge.all=Le;Ge.prototype.abort=Ge.prototype.abort;Ge.notAbortable=Ke;Ge.completed=Je;Ge.aborted=Ie;Ge.failed=He;function Q(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}
157
- function Ne(a){var b=new Q(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.g=!0};Q.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",Q);function Oe(){this.ea=new zd;this.Bc=this}Oe.prototype.addEventListener=function(a,b){this.ea&&this.ea.push(a,b)};Oe.prototype.removeEventListener=function(a,b){this.ea&&this.ea.remove(a,b)};Oe.prototype.dispatchEvent=function(a){if(!this.ea)return!0;var b=this.ea.get(a.type)||[],c=this.ea.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.Bc;a.currentTarget=this.Bc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
158
- Oe.prototype.release=function(){this.ea=null};function Pe(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Qe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Re(){this.g=[]}function Se(a,b){a.g.push(b["finally"](function(){fb(a.g,b)}))}Re.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 Te(a,b,c){Oe.call(this);this.i=!1;this.m=new Re;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}qa(Te,Oe);r=Te.prototype;r.Qd=function(a){this.o=a};function Ue(a,b,c,d){c=c||Ve;var e=We[a];if(!e||c>=e.priority)We[a]={priority:c,Hf:b,If:void 0===d?!1:d}}r.Jf=function(a){this.g.add(a)};r.Zf=function(a){this.g["delete"](a)};r.Pe=function(){this.g.clear()};r.Kf=function(a){this.h.add(a)};r.$f=function(a){this.h["delete"](a)};r.Qe=function(){this.h.clear()};
159
+ function Ne(a){var b=new Q(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.g=!0};Q.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",Q);function Oe(){this.ea=new zd;this.Cc=this}Oe.prototype.addEventListener=function(a,b){this.ea&&this.ea.push(a,b)};Oe.prototype.removeEventListener=function(a,b){this.ea&&this.ea.remove(a,b)};Oe.prototype.dispatchEvent=function(a){if(!this.ea)return!0;var b=this.ea.get(a.type)||[],c=this.ea.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.Cc;a.currentTarget=this.Cc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
160
+ Oe.prototype.release=function(){this.ea=null};function Pe(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Qe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Re(){this.g=[]}function Se(a,b){a.g.push(b["finally"](function(){fb(a.g,b)}))}Re.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 Te(a,b,c){Oe.call(this);this.i=!1;this.m=new Re;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}qa(Te,Oe);r=Te.prototype;r.Sd=function(a){this.o=a};function Ue(a,b,c,d){c=c||Ve;var e=We[a];if(!e||c>=e.priority)We[a]={priority:c,If:b,Jf:void 0===d?!1:d}}r.Kf=function(a){this.g.add(a)};r.$f=function(a){this.g["delete"](a)};r.Qe=function(){this.g.clear()};r.Lf=function(a){this.h.add(a)};r.ag=function(a){this.h["delete"](a)};r.Re=function(){this.h.clear()};
159
161
  function Xe(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Oe.prototype.release.call(this);return this.m.destroy()};
160
162
  r.request=function(a,b){var c=this,d=new Ye;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new Ze(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Pe(b.retryParameters):Ee();b.uris=Pe(b.uris);e=$e(this,a,b);var f=e.$(function(){return af(c,a,b,new De(b.retryParameters,!1),0,null,d)}),g=f.$(function(n){return bf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
161
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.$(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.wf||!c.l||q.fromCache||a!=cf||c.l(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new Ze(m.promise,function(){return m.abort()},d);Se(this.m,e);return e};
162
- function $e(a,b,c){var d=Je(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={ed:e.ed},f=a.next())e.ed=f.value,d=d.$(function(g){return function(){c.body&&(c.body=Gb(c.body));return g.ed(b,c)}}(e));return d.$(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
163
- function af(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Xb(c.uris[e]),k=h.Ea,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Yb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=We[k])?k.Hf:null;if(!m)return He(new N(2,1,1E3,h));var n=k.If,p=null,q=null,v=!1,y=!1,w;return Ke(Fe(d)).$(function(){if(a.i)return Ie();w=Date.now();var x=m(c.uris[e],c,b,function(A,F,G){p&&p.stop();q&&q.S(B/1E3);a.l&&b==cf&&(a.l(A,F),l=!0,g.g=G)},function(A){a.j&&a.j(A,c,b);y=!0});
164
- if(!n)return x;var D=c.retryParameters.connectionTimeout;D&&(p=new O(function(){v=!0;x.abort()}),p.S(D/1E3));var B=c.retryParameters.stallTimeout;B&&(q=new O(function(){v=!0;x.abort()}));return x}).$(function(x){p&&p.stop();q&&q.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-w);var D={response:x,wf:l};!y&&a.j&&a.j(x.headers,c,b);return D},function(x){p&&p.stop();q&&q.stop();if(a.s){var D=null,B=0;x instanceof N&&(D=x,1001==x.code&&(B=x.data[1]));a.s(c,D,B,v)}if(a.i)return Ie();v&&(x=new N(1,1,1003,
163
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.$(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.xf||!c.l||q.fromCache||a!=cf||c.l(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new Ze(m.promise,function(){return m.abort()},d);Se(this.m,e);return e};
164
+ function $e(a,b,c){var d=Je(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={fd:e.fd},f=a.next())e.fd=f.value,d=d.$(function(g){return function(){c.body&&(c.body=Gb(c.body));return g.fd(b,c)}}(e));return d.$(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
165
+ function af(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Xb(c.uris[e]),k=h.Ea,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Yb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=We[k])?k.If:null;if(!m)return He(new N(2,1,1E3,h));var n=k.Jf,p=null,q=null,v=!1,y=!1,w;return Ke(Fe(d)).$(function(){if(a.i)return Ie();w=Date.now();var x=m(c.uris[e],c,b,function(A,F,G){p&&p.stop();q&&q.S(B/1E3);a.l&&b==cf&&(a.l(A,F),l=!0,g.g=G)},function(A){a.j&&a.j(A,c,b);y=!0});
166
+ if(!n)return x;var D=c.retryParameters.connectionTimeout;D&&(p=new O(function(){v=!0;x.abort()}),p.S(D/1E3));var B=c.retryParameters.stallTimeout;B&&(q=new O(function(){v=!0;x.abort()}));return x}).$(function(x){p&&p.stop();q&&q.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-w);var D={response:x,xf:l};!y&&a.j&&a.j(x.headers,c,b);return D},function(x){p&&p.stop();q&&q.stop();if(a.s){var D=null,B=0;x instanceof N&&(D=x,1001==x.code&&(B=x.data[1]));a.s(c,D,B,v)}if(a.i)return Ie();v&&(x=new N(1,1,1003,
165
167
  c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return D=(new Map).set("error",x),D=new Q("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,af(a,b,c,d,e,x,g)}throw x;})}
166
- function bf(a,b,c){var d=Je(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={fd:e.fd},f=a.next())e.fd=f.value,d=d.$(function(g){return function(){var h=c.response;h.data&&(h.data=Gb(h.data));return g.fd(b,h)}}(e));return d.$(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",Te);Te.prototype.request=Te.prototype.request;Te.prototype.destroy=Te.prototype.destroy;Te.makeRequest=Xe;
167
- Te.defaultRetryParameters=function(){return Ee()};Te.prototype.clearAllResponseFilters=Te.prototype.Qe;Te.prototype.unregisterResponseFilter=Te.prototype.$f;Te.prototype.registerResponseFilter=Te.prototype.Kf;Te.prototype.clearAllRequestFilters=Te.prototype.Pe;Te.prototype.unregisterRequestFilter=Te.prototype.Zf;Te.prototype.registerRequestFilter=Te.prototype.Jf;Te.unregisterScheme=function(a){delete We[a]};Te.registerScheme=Ue;Te.prototype.setForceHTTPS=Te.prototype.Qd;function Ye(){this.g=0}
168
- Te.NumBytesRemainingClass=Ye;function Ze(a,b,c){Ge.call(this,a,b);this.h=c}qa(Ze,Ge);Te.PendingRequest=Ze;var cf=1;Te.RequestType={MANIFEST:0,SEGMENT:cf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Ve=3;Te.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Ve};var We={};function df(a){this.g=!1;this.h=new rc;this.i=a}df.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 ef(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function ff(){this.g=new zd}r=ff.prototype;r.release=function(){this.Sa();this.g=null};r.A=function(a,b,c,d){this.g&&(a=new gf(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.oc(a,b,e);c(g)}var f=this;this.A(a,b,e,d)};r.oc=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.oc(),this.g.remove(b,e))}};
169
- r.Sa=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.oc();this.g.g={}}};M("shaka.util.EventManager",ff);ff.prototype.removeAll=ff.prototype.Sa;ff.prototype.unlisten=ff.prototype.oc;ff.prototype.listenOnce=ff.prototype.oa;ff.prototype.listen=ff.prototype.A;ff.prototype.release=ff.prototype.release;function gf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=hf(a,d);this.target.addEventListener(b,c,this.g)}
170
- gf.prototype.oc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function hf(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 jf(a)?b:b.capture||!1}
171
- function jf(a){var b=kf;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}kf=b}return b||!1}var kf=void 0;function lf(){}function mf(a){a=Lc(a);return(new Xb(a)).Fa}function nf(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Nc(b,!0):e=b;a=Lc(a);a=Nc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",lf);lf.initDataTransform=nf;lf.defaultGetContentId=mf;function of(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function pf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function qf(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 rf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function sf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function tf(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.F=new Set;this.l=this.s=null;this.fa=this.ca=!1;this.G=0;this.g=null;this.o=new ff;this.i=new Map;this.C=[];this.u=new rc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ja=new Map;this.da=new Map;this.V=new O(function(){return uf(c)});this.L=!1;this.I=[];this.N=!1;this.ea=(new O(function(){vf(c)})).Ca(b);this.u["catch"](function(){});this.j=new df(function(){return wf(c)});this.W=!1}r=tf.prototype;r.destroy=function(){return this.j.destroy()};
168
+ function bf(a,b,c){var d=Je(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={gd:e.gd},f=a.next())e.gd=f.value,d=d.$(function(g){return function(){var h=c.response;h.data&&(h.data=Gb(h.data));return g.gd(b,h)}}(e));return d.$(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",Te);Te.prototype.request=Te.prototype.request;Te.prototype.destroy=Te.prototype.destroy;Te.makeRequest=Xe;
169
+ Te.defaultRetryParameters=function(){return Ee()};Te.prototype.clearAllResponseFilters=Te.prototype.Re;Te.prototype.unregisterResponseFilter=Te.prototype.ag;Te.prototype.registerResponseFilter=Te.prototype.Lf;Te.prototype.clearAllRequestFilters=Te.prototype.Qe;Te.prototype.unregisterRequestFilter=Te.prototype.$f;Te.prototype.registerRequestFilter=Te.prototype.Kf;Te.unregisterScheme=function(a){delete We[a]};Te.registerScheme=Ue;Te.prototype.setForceHTTPS=Te.prototype.Sd;function Ye(){this.g=0}
170
+ Te.NumBytesRemainingClass=Ye;function Ze(a,b,c){Ge.call(this,a,b);this.h=c}qa(Ze,Ge);Te.PendingRequest=Ze;var cf=1;Te.RequestType={MANIFEST:0,SEGMENT:cf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Ve=3;Te.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Ve};var We={};function df(a){this.g=!1;this.h=new rc;this.i=a}df.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 ef(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function ff(){this.g=new zd}r=ff.prototype;r.release=function(){this.Sa();this.g=null};r.A=function(a,b,c,d){this.g&&(a=new gf(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.pc(a,b,e);c(g)}var f=this;this.A(a,b,e,d)};r.pc=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.pc(),this.g.remove(b,e))}};
171
+ r.Sa=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.pc();this.g.g={}}};M("shaka.util.EventManager",ff);ff.prototype.removeAll=ff.prototype.Sa;ff.prototype.unlisten=ff.prototype.pc;ff.prototype.listenOnce=ff.prototype.oa;ff.prototype.listen=ff.prototype.A;ff.prototype.release=ff.prototype.release;function gf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=hf(a,d);this.target.addEventListener(b,c,this.g)}
172
+ gf.prototype.pc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function hf(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 jf(a)?b:b.capture||!1}
173
+ function jf(a){var b=kf;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}kf=b}return b||!1}var kf=void 0;function lf(){}function mf(a){a=Mc(a);return(new Xb(a)).Fa}function nf(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Oc(b,!0):e=b;a=Mc(a);a=Oc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",lf);lf.initDataTransform=nf;lf.defaultGetContentId=mf;function of(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function pf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function qf(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 rf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function sf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function tf(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.F=new Set;this.l=this.s=null;this.fa=this.ca=!1;this.G=0;this.g=null;this.o=new ff;this.i=new Map;this.C=[];this.u=new rc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ja=new Map;this.da=new Map;this.V=new O(function(){return uf(c)});this.L=!1;this.I=[];this.N=!1;this.ea=(new O(function(){vf(c)})).Ca(b);this.u["catch"](function(){});this.j=new df(function(){return wf(c)});this.W=!1}r=tf.prototype;r.destroy=function(){return this.j.destroy()};
172
174
  function wf(a){return L(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.ea.stop(),a.ea=null,a.V.stop(),a.V=null,u(b,xf(a),2);case 2:if(!a.l){b.B(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:E(b);case 5:a.l=null;case 3:a.g=null,a.F.clear(),a.s=null,a.C=[],a.h=null,a.m=function(){},a.D=null,a.W=!1,z(b)}})}r.configure=function(a){this.h=a};function yf(a,b,c){a.fa=!0;a.C=[];a.L=c;return zf(a,b)}
173
175
  function Af(a,b,c){a.C=c;a.L=0<c.length;return zf(a,b)}function Bf(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 Cf(a,g,[])}
174
- function zf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(w){if(1==w.g){if(c=Ef(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(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=qf(a.h.servers),Ff(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Gf(l),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,Hf(q,qf(a.h.servers),qf(a.h.advanced||{}));return u(w,
176
+ function zf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(w){if(1==w.g){if(c=Df(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(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=qf(a.h.servers),Ef(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Gf(l),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,Hf(q,qf(a.h.servers),qf(a.h.advanced||{}));return u(w,
175
177
  Ud(b,a.L,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.ca=!0,w["return"](Promise.resolve());y=Cf(a,void 0,b);return w["return"](g?y:y["catch"](function(){}))})}
176
178
  r.Vb=function(a){var b=this,c,d;return L(function(e){if(1==e.g){if(!b.s)return b.o.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),e["return"]();b.l=a;b.o.oa(b.l,"play",function(){for(var f=t(b.I),g=f.next();!g.done;g=f.next())If(b,g.value);b.N=!0;b.I=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.A(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return xf(b)});c=b.l.setMediaKeys(b.s);c=c["catch"](function(f){return Promise.reject(new N(2,6,6003,f.message))});return u(e,
177
179
  c,2)}ef(b.j);Jf(b);b.g.initData.length||b.C.length||(d=function(f){return Kf(b,f.initDataType,Fb(f.initData))},b.o.A(b.l,"encrypted",d));z(e)})};
178
180
  function Lf(a){var b,c,d,e,f;return L(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.B(2);break}b=Xe([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.mb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);va(g,4);break;case 3:throw e=E(g),new N(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"]();
179
181
  C(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=E(g),new N(2,6,6004,f.message);}})}function Mf(a,b){var c,d,e;return L(function(f){if(1==f.g)return u(f,Nf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Ja=new rc,d.push(e.Ja);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
180
182
  function Jf(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Kf(a,d.initDataType,d.initData);c=t(a.C);for(d=c.next();!d.done;d=c.next())Nf(a,d.value);b.length||a.C.length||a.u.resolve();return a.u}function Kf(a,b,c){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Db(c,e.value.initData)&&!yc("Tizen 2"))return;Of(a,b,c,a.g.sessionType)}function Pf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
181
- function Qf(a){a=a.i.keys();a=of(a,function(b){return b.sessionId});return Array.from(a)}r.ac=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.Ec=function(){return rf(this.da)};
183
+ function Qf(a){a=a.i.keys();a=of(a,function(b){return b.sessionId});return Array.from(a)}r.ac=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.Fc=function(){return rf(this.da)};
182
184
  function Cf(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Rf(a,c,d);w.B(2);break}return u(w,Sf(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new N(2,6,6001);ef(a.j);C(w,4);a.F.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.F.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.F.add(q.contentType.toLowerCase());if(c.length){var x=
183
185
  f.keySystem;var D=d.get(f.keySystem);var B=[],A=[],F=[],G=[],H=new Set;Tf(D,B,F,A,G,H);var J=a.L?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:B[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||J,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:A[0],initData:G,keyIds:H};D=t(D);for(B=D.next();!B.done;B=
184
186
  D.next())B=B.value,B.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=B.distinctiveIdentifierRequired),B.persistentStateRequired&&(x.persistentStateRequired=B.persistentStateRequired);D=x}else D=f.keySystem,x=b.get(f.keySystem),B=[],A=[],F=[],G=[],H=new Set,Tf(x.drmInfos,B,F,A,G,H),D={keySystem:D,licenseServerUri:B[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
185
187
  x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:A[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return u(w,f.createMediaKeys(),6);case 6:return v=w.h,ef(a.j),a.s=v,a.ca=!0,u(w,Lf(a),7);case 7:ef(a.j);va(w,0);break;case 4:y=E(w);ef(a.j,y);a.g=null;a.F.clear();if(y instanceof N)throw y;throw new N(2,6,6002,y.message);}})}
186
- function Rf(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Gf(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new N(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={cd:d.cd},e=a.next())for(d.cd=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
187
- l.cd}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
188
+ function Rf(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Gf(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new N(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={dd:d.dd},e=a.next())for(d.dd=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
189
+ l.dd}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
188
190
  function Sf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,w;return L(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new N(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){x.B(4);break}k=h.value;if(!b.has(k)){x.B(3);break}l=b.get(k);C(x,6);return u(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
189
191
  x.h,x["return"](c);case 6:E(x);case 7:ef(a.j);case 3:h=g.next();x.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){x.B(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();x.B(9);break}v=h.value;y=b.get(v);w=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(w!=p){x.B(13);break}C(x,15);return u(x,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=x.h,x["return"](c);case 15:E(x);case 16:ef(a.j);case 13:h=q.next();x.B(12);break;case 11:return x["return"](c)}})}
190
- function Ef(a){a=qf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Tc(f),h=Tc(e);g={kty:"oct",kid:Rc(g,!1),k:Rc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fb(Mc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
192
+ function Df(a){a=qf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Tc(f),h=Tc(e);g={kty:"oct",kid:Rc(g,!1),k:Rc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fb(Nc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
191
193
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
192
- function Nf(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:try{c=a.s.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.A(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.I.push(k):If(a,k)});a.o.A(c,"keystatuseschange",function(k){return Uf(a,k)});e={initData:null,loaded:!1,Fd:Infinity,Ja:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);case 4:f=h.h;ef(a.j);
194
+ function Nf(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:try{c=a.s.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.A(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.I.push(k):If(a,k)});a.o.A(c,"keystatuseschange",function(k){return Uf(a,k)});e={initData:null,loaded:!1,Hd:Infinity,Ja:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);case 4:f=h.h;ef(a.j);
193
195
  if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Vf(a)&&a.u.resolve();return h["return"](c);case 2:g=E(h),ef(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
194
- function Of(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.A(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.I.push(f):If(a,f)});a.o.A(e,"keystatuseschange",function(f){return Uf(a,f)});a.i.set(e,{initData:c,loaded:!1,Fd:Infinity,Ja:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Rc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
196
+ function Of(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.A(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.I.push(f):If(a,f)});a.o.A(e,"keystatuseschange",function(f){return Uf(a,f)});a.i.set(e,{initData:c,loaded:!1,Hd:Infinity,Ja:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Rc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
195
197
  var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new N(2,6,6006,f.message,f,h))}})}function Wf(a,b,c){"skd"==b&&(b=c.serverCertificate,c=mf(a),a=nf(a,c,b));return a}
196
198
  function If(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;L(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&Rc(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=Xe([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Pf(a.g.keySystem)&&Xf(g),h=Date.now(),C(w,2),l=a.D.mb.request(2,g),u(w,
197
199
  l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=E(w),n=new N(2,6,6007,m),a.m(n),d&&d.Ja&&d.Ja.reject(n),w["return"]();case 3:if(a.j.g)return w["return"]();a.G+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Rc(k.data);C(w,5);return u(w,c.update(k.data),7);case 7:va(w,6);break;case 5:return p=E(w),q=new N(2,6,6008,p.message),a.m(q),d&&d.Ja&&d.Ja.reject(q),w["return"]();case 6:if(a.j.g)return w["return"]();v=new Q("drmsessionupdate");a.D.onEvent(v);d&&(d.Ja&&d.Ja.resolve(),y=new O(function(){d.loaded=
198
200
  !0;Vf(a)&&a.u.resolve()}),y.S(Yf));z(w)}})}function Xf(a){var b=Kc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Sc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
199
- function Uf(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Pf(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Ib(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Uc(h);a.ja.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ja&&(a.i["delete"](c),c.close()["catch"](function(){}));
200
- Vf(a)&&(a.u.resolve(),a.V.S(Zf))}function uf(a){var b=a.ja,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new N(2,6,6014));a.D.Nc(rf(c))}
201
+ function Uf(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Pf(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||Dc())){k=Ib(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Uc(h);a.ja.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ja&&(a.i["delete"](c),c.close()["catch"](function(){}));
202
+ Vf(a)&&(a.u.resolve(),a.V.S(Zf))}function uf(a){var b=a.ja,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new N(2,6,6014));a.D.Oc(rf(c))}
201
203
  function $f(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
202
204
  c],f=new Map,g=function(l){var m,n,p;return L(function(q){switch(q.g){case 1:return C(q,2),u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,yc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:E(q),f.set(l,null),z(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](rf(f))})}
203
205
  function ag(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).S(bg)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);E(c);z(c)})}
204
206
  function xf(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return C(g,2),a.fa||a.C.includes(e.sessionId)||"persistent-license"!==f.type?u(g,ag(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);E(g);z(g)})})),0)})}
205
207
  function cg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Da:f.Da},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Da=[];f.Da=f.Da.concat(e.initData||[]);f.Da=f.Da.concat(h.initData||[]);f.Da=f.Da.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Da.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ja(e.keyIds),ja(h.keyIds))):
206
208
  e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
207
- initData:f.Da,keyIds:g});break}}return c}function Gf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function vf(a){a.i.forEach(function(b,c){var d=b.Fd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Fd=e)})}function Vf(a){a=a.i.values();return pf(a,function(b){return b.loaded})}
208
- function Ff(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
209
- function Tf(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={ra:g.ra},h=a.next()){g.ra=h.value;b.includes(g.ra.licenseServerUri)||b.push(g.ra.licenseServerUri);d.includes(g.ra.serverCertificateUri)||d.push(g.ra.serverCertificateUri);g.ra.serverCertificate&&(c.some(function(m){return function(n){return Db(n,m.ra.serverCertificate)}}(g))||c.push(g.ra.serverCertificate));if(g.ra.initData){h={};for(var k=t(g.ra.initData),l=k.next();!l.done;h={rc:h.rc},l=k.next())h.rc=l.value,e.some(function(m){return function(n){var p=
210
- m.rc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Db(n.initData,p.initData)}}(h))||e.push(h.rc)}if(g.ra.keyIds)for(h=t(g.ra.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
209
+ initData:f.Da,keyIds:g});break}}return c}function Gf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function vf(a){a.i.forEach(function(b,c){var d=b.Hd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Hd=e)})}function Vf(a){a=a.i.values();return pf(a,function(b){return b.loaded})}
210
+ function Ef(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
211
+ function Tf(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={ra:g.ra},h=a.next()){g.ra=h.value;b.includes(g.ra.licenseServerUri)||b.push(g.ra.licenseServerUri);d.includes(g.ra.serverCertificateUri)||d.push(g.ra.serverCertificateUri);g.ra.serverCertificate&&(c.some(function(m){return function(n){return Db(n,m.ra.serverCertificate)}}(g))||c.push(g.ra.serverCertificate));if(g.ra.initData){h={};for(var k=t(g.ra.initData),l=k.next();!l.done;h={sc:h.sc},l=k.next())h.sc=l.value,e.some(function(m){return function(n){var p=
212
+ m.sc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Db(n.initData,p.initData)}}(h))||e.push(h.sc)}if(g.ra.keyIds)for(h=t(g.ra.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
211
213
  function Hf(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))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||
212
214
  (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var bg=1,Yf=5,Zf=.5,dg=new sc(function(){return Gb(new Uint8Array([0]))});function eg(){}function fg(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){if(d&&(e=gg[d.toLowerCase()]))return k["return"](e);if(f=hg(a))if(g=ig[f])return k["return"](g);return d?k.B(2):u(k,jg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=gg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
213
215
  function jg(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=Xe([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function hg(a){a=(new Xb(a)).va.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",eg);eg.unregisterParserByMime=function(a){delete gg[a]};eg.registerParserByMime=function(a,b){gg[a]=b};
214
- eg.registerParserByExtension=function(a,b){ig[a]=b};var gg={},ig={};function kg(a,b){this.O=Ib(a);this.h=b==lg;this.g=0}r=kg.prototype;r.ma=function(){return this.g<this.O.byteLength};r.X=function(){return this.g};r.bf=function(){return this.O.byteLength};r.Y=function(){try{var a=this.O.getUint8(this.g);this.g+=1;return a}catch(b){throw mg();}};r.Ib=function(){try{var a=this.O.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw mg();}};r.M=function(){try{var a=this.O.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw mg();}};
215
- r.re=function(){try{var a=this.O.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw mg();}};r.Jb=function(){try{if(this.h){var a=this.O.getUint32(this.g,!0);var b=this.O.getUint32(this.g+4,!0)}else b=this.O.getUint32(this.g,!1),a=this.O.getUint32(this.g+4,!1)}catch(c){throw mg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Za=function(a){if(this.g+a>this.O.byteLength)throw mg();var b=Fb(this.O,this.g,a);this.g+=a;return b};
216
- r.skip=function(a){if(this.g+a>this.O.byteLength)throw mg();this.g+=a};r.te=function(a){if(this.g<a)throw mg();this.g-=a};r.seek=function(a){if(0>a||a>this.O.byteLength)throw mg();this.g=a};r.jc=function(){for(var a=this.g;this.ma()&&0!=this.O.getUint8(this.g);)this.g+=1;a=Fb(this.O,a,this.g-a);this.g+=1;return Ic(a)};function mg(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",kg);kg.prototype.readTerminatedString=kg.prototype.jc;kg.prototype.seek=kg.prototype.seek;kg.prototype.rewind=kg.prototype.te;
217
- kg.prototype.skip=kg.prototype.skip;kg.prototype.readBytes=kg.prototype.Za;kg.prototype.readUint64=kg.prototype.Jb;kg.prototype.readInt32=kg.prototype.re;kg.prototype.readUint32=kg.prototype.M;kg.prototype.readUint16=kg.prototype.Ib;kg.prototype.readUint8=kg.prototype.Y;kg.prototype.getLength=kg.prototype.bf;kg.prototype.getPosition=kg.prototype.X;kg.prototype.hasMoreData=kg.prototype.ma;var lg=1;kg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:lg};function ng(){this.i=[];this.h=[];this.g=!1}r=ng.prototype;r.box=function(a,b){var c=og(a);this.i[c]=pg;this.h[c]=b;return this};r.R=function(a,b){var c=og(a);this.i[c]=qg;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new kg(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Pc(0,a,b,c)};
218
- r.Pc=function(a,b,c,d){var e=b.X();if(d&&e+8>b.O.byteLength)this.g=!0;else{var f=b.M(),g=b.M(),h=!1;switch(f){case 0:f=b.O.byteLength-e;break;case 1:if(d&&b.X()+8>b.O.byteLength){this.g=!0;return}f=b.Jb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==qg){if(d&&b.X()+4>b.O.byteLength){this.g=!0;return}m=b.M();l=m>>>24;m&=16777215}g=e+f;c&&g>b.O.byteLength&&(g=b.O.byteLength);d&&g>b.O.byteLength?this.g=!0:(d=g-b.X(),b=0<d?b.Za(d):new Uint8Array(0),b=new kg(b,0),k({parser:this,partialOkay:c||
219
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.X(),b.O.byteLength-b.X()))}};function rg(a){for(var b=sg(a);a.reader.ma()&&!a.parser.g;)a.parser.Pc(a.start+b,a.reader,a.partialOkay)}function tg(a){for(var b=sg(a),c=a.reader.M(),d=0;d<c&&(a.parser.Pc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function ug(a){return function(b){a(b.reader.Za(b.reader.O.byteLength-b.reader.X()))}}
220
- function og(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 vg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function sg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",ng);ng.headerSize=sg;ng.typeToString=vg;ng.allData=ug;ng.sampleDescription=tg;ng.children=rg;ng.prototype.parseNext=ng.prototype.Pc;ng.prototype.parse=ng.prototype.parse;ng.prototype.stop=ng.prototype.stop;
216
+ eg.registerParserByExtension=function(a,b){ig[a]=b};var gg={},ig={};function kg(a,b){this.O=Ib(a);this.h=b==lg;this.g=0}r=kg.prototype;r.ma=function(){return this.g<this.O.byteLength};r.X=function(){return this.g};r.cf=function(){return this.O.byteLength};r.Y=function(){try{var a=this.O.getUint8(this.g);this.g+=1;return a}catch(b){throw mg();}};r.Ib=function(){try{var a=this.O.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw mg();}};r.M=function(){try{var a=this.O.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw mg();}};
217
+ r.se=function(){try{var a=this.O.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw mg();}};r.Jb=function(){try{if(this.h){var a=this.O.getUint32(this.g,!0);var b=this.O.getUint32(this.g+4,!0)}else b=this.O.getUint32(this.g,!1),a=this.O.getUint32(this.g+4,!1)}catch(c){throw mg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Za=function(a){if(this.g+a>this.O.byteLength)throw mg();var b=Fb(this.O,this.g,a);this.g+=a;return b};
218
+ r.skip=function(a){if(this.g+a>this.O.byteLength)throw mg();this.g+=a};r.ue=function(a){if(this.g<a)throw mg();this.g-=a};r.seek=function(a){if(0>a||a>this.O.byteLength)throw mg();this.g=a};r.jc=function(){for(var a=this.g;this.ma()&&0!=this.O.getUint8(this.g);)this.g+=1;a=Fb(this.O,a,this.g-a);this.g+=1;return Jc(a)};function mg(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",kg);kg.prototype.readTerminatedString=kg.prototype.jc;kg.prototype.seek=kg.prototype.seek;kg.prototype.rewind=kg.prototype.ue;
219
+ kg.prototype.skip=kg.prototype.skip;kg.prototype.readBytes=kg.prototype.Za;kg.prototype.readUint64=kg.prototype.Jb;kg.prototype.readInt32=kg.prototype.se;kg.prototype.readUint32=kg.prototype.M;kg.prototype.readUint16=kg.prototype.Ib;kg.prototype.readUint8=kg.prototype.Y;kg.prototype.getLength=kg.prototype.cf;kg.prototype.getPosition=kg.prototype.X;kg.prototype.hasMoreData=kg.prototype.ma;var lg=1;kg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:lg};function ng(){this.i=[];this.h=[];this.g=!1}r=ng.prototype;r.box=function(a,b){var c=og(a);this.i[c]=pg;this.h[c]=b;return this};r.R=function(a,b){var c=og(a);this.i[c]=qg;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new kg(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Qc(0,a,b,c)};
220
+ r.Qc=function(a,b,c,d){var e=b.X();if(d&&e+8>b.O.byteLength)this.g=!0;else{var f=b.M(),g=b.M(),h=!1;switch(f){case 0:f=b.O.byteLength-e;break;case 1:if(d&&b.X()+8>b.O.byteLength){this.g=!0;return}f=b.Jb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==qg){if(d&&b.X()+4>b.O.byteLength){this.g=!0;return}m=b.M();l=m>>>24;m&=16777215}g=e+f;c&&g>b.O.byteLength&&(g=b.O.byteLength);d&&g>b.O.byteLength?this.g=!0:(d=g-b.X(),b=0<d?b.Za(d):new Uint8Array(0),b=new kg(b,0),k({parser:this,partialOkay:c||
221
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.X(),b.O.byteLength-b.X()))}};function rg(a){for(var b=sg(a);a.reader.ma()&&!a.parser.g;)a.parser.Qc(a.start+b,a.reader,a.partialOkay)}function tg(a){for(var b=sg(a),c=a.reader.M(),d=0;d<c&&(a.parser.Qc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function ug(a){return function(b){a(b.reader.Za(b.reader.O.byteLength-b.reader.X()))}}
222
+ function og(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 vg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function sg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",ng);ng.headerSize=sg;ng.typeToString=vg;ng.allData=ug;ng.sampleDescription=tg;ng.children=rg;ng.prototype.parseNext=ng.prototype.Qc;ng.prototype.parse=ng.prototype.parse;ng.prototype.stop=ng.prototype.stop;
221
223
  ng.prototype.fullBox=ng.prototype.R;ng.prototype.box=ng.prototype.box;var pg=0,qg=1;function wg(a){function b(){d=!0}function c(l){f.push(l);rg(l)}a=Fb(a);var d=!1,e,f=[],g=[];(new ng).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).R("stsd",function(l){e=l;f.push(l);tg(l)}).R("encv",b).R("enca",b).R("avc1",function(l){g.push({box:l,hc:1701733238})}).R("avc3",function(l){g.push({box:l,hc:1701733238})}).R("ac-3",function(l){g.push({box:l,hc:1701733217})}).R("ec-3",function(l){g.push({box:l,hc:1701733217})}).R("mp4a",function(l){g.push({box:l,hc:1701733217})}).parse(a);
222
224
  if(d)return a;if(0==g.length||!e)throw ab(Uc(a)),new N(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=xg(a,e,k.box,f,k.hc);return a}
223
225
  function xg(a,b,c,d,e){var f=yg.value(),g=a.subarray(c.start,c.start+c.size),h=Ib(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Ib(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);zg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=xc()?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,zg(e,d.start,d.size+k.byteLength);k=Ib(e,b.start);b=sg(b);a=k.getUint32(b);
@@ -242,13 +244,13 @@ d=1===(d&1);if(c.h!==Wg){f=c.g;if(c.h===Vg&&e!==f.g){var k=1+e-f.h;Rg(f,k,1+f.g-
242
244
  0,h-1),Hg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Hg(c.l,0,15);break;case 47:e=null,c.h!==Wg&&(e=Gg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Xg(c),c.j=d}d=e;break a}d=null}else e=b.Oa,Ig(c.g,Jg,b.za),Ig(c.g,Jg,e);return d}
243
245
  function Ah(a,b){var c=[];try{for(;b.ma();){var d=nh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=nh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new oh(e));for(var g=a.j.get(e),h=b.X();b.X()-h<f;){e=b;var k=nh(e),l=k.value,m=k.pts;if(16===l){var n=nh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!gh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.C-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=hh(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,y=1;15>y;y++,
244
246
  v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=eh()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=hh(q,p,g.i));q.i[q.h]=eh();q.g=0;break;case 12:q.isVisible()&&(e=hh(q,p,g.i)),dh(q),p=q,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=ph(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?fh(g.g,"\u266a"):fh(g.g,
245
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&fh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(vh.has(e)){var x=vh.get(e);fh(g.g,x)}else fh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?fh(g.g,"_"):fh(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Bh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Ch(a,b){var c=null,d=null,e=a.M();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:e,de:c,Se:d}}function Dh(a,b){return{ld:1==b?a.Jb():a.M()}}function Eh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.M()}}
246
- function Fh(a,b,c){var d=a.M(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Md:null,sampleSize:null,Rc:null};c&256&&(g.Md=a.M());c&512&&(g.sampleSize=a.M());c&1024&&a.skip(4);c&2048&&(g.Rc=0==b?a.M():a.re());e.push(g)}return{Mg:d,ue:e}};function Gh(){this.i=new Map;this.h=this.g=0}
247
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&fh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(vh.has(e)){var x=vh.get(e);fh(g.g,x)}else fh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?fh(g.g,"_"):fh(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Bh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Ch(a,b){var c=null,d=null,e=a.M();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:e,ee:c,Te:d}}function Dh(a,b){return{md:1==b?a.Jb():a.M()}}function Eh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.M()}}
248
+ function Fh(a,b,c){var d=a.M(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Od:null,sampleSize:null,Sc:null};c&256&&(g.Od=a.M());c&512&&(g.sampleSize=a.M());c&1024&&a.skip(4);c&2048&&(g.Sc=0==b?a.M():a.se());e.push(g)}return{Ng:d,ve:e}};function Gh(){this.i=new Map;this.h=this.g=0}
247
249
  Gh.prototype.init=function(a){var b=this,c=[],d=[];(new ng).box("moov",rg).box("mvex",rg).R("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.M();f=f.M();b.g=e;b.h=f}).box("trak",rg).R("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.M();c.push(e)}).box("mdia",rg).R("mdhd",function(e){e=Eh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
248
- Gh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new ng).box("moof",rg).box("traf",rg).R("trun",function(k){f=Fh(k.reader,k.version,k.flags).ue}).R("tfhd",function(k){k=Ch(k.reader,k.flags);d=k.de||b.g;e=k.Se||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).R("tfdt",function(k){g=Dh(k.reader,k.version).ld}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,q=f,v=0,y=p;for(q.length&&(y=q[0].sampleSize||p);k.ma();){var w=k.M();if(6==
249
- (k.Y()&31)){var x=0;q.length>v&&(x=q[v].Rc||0);x=(l+x)/m;for(var D=[],B,A=k.Za(w-1),F=B=0;F<A.length;)2==B&&3==A[F]?(B=0,A=[].concat(ja(A)),A.splice(F,1),A=new Uint8Array(A)):0==A[F]?B++:B=0,F++;B=A;for(F=0;F<B.length;){for(A=0;255==B[F];)A+=255,F++;A+=B[F++];for(var G=0;255==B[F];)G+=255,F++;G+=B[F++];4==A&&D.push(B.subarray(F,F+G));F+=G}D=t(D);for(B=D.next();!B.done;B=D.next())c.push({Gf:B.value,pts:x})}else try{k.skip(w-1)}catch(H){break}y-=w+4;0==y&&(l=q.length>v?l+(q[v].Md||n):l+n,v++,y=q.length>
250
+ Gh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new ng).box("moof",rg).box("traf",rg).R("trun",function(k){f=Fh(k.reader,k.version,k.flags).ve}).R("tfhd",function(k){k=Ch(k.reader,k.flags);d=k.ee||b.g;e=k.Te||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).R("tfdt",function(k){g=Dh(k.reader,k.version).md}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,q=f,v=0,y=p;for(q.length&&(y=q[0].sampleSize||p);k.ma();){var w=k.M();if(6==
251
+ (k.Y()&31)){var x=0;q.length>v&&(x=q[v].Sc||0);x=(l+x)/m;for(var D=[],B,A=k.Za(w-1),F=B=0;F<A.length;)2==B&&3==A[F]?(B=0,A=[].concat(ja(A)),A.splice(F,1),A=new Uint8Array(A)):0==A[F]?B++:B=0,F++;B=A;for(F=0;F<B.length;){for(A=0;255==B[F];)A+=255,F++;A+=B[F++];for(var G=0;255==B[F];)G+=255,F++;G+=B[F++];4==A&&D.push(B.subarray(F,F+G));F+=G}D=t(D);for(B=D.next();!B.done;B=D.next())c.push({Hf:B.value,pts:x})}else try{k.skip(w-1)}catch(H){break}y-=w+4;0==y&&(l=q.length>v?l+(q[v].Od||n):l+n,v++,y=q.length>
250
252
  v?q[v].sampleSize||p:p)}}).parse(a,!1);return c};function Hh(){this.h=new Gh;this.g=new wh}Hh.prototype.init=function(a){this.h.init(a)};
251
- function Ih(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fb(e.Gf);if(0<f.length&&(d=a.g,e=e.pts,f=new kg(f,0),181===f.Y()&&49===f.Ib()&&1195456820===f.M()&&3===f.Y())){var g=f.Y();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Y(),l=(k&4)>>2,m=f.Y(),n=f.Y();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,za:m,Oa:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return yh(a.g)}
253
+ function Ih(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fb(e.Hf);if(0<f.length&&(d=a.g,e=e.pts,f=new kg(f,0),181===f.Y()&&49===f.Ib()&&1195456820===f.M()&&3===f.Y())){var g=f.Y();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Y(),l=(k&4)>>2,m=f.Y(),n=f.Y();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,za:m,Oa:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return yh(a.g)}
252
254
  ;function Jh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Kh(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function Lh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(Mh(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
253
255
  function Nh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Mh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Mh(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Oh(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.I={};this.G={};this.g=null;this.L=d||function(){};this.i={};this.o=new ff;this.s={};this.u=b;this.D=new rc;this.m=Ph(this,this.D);this.C=new df(function(){return Qh(e)});this.F=""}function Ph(a,b){var c=new MediaSource;a.o.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.F);b.resolve()});a.F=Rh(c);a.j.src=a.F;return c}r=Oh.prototype;r.destroy=function(){return this.C.destroy()};
254
256
  function Qh(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Qb)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.s)b.push(a.s[k].destroy());return u(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.s={};a.u=null;a.i=
@@ -260,230 +262,231 @@ function Zh(a,b,c,d,e,f){var g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g){g=q
260
262
  m,e));l.captions&&l.captions.length&&(n=a.h[g.Na].timestampOffset,p=md(l.captions),od(a.g,p,d,e,n));q=l.data;q=$h(a,q,d,b);return u(v,ai(a,b,function(){a.h[b].appendBuffer(q)}),0)})}function bi(a,b){var c=Xh(a,"video")||0;kd(a.g,b,c)}function ci(a){a.g&&kd(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return L(function(f){e=qc;return a==e.Z?u(f,d.g.remove(b,c),0):u(f,ai(d,a,function(){c<=b?Th(d,a):d.h[a].remove(b,c)}),0)})};
261
263
  function di(a,b){var c;return L(function(d){c=qc;return b==c.Z?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,ai(a,b,function(){var e=a.m.duration;0>=e?Th(a,b):a.h[b].remove(0,e)}),0)})}r.flush=function(a){var b=this,c;return L(function(d){c=qc;return a==c.Z?d["return"]():u(d,ai(b,a,function(){b.j.currentTime-=.001;Th(b,a)}),0)})};
262
264
  function ei(a,b,c,d,e){var f;return L(function(g){f=qc;return b==f.Z?(a.g.u=c,jd(a.g,d,e),g["return"]()):u(g,Promise.all([ai(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;Th(a,b)}),ai(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;Th(a,b)}),ai(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Th(a,b)})]),0)})}
263
- r.endOfStream=function(a){var b=this;return L(function(c){return u(c,fi(b,function(){Uh(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};r.Ia=function(a){var b=this;return L(function(c){return u(c,fi(b,function(){b.m.duration=a}),0)})};r.getDuration=function(){return this.m.duration};function Th(a,b){var c=a.i[b][0];c&&(c.p.resolve(),ii(a,b))}function ai(a,b,c){ef(a.C);c={start:c,p:new rc};a.i[b].push(c);1==a.i[b].length&&ji(a,b);return c.p}
264
- function fi(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:ef(a.C);c=[];d={};for(e in a.h)d.Pb=new rc,f={start:function(l){return function(){return l.Pb.resolve()}}(d),p:d.Pb},a.i[e].push(f),c.push(d.Pb),1==a.i[e].length&&f.start(),d={Pb:d.Pb};C(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=E(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)ii(a,h)}z(k)}})}function ii(a,b){a.i[b].shift();ji(a,b)}
265
- function ji(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),ii(a,b)}}function $h(a,b,c,d){var e=a.G[d];null==c&&e&&(zc()||xc())&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=wg(b));return b}var Rh=window.URL.createObjectURL;function ki(a,b,c,d){this.sa=a;this.pa=b;this.ga=c;this.xd=void 0===d?null:d}ki.prototype.dc=function(){return this.pa};ki.prototype.$b=function(){return this.ga};function li(a,b){return a&&b?a.dc()==b.dc()&&a.$b()==b.$b()&&hb(a.sa(),b.sa()):a==b}M("shaka.media.InitSegmentReference",ki);ki.prototype.getEndByte=ki.prototype.$b;ki.prototype.getStartByte=ki.prototype.dc;
266
- function mi(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.pa=d;this.ga=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}r=mi.prototype;r.sa=function(){return this.j()};r.getStartTime=function(){return this.startTime};r.$e=function(){return this.endTime};r.dc=function(){return this.pa};r.$b=function(){return this.ga};r.tf=function(){return this.tilesLayout};
267
- r.rf=function(){return this.i};M("shaka.media.SegmentReference",mi);mi.prototype.getTileDuration=mi.prototype.rf;mi.prototype.getTilesLayout=mi.prototype.tf;mi.prototype.getEndByte=mi.prototype.$b;mi.prototype.getStartByte=mi.prototype.dc;mi.prototype.getEndTime=mi.prototype.$e;mi.prototype.getStartTime=mi.prototype.getStartTime;mi.prototype.getUris=mi.prototype.sa;function S(a,b,c){this.l=a;this.Qc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.C=void 0===c?!0:c;this.D=0;this.F=!1}r=S.prototype;r.getDuration=function(){return this.i};r.ff=function(){return this.g};r.Ia=function(a){this.i=a};r.lf=function(){return this.l};r.ze=function(a){this.o=a};r.nc=function(a){this.s=a};r.Td=function(a){this.m=a};r.Vf=function(a){this.Qc=a};r.Ze=function(){return this.Qc};
268
- r.Fb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Dd(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.C&&!this.F&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.vd=function(){this.F=!0};r.Dd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Cd=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)};
269
- r.T=function(){return Infinity==this.i&&!this.s};r.lb=function(){return Infinity!=this.i&&!this.s};r.Qa=function(){return Math.max(this.u,this.gb()-this.m)};r.Ae=function(a){this.u=a};r.gb=function(){return this.T()||this.lb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};r.cc=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.gb()-this.m+a,this.Pa()))};r.Bb=function(){return this.cc(0)};
270
- r.Pa=function(){return Math.max(0,this.gb()-(this.T()||this.lb()?this.Qc:0))};r.De=function(){return null==this.l||null!=this.h&&this.C?!1:!0};r.ye=function(a){this.D=a};M("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.ye;S.prototype.usingPresentationStartTime=S.prototype.De;S.prototype.getSeekRangeEnd=S.prototype.Pa;S.prototype.getSeekRangeStart=S.prototype.Bb;S.prototype.getSafeSeekRangeStart=S.prototype.cc;S.prototype.getSegmentAvailabilityEnd=S.prototype.gb;
271
- S.prototype.setUserSeekStart=S.prototype.Ae;S.prototype.getSegmentAvailabilityStart=S.prototype.Qa;S.prototype.isInProgress=S.prototype.lb;S.prototype.isLive=S.prototype.T;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.Cd;S.prototype.notifyMinSegmentStartTime=S.prototype.Dd;S.prototype.lockStartTime=S.prototype.vd;S.prototype.notifySegments=S.prototype.Fb;S.prototype.getDelay=S.prototype.Ze;S.prototype.setDelay=S.prototype.Vf;
272
- S.prototype.setSegmentAvailabilityDuration=S.prototype.Td;S.prototype.setStatic=S.prototype.nc;S.prototype.setClockOffset=S.prototype.ze;S.prototype.getPresentationStartTime=S.prototype.lf;S.prototype.setDuration=S.prototype.Ia;S.prototype.getMaxSegmentDuration=S.prototype.ff;S.prototype.getDuration=S.prototype.getDuration;function ni(a,b){this.j=a;this.m=oi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}ni.prototype.release=function(){this.j=null;this.i=function(){}};function pi(a,b){a.i=b}function qi(a){this.g=a}function oi(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(Mh(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 ri(a,b,c,d,e){var f=this;this.g=a;this.C=b;this.l=c;this.u=e;this.i=new ff;this.s=!1;this.D=a.readyState;this.j=!1;this.h=d;this.o=!1;this.i.A(a,"waiting",function(){return si(f)});this.m=(new O(function(){si(f)})).Ca(.25)}ri.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.C=this.u=null};ri.prototype.Gd=function(){this.o=!0;si(this)};
265
+ r.endOfStream=function(a){var b=this;return L(function(c){return u(c,fi(b,function(){Uh(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};r.Ia=function(a){var b=this;return L(function(c){return u(c,fi(b,function(){b.m.duration=a}),0)})};r.getDuration=function(){return this.m.duration};function Th(a,b){var c=a.i[b][0];c&&(c.p.resolve(),gi(a,b))}function ai(a,b,c){ef(a.C);c={start:c,p:new rc};a.i[b].push(c);1==a.i[b].length&&ji(a,b);return c.p}
266
+ function fi(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:ef(a.C);c=[];d={};for(e in a.h)d.Pb=new rc,f={start:function(l){return function(){return l.Pb.resolve()}}(d),p:d.Pb},a.i[e].push(f),c.push(d.Pb),1==a.i[e].length&&f.start(),d={Pb:d.Pb};C(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=E(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)gi(a,h)}z(k)}})}function gi(a,b){a.i[b].shift();ji(a,b)}
267
+ function ji(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),gi(a,b)}}function $h(a,b,c,d){var e=a.G[d];null==c&&e&&(zc()||xc())&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=wg(b));return b}var Rh=window.URL.createObjectURL;function ki(a,b,c,d){this.sa=a;this.pa=b;this.ga=c;this.zd=void 0===d?null:d}ki.prototype.dc=function(){return this.pa};ki.prototype.$b=function(){return this.ga};function li(a,b){return a&&b?a.dc()==b.dc()&&a.$b()==b.$b()&&hb(a.sa(),b.sa()):a==b}M("shaka.media.InitSegmentReference",ki);ki.prototype.getEndByte=ki.prototype.$b;ki.prototype.getStartByte=ki.prototype.dc;
268
+ function mi(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.pa=d;this.ga=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}r=mi.prototype;r.sa=function(){return this.j()};r.getStartTime=function(){return this.startTime};r.af=function(){return this.endTime};r.dc=function(){return this.pa};r.$b=function(){return this.ga};r.uf=function(){return this.tilesLayout};
269
+ r.tf=function(){return this.i};M("shaka.media.SegmentReference",mi);mi.prototype.getTileDuration=mi.prototype.tf;mi.prototype.getTilesLayout=mi.prototype.uf;mi.prototype.getEndByte=mi.prototype.$b;mi.prototype.getStartByte=mi.prototype.dc;mi.prototype.getEndTime=mi.prototype.af;mi.prototype.getStartTime=mi.prototype.getStartTime;mi.prototype.getUris=mi.prototype.sa;function S(a,b,c){this.l=a;this.Rc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.C=void 0===c?!0:c;this.D=0;this.F=!1}r=S.prototype;r.getDuration=function(){return this.i};r.gf=function(){return this.g};r.Ia=function(a){this.i=a};r.mf=function(){return this.l};r.Ae=function(a){this.o=a};r.oc=function(a){this.s=a};r.Vd=function(a){this.m=a};r.Wf=function(a){this.Rc=a};r.$e=function(){return this.Rc};
270
+ r.Fb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Fd(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.C&&!this.F&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.xd=function(){this.F=!0};r.Fd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Ed=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)};
271
+ r.T=function(){return Infinity==this.i&&!this.s};r.lb=function(){return Infinity!=this.i&&!this.s};r.Qa=function(){return Math.max(this.u,this.gb()-this.m)};r.Be=function(a){this.u=a};r.gb=function(){return this.T()||this.lb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};r.cc=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.gb()-this.m+a,this.Pa()))};r.Bb=function(){return this.cc(0)};
272
+ r.Pa=function(){return Math.max(0,this.gb()-(this.T()||this.lb()?this.Rc:0))};r.Ee=function(){return null==this.l||null!=this.h&&this.C?!1:!0};r.ze=function(a){this.D=a};M("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.ze;S.prototype.usingPresentationStartTime=S.prototype.Ee;S.prototype.getSeekRangeEnd=S.prototype.Pa;S.prototype.getSeekRangeStart=S.prototype.Bb;S.prototype.getSafeSeekRangeStart=S.prototype.cc;S.prototype.getSegmentAvailabilityEnd=S.prototype.gb;
273
+ S.prototype.setUserSeekStart=S.prototype.Be;S.prototype.getSegmentAvailabilityStart=S.prototype.Qa;S.prototype.isInProgress=S.prototype.lb;S.prototype.isLive=S.prototype.T;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.Ed;S.prototype.notifyMinSegmentStartTime=S.prototype.Fd;S.prototype.lockStartTime=S.prototype.xd;S.prototype.notifySegments=S.prototype.Fb;S.prototype.getDelay=S.prototype.$e;S.prototype.setDelay=S.prototype.Wf;
274
+ S.prototype.setSegmentAvailabilityDuration=S.prototype.Vd;S.prototype.setStatic=S.prototype.oc;S.prototype.setClockOffset=S.prototype.Ae;S.prototype.getPresentationStartTime=S.prototype.mf;S.prototype.setDuration=S.prototype.Ia;S.prototype.getMaxSegmentDuration=S.prototype.gf;S.prototype.getDuration=S.prototype.getDuration;function ni(a,b){this.j=a;this.m=oi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}ni.prototype.release=function(){this.j=null;this.i=function(){}};function pi(a,b){a.i=b}function qi(a){this.g=a}function oi(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(Mh(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 ri(a,b,c,d,e){var f=this;this.g=a;this.C=b;this.l=c;this.u=e;this.i=new ff;this.s=!1;this.D=a.readyState;this.j=!1;this.h=d;this.o=!1;this.i.A(a,"waiting",function(){return si(f)});this.m=(new O(function(){si(f)})).Ca(.25)}ri.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.C=this.u=null};ri.prototype.Id=function(){this.o=!0;si(this)};
273
275
  function si(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.s)return}else a.s=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.D&&(a.j=!1,a.D=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=oi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Nh(b,g,a.l.gapDetectionThreshold);if(!(null==
274
276
  c||0==c&&!a.o||(d=b.start(c),d>=a.C.Pa()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new Q("largegap",g),g.cancelable=!0,a.u(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function ti(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=ui.value().get(b),c.oa(a,b,d))}var ui=new sc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function vi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new ff;this.i=new wi(a);ti(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){xi(d,d.j)})}vi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function yi(a){return a.m?a.g.currentTime:a.j}function zi(a,b){0<a.g.readyState?Ai(a.i,b):ti(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){xi(a,a.j)})}
275
277
  function xi(a,b){.001>Math.abs(a.g.currentTime-b)?Bi(a):(a.h.oa(a.g,"seeking",function(){Bi(a)}),Ai(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Bi(a){a.m=!0;a.h.A(a.g,"seeking",function(){return a.l()})}function wi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}wi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
276
278
  function Ai(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function Ci(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.oa(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new ff;ti(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}Ci.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};Ci.prototype.o=function(a){this.h=this.j?this.h:a};Ci.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};Ci.prototype.D=function(){};
277
279
  function Di(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.C=e;this.u=null;this.j=new ri(a,b.presentationTimeline,c,Ei(a,c),f);this.h=new vi(a,function(){a:{var h=g.j;h.s=!0;h.o=!1;h.j=!1;var k=yi(g.h);h=Fi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;zi(g.h,h);h=void 0;break a}g.C();h=void 0}return h},Gi(this,d));this.s=(new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=yi(g.h),k=g.g.Bb(),l=g.g.Pa();3>l-k&&(k=
278
280
  l-3);h<k&&(h=Fi(g,h),g.i.currentTime=h)}})).Ca(.25)}Di.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.s&&(this.s.stop(),this.s=null);this.i=this.h=this.g=this.l=null;this.C=function(){}};Di.prototype.o=function(a){zi(this.h,a)};Di.prototype.m=function(){var a=yi(this.h);return 0<this.i.readyState&&!this.i.paused?Hi(this,a):a};
279
- function Gi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Bb():a.g.Pa():0>b&&(b=a.g.Pa()+b);return Ii(a,Hi(a,b))}Di.prototype.D=function(){this.j.Gd()};function Ii(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Fi(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Bb(),f=a.g.Pa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.cc(c),k=a.g.cc(d);c=a.g.cc(c+d);return b>=g?Ii(a,b):b>f?f:b<e?Kh(a.i.buffered,k)?k:c:b>=h||Kh(a.i.buffered,b)?b:c}
280
- function Hi(a,b){var c=a.g.Bb();if(b<c)return c;c=a.g.Pa();return b>c?c:b}function Ei(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ni(new qi(a),b.stallThreshold);pi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function T(a){this.K=a;this.g=null;this.h=0;this.i=!1}r=T.prototype;r.destroy=function(){Kb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};r.release=function(){this.i||(this.K=[],this.g&&this.g.stop(),this.g=null)};r.Af=function(){this.i=!0};
281
+ function Gi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Bb():a.g.Pa():0>b&&(b=a.g.Pa()+b);return Ii(a,Hi(a,b))}Di.prototype.D=function(){this.j.Id()};function Ii(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Fi(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Bb(),f=a.g.Pa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.cc(c),k=a.g.cc(d);c=a.g.cc(c+d);return b>=g?Ii(a,b):b>f?f:b<e?Kh(a.i.buffered,k)?k:c:b>=h||Kh(a.i.buffered,b)?b:c}
282
+ function Hi(a,b){var c=a.g.Bb();if(b<c)return c;c=a.g.Pa();return b>c?c:b}function Ei(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ni(new qi(a),b.stallThreshold);pi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function T(a){this.K=a;this.g=null;this.h=0;this.i=!1}r=T.prototype;r.destroy=function(){Kb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};r.release=function(){this.i||(this.K=[],this.g&&this.g.stop(),this.g=null)};r.Bf=function(){this.i=!0};
281
283
  r.find=function(a){for(var b=this.K.length-1,c=b;0<=c;--c){var d=this.K[c],e=c<b?this.K[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.K.length&&a<this.K[0].startTime?this.h:null};r.get=function(a){if(0==this.K.length)return null;a-=this.h;return 0>a||a>=this.K.length?null:this.K[a]};r.offset=function(a){if(!this.i)for(var b=t(this.K),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
282
284
  r.Db=function(a){!this.i&&a.length&&(this.K=this.K.filter(function(b){return b.startTime<a[0].startTime}),this.K.push.apply(this.K,ja(a)))};r.Eb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.K.length||d.endTime>c.K[0].startTime)});this.Db(a);this.cb(b)};r.cb=function(a){if(!this.i){var b=this.K.length;this.K=this.K.filter(function(c){return c.endTime>a});this.h+=b-this.K.length}};
283
285
  r.Xa=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.K.length;)if(this.K[this.K.length-1].startTime>=b)this.K.pop();else break;for(;this.K.length;)if(this.K[0].endTime<=a)this.K.shift(),c||this.h++;else break;0!=this.K.length&&(a=this.K[this.K.length-1],this.K[this.K.length-1]=new mi(a.startTime,b,a.j,a.pa,a.ga,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}};
284
- r.Sc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.K.push.apply(c.K,ja(d)):(c.g.stop(),c.g=null)}),this.g.Ca(a))};T.prototype[Symbol.iterator]=function(){return this.fb(0)};T.prototype.fb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Ji(this,b,d)};
285
- function Ki(a,b,c){return new T([new mi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",T);T.forSingleSegment=Ki;T.prototype.getIteratorForTime=T.prototype.fb;T.prototype.updateEvery=T.prototype.Sc;T.prototype.fit=T.prototype.Xa;T.prototype.evict=T.prototype.cb;T.prototype.mergeAndEvict=T.prototype.Eb;T.prototype.merge=T.prototype.Db;T.prototype.offset=T.prototype.offset;T.prototype.get=T.prototype.get;T.prototype.find=T.prototype.find;T.prototype.markImmutable=T.prototype.Af;
286
+ r.Tc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.K.push.apply(c.K,ja(d)):(c.g.stop(),c.g=null)}),this.g.Ca(a))};T.prototype[Symbol.iterator]=function(){return this.fb(0)};T.prototype.fb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Ji(this,b,d)};
287
+ function Ki(a,b,c){return new T([new mi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",T);T.forSingleSegment=Ki;T.prototype.getIteratorForTime=T.prototype.fb;T.prototype.updateEvery=T.prototype.Tc;T.prototype.fit=T.prototype.Xa;T.prototype.evict=T.prototype.cb;T.prototype.mergeAndEvict=T.prototype.Eb;T.prototype.merge=T.prototype.Db;T.prototype.offset=T.prototype.offset;T.prototype.get=T.prototype.get;T.prototype.find=T.prototype.find;T.prototype.markImmutable=T.prototype.Bf;
286
288
  T.prototype.release=T.prototype.release;T.prototype.destroy=T.prototype.destroy;function Ji(a,b,c){this.i=a;this.h=b;this.g=c}Ji.prototype.seek=function(a){Kb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.fb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
287
289
  Ji.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.sa().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};Ji.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.sa().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Ji);Ji.prototype.next=Ji.prototype.next;Ji.prototype.current=Ji.prototype.current;
288
290
  Ji.prototype.seek=Ji.prototype.seek;function Li(){T.call(this,[]);this.j=[]}qa(Li,T);r=Li.prototype;r.clone=function(){var a=new Li;a.j=this.j.slice();return a};r.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};r.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.K.length}return null};
289
- r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.K.length}return null};r.offset=function(){};r.Db=function(){};r.cb=function(){};r.Eb=function(){};r.Xa=function(){};r.Sc=function(){};M("shaka.media.MetaSegmentIndex",Li);Li.prototype.updateEvery=Li.prototype.Sc;Li.prototype.fit=Li.prototype.Xa;Li.prototype.mergeAndEvict=Li.prototype.Eb;Li.prototype.evict=Li.prototype.cb;Li.prototype.merge=Li.prototype.Db;
290
- Li.prototype.offset=Li.prototype.offset;Li.prototype.get=Li.prototype.get;Li.prototype.find=Li.prototype.find;Li.prototype.release=Li.prototype.release;function Mi(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Hc();this.h=new O(function(){b.g.pe(.25*b.i)})}Mi.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Mi.prototype.set=function(a){this.i=a;Ni(this)};Mi.prototype.Dc=function(){return this.g.Dc()};function Ni(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Hc()!=b&&a.g.Sd(b);return}catch(c){}a.h.Ca(.25);0!=a.g.Hc()&&a.g.Sd(0)};function Oi(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){Pi(b,!1)})).Ca(.25)}Oi.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 Pi(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Qi(a){Oe.call(this);this.g=new Map;this.h=a}qa(Qi,Oe);Qi.prototype.release=function(){this.g.clear();Oe.prototype.release.call(this)};function Ri(a,b){var c=a.g.get(b);c||(c={ic:[],be:null,contentType:b},a.g.set(b,c));return c}function Si(a,b,c){var d=Ri(a,b.contentType);Ti(a,d);a={xd:b,position:c};d=d.ic;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
291
- Qi.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.ic;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.xd;break a}}d=null}if(e=d)e=c.be,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);
292
- 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.be=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Ti(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.ic;b.ic=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.ic=[]};function Ui(a){Oe.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(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 Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}qa(Ui,Oe);Ui.prototype.release=function(){this.g.clear();this.h.stop();Oe.prototype.release.call(this)};function Vi(a){Oe.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{sb:null,rb:Wi,kb:function(c,d){return Xi(b,"enter",c,d)}},{sb:Yi,rb:Wi,kb:function(c,d){return Xi(b,"enter",c,d)}},{sb:Zi,rb:Wi,kb:function(c,d){return Xi(b,"enter",c,d)}},{sb:Wi,rb:Yi,kb:function(c,d){return Xi(b,"exit",c,d)}},{sb:Wi,rb:Zi,kb:function(c,d){return Xi(b,"exit",c,d)}},{sb:Yi,rb:Zi,kb:function(c,d){return Xi(b,"skip",c,d)}},{sb:Zi,rb:Yi,kb:function(c,d){return Xi(b,"skip",c,d)}}];this.h=new ff;this.h.A(this.i,"regionremove",
291
+ r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.K.length}return null};r.offset=function(){};r.Db=function(){};r.cb=function(){};r.Eb=function(){};r.Xa=function(){};r.Tc=function(){};M("shaka.media.MetaSegmentIndex",Li);Li.prototype.updateEvery=Li.prototype.Tc;Li.prototype.fit=Li.prototype.Xa;Li.prototype.mergeAndEvict=Li.prototype.Eb;Li.prototype.evict=Li.prototype.cb;Li.prototype.merge=Li.prototype.Db;
292
+ Li.prototype.offset=Li.prototype.offset;Li.prototype.get=Li.prototype.get;Li.prototype.find=Li.prototype.find;Li.prototype.release=Li.prototype.release;function Mi(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Ic();this.h=new O(function(){b.g.qe(.25*b.i)})}Mi.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Mi.prototype.set=function(a){this.i=a;Ni(this)};Mi.prototype.Ec=function(){return this.g.Ec()};function Ni(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Ic()!=b&&a.g.Ud(b);return}catch(c){}a.h.Ca(.25);0!=a.g.Ic()&&a.g.Ud(0)};function Oi(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){Pi(b,!1)})).Ca(.25)}Oi.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 Pi(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Qi(a){Oe.call(this);this.g=new Map;this.h=a}qa(Qi,Oe);Qi.prototype.release=function(){this.g.clear();Oe.prototype.release.call(this)};function Ri(a,b){var c=a.g.get(b);c||(c={ic:[],ce:null,contentType:b},a.g.set(b,c));return c}function Si(a,b,c){var d=Ri(a,b.contentType);Ti(a,d);a={zd:b,position:c};d=d.ic;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
293
+ Qi.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.ic;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.zd;break a}}d=null}if(e=d)e=c.ce,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);
294
+ 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.ce=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Ti(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.ic;b.ic=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.ic=[]};function Ui(a){Oe.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(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 Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}qa(Ui,Oe);Ui.prototype.release=function(){this.g.clear();this.h.stop();Oe.prototype.release.call(this)};function Vi(a){Oe.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{sb:null,rb:Wi,kb:function(c,d){return Xi(b,"enter",c,d)}},{sb:Yi,rb:Wi,kb:function(c,d){return Xi(b,"enter",c,d)}},{sb:Zi,rb:Wi,kb:function(c,d){return Xi(b,"enter",c,d)}},{sb:Wi,rb:Yi,kb:function(c,d){return Xi(b,"exit",c,d)}},{sb:Wi,rb:Zi,kb:function(c,d){return Xi(b,"exit",c,d)}},{sb:Yi,rb:Zi,kb:function(c,d){return Xi(b,"skip",c,d)}},{sb:Zi,rb:Yi,kb:function(c,d){return Xi(b,"skip",c,d)}}];this.h=new ff;this.h.A(this.i,"regionremove",
293
295
  function(c){b.g["delete"](c.region)})}qa(Vi,Oe);Vi.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Oe.prototype.release.call(this)};Vi.prototype.j=function(a,b){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?Yi:a>d.endTime?Zi:Wi;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.sb==e&&h.rb==f&&h.kb(d,b)}};
294
296
  function Xi(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Yi=1,Wi=2,Zi=3;function $i(a,b,c,d,e){a=Xe(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function aj(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.u=1;this.o=this.l=null;this.i=new Map;this.C=!1;this.D=null;this.s=!1;this.j=new df(function(){return bj(c)})}aj.prototype.destroy=function(){return this.j.destroy()};function bj(a){var b,c,d,e;return L(function(f){if(1==f.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,cj(e),b.push(dj(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.h=null;z(f)})}
295
297
  aj.prototype.configure=function(a){this.h=a;this.D=new De({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)};aj.prototype.start=function(){var a=this;return L(function(b){if(1==b.g)return u(b,ej(a),2);ef(a.j);a.C=!0;z(b)})};
296
298
  function fj(a,b){var c,d,e,f,g,h;L(function(k){switch(k.g){case 1:return c=qc,C(k,2),u(k,di(a.g.P,c.Z),4);case 4:va(k,3);break;case 2:if(d=E(k),a.g)a.g.onError(d);case 3:e=ad(b.mimeType,b.codecs);Sh(a.g.P,e);f=a.g.P.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=gj(b),a.i.set(c.Z,h),hj(a,h,0);z(k)}})}function ij(a){var b=a.i.get(pc);b&&(cj(b),dj(b)["catch"](function(){}),a.i["delete"](pc));a.o=null}
297
299
  function jj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.ob&&(kj(a,e,!1,0,!1),c.ob=d)}else if(d=c.ob)c.ob=null,kj(a,d,!0,0,!1)}}function lj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.C&&(b.video&&kj(a,b.video,c,d,e),b.audio&&kj(a,b.audio,c,d,e))}function mj(a,b){a.o=b;a.C&&kj(a,b,!0,0,!1)}
298
- function kj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=pc?f&&(f.ob&&(b.trickModeVideo?(f.ob=b,b=b.trickModeVideo):f.ob=null),f.stream!=b||e)&&(b.type==pc&&Sh(a.g.P,ad(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ba=null,c&&(f.Yb?f.Vc=!0:f.Ha?(f.qb=!0,f.xc=d,f.Vc=!0):(cj(f),nj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),oj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):fj(a,b)}
299
- function oj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.ua)return e["return"]();c=b.stream;d=b.ua;return c.segmentIndex?e.B(2):u(e,c.createSegmentIndex(),2)}if(b.ua!=d||b.stream!=c)return e["return"]();var f=a.g.Gc();var g=Xh(a.g.P,b.type),h=b.stream.segmentIndex.find(b.Aa?b.Aa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ga?k.ga-k.pa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.ga?k.ga-k.pa:null)||0),k=a.g.getBandwidthEstimate(),
300
- f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.ua.h.g>h?!0:!1):f=!1;f&&b.ua.abort();z(e)})}function pj(a,b){b.Yb||b.qb||(b.Ha?(b.qb=!0,b.xc=0):null==Vh(a.g.P,b.type)?null==b.Ka&&hj(a,b,0):(cj(b),nj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
300
+ function kj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=pc?f&&(f.ob&&(b.trickModeVideo?(f.ob=b,b=b.trickModeVideo):f.ob=null),f.stream!=b||e)&&(b.type==pc&&Sh(a.g.P,ad(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ba=null,c&&(f.Yb?f.Wc=!0:f.Ha?(f.qb=!0,f.yc=d,f.Wc=!0):(cj(f),nj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),oj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):fj(a,b)}
301
+ function oj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.ua)return e["return"]();c=b.stream;d=b.ua;return c.segmentIndex?e.B(2):u(e,c.createSegmentIndex(),2)}if(b.ua!=d||b.stream!=c)return e["return"]();var f=a.g.Hc();var g=Xh(a.g.P,b.type),h=b.stream.segmentIndex.find(b.Aa?b.Aa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ga?k.ga-k.pa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.ga?k.ga-k.pa:null)||0),k=a.g.getBandwidthEstimate(),
302
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.ua.h.g>h?!0:!1):f=!1;f&&b.ua.abort();z(e)})}function pj(a,b){b.Yb||b.qb||(b.Ha?(b.qb=!0,b.yc=0):null==Vh(a.g.P,b.type)?null==b.Ka&&hj(a,b,0):(cj(b),nj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
301
303
  function ej(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){if(1==n.g){b=qc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.bb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Na,a.l.video),d.add(a.l.video));a.o&&(c.set(b.Z,a.o),d.add(a.o));e=a.g.P;f=a.h.forceTransmuxTS;return u(n,e.init(c,f),2)}ef(a.j);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.P.Ia(p):a.g.P.Ia(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||
302
- (m=gj(l),a.i.set(k,m),hj(a,m,0));z(n)})}function gj(a){return{stream:a,type:a.type,ba:null,Aa:null,Kc:null,ud:null,td:null,sd:null,ob:null,endOfStream:!1,Ha:!1,Ka:null,qb:!1,xc:0,Vc:!1,Yb:!1,Kd:!1,ec:!1,ua:null}}
303
- function qj(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:ef(a.j);if(b.Ha||null==b.Ka||b.Yb)return h["return"]();b.Ka=null;if(!b.qb){h.B(2);break}return u(h,nj(a,b,b.Vc,b.xc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.Ka&&hj(a,b,0),h["return"]();case 4:C(h,6);d=rj(a,b);null!=d&&(hj(a,b,d),b.ec=!1);va(h,7);break;case 6:return e=
304
+ (m=gj(l),a.i.set(k,m),hj(a,m,0));z(n)})}function gj(a){return{stream:a,type:a.type,ba:null,Aa:null,Lc:null,wd:null,vd:null,ud:null,ob:null,endOfStream:!1,Ha:!1,Ka:null,qb:!1,yc:0,Wc:!1,Yb:!1,Md:!1,ec:!1,ua:null}}
305
+ function qj(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:ef(a.j);if(b.Ha||null==b.Ka||b.Yb)return h["return"]();b.Ka=null;if(!b.qb){h.B(2);break}return u(h,nj(a,b,b.Wc,b.yc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.Ka&&hj(a,b,0),h["return"]();case 4:C(h,6);d=rj(a,b);null!=d&&(hj(a,b,d),b.ec=!1);va(h,7);break;case 6:return e=
304
306
  E(h),u(h,sj(a,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.B(0);break}return u(h,a.g.P.endOfStream(),10);case 10:ef(a.j),g=a.g.P.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ia(g),z(h)}})}
305
- function rj(a,b){if(tj(b))return bi(a.g.P,b.stream.originalId||""),null;b.type==pc&&ci(a.g.P);var c=a.g.Gc(),d=b.Aa?b.Aa.endTime:c,e=Yh(a.g.P,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.u;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(pc))&&tj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Xh(a.g.P,b.type);e=uj(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=Infinity;
307
+ function rj(a,b){if(tj(b))return bi(a.g.P,b.stream.originalId||""),null;b.type==pc&&ci(a.g.P);var c=a.g.Hc(),d=b.Aa?b.Aa.endTime:c,e=Yh(a.g.P,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.u;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(pc))&&tj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Xh(a.g.P,b.type);e=uj(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=Infinity;
306
308
  var g=Array.from(a.i.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,tj(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.Aa?h.Aa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;vj(a,b,c,e)["catch"](function(){});return null}
307
309
  function uj(a,b,c,d){if(b.ba)return b.ba.current();if(b.Aa||d)return b.ba=b.stream.segmentIndex.fb(b.Aa?b.Aa.endTime:d),b.ba&&b.ba.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.fb(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.fb(c),e=b.ba&&b.ba.next().value);return e}
308
310
  function vj(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,y;return L(function(w){switch(w.g){case 1:return e=qc,f=b.stream,g=b.ba,b.Ha=!0,C(w,2),u(w,wj(a,b,d),4);case 4:ef(a.j);if(a.s)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(x){var D,B,A;return L(function(F){ef(a.j);if(a.s)return F["return"]();n=xj(n,x);D=!1;B=0;(new ng).box("mdat",function(G){B=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D)return F.B(0);
309
- A=n.subarray(0,B);n=n.subarray(B);return u(F,yj(a,b,c,f,d,A),0)})},u(w,zj(a,b,d,p),6);l=zj(a,b,d);return u(w,l,7);case 7:return m=w.h,ef(a.j),a.s?w["return"]():b.qb?(b.Ha=!1,hj(a,b,0),w["return"]()):u(w,yj(a,b,c,f,d,m),6);case 6:ef(a.j);if(a.s)return w["return"]();b.Aa=d;g.next();b.Ha=!1;b.Kd=!1;q=a.g.P.Ya();v=q[b.type];$a(JSON.stringify(v));b.qb||a.g.Gd();hj(a,b,0);va(w,0);break;case 2:y=E(w);ef(a.j,y);if(a.s)return w["return"]();b.Ha=!1;if(7001==y.code)b.Ha=!1,b.Ka=null,hj(a,b,0),w.B(0);else if(b.type==
311
+ A=n.subarray(0,B);n=n.subarray(B);return u(F,yj(a,b,c,f,d,A),0)})},u(w,zj(a,b,d,p),6);l=zj(a,b,d);return u(w,l,7);case 7:return m=w.h,ef(a.j),a.s?w["return"]():b.qb?(b.Ha=!1,hj(a,b,0),w["return"]()):u(w,yj(a,b,c,f,d,m),6);case 6:ef(a.j);if(a.s)return w["return"]();b.Aa=d;g.next();b.Ha=!1;b.Md=!1;q=a.g.P.Ya();v=q[b.type];$a(JSON.stringify(v));b.qb||a.g.Id();hj(a,b,0);va(w,0);break;case 2:y=E(w);ef(a.j,y);if(a.s)return w["return"]();b.Ha=!1;if(7001==y.code)b.Ha=!1,b.Ka=null,hj(a,b,0),w.B(0);else if(b.type==
310
312
  e.Z&&a.h.ignoreTextStreamFailures)a.i["delete"](e.Z),w.B(0);else if(3017==y.code)Aj(a,b,y),w.B(0);else if(1001==y.code&&y.data&&404==y.data[1])b.Ha=!1,b.Ka=null,hj(a,b,1),w.B(0);else return b.ec=!0,y.severity=2,u(w,sj(a,y),0)}})}function xj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
311
- function Aj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Kd})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.ec=!0;a.s=!0;a.g.onError(c);return}b.Kd=!0}hj(a,b,4)}
312
- function wj(a,b,c){var d,e,f,g,h,k,l;return L(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.ud||e!=b.td||f!=b.sd)h=function(){var n;return L(function(p){if(1==p.g)return C(p,2),b.td=e,b.sd=f,b.ud=g,u(p,ei(a.g.P,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=E(p);b.td=null;b.sd=null;b.ud=null;throw n;})},d.push(h());!li(c.g,b.Kc)&&(b.Kc=c.g)&&(k=zj(a,b,c.g),l=function(){var n,p,q;return L(function(v){switch(v.g){case 1:return C(v,2),u(v,k,4);
313
- case 4:return n=v.h,ef(a.j),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,Zh(a.g.P,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw q=E(v),b.Kc=null,q;}})},a.g.Ef(c.startTime,c.g),d.push(l()));return u(m,Promise.all(d),0)})}
313
+ function Aj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Md})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.ec=!0;a.s=!0;a.g.onError(c);return}b.Md=!0}hj(a,b,4)}
314
+ function wj(a,b,c){var d,e,f,g,h,k,l;return L(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.wd||e!=b.vd||f!=b.ud)h=function(){var n;return L(function(p){if(1==p.g)return C(p,2),b.vd=e,b.ud=f,b.wd=g,u(p,ei(a.g.P,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=E(p);b.vd=null;b.ud=null;b.wd=null;throw n;})},d.push(h());!li(c.g,b.Lc)&&(b.Lc=c.g)&&(k=zj(a,b,c.g),l=function(){var n,p,q;return L(function(v){switch(v.g){case 1:return C(v,2),u(v,k,4);
315
+ case 4:return n=v.h,ef(a.j),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,Zh(a.g.P,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw q=E(v),b.Lc=null,q;}})},a.g.Ff(c.startTime,c.g),d.push(l()));return u(m,Promise.all(d),0)})}
314
316
  function yj(a,b,c,d,e,f){var g;return L(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new ng).R("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.jc();var n=k.reader.jc();var p=k.reader.M();var q=k.reader.M();var v=k.reader.M();var y=k.reader.M();var w=e.startTime+q/p}else p=k.reader.M(),w=k.reader.Jb()/p+e.timestampOffset,q=w-e.startTime,v=k.reader.M(),y=k.reader.M(),
315
- m=k.reader.jc(),n=k.reader.jc();k=k.reader.Za(k.reader.O.byteLength-k.reader.X());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Ff():(l=(new Map).set("detail",{startTime:w,endTime:w+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:q,eventDuration:v,id:y,messageData:k}),l=new Q(Bj,l),a.g.onEvent(l))}).parse(f),u(h,Cj(a,b,c),2);if(3!=h.g)return ef(a.j),u(h,Zh(a.g.P,b.type,f,e.startTime,e.endTime,g),3);ef(a.j);z(h)})}
317
+ m=k.reader.jc(),n=k.reader.jc();k=k.reader.Za(k.reader.O.byteLength-k.reader.X());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Gf():(l=(new Map).set("detail",{startTime:w,endTime:w+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:q,eventDuration:v,id:y,messageData:k}),l=new Q(Bj,l),a.g.onEvent(l))}).parse(f),u(h,Cj(a,b,c),2);if(3!=h.g)return ef(a.j),u(h,Zh(a.g.P,b.type,f,e.startTime,e.endTime,g),3);ef(a.j);z(h)})}
316
318
  function Cj(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Vh(a.g.P,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.P.remove(b.type,e,e+g),2)}ef(a.j);z(h)})}function tj(a){return a&&a.type==pc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
317
319
  function zj(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=cf,f=$i(c.sa(),c.pa,c.ga,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof ki,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.mb.request(e,f),b.ua=h,u(l,h.promise,2);k=l.h;b.ua=null;return l["return"](k.data)})}
318
- function nj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.qb=!1,b.Vc=!1,b.xc=0,b.Yb=!0,b.Aa=null,b.Kc=null,b.ba=null,d?(e=a.g.Gc(),f=a.g.P.getDuration(),u(g,a.g.P.remove(b.type,e+d,f),3)):u(g,di(a.g.P,b.type),4);if(3!=g.g)return ef(a.j),c?u(g,a.g.P.flush(b.type),3):g.B(3);ef(a.j);b.Yb=!1;b.endOfStream=!1;hj(a,b,0);z(g)})}
320
+ function nj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.qb=!1,b.Wc=!1,b.yc=0,b.Yb=!0,b.Aa=null,b.Lc=null,b.ba=null,d?(e=a.g.Hc(),f=a.g.P.getDuration(),u(g,a.g.P.remove(b.type,e+d,f),3)):u(g,di(a.g.P,b.type),4);if(3!=g.g)return ef(a.j),c?u(g,a.g.P.flush(b.type),3):g.B(3);ef(a.j);b.Yb=!1;b.endOfStream=!1;hj(a,b,0);z(g)})}
319
321
  function hj(a,b,c){var d=b.type;if(d!=pc||a.i.has(d))b.Ka=(new tc(function(){var e;return L(function(f){if(1==f.g)return C(f,2),u(f,qj(a,b),4);if(2!=f.g)return va(f,0);e=E(f);if(a.g)a.g.onError(e);z(f)})})).S(c)}function cj(a){null!=a.Ka&&(a.Ka.stop(),a.Ka=null)}function dj(a){return L(function(b){return a.ua?u(b,a.ua.abort(),0):b.B(0)})}function sj(a,b){return L(function(c){if(1==c.g)return u(c,Fe(a.D),2);ef(a.j);a.g.onError(b);b.handled||a.h.failureCallback(b);z(c)})};function Dj(a,b){var c=Ej(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Fj(d)});this.s=new df(function(){return Gj(d)})}Dj.prototype.destroy=function(){return this.s.destroy()};function Gj(a){var b,c,d;return L(function(e){if(1==e.g)return a.h&&a.h.abort(),Hj(a),u(e,a.u,2);a.g&&a.g.Ga.nb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ga.nb();a.g=null;a.m=[];a.j=null;z(e)})}
320
- function Ij(a,b){var c={Gb:function(){},Mc:function(){},nb:function(){},onError:function(){},Oc:function(){},Lg:function(){}};a.m.push({create:b,Ga:c});a.h&&a.h.abort();Hj(a);return c}
321
- function Fj(a){return L(function(b){if(a.s.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.jb)var c=!1;else{a.g&&(a.g.Ga.nb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ga.Gb(),a.g={node:d.node,payload:d.payload,jb:d.jb,Ga:c.Ga}):c.Ga.Oc();c=!0}c?c=Promise.resolve():a.g?c=Jj(a):(a.j.Df(a.i),a.o=new rc,c=a.o);b=u(b,c,1)}return b})}
322
- function Jj(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.hf(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.Ue(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ga.Mc(),a.g=null);va(d,0);break;case 2:b=E(d);if(7001==b.code)a.g.Ga.nb();else a.g.Ga.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Hj(a){a.o&&(a.o.resolve(),a.o=null)};function Kj(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}r=Kj.prototype;r.remove=function(a,b){if(!this.g)return!1;Lj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
323
- r.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n,p){return n+"<"+p+">"},"");h=h.reduceRight(function(n,p){return n+"</"+p+">"},"");return g.lineBreak||g.spacer?(g.spacer&&Kb("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=
324
- g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=t(c);for(var f=c.next();!f.done;e={ub:e.ub},f=c.next())e.ub=f.value,a.some(function(g){return function(h){return h.startTime==g.ub.startTime&&h.endTime==g.ub.endTime&&h.text==g.ub.payload?!0:!1}}(e))||(f=Mj(e.ub))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
325
- d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=t(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};r.destroy=function(){this.g&&(Lj(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"};
322
+ function Ij(a,b){var c={Gb:function(){},Nc:function(){},nb:function(){},onError:function(){},Pc:function(){},Mg:function(){}};a.m.push({create:b,Ga:c});a.h&&a.h.abort();Hj(a);return c}
323
+ function Fj(a){return L(function(b){if(a.s.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.jb)var c=!1;else{a.g&&(a.g.Ga.nb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ga.Gb(),a.g={node:d.node,payload:d.payload,jb:d.jb,Ga:c.Ga}):c.Ga.Pc();c=!0}c?c=Promise.resolve():a.g?c=Jj(a):(a.j.Ef(a.i),a.o=new rc,c=a.o);b=u(b,c,1)}return b})}
324
+ function Jj(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.jf(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.Ve(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ga.Nc(),a.g=null);va(d,0);break;case 2:b=E(d);if(7001==b.code)a.g.Ga.nb();else a.g.Ga.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Hj(a){a.o&&(a.o.resolve(),a.o=null)};function Kj(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}r=Kj.prototype;r.remove=function(a,b){if(!this.g)return!1;Lj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
325
+ r.append=function(a){function b(h,k){for(var l=t(h),m=l.next();!m.done;m=l.next())if(m=m.value,m.isContainer)b(m.nestedCues,k);else{var n=m.clone();n.nestedCues=[];n.payload=c(m);k.push(n)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},"");k=k.reduceRight(function(p,q){return p+"</"+q+">"},"");return h.lineBreak||h.spacer?(h.spacer&&Kb("shaka.extern.Cue",
326
+ "Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(c).join(""):l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=t(d);for(var g=d.next();!g.done;f={ub:f.ub},g=d.next())f.ub=g.value,a.some(function(h){return function(k){return k.startTime==h.ub.startTime&&k.endTime==h.ub.endTime&&k.text==h.ub.payload?!0:!1}}(f))||(g=Mj(f.ub))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=
327
+ k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-e.indexOf(k)});a=t(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};r.destroy=function(){this.g&&(Lj(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"};
326
328
  function Mj(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
327
- function Lj(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}M("shaka.text.SimpleTextDisplayer",Kj);Kj.prototype.setTextVisibility=Kj.prototype.setTextVisibility;Kj.prototype.isTextVisible=Kj.prototype.isTextVisible;Kj.prototype.destroy=Kj.prototype.destroy;Kj.prototype.append=Kj.prototype.append;Kj.prototype.remove=Kj.prototype.remove;function Nj(){}function Oj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Nj);Nj.removeAllChildren=Oj;function Pj(a,b){var c=this;this.j=!1;this.i=[];this.u=a;this.m=b;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.m.appendChild(this.g);this.s=(new O(function(){Qj(c)})).Ca(.25);this.h=new Map;this.o=new ff;this.o.A(document,"fullscreenchange",function(){Qj(c,!0)});this.l=null;"ResizeObserver"in
328
- window&&(this.l=new ResizeObserver(function(){Qj(c,!0)}),this.l.observe(this.g))}r=Pj.prototype;r.append=function(a){var b=[].concat(ja(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={pc:c.pc},d=a.next())c.pc=d.value,b.some(function(e){return function(f){return tb(f,e.pc)}}(c))||this.i.push(c.pc);Qj(this)};
329
- r.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.s&&this.s.stop();this.h.clear();this.o&&(this.o.release(),this.o=null);this.l&&(this.l.disconnect(),this.l=null)};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Qj(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
330
- function Rj(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.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Ee:null;l&&(g.push(l.ae),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Sj(a,k,e),l=a.h.get(k),n=l.Ee,f=!0));0<k.nestedCues.length&&n&&Rj(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,q){return p.startTime!=q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});
331
- h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),c.appendChild(d.ae)}}function Qj(a,b){if(a.g){var c=a.u.currentTime;(!a.j||(void 0===b?0:b))&&0<a.h.size&&(Oj(a.g),a.h.clear());if(a.j){for(var d=new Map,e=t(a.h.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));Rj(a,a.i,a.g,c,[])}}}
332
- function Sj(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Kb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Tj(a,f,b,c,d);c=f;d&&(c=document.createElement("span"),c.classList.add("shaka-text-wrapper"),c.style.backgroundColor=b.backgroundColor,f.appendChild(c));a.h.set(b,{ae:f,Ee:c})}
329
+ function Lj(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}M("shaka.text.SimpleTextDisplayer",Kj);Kj.prototype.setTextVisibility=Kj.prototype.setTextVisibility;Kj.prototype.isTextVisible=Kj.prototype.isTextVisible;Kj.prototype.destroy=Kj.prototype.destroy;Kj.prototype.append=Kj.prototype.append;Kj.prototype.remove=Kj.prototype.remove;function Nj(){}function Oj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Nj);Nj.removeAllChildren=Oj;function Pj(a,b){var c=this;this.j=!1;this.i=[];this.C=a;this.m=b;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.m.appendChild(this.g);this.u=(new O(function(){Qj(c)})).Ca(.25);this.h=new Map;this.s=new ff;this.s.A(document,"fullscreenchange",function(){Qj(c,!0)});this.l=null;"ResizeObserver"in
330
+ window&&(this.l=new ResizeObserver(function(){Qj(c,!0)}),this.l.observe(this.g));this.o=new Map}r=Pj.prototype;r.append=function(a){var b=[].concat(ja(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={qc:c.qc},d=a.next())c.qc=d.value,b.some(function(e){return function(f){return tb(f,e.qc)}}(c))||this.i.push(c.qc);Qj(this)};
331
+ r.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.u&&this.u.stop();this.h.clear();this.s&&(this.s.release(),this.s=null);this.l&&(this.l.disconnect(),this.l=null)};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Qj(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
332
+ function Rj(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.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Fe:null;l&&(g.push(l.nd),l.kc&&g.push(l.kc),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Sj(a,k,e),l=a.h.get(k),n=l.Fe,f=!0));0<k.nestedCues.length&&n&&Rj(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!=q.startTime?
333
+ p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.kc?(c.appendChild(d.kc),d.kc.appendChild(d.nd)):c.appendChild(d.nd)}}function Qj(a,b){if(a.g){var c=a.C.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=t(a.o.values()),e=d.next();!e.done;e=d.next())Oj(e.value);Oj(a.g);a.h.clear();a.o.clear()}if(a.j){d=new Map;e=t(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));Rj(a,a.i,a.g,c,[])}}}
334
+ function Sj(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Kb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Tj(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.o.has(c.id))c=a.o.get(c.id);else{e=document.createElement("span");var g=c.heightUnits==Ab?"%":"px",h=c.widthUnits==Ab?"%":"px",k=c.viewportAnchorUnits==Ab?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");
335
+ e.style.height=c.height+g;e.style.width=c.width+h;e.style.position="absolute";e.style.top=c.viewportAnchorY+k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.o.set(c.id,e);c=e}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{nd:f,
336
+ Fe:e,kc:c})}
333
337
  function Tj(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=Uj(c.linePadding,c,a.m);f.paddingRight=Uj(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
334
338
  "contain",f.backgroundPosition="center";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=Vj(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?
335
- "center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Uj(c.fontSize,c,a.m);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==nb?(f.width="100%",c.lineAlign==pb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==pb?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height=
336
- "100%",c.lineAlign==pb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Ab?"%":"px",d=c.region.viewportAnchorUnits==Ab?"%":"px",f.height=c.region.height+(c.region.heightUnits==Ab?"%":"px"),f.width=c.region.width+a,f.position="absolute",f.top=c.region.viewportAnchorY+d,f.left=c.region.viewportAnchorX+d);f.lineHeight=c.lineHeight;c.position&&(c.writingMode==nb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat=
337
- "left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==nb?f.width=c.size+"%":f.height=c.size+"%")}
338
- function Uj(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 Vj(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Pj);Pj.prototype.setTextVisibility=Pj.prototype.setTextVisibility;
339
- Pj.prototype.isTextVisible=Pj.prototype.isTextVisible;Pj.prototype.remove=Pj.prototype.remove;Pj.prototype.destroy=Pj.prototype.destroy;Pj.prototype.append=Pj.prototype.append;function Wj(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},
339
+ "center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Uj(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==nb?(f.width="100%",c.lineAlign==pb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==pb?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height=
340
+ "100%",c.lineAlign==pb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%")));f.lineHeight=c.lineHeight;c.position&&(c.writingMode==nb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&
341
+ (c.writingMode==nb?f.width=c.size+"%":f.height=c.size+"%")}function Uj(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 Vj(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Pj);
342
+ Pj.prototype.setTextVisibility=Pj.prototype.setTextVisibility;Pj.prototype.isTextVisible=Pj.prototype.isTextVisible;Pj.prototype.remove=Pj.prototype.remove;Pj.prototype.destroy=Pj.prototype.destroy;Pj.prototype.append=Pj.prototype.append;function Wj(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},
340
343
  "");k=k.reduceRight(function(p,q){return p+"</"+q+">"},"");return h.lineBreak||h.spacer?(h.spacer&&Kb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=t(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");
341
344
  break;case "right":k.push("align:right");break;case mb:k.push("align:middle");break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}M("shaka.text.WebVttGenerator",function(){});function Xj(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function Yj(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?Zj:ak};d.ot=bk(c);var e=d.ot===ck||d.ot===dk||d.ot===ek||d.ot===fk;e&&(d.bl=gk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==fk&&(d.tb=hk(a,d.ot)/1E3);ik(a,b,d)}}catch(f){Va("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
342
345
  function jk(a,b,c){try{if(!a.g.enabled)return b;var d=kk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=ek;break a;case "application/x-mpegurl":e=lk;break a}e=void 0}d.ot=e;d.su=!0;var f=mk(d);return nk(b,f)}catch(g){return Va("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function ok(a,b){try{if(!a.g.enabled)return b;var c=kk(a);c.ot=pk;c.su=!0;var d=mk(c);return nk(b,d)}catch(e){return Va("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),b}}
343
- function kk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function ik(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,kk(a));c.pr=a.h.Fc();var e=c.ot===ck||c.ot===ek;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=qk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=mk(c);f&&(b.uris=b.uris.map(function(g){return nk(g,f)}))}}}
346
+ function kk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function ik(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,kk(a));c.pr=a.h.Gc();var e=c.ot===ck||c.ot===ek;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=qk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=mk(c);f&&(b.uris=b.uris.map(function(g){return nk(g,f)}))}}}
344
347
  function bk(a){var b=a.type;if(a.init)return rk;if("video"==b)return a.codecs.includes(",")?ek:ck;if("audio"==b)return dk;if("text"==b)return"application/mp4"===a.mimeType?fk:pk}function gk(a,b){var c=a.h.Ya()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
345
348
  function hk(a,b){var c=a.h.ib();if(!c.length)return NaN;var d=c[0];c=t(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case ck:return d.videoBandwidth||NaN;case dk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
346
349
  function mk(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"===
347
350
  l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function qk(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=mk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
348
- function nk(a,b){if(!b||a.includes("offline:"))return a;var c=new Xb(a);c.g.set("CMCD",b);return c.toString()}var lk="m",dk="a",ck="v",ek="av",rk="i",pk="c",fk="tt",ak="v",Zj="l";M("shaka.util.CmcdManager.StreamingFormat",{hg:"d",og:"h",yg:"s",ug:"o"});function sk(){}
351
+ function nk(a,b){if(!b||a.includes("offline:"))return a;var c=new Xb(a);c.g.set("CMCD",b);return c.toString()}var lk="m",dk="a",ck="v",ek="av",rk="i",pk="c",fk="tt",ak="v",Zj="l";M("shaka.util.CmcdManager.StreamingFormat",{ig:"d",pg:"h",zg:"s",vg:"o"});function sk(){}
349
352
  function tk(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Pe(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Pe(l)),k=tk(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ta("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ua("Unexpected number of arguments for "+k),a[h]=b[h]):(Ta("Invalid config, unrecognized key "+
350
353
  k),g=!1)}return g}function uk(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 vk(a,b){return a&&b}M("shaka.util.ConfigUtils",sk);sk.convertToConfigObject=uk;sk.mergeConfigObjects=tk;function wk(){}
351
354
  function xk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ee(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Wf,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Ee(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
352
355
  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:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},
353
356
  manifestPreprocessor:function(g){return vk([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E"}},d={retryParameters:Ee(),failureCallback:function(g){return vk([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,
354
- safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||zc()||Ac())d.gapDetectionThreshold=.5;if(yc("Web0S")||zc()||Ac())d.stallSkip=0;var e={trackSelectionCallback:function(g){return L(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;
357
+ safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||zc()||Bc())d.gapDetectionThreshold=.5;if(Ac()||zc()||Bc())d.stallSkip=0;var e={trackSelectionCallback:function(g){return L(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;
355
358
  return L(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return vk([g,h],void 0)},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new ne},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,
356
359
  maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,
357
360
  maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return L(function(h){return h["return"](yk(g,f.preferredAudioLanguage))})};return f}
358
361
  function zk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return tk(a,b,c||xk(),d,"")}
359
362
  function yk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=yd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return rd(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
360
363
  2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=pc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",wk);wk.mergeConfigObjects=zk;function Ak(){this.g=null;this.h=[]}function Bk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Ck(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
361
- function Dk(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 Ek(){this.i=this.h=null;this.g=[]}function Fk(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 Gk(){this.o=this.s=this.F=this.C=this.m=this.j=this.D=this.l=this.i=this.G=this.I=this.L=this.u=this.N=NaN;this.g=new Ak;this.h=new Ek};function U(a,b){Oe.call(this);var c=this;this.l=Hk;this.zc=this.g=null;this.ja=!1;this.Cc=new ff;this.Tb=new ff;this.o=new ff;this.pd=this.s=this.Sb=this.i=this.Ic=this.I=this.j=this.wa=this.W=this.Jc=this.L=this.Ac=this.G=this.wb=this.D=this.N=this.m=this.F=null;this.Ed=1E9;this.h=Ik(this);this.Bd={width:Infinity,height:Infinity};this.u=null;this.La=new ve(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ma=this.h.preferredTextLanguage;this.Wb=this.h.preferredTextRole;
362
- this.Ub=this.h.preferForcedSubs;this.Mb=[];this.Xb=null;b&&b(this);this.F=Jk(this);this.F.Qd(this.h.streaming.forceHTTPS);this.C=null;Kk&&(this.C=Sb(Kk));this.Cc.A(window,"online",function(){c.Ld()});this.V={name:"detach"};this.ca={name:"attach"};this.fa={name:"unload"};this.Hd={name:"manifest-parser"};this.wd={name:"manifest"};this.vb={name:"media-source"};this.qd={name:"drm-engine"};this.da={name:"load"};this.Id={name:"src-equals-drm-engine"};this.xb={name:"src-equals"};var d=new Map;d.set(this.ca,
363
- function(e,f){return Ke(Lk(c,e,f))});d.set(this.V,function(e){e.J&&(c.Tb.Sa(),e.J=null);c.C&&c.C.release();c.g=null;e=Promise.resolve();return Ke(e)});d.set(this.fa,function(e){return Ke(Mk(c,e))});d.set(this.vb,function(e){e=Nk(c,e);return Ke(e)});d.set(this.Hd,function(e,f){var g=Ok(c,e,f);return Ke(g)});d.set(this.wd,function(e){return Pk(c,e)});d.set(this.qd,function(e){e=Qk(c,e);return Ke(e)});d.set(this.da,function(e,f){return Ke(Rk(c,e,f))});d.set(this.Id,function(e,f){var g=Sk(c,e,f);return Ke(g)});
364
- d.set(this.xb,function(e,f){return Tk(c,e,f)});this.xa=new Dj(this.V,{hf:function(e,f,g,h){var k=null;e==c.V&&(k=g==c.V?c.V:c.ca);e==c.ca&&(k=g==c.V||f.J!=h.J?c.V:g==c.ca?c.ca:g==c.vb||g==c.da?c.vb:g==c.xb?c.Id:null);e==c.vb&&(k=g==c.da&&f.J==h.J?c.Hd:c.fa);e==c.Hd&&(k=Uk(c.da,c.wd,c.fa,g,f,h));e==c.wd&&(k=Uk(c.da,c.qd,c.fa,g,f,h));e==c.qd&&(k=Uk(c.da,c.da,c.fa,g,f,h));e==c.Id&&(k=g==c.xb&&f.J==h.J?c.xb:c.fa);if(e==c.da||e==c.xb)k=c.fa;e==c.fa&&(k=h.J&&f.J==h.J?c.ca:c.V);return k},Ue:function(e,f,
365
- g){c.dispatchEvent(Vk(Wk,(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,Mk(c,e),2):f["return"](e.J?c.ca:c.V)})},Df:function(e){c.dispatchEvent(Vk(Xk,(new Map).set("state",e.name)))}});a&&this.Vb(a,!0)}qa(U,Oe);function Vk(a,b){return new Q(a,b)}r=U.prototype;
366
- r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==Yk)return c["return"]();a.l=Yk;b=Ij(a.xa,function(){return{node:a.V,payload:Ej(),jb:!1}});return u(c,new Promise(function(d){b.Gb=function(){};b.Mc=function(){d()};b.nb=function(){d()};b.onError=function(){d()};b.Oc=function(){d()}}),2);case 2:return u(c,a.xa.destroy(),3);case 3:a.Cc&&(a.Cc.release(),a.Cc=null);a.Tb&&(a.Tb.release(),a.Tb=null);a.o&&(a.o.release(),a.o=null);a.pd=null;a.s=null;a.h=null;a.u=null;a.zc=null;
364
+ function Dk(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 Ek(){this.i=this.h=null;this.g=[]}function Fk(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 Gk(){this.o=this.s=this.F=this.C=this.m=this.j=this.D=this.l=this.i=this.G=this.I=this.L=this.u=this.N=NaN;this.g=new Ak;this.h=new Ek};function U(a,b){Oe.call(this);var c=this;this.l=Hk;this.Ac=this.g=null;this.ja=!1;this.Dc=new ff;this.Tb=new ff;this.o=new ff;this.rd=this.s=this.Sb=this.i=this.Jc=this.I=this.j=this.wa=this.W=this.Kc=this.L=this.Bc=this.G=this.wb=this.D=this.N=this.m=this.F=null;this.Gd=1E9;this.h=Ik(this);this.Dd={width:Infinity,height:Infinity};this.u=null;this.La=new ve(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ma=this.h.preferredTextLanguage;this.Wb=this.h.preferredTextRole;
365
+ this.Ub=this.h.preferForcedSubs;this.Mb=[];this.Xb=null;b&&b(this);this.F=Jk(this);this.F.Sd(this.h.streaming.forceHTTPS);this.C=null;Kk&&(this.C=Sb(Kk));this.Dc.A(window,"online",function(){c.Nd()});this.V={name:"detach"};this.ca={name:"attach"};this.fa={name:"unload"};this.Jd={name:"manifest-parser"};this.yd={name:"manifest"};this.vb={name:"media-source"};this.sd={name:"drm-engine"};this.da={name:"load"};this.Kd={name:"src-equals-drm-engine"};this.xb={name:"src-equals"};var d=new Map;d.set(this.ca,
366
+ function(e,f){return Ke(Lk(c,e,f))});d.set(this.V,function(e){e.J&&(c.Tb.Sa(),e.J=null);c.C&&c.C.release();c.g=null;e=Promise.resolve();return Ke(e)});d.set(this.fa,function(e){return Ke(Mk(c,e))});d.set(this.vb,function(e){e=Nk(c,e);return Ke(e)});d.set(this.Jd,function(e,f){var g=Ok(c,e,f);return Ke(g)});d.set(this.yd,function(e){return Pk(c,e)});d.set(this.sd,function(e){e=Qk(c,e);return Ke(e)});d.set(this.da,function(e,f){return Ke(Rk(c,e,f))});d.set(this.Kd,function(e,f){var g=Sk(c,e,f);return Ke(g)});
367
+ d.set(this.xb,function(e,f){return Tk(c,e,f)});this.xa=new Dj(this.V,{jf:function(e,f,g,h){var k=null;e==c.V&&(k=g==c.V?c.V:c.ca);e==c.ca&&(k=g==c.V||f.J!=h.J?c.V:g==c.ca?c.ca:g==c.vb||g==c.da?c.vb:g==c.xb?c.Kd:null);e==c.vb&&(k=g==c.da&&f.J==h.J?c.Jd:c.fa);e==c.Jd&&(k=Uk(c.da,c.yd,c.fa,g,f,h));e==c.yd&&(k=Uk(c.da,c.sd,c.fa,g,f,h));e==c.sd&&(k=Uk(c.da,c.da,c.fa,g,f,h));e==c.Kd&&(k=g==c.xb&&f.J==h.J?c.xb:c.fa);if(e==c.da||e==c.xb)k=c.fa;e==c.fa&&(k=h.J&&f.J==h.J?c.ca:c.V);return k},Ve:function(e,f,
368
+ g){c.dispatchEvent(Vk(Wk,(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,Mk(c,e),2):f["return"](e.J?c.ca:c.V)})},Ef:function(e){c.dispatchEvent(Vk(Xk,(new Map).set("state",e.name)))}});a&&this.Vb(a,!0)}qa(U,Oe);function Vk(a,b){return new Q(a,b)}r=U.prototype;
369
+ r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==Yk)return c["return"]();a.l=Yk;b=Ij(a.xa,function(){return{node:a.V,payload:Ej(),jb:!1}});return u(c,new Promise(function(d){b.Gb=function(){};b.Nc=function(){d()};b.nb=function(){d()};b.onError=function(){d()};b.Pc=function(){d()}}),2);case 2:return u(c,a.xa.destroy(),3);case 3:a.Dc&&(a.Dc.release(),a.Dc=null);a.Tb&&(a.Tb.release(),a.Tb=null);a.o&&(a.o.release(),a.o=null);a.rd=null;a.s=null;a.h=null;a.u=null;a.Ac=null;
367
370
  a.W=null;if(!a.F){c.B(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:Oe.prototype.release.call(a),z(c)}})};r.Vb=function(a,b){b=void 0===b?!0:b;if(this.l==Yk)return Promise.reject(Zk());var c=Ej();c.J=a;uc()||(b=!1);var d=b?this.vb:this.ca,e=Ij(this.xa,function(){return{node:d,payload:c,jb:!1}});e.Gb=function(){};return $k(e)};r.detach=function(){var a=this;if(this.l==Yk)return Promise.reject(Zk());var b=Ij(this.xa,function(){return{node:a.V,payload:Ej(),jb:!1}});b.Gb=function(){};return $k(b)};
368
- r.Xd=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Yk)return Promise.reject(Zk());uc()||(a=!1);var c=Ej(),d=Ij(this.xa,function(e){var f=e.J&&a?b.vb:e.J?b.ca:b.V;c.J=e.J;return{node:f,payload:c,jb:!1}});d.Gb=function(){};return $k(d)};r.cg=function(a){this.Xb=a};
369
- r.load=function(a,b,c){var d=this;this.Xb=null;if(this.l==Yk)return Promise.reject(Zk());this.dispatchEvent(Vk(al));var e=Ej();e.uri=a;e.Ud=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=bl(this,e)?this.xb:this.da,g=Ij(this.xa,function(h){if(null==h.J)return null;e.J=h.J;return{node:f,payload:e,jb:!0}});this.u=new Gk;this.W=cl(this);g.Gb=function(){};return new Promise(function(h,k){g.Oc=function(){return k(new N(2,7,7002))};g.Mc=function(){h();d.dispatchEvent(Vk(dl))};g.nb=function(){return k(Zk())};
370
- g.onError=function(l){return k(l)}})};function bl(a,b){if(!uc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=hg(d),c=el[c]);if(c){if(""==(b.J||wc()).canPlayType(c))return!1;if(!uc()||!(c in gg||hg(d)in ig)||a.h.streaming.preferNativeHls)return!0;if(Bc())return a.h.streaming.useNativeHlsOnSafari}return!1}function Lk(a,b,c){null==b.J&&(b.J=c.J,a.Tb.A(b.J,"error",function(){var d=fl(a);d&&gl(a,d)}));a.g=b.J;return Promise.resolve()}
371
- function Mk(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return a.l!=Yk&&(a.l=Hk),c=a.Mb.map(function(p){return p()}),a.Mb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Vk(hl));b.mimeType=null;b.startTime=null;b.uri=null;b.J&&a.o.Sa();a.wb&&(a.wb.release(),a.wb=null);a.Ac&&(a.Ac.stop(),a.Ac=null);if(!a.I){n.B(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.Ic=null;case 3:if(!a.s){n.B(5);break}return u(n,a.s.stop(),5);case 5:if(!a.j){n.B(7);break}return u(n,a.j.destroy(),
371
+ r.Zd=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Yk)return Promise.reject(Zk());uc()||(a=!1);var c=Ej(),d=Ij(this.xa,function(e){var f=e.J&&a?b.vb:e.J?b.ca:b.V;c.J=e.J;return{node:f,payload:c,jb:!1}});d.Gb=function(){};return $k(d)};r.dg=function(a){this.Xb=a};
372
+ r.load=function(a,b,c){var d=this;this.Xb=null;if(this.l==Yk)return Promise.reject(Zk());this.dispatchEvent(Vk(al));var e=Ej();e.uri=a;e.Wd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=bl(this,e)?this.xb:this.da,g=Ij(this.xa,function(h){if(null==h.J)return null;e.J=h.J;return{node:f,payload:e,jb:!0}});this.u=new Gk;this.W=cl(this);g.Gb=function(){};return new Promise(function(h,k){g.Pc=function(){return k(new N(2,7,7002))};g.Nc=function(){h();d.dispatchEvent(Vk(dl))};g.nb=function(){return k(Zk())};
373
+ g.onError=function(l){return k(l)}})};function bl(a,b){if(!uc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=hg(d),c=el[c]);if(c){if(""==(b.J||wc()).canPlayType(c))return!1;if(!uc()||!(c in gg||hg(d)in ig)||a.h.streaming.preferNativeHls)return!0;if(Cc())return a.h.streaming.useNativeHlsOnSafari}return!1}function Lk(a,b,c){null==b.J&&(b.J=c.J,a.Tb.A(b.J,"error",function(){var d=fl(a);d&&gl(a,d)}));a.g=b.J;return Promise.resolve()}
374
+ function Mk(a,b){var c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return a.l!=Yk&&(a.l=Hk),c=a.Mb.map(function(p){return p()}),a.Mb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Vk(hl));b.mimeType=null;b.startTime=null;b.uri=null;b.J&&a.o.Sa();a.wb&&(a.wb.release(),a.wb=null);a.Bc&&(a.Bc.stop(),a.Bc=null);if(!a.I){n.B(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.Jc=null;case 3:if(!a.s){n.B(5);break}return u(n,a.s.stop(),5);case 5:if(!a.j){n.B(7);break}return u(n,a.j.destroy(),
372
375
  8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.D&&(a.D.release(),a.D=null);if(!a.N){n.B(9);break}return u(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.C)a.C.onAssetUnload();if(!b.J||!b.J.src){n.B(11);break}return u(n,new Promise(function(p){return(new O(p)).S(.1)}),12);case 12:for(b.J.removeAttribute("src"),b.J.load();b.J.lastChild;)b.J.removeChild(b.J.firstChild);case 11:if(!a.m){n.B(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Sb=null;a.L=null;if(a.i){d=t(a.i.variants);
373
- for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.u=new Gk;a.rd=null;il(a);z(n)}})}
374
- function Nk(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=new Hh,d=a.h.textDisplayFactory,e=Sb(d),a.rd=d,f=jl(b.J,c,e,function(h,k,l){h=t(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,q=t(m.frames),v=q.next();!v.done;v=q.next())kl(a,n,p,"ID3",v.value);if(a.C)a.C.onHlsTimedMetadata(m,n)}}),u(g,f.D,2);a.N=f;z(g)})}
375
- function Ok(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.Sb=d,f=a,u(h,fg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Ic=h.h;a.I=Sb(a.Ic);g=Pe(a.h.manifest);c.J&&"AUDIO"===c.J.nodeName&&(g.disableVideo=!0);a.I.configure(g);z(h)})}
376
- function Pk(a,b){var c=b.uri,d=a.F;a.Jc=new Ui(function(){return a.kc()});a.Jc.addEventListener("regionadd",function(g){g=g.region;ll(a,ml,g);if(a.C)a.C.onDashTimedMetadata(g)});a.wa=null;a.h.streaming.observeQualityChanges&&(a.wa=new Qi(function(){return a.Ya()}),a.wa.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
376
+ for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.u=new Gk;a.td=null;il(a);z(n)}})}
377
+ function Nk(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=new Hh,d=a.h.textDisplayFactory,e=Sb(d),a.td=d,f=jl(b.J,c,e,function(h,k,l){h=t(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,q=t(m.frames),v=q.next();!v.done;v=q.next())kl(a,n,p,"ID3",v.value);if(a.C)a.C.onHlsTimedMetadata(m,n)}}),u(g,f.D,2);a.N=f;z(g)})}
378
+ function Ok(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.Sb=d,f=a,u(h,fg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Jc=h.h;a.I=Sb(a.Jc);g=Pe(a.h.manifest);c.J&&"AUDIO"===c.J.nodeName&&(g.disableVideo=!0);a.I.configure(g);z(h)})}
379
+ function Pk(a,b){var c=b.uri,d=a.F;a.Kc=new Ui(function(){return a.lc()});a.Kc.addEventListener("regionadd",function(g){g=g.region;ll(a,ml,g);if(a.C)a.C.onDashTimedMetadata(g)});a.wa=null;a.h.streaming.observeQualityChanges&&(a.wa=new Qi(function(){return a.Ya()}),a.wa.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
377
380
  mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(Vk(nl,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.o=h.format,ik(k,g,{ot:lk,su:!k.i}))}catch(l){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){Yj(a.W,g,h)},filter:function(g){return ol(a,g)},makeTextStreamsForClosedCaptions:function(g){return pl(a,g)},
378
- onTimelineRegionAdded:function(g){var h=a.Jc;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new Q("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return gl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
381
+ onTimelineRegionAdded:function(g){var h=a.Kc;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new Q("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return gl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
379
382
  enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Ge(function(){var g,h,k,l;return L(function(m){if(1==m.g)return g=a,u(m,a.I.start(c,e),2);g.i=m.h;h=Vk(ql);a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);rl(a.i);k=Date.now()/1E3;l=k-f;a.u.D=l;z(m)})}(),function(){return a.I.stop()})}
380
- function Qk(a,b){var c,d;return L(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=sl(a,{mb:a.F,onError:function(f){gl(a,f)},Nc:function(f){tl(a,f)},onExpirationUpdated:function(f,g){ul(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==vl&&d&&(d=!1,a.u.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,Af(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Vb(b.J),3):u(e,ol(a,a.i),0)})}
381
- function Rk(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Xb&&(b.startTime=a.Xb,a.Xb=null);d=b.J;e=b.uri;a.Sb=e;a.G=new Mi({Hc:function(){return d.playbackRate},Dc:function(){return d.defaultPlaybackRate},Sd:function(w){d.playbackRate=w},pe:function(w){d.currentTime+=w}});f=function(){return wl(a)};g=function(){return xl(a)};a.o.A(d,"playing",f);a.o.A(d,"pause",f);a.o.A(d,"ended",f);a.o.A(d,"ratechange",g);h=a.h.abrFactory;a.s&&a.pd==h||
382
- (a.pd=h,a.s=Sb(h),"function"!=typeof a.s.playbackRateChanged&&(Kb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.s.playbackRateChanged=function(){}),a.s.configure(a.h.abr));a.La=new ve(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ma=a.h.preferredTextLanguage;a.Wb=a.h.preferredTextRole;a.Ub=a.h.preferForcedSubs;yl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(w,x,D){a.j&&w!=a.j.l&&zl(a,w,!0,void 0===
383
+ function Qk(a,b){var c,d;return L(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=sl(a,{mb:a.F,onError:function(f){gl(a,f)},Oc:function(f){tl(a,f)},onExpirationUpdated:function(f,g){ul(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==vl&&d&&(d=!1,a.u.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,Af(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Vb(b.J),3):u(e,ol(a,a.i),0)})}
384
+ function Rk(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Xb&&(b.startTime=a.Xb,a.Xb=null);d=b.J;e=b.uri;a.Sb=e;a.G=new Mi({Ic:function(){return d.playbackRate},Ec:function(){return d.defaultPlaybackRate},Ud:function(w){d.playbackRate=w},qe:function(w){d.currentTime+=w}});f=function(){return wl(a)};g=function(){return xl(a)};a.o.A(d,"playing",f);a.o.A(d,"pause",f);a.o.A(d,"ended",f);a.o.A(d,"ratechange",g);h=a.h.abrFactory;a.s&&a.rd==h||
385
+ (a.rd=h,a.s=Sb(h),"function"!=typeof a.s.playbackRateChanged&&(Kb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.s.playbackRateChanged=function(){}),a.s.configure(a.h.abr));a.La=new ve(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ma=a.h.preferredTextLanguage;a.Wb=a.h.preferredTextRole;a.Ub=a.h.preferForcedSubs;yl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(w,x,D){a.j&&w!=a.j.l&&zl(a,w,!0,void 0===
383
386
  x?!1:x,void 0===D?0:D)});a.D=Al(a,b.startTime);a.wb=Bl(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Cl(a,k);Bd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Dl(a);a.j.configure(a.h.streaming);a.l=El;d.textTracks&&a.o.A(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "chapters":Fl(a,w)}});a.dispatchEvent(Vk(Gl));l=null;if(m=a.ib().find(function(w){return w.active})){y.B(2);break}l=
384
- Hl(a)?a.s.chooseVariant():null;zl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.B(3);break}n=a.D.m();return u(y,Il(l,n),4);case 4:p=y.h,a.D.o(p);case 3:Jl(a,null,$d(l));case 2:return q=a.hb().find(function(w){return w.active}),q||((v=ke(a.i.textStreams,a.Ma,a.Wb,a.Ub)[0]||null)&&Fk(a.u.h,v,!0),l&&(v?(l.audio&&Kl(a,l.audio,v)&&(a.ja=!0),a.ja&&a.N.l.setTextVisibility(!0),Ll(a)):a.ja=!1),v&&(a.h.streaming.alwaysStreamText||a.od())&&mj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.s.enable(),
385
- Ml(a)),Rd(a.j?a.j.l:null,a.i),Nl(a.i),Ol(a),Hl(a),a.i.variants.some(function(w){return w.primary}),a.o.oa(d,"loadedmetadata",function(){a.u.l=Date.now()/1E3-c.Ud}),z(y)}})}
386
- function Sk(a,b,c){var d,e,f,g,h,k,l;return L(function(m){return 1==m.g?(d=qc,e=Date.now()/1E3,f=!0,a.m=sl(a,{mb:a.F,onError:function(n){gl(a,n)},Nc:function(n){tl(a,n)},onExpirationUpdated:function(n,p){ul(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==vl&&f&&(f=!1,a.u.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=hg(g),k=el[h],"application/x-mpegurl"==k&&Bc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
387
+ Hl(a)?a.s.chooseVariant():null;zl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.B(3);break}n=a.D.m();return u(y,Il(l,n),4);case 4:p=y.h,a.D.o(p);case 3:Jl(a,null,$d(l));case 2:return q=a.hb().find(function(w){return w.active}),q||((v=je(a.i.textStreams,a.Ma,a.Wb,a.Ub)[0]||null)&&Fk(a.u.h,v,!0),l&&(v?(l.audio&&Kl(a,l.audio,v)&&(a.ja=!0),a.ja&&a.N.l.setTextVisibility(!0),Ll(a)):a.ja=!1),v&&(a.h.streaming.alwaysStreamText||a.qd())&&mj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.s.enable(),
388
+ Ml(a)),Rd(a.j?a.j.l:null,a.i),Nl(a.i),Ol(a),Hl(a),a.i.variants.some(function(w){return w.primary}),a.o.oa(d,"loadedmetadata",function(){a.u.l=Date.now()/1E3-c.Wd}),z(y)}})}
389
+ function Sk(a,b,c){var d,e,f,g,h,k,l;return L(function(m){return 1==m.g?(d=qc,e=Date.now()/1E3,f=!0,a.m=sl(a,{mb:a.F,onError:function(n){gl(a,n)},Oc:function(n){tl(a,n)},onExpirationUpdated:function(n,p){ul(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==vl&&f&&(f=!1,a.u.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=hg(g),k=el[h],"application/x-mpegurl"==k&&Cc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
387
390
  createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?ed(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,u(m,Af(a.m,[l],[]),2)):u(m,a.m.Vb(b.J),
388
391
  0)})}
389
- function Tk(a,b,c){function d(){return wl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Sb=b.uri;var e=b.J;a.D=new Ci(e);var f=!1;a.Mb.push(function(){f=!0});null!=b.startTime&&a.D.o(b.startTime);a.G=new Mi({Hc:function(){return e.playbackRate},Dc:function(){return e.defaultPlaybackRate},Sd:function(k){e.playbackRate=k},pe:function(k){e.currentTime+=k}});Cl(a,a.h.streaming.rebufferingGoal);a.o.A(e,"playing",d);a.o.A(e,"pause",d);a.o.A(e,"ended",d);a.o.A(e,"ratechange",function(){return xl(a)});"none"!=e.preload&&
390
- a.o.oa(e,"loadedmetadata",function(){a.u.l=Date.now()/1E3-c.Ud});e.audioTracks&&(a.o.A(e.audioTracks,"addtrack",function(){return Ol(a)}),a.o.A(e.audioTracks,"removetrack",function(){return Ol(a)}),a.o.A(e.audioTracks,"change",function(){return Ol(a)}));e.textTracks&&(a.o.A(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Pl(a,k);break;case "chapters":Fl(a,k);break;default:Ol(a)}}),a.o.A(e.textTracks,"removetrack",function(){return Ol(a)}),a.o.A(e.textTracks,
391
- "change",function(){return Ol(a)}));var g=hg(b.uri);e.src=jk(a.W,b.uri,el[g]);(zc()||yc("Web0S"))&&e.load();a.l=Ql;a.dispatchEvent(Vk(Gl));var h=new rc;ti(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){h.resolve()});ti(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var k;return L(function(l){if(1==l.g)return Rl(a),k=Sl(a),k.find(function(m){return"disabled"!=m.mode})?l.B(2):u(l,new Promise(function(m){a.o.oa(e.textTracks,"change",m);(new O(m)).S(1)}),2);if(f)return l["return"]();Tl(a);z(l)})});
392
- e.error?h.reject(fl(a)):"none"==e.preload&&(Ua('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.o.oa(e,"error",function(){h.reject(fl(a))});return new Ge(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
393
- function Rl(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Nd(b);var c=a.h.preferredVariantRole;""!=c&&a.Nd(b,c)}}function Tl(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Od(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Od(b,d,c)}}
392
+ function Tk(a,b,c){function d(){return wl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Sb=b.uri;var e=b.J;a.D=new Ci(e);var f=!1;a.Mb.push(function(){f=!0});null!=b.startTime&&a.D.o(b.startTime);a.G=new Mi({Ic:function(){return e.playbackRate},Ec:function(){return e.defaultPlaybackRate},Ud:function(k){e.playbackRate=k},qe:function(k){e.currentTime+=k}});Cl(a,a.h.streaming.rebufferingGoal);a.o.A(e,"playing",d);a.o.A(e,"pause",d);a.o.A(e,"ended",d);a.o.A(e,"ratechange",function(){return xl(a)});"none"!=e.preload&&
393
+ a.o.oa(e,"loadedmetadata",function(){a.u.l=Date.now()/1E3-c.Wd});e.audioTracks&&(a.o.A(e.audioTracks,"addtrack",function(){return Ol(a)}),a.o.A(e.audioTracks,"removetrack",function(){return Ol(a)}),a.o.A(e.audioTracks,"change",function(){return Ol(a)}));e.textTracks&&(a.o.A(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Pl(a,k);break;case "chapters":Fl(a,k);break;default:Ol(a)}}),a.o.A(e.textTracks,"removetrack",function(){return Ol(a)}),a.o.A(e.textTracks,
394
+ "change",function(){return Ol(a)}));var g=hg(b.uri);e.src=jk(a.W,b.uri,el[g]);(zc()||Ac())&&e.load();a.l=Ql;a.dispatchEvent(Vk(Gl));var h=new rc;ti(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){h.resolve()});ti(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var k;return L(function(l){if(1==l.g)return Rl(a),k=Sl(a),k.find(function(m){return"disabled"!=m.mode})?l.B(2):u(l,new Promise(function(m){a.o.oa(e.textTracks,"change",m);(new O(m)).S(1)}),2);if(f)return l["return"]();Tl(a);z(l)})});e.error?
395
+ h.reject(fl(a)):"none"==e.preload&&(Ua('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.o.oa(e,"error",function(){h.reject(fl(a))});return new Ge(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
396
+ function Rl(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Pd(b);var c=a.h.preferredVariantRole;""!=c&&a.Pd(b,c)}}function Tl(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Qd(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Qd(b,d,c)}}
394
397
  function Pl(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.A(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,kl(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value)});var c=(new O(function(){var d=Ul(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Lb().S(.5);a.Mb.push(function(){c.stop()})}}
395
398
  function kl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Vk(Vl,b))}function Fl(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Lb().S(.5);a.Mb.push(function(){c.stop()})}}function rl(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function sl(a,b){return new tf(b,a.h.drm.updateExpirationTime)}
396
399
  function Jk(a){return new Te(function(b,c){a.s&&a.s.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Vk(Wl,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Vk(Xl,b))})}
397
- function Al(a,b){return new Di(a.g,a.i,a.h.streaming,b,function(){a.wb&&Pi(a.wb,!0);if(a.j)for(var c=a.j,d=c.g.Gc(),e=c.h.smallGapLimit,f=t(c.i.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.i.get(g);h.ba=null;var k=c.g.P;g==pc?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=Wh(k,g),k=Kh(k,d,e));if(!k&&((null!=Xh(c.g.P,g)||h.Ha)&&pj(c,h),h.ua&&(h.ua.abort(),h.ua=null),g===pc))for(g=c.g.P.u.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,xh(g),g=t(g.j.values()),h=g.next();!h.done;h=g.next())sh(h.value)}a.L&&
398
- Yl(a)},function(c){return a.dispatchEvent(c)})}function Bl(a){var b=new Vi(a.Jc);b.addEventListener("enter",function(d){ll(a,Zl,d.region)});b.addEventListener("exit",function(d){ll(a,$l,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(ll(a,Zl,e),ll(a,$l,e))});var c=new Oi(a.g);c.g.add(b);a.wa&&c.g.add(a.wa);return c}function Cl(a,b){a.L=new ze;a.L.g=Be;Ce(a.L,b,Math.min(.5,b/2));il(a);a.Ac=(new O(function(){Yl(a)})).Ca(.25)}
400
+ function Al(a,b){return new Di(a.g,a.i,a.h.streaming,b,function(){a.wb&&Pi(a.wb,!0);if(a.j)for(var c=a.j,d=c.g.Hc(),e=c.h.smallGapLimit,f=t(c.i.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.i.get(g);h.ba=null;var k=c.g.P;g==pc?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=Wh(k,g),k=Kh(k,d,e));if(!k&&((null!=Xh(c.g.P,g)||h.Ha)&&pj(c,h),h.ua&&(h.ua.abort(),h.ua=null),g===pc))for(g=c.g.P.u.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,xh(g),g=t(g.j.values()),h=g.next();!h.done;h=g.next())sh(h.value)}a.L&&
401
+ Yl(a)},function(c){return a.dispatchEvent(c)})}function Bl(a){var b=new Vi(a.Kc);b.addEventListener("enter",function(d){ll(a,Zl,d.region)});b.addEventListener("exit",function(d){ll(a,$l,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(ll(a,Zl,e),ll(a,$l,e))});var c=new Oi(a.g);c.g.add(b);a.wa&&c.g.add(a.wa);return c}function Cl(a,b){a.L=new ze;a.L.g=Be;Ce(a.L,b,Math.min(.5,b/2));il(a);a.Bc=(new O(function(){Yl(a)})).Ca(.25)}
399
402
  function Yl(a){switch(a.l){case Ql:if(a.g.ended)var b=!0;else{var c=Jh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case El:a:if(a.g.ended||Uh(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.gb();var d=Jh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Lh(a.g.buffered,a.g.currentTime);c=a.L;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Ae:Be;c.g=d;b!=d&&il(a)}function jl(a,b,c,d){return new Oh(a,b,c,d)}
400
- function cl(a){return new Xj({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Ya:function(){return a.Ya()},getCurrentTime:function(){return a.g?a.g.currentTime:0},ib:function(){return a.ib()},Fc:function(){return a.Fc()},T:function(){return a.T()}},a.h.cmcd)}
401
- function Dl(a){return new aj(a.i,{Gc:function(){return a.D.m()},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Yj(a.W,b,c)},P:a.N,mb:a.F,onError:function(b){return gl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ff:function(){a.I&&a.I.update&&a.I.update()},Gd:function(){a.D&&a.D.D();Yl(a)},Ef:function(b,c){var d=c.xd;d&&a.wa&&Si(a.wa,d,b)}})}
403
+ function cl(a){return new Xj({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Ya:function(){return a.Ya()},getCurrentTime:function(){return a.g?a.g.currentTime:0},ib:function(){return a.ib()},Gc:function(){return a.Gc()},T:function(){return a.T()}},a.h.cmcd)}
404
+ function Dl(a){return new aj(a.i,{Hc:function(){return a.D.m()},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Yj(a.W,b,c)},P:a.N,mb:a.F,onError:function(b){return gl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Gf:function(){a.I&&a.I.update&&a.I.update()},Id:function(){a.D&&a.D.D();Yl(a)},Ff:function(b,c){var d=c.zd;d&&a.wa&&Si(a.wa,d,b)}})}
402
405
  r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=uk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Kb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
403
406
  0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=zk(this.h,a,Ik(this));am(this);return c};
404
- function am(a){if(a.I){var b=Pe(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{bm(a,a.i)}catch(f){gl(a,f)}a.s&&Hl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||cm(a)}a.F&&a.F.Qd(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.rd!=b)){var c=Sb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.rd=b;a.j&&(b=a.j,(c=b.i.get(pc))&&
407
+ function am(a){if(a.I){var b=Pe(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{bm(a,a.i)}catch(f){gl(a,f)}a.s&&Hl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||cm(a)}a.F&&a.F.Sd(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.td!=b)){var c=Sb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.td=b;a.j&&(b=a.j,(c=b.i.get(pc))&&
405
408
  kj(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.h.abr),a.h.abr.enabled?a.s.enable():a.s.disable(),Ml(a));a.L&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ce(a.L,b,Math.min(.5,b/2)));a.i&&yl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=Ik(this);zk(a,this.h,Ik(this));return a};
406
- r.Xe=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.kc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.Pf=function(){for(var a in this.h)delete this.h[a];zk(this.h,Ik(this),Ik(this));am(this)};r.cf=function(){return this.l};r.gf=function(){return this.g};r.bc=function(){return this.F};r.md=function(){return this.Sb};
407
- r.he=function(){return this.C?this.C:null};r.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};r.lb=function(){return this.i?this.i.presentationTimeline.lb():!1};r.xf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
408
- r.kc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Bb(),end:a.Pa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.vf=function(){this.T()&&(this.g.currentTime=this.kc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.ac=function(){return this.m?this.m.ac():Infinity};r.Ec=function(){return this.m?this.m.Ec():{}};
409
- r.nd=function(){return this.L?this.L.g==Be:!1};r.Fc=function(){return this.g?this.G?this.G.i:1:0};r.Yf=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.G.set(a),this.l==El&&(this.s.playbackRateChanged(a),jj(this.j,1<Math.abs(a))))};r.Ne=function(){var a=this.G.Dc();this.l==Ql&&this.G.set(a);this.l==El&&(this.G.set(a),this.s.playbackRateChanged(a),jj(this.j,!1))};
409
+ r.Ye=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.lc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.Qf=function(){for(var a in this.h)delete this.h[a];zk(this.h,Ik(this),Ik(this));am(this)};r.df=function(){return this.l};r.hf=function(){return this.g};r.bc=function(){return this.F};r.od=function(){return this.Sb};
410
+ r.ie=function(){return this.C?this.C:null};r.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};r.lb=function(){return this.i?this.i.presentationTimeline.lb():!1};r.yf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
411
+ r.lc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Bb(),end:a.Pa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.wf=function(){this.T()&&(this.g.currentTime=this.lc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.ac=function(){return this.m?this.m.ac():Infinity};r.Fc=function(){return this.m?this.m.Fc():{}};
412
+ r.pd=function(){return this.L?this.L.g==Be:!1};r.Gc=function(){return this.g?this.G?this.G.i:1:0};r.Zf=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.G.set(a),this.l==El&&(this.s.playbackRateChanged(a),jj(this.j,1<Math.abs(a))))};r.Oe=function(){var a=this.G.Ec();this.l==Ql&&this.G.set(a);this.l==El&&(this.G.set(a),this.s.playbackRateChanged(a),jj(this.j,!1))};
410
413
  r.ib=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,he(e)){var f=$d(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return ge(g)}):[]};
411
- r.hb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ae(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Sl(this).map(function(f){return ee(f)}):[]};r.af=function(){return this.i?this.i.imageStreams.map(function(a){return be(a)}):[]};
412
- r.qf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A;return L(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.B(3):u(F,d.createSegmentIndex(),3):F["return"](null):F.B(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;q=l/n;
414
+ r.hb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ae(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Sl(this).map(function(f){return ee(f)}):[]};r.bf=function(){return this.i?this.i.imageStreams.map(function(a){return be(a)}):[]};
415
+ r.rf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A;return L(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.B(3):u(F,d.createSegmentIndex(),3):F["return"](null):F.B(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;q=l/n;
413
416
  v=m*n;y=f.l-f.startTime;w=f.i||y/v;x=f.startTime;B=D=0;1<v&&(A=Math.floor((b-f.startTime)/w),x=f.startTime+A*w,D=A%m*p,B=Math.floor(A/m)*q);return F["return"]({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:B,startTime:x,duration:w,uris:f.sa(),width:p})}return F["return"](null)})};
414
- r.we=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Fk(this.u.h,b,!1),mj(this.j,b),dm(this),this.Ma=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Sl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ce(c)==a.id?c.mode=this.ja?"showing":"hidden":c.mode="disabled";dm(this)}};
415
- r.xe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&he(d)&&(zl(this,d,!1,b,c),this.La=new ue(d),Hl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
416
- ce(c)==a.id){em(this,c);break}};r.We=function(){return fm(this.ib())};r.pf=function(){return fm(this.hb())};r.Ve=function(){return Array.from(gm(this.ib()))};r.nf=function(){return Array.from(gm(this.hb()))};
417
- r.Nd=function(a,b){if(this.i&&this.D){this.La=new ve(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.La.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=$d(f),this.xe(c,!0)):cm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=rd(a);f=d=null;e=
417
+ r.xe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Fk(this.u.h,b,!1),mj(this.j,b),dm(this),this.Ma=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Sl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ce(c)==a.id?c.mode=this.ja?"showing":"hidden":c.mode="disabled";dm(this)}};
418
+ r.ye=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&he(d)&&(zl(this,d,!1,b,c),this.La=new ue(d),Hl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
419
+ ce(c)==a.id){em(this,c);break}};r.Xe=function(){return fm(this.ib())};r.qf=function(){return fm(this.hb())};r.We=function(){return Array.from(gm(this.ib()))};r.pf=function(){return Array.from(gm(this.hb()))};
420
+ r.Pd=function(a,b){if(this.i&&this.D){this.La=new ve(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.La.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=$d(f),this.ye(c,!0)):cm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=rd(a);f=d=null;e=
418
421
  t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ge(g);rd(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?em(this,f):d&&em(this,d)}};
419
- r.Od=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.D){if(this.Ma=a,this.Wb=b||"",this.Ub=c,(a=ke(this.i.textStreams,this.Ma,this.Wb,this.Ub)[0]||null)&&a!=this.j.o&&(Fk(this.u.h,a,!1),this.h.streaming.alwaysStreamText||this.od()))mj(this.j,a),dm(this)}else{var d=rd(a);(a=this.hb().find(function(e){return rd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.we(a)}};
420
- r.Qf=function(a){if(this.i&&this.D){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.La=new ve(b.language,"",0,a),cm(this))}};r.od=function(){var a=this.ja;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Sl(this).some(function(b){return"showing"==b.mode}):a};r.ie=function(){return this.g&&this.g.src&&this.g.textTracks?hm(this).map(function(a){return ee(a)}):[]};
421
- r.Ye=function(a){var b=rd(a),c=hm(this).filter(function(f){return rd(f.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function Sl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
422
+ r.Qd=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.D){if(this.Ma=a,this.Wb=b||"",this.Ub=c,(a=je(this.i.textStreams,this.Ma,this.Wb,this.Ub)[0]||null)&&a!=this.j.o&&(Fk(this.u.h,a,!1),this.h.streaming.alwaysStreamText||this.qd()))mj(this.j,a),dm(this)}else{var d=rd(a);(a=this.hb().find(function(e){return rd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.xe(a)}};
423
+ r.Rf=function(a){if(this.i&&this.D){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.La=new ve(b.language,"",0,a),cm(this))}};r.qd=function(){var a=this.ja;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Sl(this).some(function(b){return"showing"==b.mode}):a};r.je=function(){return this.g&&this.g.src&&this.g.textTracks?hm(this).map(function(a){return ee(a)}):[]};
424
+ r.Ze=function(a){var b=rd(a),c=hm(this).filter(function(f){return rd(f.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function Sl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
422
425
  function Ul(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function hm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
423
- r.Wf=function(a){a=!!a;if(this.ja!=a){this.ja=a;if(this.l==El)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=ke(this.i.textStreams,this.Ma,this.Wb,this.Ub),0<a.length&&(mj(this.j,a[0]),dm(this))):ij(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Sl(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")}Ll(this)}};
424
- r.kf=function(){if(!this.T())return null;var a=this.xa.l,b=0;if(this.D)b=this.D.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
425
- r.je=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.Ya=function(){if(this.l==El)return this.N.Ya();var a={total:[],audio:[],video:[],text:[]};this.l==Ql&&(a.total=Mh(this.g.buffered));return a};
426
+ r.Xf=function(a){a=!!a;if(this.ja!=a){this.ja=a;if(this.l==El)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=je(this.i.textStreams,this.Ma,this.Wb,this.Ub),0<a.length&&(mj(this.j,a[0]),dm(this))):ij(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Sl(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")}Ll(this)}};
427
+ r.lf=function(){if(!this.T())return null;var a=this.xa.l,b=0;if(this.D)b=this.D.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
428
+ r.ke=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.Ya=function(){if(this.l==El)return this.N.Ya();var a={total:[],audio:[],video:[],text:[]};this.l==Ql&&(a.total=Mh(this.g.buffered));return a};
426
429
  r.getStats=function(){if(this.l!=El&&this.l!=Ql)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};wl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.u;b=Math.round(100*b);c.i=isNaN(c.i)?
427
- b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.u,b=Number(a.totalVideoFrames),c.L=Number(a.droppedVideoFrames),c.I=b,this.u.G=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.G?a.G:NaN):a=NaN;this.u.m=a;if(this.l==El){if(a=this.j.l)this.u.s=(this.G?this.G.i:1)*a.bandwidth;a&&a.video&&(c=this.u,b=a.video.height||NaN,c.N=a.video.width||NaN,c.u=b);this.T()&&(a=this.je().valueOf()+1E3*this.kc().end,this.u.C=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
430
+ b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.u,b=Number(a.totalVideoFrames),c.L=Number(a.droppedVideoFrames),c.I=b,this.u.G=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.G?a.G:NaN):a=NaN;this.u.m=a;if(this.l==El){if(a=this.j.l)this.u.s=(this.G?this.G.i:1)*a.bandwidth;a&&a.video&&(c=this.u,b=a.video.height||NaN,c.N=a.video.width||NaN,c.u=b);this.T()&&(a=this.ke().valueOf()+1E3*this.lc().end,this.u.C=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
428
431
  (this.u.F=this.i.presentationTimeline.g);a=this.s.getBandwidthEstimate();this.u.o=a}var d=this.u;a=d.N;c=d.u;b=d.s;var e=d.I,f=d.L,g=d.G,h=d.o,k=d.i,l=d.l,m=d.D,n=d.j,p=Ck(d.g,"playing"),q=Ck(d.g,"paused"),v=Ck(d.g,"buffering"),y=d.m,w=d.C,x=d.F,D=Dk(d.g),B=[];d=t(d.h.g);for(var A=d.next();!A.done;A=d.next())A=A.value,B.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
429
432
  estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:q,bufferingTime:v,licenseTime:y,liveLatency:w,maxSegmentDuration:x,stateHistory:D,switchHistory:B}};
430
433
  r.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Kb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=El&&this.l!=Ql)throw new N(1,7,7004);if(!d){var h=hg(a);d=im[h];if(!d)throw new N(1,2,2011,h);}if(this.l==Ql){if("text/vtt"!=d)throw new N(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=ok(this.W,a);d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.hb().find(function(k){return k.language==
431
- b&&k.label==(f||"")&&k.kind==c}))return Ol(this),a;throw new N(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new N(1,4,4033);a={id:this.Ed++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ki(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:pc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
434
+ b&&k.label==(f||"")&&k.kind==c}))return Ol(this),a;throw new N(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new N(1,4,4033);a={id:this.Gd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ki(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:pc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
432
435
  closedCaptions:null};if(!gd(ad(a.mimeType,a.codecs)))throw new N(2,2,2014,d);this.i.textStreams.push(a);Ol(this);return ae(a)};
433
- r.Je=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,v,y,w,x,D;return L(function(B){switch(B.g){case 1:if(h.l!=El&&h.l!=Ql)throw new N(1,7,7004);if(d){B.B(2);break}return u(B,jm(h,a),3);case 3:d=B.h;case 2:k=[];if(h.C)try{k=h.C.getServerSideCuePoints()}catch(A){}if(h.l!=Ql){B.B(4);break}g&&(c="forced");return u(B,km(h,a,b,c,d,f||"",k),5);case 5:l=h.hb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Ol(h),B["return"](m);throw new N(1,2,2012);case 4:n=
434
- qc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){B.B(6);break}return u(B,lm(h,a,h.F,h.h.streaming.retryParameters),7);case 7:q=B.h,v=mm(h,q,d,k),y=new Blob([v],{type:"text/vtt"}),a=Rh(y),d="text/vtt";case 6:w={id:h.Ed++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ki(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.Z,primary:!1,trickModeVideo:null,
436
+ r.Ke=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,v,y,w,x,D;return L(function(B){switch(B.g){case 1:if(h.l!=El&&h.l!=Ql)throw new N(1,7,7004);if(d){B.B(2);break}return u(B,jm(h,a),3);case 3:d=B.h;case 2:k=[];if(h.C)try{k=h.C.getServerSideCuePoints()}catch(A){}if(h.l!=Ql){B.B(4);break}g&&(c="forced");return u(B,km(h,a,b,c,d,f||"",k),5);case 5:l=h.hb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Ol(h),B["return"](m);throw new N(1,2,2012);case 4:n=
437
+ qc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){B.B(6);break}return u(B,lm(h,a,h.F,h.h.streaming.retryParameters),7);case 7:q=B.h,v=mm(h,q,d,k),y=new Blob([v],{type:"text/vtt"}),a=Rh(y),d="text/vtt";case 6:w={id:h.Gd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ki(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.Z,primary:!1,trickModeVideo:null,
435
438
  emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=ad(w.mimeType,w.codecs);D=gd(x);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(w);Ol(h);return B["return"](ae(w))}})};
436
- r.Ie=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=El&&d.l!=Ql)throw new N(1,7,7004);if(c){k.B(2);break}return u(k,jm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.C)try{e=d.C.getServerSideCuePoints()}catch(l){}return u(k,km(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.ie();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return u(k,new Promise(function(l,m){d.o.oa(f,"load",l);d.o.oa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
439
+ r.Je=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=El&&d.l!=Ql)throw new N(1,7,7004);if(c){k.B(2);break}return u(k,jm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.C)try{e=d.C.getServerSideCuePoints()}catch(l){}return u(k,km(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.je();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return u(k,new Promise(function(l,m){d.o.oa(f,"load",l);d.o.oa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
437
440
  case 5:throw new N(1,2,2012);}})};function jm(a,b){var c,d;return L(function(e){switch(e.g){case 1:c=hg(b);if(d=im[c])return e["return"](d);C(e,2);return u(e,jg(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:E(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
438
441
  function km(a,b,c,d,e,f,g){var h,k,l,m;return L(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,lm(a,b,a.F,a.h.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=mm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Rh(l),e="text/vtt");m=document.createElement("track");m.src=ok(a.W,b);m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
439
442
  function lm(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=cf;f=Xe([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&ik(k,f,{ot:pk,su:!0})}catch(l){Va("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}function mm(a,b,c,d){var e=hd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Fb(b),b=c.parseMedia(b,a),Wj(b,d);throw new N(2,2,2014,c);}
440
- r.Rd=function(a,b){this.Bd.width=a;this.Bd.height=b};r.Ld=function(){if(this.l==El){var a=this.j;if(a.j.g)a=!1;else if(a.s)a=!1;else{for(var b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,c.ec&&(c.ec=!1,hj(a,c,.1));a=!0}}else a=!1;return a};r.df=function(){Ua("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};
441
- r.ef=function(){return this.Ic};function Ik(a){var b=xk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.T()&&d.includes(c.code)&&(c.severity=1,a.Ld())};b.textDisplayFactory=function(){return a.zc?new Pj(a.g,a.zc):new Kj(a.g)};return b}r.Be=function(a){this.zc=a};
442
- function pl(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 Li;h={id:a.Ed++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
443
+ r.Td=function(a,b){this.Dd.width=a;this.Dd.height=b};r.Nd=function(){if(this.l==El){var a=this.j;if(a.j.g)a=!1;else if(a.s)a=!1;else{for(var b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,c.ec&&(c.ec=!1,hj(a,c,.1));a=!0}}else a=!1;return a};r.ef=function(){Ua("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};
444
+ r.ff=function(){return this.Jc};function Ik(a){var b=xk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.T()&&d.includes(c.code)&&(c.severity=1,a.Nd())};b.textDisplayFactory=function(){return a.Ac?new Pj(a.g,a.Ac):new Kj(a.g)};return b}r.Ce=function(a){this.Ac=a};
445
+ function pl(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 Li;h={id:a.Gd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
443
446
  segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:pc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function ol(a,b){return L(function(c){if(1==c.g)return u(c,nm(a,b),2);bm(a,b);z(c)})}
444
447
  function nm(a,b){var c;return L(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Pd(c,b),2);Nl(b);z(d)})}
445
- function bm(a,b){if(a.l!=Yk){for(var c=a.h.restrictions,d=a.Bd,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Od(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Ol(a);if((c=a.m?a.m.g:null)&&a.m.s)for(d=t(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=t(f.initData||[]),g=f.next();!g.done;g=
448
+ function bm(a,b){if(a.l!=Yk){for(var c=a.h.restrictions,d=a.Dd,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Od(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Ol(a);if((c=a.m?a.m.g:null)&&a.m.s)for(d=t(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=t(f.initData||[]),g=f.next();!g.done;g=
446
449
  f.next())g=g.value,Kf(a.m,g.initDataType,g.initData);om(a,b)}}
447
450
  function Il(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return L(function(q){if(1==q.g)return k?u(q,k.createSegmentIndex(),2):q["return"](null);n=(m=k.segmentIndex.fb(l))?m.next().value:null;if(!n)return q["return"](null);p=n.startTime;return q["return"](p)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
448
- function il(a){var b=a.nd();if(a.u&&a.L&&a.D){var c=a.G;c.j=b;Ni(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);wl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Vk(pm,b))}function xl(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=Vk(qm),a.dispatchEvent(b))}function wl(a){if(a.u&&a.L){var b=a.u.g;a.L.g==Be?Bk(b,"buffering"):a.g.paused?Bk(b,"paused"):a.g.ended?Bk(b,"ended"):Bk(b,"playing")}}
451
+ function il(a){var b=a.pd();if(a.u&&a.L&&a.D){var c=a.G;c.j=b;Ni(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);wl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Vk(pm,b))}function xl(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=Vk(qm),a.dispatchEvent(b))}function wl(a){if(a.u&&a.L){var b=a.u.g;a.L.g==Be?Bk(b,"buffering"):a.g.paused?Bk(b,"paused"):a.g.ended?Bk(b,"ended"):Bk(b,"playing")}}
449
452
  function Hl(a){try{om(a,a.i)}catch(c){return gl(a,c),!1}var b=a.i.variants.filter(function(c){return he(c)});b=a.La.create(b);a.s.setVariants(Array.from(b.values()));return!0}function cm(a){var b;(b=Hl(a)?a.s.chooseVariant():null)&&zl(a,b,!0,!0,0)}
450
453
  function zl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&lj(a.j,b,d,e,!0);else{var g=a.u.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));lj(a.j,b,d,e);d=null;f&&(d=$d(f));b=$d(b);c?Jl(a,d,b):rm(a,d,b)}}function em(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=ge(c);var d=ge(b);rm(a,c,d)}
451
454
  function Kl(a,b,c){a=rd(a.h.preferredTextLanguage);b=rd(b.language);c=rd(c.language);return qd(c,a)&&!qd(b,c)}function Jl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Vk(sm,b);tm(a,b)}function Ol(a){var b=Vk(um);tm(a,b)}function rm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Vk(vm,b);tm(a,b)}function dm(a){var b=Vk(wm);tm(a,b)}function Ll(a){var b=Vk(xm);tm(a,b)}function Ml(a){var b=(new Map).set("newStatus",a.h.abr.enabled);tm(a,Vk(ym,b))}
452
455
  function gl(a,b){if(a.l!=Yk){var c=Vk(zm,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function ll(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(Vk(b,c))}
453
456
  function fl(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.g.error.message)}
454
457
  function tl(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Am.includes(l)}h!=f.allowedByKeySystem&&
455
- (e=!0)}}}if(!e||Hl(a))(d=a.j.l)&&!d.allowedByKeySystem&&cm(a),e&&Ol(a)}}function ul(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Vk(Bm);a.dispatchEvent(b)}function yl(a,b,c){0<b&&(a.T()||a.Ae(b));b=a.getDuration();c<b&&(a.T()||a.Ia(c))}
456
- function om(a,b){var c=a.m?a.m.Ec():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var q=c[d?"00":p];q?Am.includes(q)&&h.add(q):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
458
+ (e=!0)}}}if(!e||Hl(a))(d=a.j.l)&&!d.allowedByKeySystem&&cm(a),e&&Ol(a)}}function ul(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Vk(Bm);a.dispatchEvent(b)}function yl(a,b,c){0<b&&(a.T()||a.Be(b));b=a.getDuration();c<b&&(a.T()||a.Ia(c))}
459
+ function om(a,b){var c=a.m?a.m.Fc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var q=c[d?"00":p];q?Am.includes(q)&&h.add(q):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
457
460
  missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function Nl(a){if(!a.variants.some(he))throw new N(2,4,4032);}function tm(a,b){L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Yk&&a.dispatchEvent(b);z(c)})}function gm(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(rd(c.language)):b.add("und");return b}
458
461
  function fm(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=rd(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){for(var m=t(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
459
- h.push({language:l,role:n,label:p})}});return h}function Zk(){return new N(2,7,7E3)}function Uk(a,b,c,d,e,f){return d==a&&e.J==f.J&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Ej(){return{J:null,mimeType:null,startTime:null,Ud:NaN,uri:null}}function $k(a){return new Promise(function(b,c){a.nb=function(){return c(Zk())};a.Mc=function(){return b()};a.onError=function(d){return c(d)};a.Oc=function(){return c(Zk())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Be;
460
- U.prototype.getManifestParserFactory=U.prototype.ef;U.prototype.getManifest=U.prototype.df;U.prototype.retryStreaming=U.prototype.Ld;U.prototype.setMaxHardwareResolution=U.prototype.Rd;U.prototype.addChaptersTrack=U.prototype.Ie;U.prototype.addTextTrackAsync=U.prototype.Je;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Ya;U.prototype.getPresentationStartTimeAsDate=U.prototype.je;
461
- U.prototype.getPlayheadTimeAsDate=U.prototype.kf;U.prototype.setTextTrackVisibility=U.prototype.Wf;U.prototype.getChapters=U.prototype.Ye;U.prototype.getChaptersTracks=U.prototype.ie;U.prototype.isTextTrackVisible=U.prototype.od;U.prototype.selectVariantsByLabel=U.prototype.Qf;U.prototype.selectTextLanguage=U.prototype.Od;U.prototype.selectAudioLanguage=U.prototype.Nd;U.prototype.getTextLanguages=U.prototype.nf;U.prototype.getAudioLanguages=U.prototype.Ve;U.prototype.getTextLanguagesAndRoles=U.prototype.pf;
462
- U.prototype.getAudioLanguagesAndRoles=U.prototype.We;U.prototype.selectVariantTrack=U.prototype.xe;U.prototype.selectTextTrack=U.prototype.we;U.prototype.getThumbnails=U.prototype.qf;U.prototype.getImageTracks=U.prototype.af;U.prototype.getTextTracks=U.prototype.hb;U.prototype.getVariantTracks=U.prototype.ib;U.prototype.cancelTrickPlay=U.prototype.Ne;U.prototype.trickPlay=U.prototype.Yf;U.prototype.getPlaybackRate=U.prototype.Fc;U.prototype.isBuffering=U.prototype.nd;U.prototype.getKeyStatuses=U.prototype.Ec;
463
- U.prototype.getExpiration=U.prototype.ac;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.vf;U.prototype.seekRange=U.prototype.kc;U.prototype.isAudioOnly=U.prototype.xf;U.prototype.isInProgress=U.prototype.lb;U.prototype.isLive=U.prototype.T;U.prototype.getAdManager=U.prototype.he;U.prototype.getAssetUri=U.prototype.md;U.prototype.getNetworkingEngine=U.prototype.bc;U.prototype.getMediaElement=U.prototype.gf;
464
- U.prototype.getLoadMode=U.prototype.cf;U.prototype.resetConfiguration=U.prototype.Pf;U.prototype.getBufferFullness=U.prototype.Xe;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.cg;U.prototype.unload=U.prototype.Xd;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Vb;
462
+ h.push({language:l,role:n,label:p})}});return h}function Zk(){return new N(2,7,7E3)}function Uk(a,b,c,d,e,f){return d==a&&e.J==f.J&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Ej(){return{J:null,mimeType:null,startTime:null,Wd:NaN,uri:null}}function $k(a){return new Promise(function(b,c){a.nb=function(){return c(Zk())};a.Nc=function(){return b()};a.onError=function(d){return c(d)};a.Pc=function(){return c(Zk())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Ce;
463
+ U.prototype.getManifestParserFactory=U.prototype.ff;U.prototype.getManifest=U.prototype.ef;U.prototype.retryStreaming=U.prototype.Nd;U.prototype.setMaxHardwareResolution=U.prototype.Td;U.prototype.addChaptersTrack=U.prototype.Je;U.prototype.addTextTrackAsync=U.prototype.Ke;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Ya;U.prototype.getPresentationStartTimeAsDate=U.prototype.ke;
464
+ U.prototype.getPlayheadTimeAsDate=U.prototype.lf;U.prototype.setTextTrackVisibility=U.prototype.Xf;U.prototype.getChapters=U.prototype.Ze;U.prototype.getChaptersTracks=U.prototype.je;U.prototype.isTextTrackVisible=U.prototype.qd;U.prototype.selectVariantsByLabel=U.prototype.Rf;U.prototype.selectTextLanguage=U.prototype.Qd;U.prototype.selectAudioLanguage=U.prototype.Pd;U.prototype.getTextLanguages=U.prototype.pf;U.prototype.getAudioLanguages=U.prototype.We;U.prototype.getTextLanguagesAndRoles=U.prototype.qf;
465
+ U.prototype.getAudioLanguagesAndRoles=U.prototype.Xe;U.prototype.selectVariantTrack=U.prototype.ye;U.prototype.selectTextTrack=U.prototype.xe;U.prototype.getThumbnails=U.prototype.rf;U.prototype.getImageTracks=U.prototype.bf;U.prototype.getTextTracks=U.prototype.hb;U.prototype.getVariantTracks=U.prototype.ib;U.prototype.cancelTrickPlay=U.prototype.Oe;U.prototype.trickPlay=U.prototype.Zf;U.prototype.getPlaybackRate=U.prototype.Gc;U.prototype.isBuffering=U.prototype.pd;U.prototype.getKeyStatuses=U.prototype.Fc;
466
+ U.prototype.getExpiration=U.prototype.ac;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.wf;U.prototype.seekRange=U.prototype.lc;U.prototype.isAudioOnly=U.prototype.yf;U.prototype.isInProgress=U.prototype.lb;U.prototype.isLive=U.prototype.T;U.prototype.getAdManager=U.prototype.ie;U.prototype.getAssetUri=U.prototype.od;U.prototype.getNetworkingEngine=U.prototype.bc;U.prototype.getMediaElement=U.prototype.hf;
467
+ U.prototype.getLoadMode=U.prototype.df;U.prototype.resetConfiguration=U.prototype.Qf;U.prototype.getBufferFullness=U.prototype.Ye;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.dg;U.prototype.unload=U.prototype.Zd;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Vb;
465
468
  U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?u(h,$f(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(uc()){for(var l in gg)k[l]=!0;for(var m in ig)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};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,k[n]=uc()?!!gg[n]:vc(n);for(var p in l)k[p]=
466
469
  uc()?!!ig[p]:vc(l[p]);c=k;k={};p=t('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
467
470
  for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=uc()?gd(l)?!0:MediaSource.isTypeSupported(l)||Xc(l):vc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Cm;for(g in f)e[g]=f[g]();return h["return"](e)})};
468
- U.isBrowserSupported=function(){window.Promise||Ua("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Ua("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||yc("Trident/"))return!1;var a=Dc();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
469
- !1:uc()?!0:vc("application/x-mpegurl")};U.setAdManagerFactory=function(a){Kk=a};U.registerSupportPlugin=function(a,b){Cm[a]=b};U.prototype.destroy=U.prototype.destroy;
470
- var ym="abrstatuschanged",sm="adaptation",pm="buffering",Xl="downloadfailed",Wl="downloadheadersreceived",vl="drmsessionupdate",Bj="emsg",zm="error",Bm="expirationupdated",dl="loaded",al="loading",ql="manifestparsed",nl="mediaqualitychanged",Vl="metadata",Wk="onstatechange",Xk="onstateidle",qm="ratechange",Gl="streaming",wm="textchanged",xm="texttrackvisibility",ml="timelineregionadded",Zl="timelineregionenter",$l="timelineregionexit",um="trackschanged",hl="unloading",vm="variantchanged",Dm={eg:ym,
471
- fg:sm,gg:pm,ig:Xl,jg:Wl,kg:vl,mg:Bj,Error:zm,ng:Bm,pg:"largegap",qg:dl,rg:al,sg:ql,tg:nl,Metadata:Vl,vg:Wk,wg:Xk,xg:qm,zg:"sessiondata",Ag:Gl,Bg:wm,Cg:xm,Dg:ml,Eg:Zl,Fg:$l,Gg:um,Hg:hl,Ig:vm},Yk=0,Hk=1,El=2,Ql=3;U.LoadMode={DESTROYED:Yk,NOT_LOADED:Hk,MEDIA_SOURCE:El,SRC_EQUALS:Ql};U.version="v3.3.8";var Em=["3","3"];Lb=new function(a){this.g=a;this.i=Mb;this.h=Nb}(new Jb(Number(Em[0]),Number(Em[1])));
471
+ U.isBrowserSupported=function(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||yc("Trident/"))return!1;var a=Ec();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:uc()?!0:vc("application/x-mpegurl")};U.setAdManagerFactory=function(a){Kk=a};
472
+ U.registerSupportPlugin=function(a,b){Cm[a]=b};U.prototype.destroy=U.prototype.destroy;
473
+ var ym="abrstatuschanged",sm="adaptation",pm="buffering",Xl="downloadfailed",Wl="downloadheadersreceived",vl="drmsessionupdate",Bj="emsg",zm="error",Bm="expirationupdated",dl="loaded",al="loading",ql="manifestparsed",nl="mediaqualitychanged",Vl="metadata",Wk="onstatechange",Xk="onstateidle",qm="ratechange",Gl="streaming",wm="textchanged",xm="texttrackvisibility",ml="timelineregionadded",Zl="timelineregionenter",$l="timelineregionexit",um="trackschanged",hl="unloading",vm="variantchanged",Dm={fg:ym,
474
+ gg:sm,hg:pm,jg:Xl,kg:Wl,lg:vl,ng:Bj,Error:zm,og:Bm,qg:"largegap",rg:dl,sg:al,tg:ql,ug:nl,Metadata:Vl,wg:Wk,xg:Xk,yg:qm,Ag:"sessiondata",Bg:Gl,Cg:wm,Dg:xm,Eg:ml,Fg:Zl,Gg:$l,Hg:um,Ig:hl,Jg:vm},Yk=0,Hk=1,El=2,Ql=3;U.LoadMode={DESTROYED:Yk,NOT_LOADED:Hk,MEDIA_SOURCE:El,SRC_EQUALS:Ql};U.version="v3.3.9";var Em=["3","3"];Lb=new function(a){this.g=a;this.i=Mb;this.h=Nb}(new Jb(Number(Em[0]),Number(Em[1])));
472
475
  var Am=["output-restricted","internal-error"],Cm={},Kk=null,el={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},im={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
473
476
  ssa:"text/x-ssa",ass:"text/x-ssa"};function Fm(){this.h=[];this.j=this.i=this.g=0};function V(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new ff;this.j.A(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.A(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}r=V.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
474
477
  r.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.g.getAdSkippableState()};r.skip=function(){return this.g.skip()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.resume()};r.getVolume=function(){return this.g.getVolume()};r.setVolume=function(a){return this.g.setVolume(a)};r.isMuted=function(){return 0==this.g.getVolume()};
475
478
  r.isLinear=function(){return this.h.isLinear()};r.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};r.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=null};
476
479
  M("shaka.ads.ClientSideAd",V);V.prototype.release=V.prototype.release;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isLinear=V.prototype.isLinear;V.prototype.isMuted=V.prototype.isMuted;V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;
477
- V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;V.prototype.getDuration=V.prototype.getDuration;function Gm(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.j=d;this.m=null;this.h=new ff;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.3.8");this.g=null;this.h.oa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Hm(e,f)});this.h.A(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
478
- function(f){Im(e,f)});this.i.onended=function(){e.l.contentComplete()}}Gm.prototype.stop=function(){this.g&&this.g.stop();this.o&&Oj(this.o)};Gm.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Im(a,b){b.getError();Jm(a,null);a.j(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
479
- function Hm(a,b){a.j(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.j(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new Q("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Km(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
480
+ V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;V.prototype.getDuration=V.prototype.getDuration;function Gm(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new ff;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.9");this.g=null;this.h.oa(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Hm(e,f)});this.h.A(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
481
+ function(f){Im(e,f)});this.i.onended=function(){e.m.contentComplete()}}Gm.prototype.stop=function(){this.g&&this.g.stop();this.o&&Oj(this.o)};Gm.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Im(a,b){b.getError();Jm(a,null);a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
482
+ function Hm(a,b){a.l(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Km(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
480
483
  a.h.A(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.g.start()}catch(f){Jm(a,null)}}
481
- function Km(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new Q(d,e))}a.h.A(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Im(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Lm(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.STARTED,function(c){Lm(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.A(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.A(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
484
+ function Km(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.l(new Q(d,e))}a.h.A(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Im(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Lm(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.STARTED,function(c){Lm(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.A(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.A(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
482
485
  function(c){b(c,"ad-third-quartile")});a.h.A(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.A(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Jm(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Jm(a,c)});a.h.A(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.A(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.A(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
483
- a.h.A(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.m.i=!0;b(c,"ad-paused")});a.h.A(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.m.i=!1;b(c,"ad-resumed")});a.h.A(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.A(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.A(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.A(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.A(a.g,
486
+ a.h.A(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.A(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.A(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.A(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.A(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.A(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.A(a.g,
484
487
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.A(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.A(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.A(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.A(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.A(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.A(a.g,google.ima.AdEvent.Type.AD_METADATA,
485
- function(c){b(c,"ad-metadata")});a.h.A(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.A(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.A(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Lm(a,b){var c=b.getAd();a.m=new V(c,a.g);c=(new Map).set("ad",a.m).set("sdkAdObject",c).set("originalEvent",b);a.j(new Q("ad-started",c));a.m.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())}
486
- function Jm(a,b){a.j(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.m.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}r=W.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
488
+ function(c){b(c,"ad-metadata")});a.h.A(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.A(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.A(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Lm(a,b){var c=b.getAd();a.j=new V(c,a.g);c=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new Q("ad-started",c));a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())}
489
+ function Jm(a,b){a.l(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}r=W.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
487
490
  r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};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!0};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};
488
491
  r.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;
489
492
  W.prototype.isLinear=W.prototype.isLinear;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;
@@ -493,10 +496,10 @@ var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.A(this
493
496
  this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new Q("ad-complete"));e.i(new Q("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.A(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new Q("ad-skipped"));e.i(new Q("ad-stopped"))});this.h.A(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.D=
494
497
  f;e.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Mm.prototype.stop=function(){this.C="";this.o=null;this.D=[]};Mm.prototype.release=function(){this.stop();this.h&&this.h.release()};Mm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
495
498
  function Nm(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.F||a.h.A(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.o=d,a.l.currentTime=e.start)}})};function X(){Oe.call(this);this.g=this.i=null;this.h=new Fm;this.j=navigator.language}qa(X,Oe);r=X.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new Gm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
496
- r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Oe.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.h=new Fm};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.l.requestAds(a)};
499
+ r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Oe.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.h=new Fm};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.m.requestAds(a)};
497
500
  r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new Mm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
498
- r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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="v3.3.8";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
499
- (c.F=!0),c.j=new rc,c.g.requestStream(a),c.C=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Ua('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="v3.3.8";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
501
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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="v3.3.9";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
502
+ (c.F=!0),c.j=new rc,c.g.requestStream(a),c.C=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Ua('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="v3.3.9";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
500
503
  r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};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)};M("shaka.ads.AdManager",X);
501
504
  X.prototype.onCueMetadataChange=X.prototype.onCueMetadataChange;X.prototype.onHlsTimedMetadata=X.prototype.onHlsTimedMetadata;X.prototype.onDashTimedMetadata=X.prototype.onDashTimedMetadata;X.prototype.getStats=X.prototype.getStats;X.prototype.getServerSideCuePoints=X.prototype.getServerSideCuePoints;X.prototype.replaceServerSideAdTagParameters=X.prototype.replaceServerSideAdTagParameters;X.prototype.requestServerSideStream=X.prototype.requestServerSideStream;X.prototype.initServerSide=X.prototype.initServerSide;
502
505
  X.prototype.requestClientSideAds=X.prototype.requestClientSideAds;X.prototype.onAssetUnload=X.prototype.onAssetUnload;X.prototype.release=X.prototype.release;X.prototype.initClientSide=X.prototype.initClientSide;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";X.AD_MIDPOINT="ad-midpoint";X.AD_THIRD_QUARTILE="ad-third-quartile";X.AD_COMPLETE="ad-complete";X.AD_STOPPED="ad-stopped";X.AD_SKIPPED="ad-skipped";
@@ -508,61 +511,61 @@ function Qm(a){return{length:a.length,start:function(b){return a.start[b]},end:f
508
511
  var Rm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Sm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Tm=["loop","playbackRate"],Um=["pause","play"],Vm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
509
512
  getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Wm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Xm=[["getConfiguration","configure"]],Ym=[["isTextTrackVisible","setTextTrackVisibility"]],Zm="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
510
513
  $m=["attach","detach","load","unload"];function an(a,b,c,d,e,f){var g=this;this.G=a;this.j=new O(b);this.V=c;this.u=!1;this.s=d;this.F=e;this.L=f;this.h=this.m=!1;this.N="";this.o=null;this.C=function(){return bn(g)};this.D=function(h,k){var l=Pm(k);switch(l.type){case "event":var m=l.targetName;l=Ne(l.event);g.s(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.u&&(g.V(),g.u=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new N(l.severity,l.category,l.code);
511
- for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;cn.add(this)}r=an.prototype;r.destroy=function(){cn["delete"](this);dn(this);en&&fn(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.C=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.ta=function(){return this.h};r.Jd=function(){return this.N};
514
+ for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;cn.add(this)}r=an.prototype;r.destroy=function(){cn["delete"](this);dn(this);en&&fn(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.C=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.ta=function(){return this.h};r.Ld=function(){return this.N};
512
515
  r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Lb();var a=new chrome.cast.SessionRequest(this.G);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(cn),d=c.next();!d.done;d=c.next())gn(d.value,b)},function(b){for(var c=t(cn),d=c.next();!d.done;d=c.next())d=d.value,hn="available"==b,d.j.Lb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});hn&&this.j.S(jn);(a=en)&&a.status!=chrome.cast.SessionStatus.STOPPED?gn(this,
513
- a):en=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=kn),window.__onGCastApiAvailable!=kn&&Ua("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};r.Pd=function(a){this.o=a;this.h&&ln(this,{type:"appData",appData:this.o})};
516
+ a):en=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=kn),window.__onGCastApiAvailable!=kn&&Ua("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};r.Rd=function(a){this.o=a;this.h&&ln(this,{type:"appData",appData:this.o})};
514
517
  r.cast=function(a){var b=this;return L(function(c){if(!b.m)throw new N(1,8,8E3);if(!hn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new rc;chrome.cast.requestSession(function(d){return mn(b,a,d)},function(d){return nn(b,d)});return u(c,b.l,0)})};function on(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return mn(a,b,c)},function(c){return nn(a,c)})}}r.zb=function(){if(this.h){dn(this);if(en){fn(this);try{en.stop(function(){},function(){})}catch(a){}en=null}bn(this)}};
515
- r.get=function(a,b){var c=this;if("video"==a){if(Um.includes(b))return function(){return c.se.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))}}else if("player"==a){if(Wm[b]&&!this.get("player","isLive")())return function(){};if(Zm.includes(b))return function(){return c.se.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))};if($m.includes(b))return function(){return c.Mf.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))};if(Vm[b])return function(){return c.g[a][b]}}return this.g[a][b]};
518
+ r.get=function(a,b){var c=this;if("video"==a){if(Um.includes(b))return function(){return c.te.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))}}else if("player"==a){if(Wm[b]&&!this.get("player","isLive")())return function(){};if(Zm.includes(b))return function(){return c.te.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))};if($m.includes(b))return function(){return c.Nf.apply(c,[a,b].concat(ja(Ha.apply(0,arguments))))};if(Vm[b])return function(){return c.g[a][b]}}return this.g[a][b]};
516
519
  r.set=function(a,b,c){this.g[a][b]=c;ln(this,{type:"set",targetName:a,property:b,value:c})};function mn(a,b,c){en=c;c.addUpdateListener(a.C);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);bn(a);ln(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function nn(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}
517
- r.se=function(a,b){ln(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.Mf=function(a,b){var c=Ha.apply(2,arguments),d=new rc,e=this.I.toString();this.I++;this.i[e]=d;try{ln(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function gn(a,b){var c=a.L();a.l=new rc;a.u=!0;mn(a,c,b)}function fn(a){var b=en;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
520
+ r.te=function(a,b){ln(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.Nf=function(a,b){var c=Ha.apply(2,arguments),d=new rc,e=this.I.toString();this.I++;this.i[e]=d;try{ln(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function gn(a,b){var c=a.L();a.l=new rc;a.u=!0;mn(a,c,b)}function fn(a){var b=en;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
518
521
  function bn(a){var b=en?"connected"==en.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};dn(a)}a.h=b;a.N=b?en.receiver.friendlyName:"";a.j.Lb()}function dn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function ln(a,b){var c=Om(b),d=en;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Xa)}catch(e){throw c=new N(2,8,8005,e),d=new Q("error",(new Map).set("detail",c)),a.s("player",d),a.zb(),c;}}var jn=.02,hn=!1,en=null,cn=new Set;
519
522
  function kn(a){if(a){a=t(cn);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function pn(a,b,c){Oe.call(this);var d=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.u=new Map;this.g=new an(c,function(){return qn(d)},function(){return rn(d)},function(e,f){return sn(d,e,f)},function(){return tn(d)},function(){return un(d)});vn(this)}qa(pn,Oe);r=pn.prototype;
520
- r.destroy=function(a){a&&this.g.zb();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;Oe.prototype.release.call(this);return Promise.all(a)};r.uf=function(){return this.l};r.jf=function(){return this.s};r.Le=function(){return this.g.m&&hn};r.ta=function(){return this.g.ta()};r.Jd=function(){return this.g.Jd()};
521
- r.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=un(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Xd(),0):c["return"]()})};r.Pd=function(a){this.g.Pd(a)};r.Xf=function(){on(this.g)};r.zb=function(){this.g.zb()};
522
- r.Oe=function(a){var b=this;return L(function(c){if(1==c.g){if(a==b.C)return c["return"]();b.C=a;b.g.zb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new an(a,function(){return qn(b)},function(){return rn(b)},function(d,e){return sn(b,d,e)},function(){return tn(b)},function(){return un(b)});b.g.init();z(c)})};
523
+ r.destroy=function(a){a&&this.g.zb();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;Oe.prototype.release.call(this);return Promise.all(a)};r.vf=function(){return this.l};r.kf=function(){return this.s};r.Me=function(){return this.g.m&&hn};r.ta=function(){return this.g.ta()};r.Ld=function(){return this.g.Ld()};
524
+ r.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=un(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Zd(),0):c["return"]()})};r.Rd=function(a){this.g.Rd(a)};r.Yf=function(){on(this.g)};r.zb=function(){this.g.zb()};
525
+ r.Pe=function(a){var b=this;return L(function(c){if(1==c.g){if(a==b.C)return c["return"]();b.C=a;b.g.zb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new an(a,function(){return qn(b)},function(){return rn(b)},function(d,e){return sn(b,d,e)},function(){return tn(b)},function(){return un(b)});b.g.init();z(c)})};
523
526
  function vn(a){a.g.init();a.m=new ff;for(var b=t(Rm),c=b.next();!c.done;c=b.next())a.m.A(a.i,c.value,function(f){a.g.ta()||(f=Ne(f),a.j.dispatchEvent(f))});for(var d in Dm)a.m.A(a.h,Dm[d],function(f){a.g.ta()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Nb=e,Object.defineProperty(a.l,b.Nb,{configurable:!1,enumerable:!0,get:function(f){return function(){return wn(a,f.Nb)}}(b),set:function(f){return function(g){var h=f.Nb;a.g.ta()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Nb:b.Nb};a.s={};xn(a,
524
- function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return yn(a,f)}})});zn(a);a.j=new Oe;a.j.Bc=a.l;a.o=new Oe;a.o.Bc=a.s}function zn(a){var b=new Map;xn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.u.set(c,e):a.u.set(e,c)}else b.set(d,c)})}
527
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return yn(a,f)}})});zn(a);a.j=new Oe;a.j.Cc=a.l;a.o=new Oe;a.o.Cc=a.s}function zn(a){var b=new Map;xn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.u.set(c,e):a.u.set(e,c)}else b.set(d,c)})}
525
528
  function xn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
526
- function un(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.md(),startTime:null};a.i.pause();for(var c=t(Tm),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(Xm);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(Ym);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 qn(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
529
+ function un(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.od(),startTime:null};a.i.pause();for(var c=t(Tm),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(Xm);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(Ym);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 qn(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
527
530
  function rn(a){var b=new Q(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
528
531
  function tn(a){for(var b=t(Xm),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=t(Tm);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=t(Tm),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(Ym);for(k=
529
532
  h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new Q(zm,h);a.h.dispatchEvent(h)})}
530
533
  function wn(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.ta()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ta()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
531
- function yn(a,b){a.u.has(b)&&(b=a.u.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.bc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.he()};
532
- if("setVideoContainer"==b)return function(c){return a.h.Be(c)};if(a.g.ta()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ta()&&0==Object.keys(a.g.g.video).length&&Vm[b]||!a.g.ta()?a.h[b].bind(a.h):a.g.get("player",b)}function sn(a,b,c){a.g.ta()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}
533
- M("shaka.cast.CastProxy",pn);pn.prototype.changeReceiverId=pn.prototype.Oe;pn.prototype.forceDisconnect=pn.prototype.zb;pn.prototype.suggestDisconnect=pn.prototype.Xf;pn.prototype.setAppData=pn.prototype.Pd;pn.prototype.cast=pn.prototype.cast;pn.prototype.receiverName=pn.prototype.Jd;pn.prototype.isCasting=pn.prototype.ta;pn.prototype.canCast=pn.prototype.Le;pn.prototype.getPlayer=pn.prototype.jf;pn.prototype.getVideo=pn.prototype.uf;pn.prototype.destroy=pn.prototype.destroy;function In(a,b,c,d){Oe.call(this);var e=this;this.g=a;this.h=b;this.j=new ff;this.I={video:a,player:b};this.D=c||function(){};this.L=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.C=!1;this.u=!0;this.s=this.l=null;this.G=new O(function(){Jn(e)});Kn(this)}qa(In,Oe);r=In.prototype;r.isConnected=function(){return this.F};r.yf=function(){return this.o};r.Tf=function(a){this.i=a};r.Re=function(){this.i=null};
534
- r.Uf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Sf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Rf=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
534
+ function yn(a,b){a.u.has(b)&&(b=a.u.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.bc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.ie()};
535
+ if("setVideoContainer"==b)return function(c){return a.h.Ce(c)};if(a.g.ta()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ta()&&0==Object.keys(a.g.g.video).length&&Vm[b]||!a.g.ta()?a.h[b].bind(a.h):a.g.get("player",b)}function sn(a,b,c){a.g.ta()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}
536
+ M("shaka.cast.CastProxy",pn);pn.prototype.changeReceiverId=pn.prototype.Pe;pn.prototype.forceDisconnect=pn.prototype.zb;pn.prototype.suggestDisconnect=pn.prototype.Yf;pn.prototype.setAppData=pn.prototype.Rd;pn.prototype.cast=pn.prototype.cast;pn.prototype.receiverName=pn.prototype.Ld;pn.prototype.isCasting=pn.prototype.ta;pn.prototype.canCast=pn.prototype.Me;pn.prototype.getPlayer=pn.prototype.kf;pn.prototype.getVideo=pn.prototype.vf;pn.prototype.destroy=pn.prototype.destroy;function In(a,b,c,d){Oe.call(this);var e=this;this.g=a;this.h=b;this.j=new ff;this.I={video:a,player:b};this.D=c||function(){};this.L=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.C=!1;this.u=!0;this.s=this.l=null;this.G=new O(function(){Jn(e)});Kn(this)}qa(In,Oe);r=In.prototype;r.isConnected=function(){return this.F};r.zf=function(){return this.o};r.Uf=function(a){this.i=a};r.Se=function(){this.i=null};
537
+ r.Vf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Tf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Sf=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
535
538
  r.destroy=function(){var a=this,b,c;return L(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.I=null,a.D=null,a.F=!1,a.o=!0,a.l=null,a.s=null,Oe.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
536
539
  function Kn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Ln(a)};b.onSenderDisconnected=function(){return Ln(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Mn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Mn(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 Nn(a,
537
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return On(a,e)};b.start();b=t(Rm);for(var c=b.next();!c.done;c=b.next())a.j.A(a.g,c.value,function(e){return Pn(a,"video",e)});for(var d in Dm)a.j.A(a.h,Dm[d],function(e){return Pn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Rd(3840,2160):a.h.Rd(1920,1080);a.j.A(a.g,"loadeddata",function(){a.C=!0});a.j.A(a.h,"loading",function(){a.o=
540
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return On(a,e)};b.start();b=t(Rm);for(var c=b.next();!c.done;c=b.next())a.j.A(a.g,c.value,function(e){return Pn(a,"video",e)});for(var d in Dm)a.j.A(a.h,Dm[d],function(e){return Pn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Td(3840,2160):a.h.Td(1920,1080);a.j.A(a.g,"loadeddata",function(){a.C=!0});a.j.A(a.h,"loading",function(){a.o=
538
541
  !1;Qn(a)});a.j.A(a.g,"playing",function(){a.o=!1;Qn(a)});a.j.A(a.g,"pause",function(){Qn(a)});a.j.A(a.h,"unloading",function(){a.o=!0;Qn(a)});a.j.A(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.o=!0,Qn(a))})).S(Rn)})}function Ln(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Qn(a)}
539
542
  function Qn(a){var b;L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new Q("caststatuschanged");a.dispatchEvent(b);Sn(a)||Tn(a);z(c)})}
540
543
  function Un(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;L(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,C(v,5),u(v,a.h.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=E(v),h=zm,k=(new Map).set("detail",g),l=new Q(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)q=b.playerAfterLoad[p],
541
544
  a.h[p](q);a.g.autoplay=f;b.manifest&&(a.g.play(),Tn(a));z(v)}})}function Pn(a,b,c){a.h&&(Jn(a),Mn(a,{type:"event",targetName:b,event:c},a.l))}
542
545
  function Jn(a){a.G.S(Vn);for(var b={video:{},player:{}},c=t(Sm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in Wm)0==a.m%Wm[e]&&(b.player[e]=a.h[e]());for(var f in Vm)0==a.m%Vm[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.C&&(a.m+=1);Mn(a,{type:"update",update:b},a.l);Sn(a)}function Sn(a){return a.u&&(a.g.duration||a.h.T())?(Wn(a),a.u=!1,!0):!1}
543
- function Wn(a,b){var c={contentId:a.h.md(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Tn(a,void 0===b?0:b,c)}
546
+ function Wn(a,b){var c={contentId:a.h.od(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Tn(a,void 0===b?0:b,c)}
544
547
  function On(a,b){var c=Pm(b.data);switch(c.type){case "init":a.m=0;a.C=!1;a.u=!0;Un(a,c.initState,c.appData);Jn(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.I[d][e]=c;break;case "call":d=a.I[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
545
548
  c.methodName;"player"==d&&"load"==e&&(a.m=0,a.C=!1);var g=c.id,h=b.senderId;f=a.I[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return Xn(a,h,g,null)},function(k){return Xn(a,h,g,k)})}}
546
- function Nn(a,b){var c=Pm(b.data);switch(c.type){case "PLAY":a.g.play();Tn(a);break;case "PAUSE":a.g.pause();Tn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),Tn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Tn(a));break;case "STOP":a.h.Xd().then(function(){a.h&&Tn(a)});break;case "GET_STATUS":Wn(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
549
+ function Nn(a,b){var c=Pm(b.data);switch(c.type){case "PLAY":a.g.play();Tn(a);break;case "PAUSE":a.g.pause();Tn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),Tn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Tn(a));break;case "STOP":a.h.Zd().then(function(){a.h&&Tn(a)});break;case "GET_STATUS":Wn(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
547
550
  null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||Tn(a);break;case "LOAD":a.m=0;a.C=!1;a.u=!1;d=c.media;e=c.currentTime;f=a.L(d.contentId);g=c.autoplay||!0;a.D(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&Wn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Mn(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:Mn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
548
- function Xn(a,b,c,d){a.h&&Mn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Mn(a,b,c,d){a.F&&(a=Om(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Tn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Yn:a.h.nd()?Zn:a.g.paused?$n:ao,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Mn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
549
- M("shaka.cast.CastReceiver",In);In.prototype.destroy=In.prototype.destroy;In.prototype.setContentArtist=In.prototype.Rf;In.prototype.setContentImage=In.prototype.Sf;In.prototype.setContentTitle=In.prototype.Uf;In.prototype.clearContentMetadata=In.prototype.Re;In.prototype.setContentMetadata=In.prototype.Tf;In.prototype.isIdle=In.prototype.yf;In.prototype.isConnected=In.prototype.isConnected;var Vn=.5,Rn=5,Yn="IDLE",ao="PLAYING",Zn="BUFFERING",$n="PAUSED";function bo(a){var b=this;this.g=[];this.h=[];this.data=[];(new ng).box("moov",rg).R("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.O,-12,c.size);b.data.push(d);b.g.push(Uc(c.reader.Za(16)));if(0<c.version){d=c.reader.M();for(var e=0;e<d;e++){var f=Uc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
550
- function co(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Ib(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function eo(a){if(!a)return a;var b=new bo(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={qc:c.qc},d=b.next())c.qc=d.value,a.some(function(e){return function(f){return Db(f,e.qc)}}(c))||a.push(c.qc);return Vc.apply(Pc,ja(a))};function fo(a,b){var c=go(a,b);return 1!=c.length?null:c[0]}function ho(a,b,c){a=io(a,b,c);return 1!=a.length?null:a[0]}function go(a,b){for(var c=[],d=t(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function jo(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
551
+ function Xn(a,b,c,d){a.h&&Mn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Mn(a,b,c,d){a.F&&(a=Om(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Tn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Yn:a.h.pd()?Zn:a.g.paused?$n:ao,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Mn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
552
+ M("shaka.cast.CastReceiver",In);In.prototype.destroy=In.prototype.destroy;In.prototype.setContentArtist=In.prototype.Sf;In.prototype.setContentImage=In.prototype.Tf;In.prototype.setContentTitle=In.prototype.Vf;In.prototype.clearContentMetadata=In.prototype.Se;In.prototype.setContentMetadata=In.prototype.Uf;In.prototype.isIdle=In.prototype.zf;In.prototype.isConnected=In.prototype.isConnected;var Vn=.5,Rn=5,Yn="IDLE",ao="PLAYING",Zn="BUFFERING",$n="PAUSED";function bo(a){var b=this;this.g=[];this.h=[];this.data=[];(new ng).box("moov",rg).R("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.O,-12,c.size);b.data.push(d);b.g.push(Uc(c.reader.Za(16)));if(0<c.version){d=c.reader.M();for(var e=0;e<d;e++){var f=Uc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
553
+ function co(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Ib(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function eo(a){if(!a)return a;var b=new bo(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={rc:c.rc},d=b.next())c.rc=d.value,a.some(function(e){return function(f){return Db(f,e.rc)}}(c))||a.push(c.rc);return Vc.apply(Pc,ja(a))};function fo(a,b){var c=go(a,b);return 1!=c.length?null:c[0]}function ho(a,b,c){a=io(a,b,c);return 1!=a.length?null:a[0]}function go(a,b){for(var c=[],d=t(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function jo(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
551
554
  function io(a,b,c){var d=[];a=t(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function ko(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function lo(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function mo(a){return Array.from(a.childNodes).every(no)?a.textContent.trim():null}
552
555
  function no(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function oo(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function po(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:Math.floor(a/1E3)}
553
556
  function qo(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}
554
557
  function ro(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 so(a){a=Number(a);return 0===a%1?a:null}function to(a){a=Number(a);return 0===a%1&&0<a?a:null}function uo(a){a=Number(a);return 0===a%1&&0<=a?a:null}function vo(a){a=Number(a);return isNaN(a)?null:a}function wo(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
555
- function xo(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function yo(a,b){try{var c=Ic(a);return xo(c,b)}catch(d){return null}};function zo(a,b,c){var d=Ao(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.ve?(e=h.init||e,!1):!0}),f.length&&(a=Bo(e,f,c),0==a.length&&(a=[lc("",e)])));if(d.length&&(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(lc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
556
- t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{ce:g,Jg:e,drmInfos:a,ge:!0}}function Co(a,b,c,d){var e=zo(a,c,d);if(b.ge){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.ge=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.ce||b.ce}
558
+ function xo(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function yo(a,b){try{var c=Jc(a);return xo(c,b)}catch(d){return null}};function zo(a,b,c){var d=Ao(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.we?(e=h.init||e,!1):!0}),f.length&&(a=Bo(e,f,c),0==a.length&&(a=[lc("",e)])));if(d.length&&(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(lc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
559
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{de:g,Kg:e,drmInfos:a,he:!0}}function Co(a,b,c,d){var e=zo(a,c,d);if(b.he){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.he=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.de||b.de}
557
560
  function Do(a){var b=0,c=Ib(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=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
558
561
  function Eo(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Fo(a){a=ho(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Sc(a.textContent);a=Do(a).filter(function(b){return b.type===Go})[0];if(!a)return"";a=Kc(a.value,!0);return(a=xo(a,"WRMHEADER"))?Eo(a):""}
559
- function Bo(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.ve];if(f){var g;if(g=ho(e.node,"urn:microsoft:playready","pro")){g=Sc(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:co(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=lc(f,e.init||a||g);if(f=Ho.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
562
+ function Bo(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.we];if(f){var g;if(g=ho(e.node,"urn:microsoft:playready","pro")){g=Sc(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:co(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=lc(f,e.init||a||g);if(f=Ho.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
560
563
  function Ao(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Io(c.value))&&b.push(c);return b}
561
- function Io(a){var b=a.getAttribute("schemeIdUri"),c=ko(a,"urn:mpeg:cenc:2013","default_KID"),d=io(a,"urn:mpeg:cenc:2013","pssh").map(mo);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Sc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,ve:b,keyId:c,init:0<e.length?e:null}}
564
+ function Io(a){var b=a.getAttribute("schemeIdUri"),c=ko(a,"urn:mpeg:cenc:2013","default_KID"),d=io(a,"urn:mpeg:cenc:2013","pssh").map(mo);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Sc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,we:b,keyId:c,init:0<e.length?e:null}}
562
565
  var Go=1,Ho=(new Map).set("com.widevine.alpha",function(a){return(a=ho(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Fo).set("com.microsoft.playready.recommendation",Fo).set("com.microsoft.playready.software",Fo).set("com.microsoft.playready.hardware",Fo);function Jo(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
563
566
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
564
567
  function Ko(a,b){var c=Lo(a,b,"timescale"),d=1;c&&(d=to(c)||1);var e=Lo(a,b,"duration");c=to(e||"");"image"==a.H.contentType&&(c=vo(e||""));c&&(c/=d);var f=Lo(a,b,"startNumber");e=Number(Lo(a,b,"presentationTimeOffset"))||0;var g=uo(f||"");if(null==f||null==g)g=1;var h=Mo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.U.duration||Infinity;h=go(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=oo(p,"t",uo),y=oo(p,"d",uo);p=oo(p,"r",so);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
565
- p||0;if(0>p)if(q){q=oo(q,"t",uo);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+y,l.push({start:v/f,end:m/f,ag:v}),v=m}f=l}return{timescale:d,ia:c,Kb:g,Ta:e/d||0,Yd:e,timeline:f}}function Lo(a,b,c){return[b(a.H),b(a.ka),b(a.aa)].filter(Rb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
568
+ p||0;if(0>p)if(q){q=oo(q,"t",uo);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+y,l.push({start:v/f,end:m/f,bg:v}),v=m}f=l}return{timescale:d,ia:c,Kb:g,Ta:e/d||0,$d:e,timeline:f}}function Lo(a,b,c){return[b(a.H),b(a.ka),b(a.aa)].filter(Rb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
566
569
  function Mo(a,b,c){return[b(a.H),b(a.ka),b(a.aa)].filter(Rb).map(function(d){return fo(d,c)}).reduce(function(d,e){return d||e})}
567
570
  function No(a,b,c,d,e,f){for(var g=ko(a,"http://www.w3.org/1999/xlink","href"),h=ko(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return He(new N(2,4,4028));if("onLoad"!=h)return He(new N(2,4,4027));var m=kc([d],[g]);return e.request(0,Xe(m,b)).$(function(n){n=yo(n.data,a.tagName);if(!n)return He(new N(2,4,4001,g));
568
571
  for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return Oo(a,b,c,m[0],e,f+1)})}
@@ -570,28 +573,28 @@ function Oo(a,b,c,d,e,f){f=void 0===f?0:f;if(ko(a,"http://www.w3.org/1999/xlink"
570
573
  function Qo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.M();var m=g.reader.M()}else l=g.reader.Jb(),m=g.reader.Jb();g.reader.skip(2);var n=g.reader.Ib();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.M(),q=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.M();g.reader.skip(4);if(1==q)throw new N(2,3,3006);h.push(new mi(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Ro(a){this.h=Ib(a);this.g=new kg(this.h,0)}Ro.prototype.ma=function(){return this.g.ma()};
571
574
  function So(a){var b=To(a);if(7<b.length)throw new N(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=To(a);a:{d=t(Uo);for(var e=d.next();!e.done;e=d.next())if(Db(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.X();else{if(8==b.length&&b[1]&224)throw new N(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.X()+b<=a.h.byteLength?b:a.h.byteLength-a.g.X();d=Ib(a.h,a.g.X(),b);a.g.skip(b);return new Vo(c,d)}
572
575
  function To(a){var b=a.g.X(),c=a.g.Y();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fb(a.h,b,c)}var Uo=[[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 Vo(a,b){this.id=a;this.g=b}
573
- function Wo(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(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 Xo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Ro(a.g);for(var n=null,p=null;a.ma();){var q=So(a);if(187==q.id){var v=Yo(q);v&&(q=c*v.bg,v=b+v.Lf,null!=n&&m.push(new mi(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new mi(n+g,d+g,l,p,null,f,g,h,k));return m}
574
- function Yo(a){var b=new Ro(a.g);a=So(b);if(179!=a.id)throw new N(2,3,3013);a=Wo(a);b=So(b);if(183!=b.id)throw new N(2,3,3012);b=new Ro(b.g);for(var c=0;b.ma();){var d=So(b);if(241==d.id){c=Wo(d);break}}return{bg:a,Lf:c}};function Zo(a,b){var c=Mo(a,b,"Initialization");if(!c)return null;var d=a.H.ya,e=c.getAttribute("sourceURL");e&&(d=kc(a.H.ya,[e]));e=0;var f=null;if(c=oo(c,"range",ro))e=c.start,f=c.end;return new ki(function(){return d},e,f,$o(a))}
576
+ function Wo(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(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 Xo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Ro(a.g);for(var n=null,p=null;a.ma();){var q=So(a);if(187==q.id){var v=Yo(q);v&&(q=c*v.cg,v=b+v.Mf,null!=n&&m.push(new mi(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new mi(n+g,d+g,l,p,null,f,g,h,k));return m}
577
+ function Yo(a){var b=new Ro(a.g);a=So(b);if(179!=a.id)throw new N(2,3,3013);a=Wo(a);b=So(b);if(183!=b.id)throw new N(2,3,3012);b=new Ro(b.g);for(var c=0;b.ma();){var d=So(b);if(241==d.id){c=Wo(d);break}}return{cg:a,Mf:c}};function Zo(a,b){var c=Mo(a,b,"Initialization");if(!c)return null;var d=a.H.ya,e=c.getAttribute("sourceURL");e&&(d=kc(a.H.ya,[e]));e=0;var f=null;if(c=oo(c,"range",ro))e=c.start,f=c.end;return new ki(function(){return d},e,f,$o(a))}
575
578
  function ap(a,b){var c=Number(Lo(a,bp,"presentationTimeOffset"))||0,d=Lo(a,bp,"timescale"),e=1;d&&(e=to(d)||1);var f=c/e||0,g=Zo(a,bp);cp(a,g);var h=Qe(a);return{Ab:function(){var k=Mo(h,bp,"RepresentationIndex"),l=h.H.ya;k&&(k=k.getAttribute("sourceURL"))&&(l=kc(h.H.ya,[k]));k=dp(h);return ep(h,b,g,l,k.start,k.end,f)}}}
576
- function ep(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,w,x,D,B,A,F;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Wa||!a.U.ne,l=a.U.start,m=a.U.duration,n=a.H.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.sa(),c.pa,c.ga):null],p=null,u(G,Promise.all(v),2);y=G.h;w=y[0];x=y[1]||null;D=null;B=l-g;A=l;F=m?l+m:Infinity;if("mp4"==n)var H=Po(w,e,d,c,B,A,F);else{H=new Ro(x);if(440786851!=So(H).id)throw new N(2,3,3008);var J=So(H);if(408125543!=J.id)throw new N(2,3,3009);H=J.g.byteOffset;
579
+ function ep(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,w,x,D,B,A,F;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Wa||!a.U.oe,l=a.U.start,m=a.U.duration,n=a.H.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.sa(),c.pa,c.ga):null],p=null,u(G,Promise.all(v),2);y=G.h;w=y[0];x=y[1]||null;D=null;B=l-g;A=l;F=m?l+m:Infinity;if("mp4"==n)var H=Po(w,e,d,c,B,A,F);else{H=new Ro(x);if(440786851!=So(H).id)throw new N(2,3,3008);var J=So(H);if(408125543!=J.id)throw new N(2,3,3009);H=J.g.byteOffset;
577
580
  J=new Ro(J.g);for(var I=null;J.ma();){var K=So(J);if(357149030==K.id){I=K;break}}if(!I)throw new N(2,3,3010);I=new Ro(I.g);K=1E6;for(J=null;I.ma();){var P=So(I);if(2807729==P.id)K=Wo(P);else if(17545==P.id)if(4==P.g.byteLength)J=P.g.getFloat32(0);else if(8==P.g.byteLength)J=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==J)throw new N(2,3,3011);I=K/1E9;J*=I;K=So(new Ro(w));if(475249515!=K.id)throw new N(2,3,3007);H=Xo(K,H,I,J,d,c,B,A,F)}D=H;h.Fb(D);q=new T(D);k&&q.Xa(A,F,!0);return G["return"](q)})}
578
- function bp(a){return a.lc}function dp(a){var b=Mo(a,bp,"RepresentationIndex");a=Lo(a,bp,"indexRange");a=ro(a||"");b&&(a=oo(b,"range",ro,a));return a}function cp(a,b){fp(a,b);if(!dp(a))throw new N(2,4,4002);}function fp(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=pc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
579
- function $o(a){var b=a.H;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.Lc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function gp(a,b){var c=Zo(a,hp),d=ip(a);if(!d.ia&&!d.timeline&&1<d.Cb.length)throw new N(2,4,4002);if(!d.ia&&!a.U.duration&&!d.timeline&&1==d.Cb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=jp(a.U.start,a.U.duration,a.H.ya,d,c);c=!e;e?e.Eb(g,a.presentationTimeline.Qa()):e=new T(g);a.presentationTimeline.Fb(g);a.Wa&&a.U.ne||e.Xa(a.U.start,a.U.duration?a.U.start+a.U.duration:
581
+ function bp(a){return a.mc}function dp(a){var b=Mo(a,bp,"RepresentationIndex");a=Lo(a,bp,"indexRange");a=ro(a||"");b&&(a=oo(b,"range",ro,a));return a}function cp(a,b){fp(a,b);if(!dp(a))throw new N(2,4,4002);}function fp(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=pc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
582
+ function $o(a){var b=a.H;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.Mc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function gp(a,b){var c=Zo(a,hp),d=ip(a);if(!d.ia&&!d.timeline&&1<d.Cb.length)throw new N(2,4,4002);if(!d.ia&&!a.U.duration&&!d.timeline&&1==d.Cb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=jp(a.U.start,a.U.duration,a.H.ya,d,c);c=!e;e?e.Eb(g,a.presentationTimeline.Qa()):e=new T(g);a.presentationTimeline.Fb(g);a.Wa&&a.U.oe||e.Xa(a.U.start,a.U.duration?a.U.start+a.U.duration:
580
583
  Infinity,c);f&&(f.segmentIndex=e);return{Ab:function(){e&&0!=e.K.length||e.Db(g);return Promise.resolve(e)}}}function hp(a){return a.$a}function ip(a){var b=kp(a);a=Ko(a,hp);var c=a.Kb;0==c&&(c=1);var d=0;a.ia?d=a.ia*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ia:a.ia,startTime:d,Kb:c,Ta:a.Ta,timeline:a.timeline,Cb:b}}
581
- function jp(a,b,c,d,e){var f=d.Cb.length;d.timeline&&d.timeline.length!=d.Cb.length&&(f=Math.min(d.timeline.length,d.Cb.length));for(var g=a-d.Ta,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={ad:m.ad},n++){var p=d.Cb[n];m.ad=kc(c,[p.Cf]);var q=void 0;q=null!=d.ia?l+d.ia:d.timeline?d.timeline[n].end:l+b;k.push(new mi(a+l,a+q,function(v){return function(){return v.ad}}(m),p.start,p.end,e,g,a,h));l=q}return k}
582
- function kp(a){return[a.H.$a,a.ka.$a,a.aa.$a].filter(Rb).map(function(b){return go(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.le&&(a.le=!0);var c=b.getAttribute("media");b=oo(b,"mediaRange",ro,{start:0,end:null});return{Cf:c,start:b.start,end:b.end}})};function lp(a,b,c,d,e,f){var g=mp(a),h=np(a);op(h);var k=Qe(a);if(h.fc)return fp(a,g),{Ab:function(){var q=Jo(h.fc,k.H.id,null,k.bandwidth||null,null);q=kc(k.H.ya,[q]);return ep(k,b,g,q,0,null,h.Ta)}};if(h.ia)return d||(a.presentationTimeline.Cd(h.ia),a.presentationTimeline.Dd(a.U.start)),{Ab:function(){return pp(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.H.id&&(d=a.aa.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=qp(k,h,g);c=a.U.start;var n=a.U.duration?a.U.start+a.U.duration:Infinity,p=Infinity!=
583
- n;l?(p&&(new T(m)).Xa(c,n,!0),l.Eb(m,a.presentationTimeline.Qa())):l=new T(m);a.presentationTimeline.Fb(m);p&&l.Xa(c,n);d&&a.Wa&&(d.segmentIndex=l);return{Ab:function(){l&&0!=l.K.length||l.Db(m);return Promise.resolve(l)}}}function rp(a){return a.mc}function np(a){var b=Ko(a,rp),c=Lo(a,rp,"media");a=Lo(a,rp,"index");return{ia:b.ia,timescale:b.timescale,Kb:b.Kb,Ta:b.Ta,Yd:b.Yd,timeline:b.timeline,zd:c,fc:a}}
584
- function op(a){var b=a.fc?1:0;b+=a.timeline?1:0;b+=a.ia?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.fc&&(a.timeline=null),a.ia=null);if(!a.fc&&!a.zd)throw new N(2,4,4002);}
584
+ function jp(a,b,c,d,e){var f=d.Cb.length;d.timeline&&d.timeline.length!=d.Cb.length&&(f=Math.min(d.timeline.length,d.Cb.length));for(var g=a-d.Ta,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={bd:m.bd},n++){var p=d.Cb[n];m.bd=kc(c,[p.Df]);var q=void 0;q=null!=d.ia?l+d.ia:d.timeline?d.timeline[n].end:l+b;k.push(new mi(a+l,a+q,function(v){return function(){return v.bd}}(m),p.start,p.end,e,g,a,h));l=q}return k}
585
+ function kp(a){return[a.H.$a,a.ka.$a,a.aa.$a].filter(Rb).map(function(b){return go(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.me&&(a.me=!0);var c=b.getAttribute("media");b=oo(b,"mediaRange",ro,{start:0,end:null});return{Df:c,start:b.start,end:b.end}})};function lp(a,b,c,d,e,f){var g=mp(a),h=np(a);op(h);var k=Qe(a);if(h.fc)return fp(a,g),{Ab:function(){var q=Jo(h.fc,k.H.id,null,k.bandwidth||null,null);q=kc(k.H.ya,[q]);return ep(k,b,g,q,0,null,h.Ta)}};if(h.ia)return d||(a.presentationTimeline.Ed(h.ia),a.presentationTimeline.Fd(a.U.start)),{Ab:function(){return pp(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.H.id&&(d=a.aa.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=qp(k,h,g);c=a.U.start;var n=a.U.duration?a.U.start+a.U.duration:Infinity,p=Infinity!=
586
+ n;l?(p&&(new T(m)).Xa(c,n,!0),l.Eb(m,a.presentationTimeline.Qa())):l=new T(m);a.presentationTimeline.Fb(m);p&&l.Xa(c,n);d&&a.Wa&&(d.segmentIndex=l);return{Ab:function(){l&&0!=l.K.length||l.Db(m);return Promise.resolve(l)}}}function rp(a){return a.nc}function np(a){var b=Ko(a,rp),c=Lo(a,rp,"media");a=Lo(a,rp,"index");return{ia:b.ia,timescale:b.timescale,Kb:b.Kb,Ta:b.Ta,$d:b.$d,timeline:b.timeline,Cd:c,fc:a}}
587
+ function op(a){var b=a.fc?1:0;b+=a.timeline?1:0;b+=a.ia?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.fc&&(a.timeline=null),a.ia=null);if(!a.fc&&!a.Cd)throw new N(2,4,4002);}
585
588
  function pp(a,b,c,d,e){function f(I){var K=(I-q)*p,P=K+b.Ta,R=K+l;K=R+p;var ba=Math.min(K,h());R=new mi(R,ba,function(){var aa=Jo(y,x,I,w,P*v);return kc(D,[aa])},0,null,d,B,l,h());R.l=K;return R}function g(){var I=[Math.max(k.Qa(),l),Math.min(k.gb(),h())].map(function(K){return K-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(K){return K+q})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.U.start,m=a.aa.id,n=a.U.duration,p=b.ia,q=b.Kb,v=b.timescale,
586
- y=b.zd,w=a.bandwidth||null,x=a.H.id,D=a.H.ya,B=l-b.Ta,A=g();a=a.Wa?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var F=a;F<=A;++F){var G=f(F);c.push(G)}var H=new T(c);c=k.gb()<h();F=k.T();if(c||F){var J=Math.max(a,A+1);H.Sc(p,function(){var I=k.Qa();H.cb(I);var K=t(g());K.next();K=K.next().value;for(var P=[];J<=K;){var R=f(J);P.push(R);J++}return I>h()&&!P.length?null:P})}return Promise.resolve(H)}
587
- function qp(a,b,c){var d=a.U.start,e=a.U.duration,f=d-b.Ta;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={$c:h.$c,dd:h.dd,gd:h.gd,Xc:h.Xc,jd:h.jd,Yc:h.Yc},k++){var l=b.timeline[k],m=l.start,n=l.ag;l=l.end;h.gd=k+b.Kb;h.jd=n+b.Yd;h.dd=a.H.id;h.Xc=a.bandwidth||null;h.$c=b.zd;h.Yc=a.H.ya;g.push(new mi(d+m,d+l,function(p){return function(){var q=Jo(p.$c,p.dd,p.gd,p.Xc||null,p.jd);return kc(p.Yc,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
589
+ y=b.Cd,w=a.bandwidth||null,x=a.H.id,D=a.H.ya,B=l-b.Ta,A=g();a=a.Wa?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var F=a;F<=A;++F){var G=f(F);c.push(G)}var H=new T(c);c=k.gb()<h();F=k.T();if(c||F){var J=Math.max(a,A+1);H.Tc(p,function(){var I=k.Qa();H.cb(I);var K=t(g());K.next();K=K.next().value;for(var P=[];J<=K;){var R=f(J);P.push(R);J++}return I>h()&&!P.length?null:P})}return Promise.resolve(H)}
590
+ function qp(a,b,c){var d=a.U.start,e=a.U.duration,f=d-b.Ta;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={ad:h.ad,ed:h.ed,hd:h.hd,Yc:h.Yc,kd:h.kd,Zc:h.Zc},k++){var l=b.timeline[k],m=l.start,n=l.bg;l=l.end;h.hd=k+b.Kb;h.kd=n+b.$d;h.ed=a.H.id;h.Yc=a.bandwidth||null;h.ad=b.Cd;h.Zc=a.H.ya;g.push(new mi(d+m,d+l,function(p){return function(){var q=Jo(p.ad,p.ed,p.hd,p.Yc||null,p.kd);return kc(p.Zc,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
588
591
  function mp(a){var b=Lo(a,rp,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.ya;return new ki(function(){var f=Jo(b,c,null,d,null);return kc(e,[f])},0,null,$o(a))};function sp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}sp.prototype.release=function(){for(var a=t(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
589
- function tp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da;return L(function(Fa){switch(Fa.g){case 1:d=qc;up(b);vp(b);wp(b);xp(b);if(!c&&1==b.length){e=b[0];a.g=e.vc;a.h=e.Uc;a.j=e.textStreams;a.i=e.imageStreams;Fa.B(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Fa["return"]();k=b.map(function(ya){return ya.vc});l=b.map(function(ya){return ya.Uc});m=b.map(function(ya){return ya.textStreams});n=b.map(function(ya){return ya.imageStreams});
592
+ function tp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da;return L(function(Fa){switch(Fa.g){case 1:d=qc;up(b);vp(b);wp(b);xp(b);if(!c&&1==b.length){e=b[0];a.g=e.wc;a.h=e.Vc;a.j=e.textStreams;a.i=e.imageStreams;Fa.B(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Fa["return"]();k=b.map(function(xa){return xa.wc});l=b.map(function(xa){return xa.Vc});m=b.map(function(xa){return xa.textStreams});n=b.map(function(xa){return xa.imageStreams});
590
593
  p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(yp(d.Z));y=t(n);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(yp(d.Rb));return u(Fa,zp(a.g,k,f,Ap,Bp),3);case 3:return u(Fa,zp(a.h,l,f,Ap,Bp),4);case 4:return u(Fa,zp(a.j,m,f,Ap,Bp),5);case 5:return u(Fa,zp(a.i,n,f,Ap,Bp),2);case 2:D=0;B=[];if(a.h.length&&a.g.length)for(I=t(a.g),K=I.next();!K.done;K=I.next())for(P=K.value,R=t(a.h),ba=R.next();!ba.done;ba=R.next())aa=ba.value,Y=cg(P.drmInfos,aa.drmInfos),P.drmInfos.length&&aa.drmInfos.length&&
591
594
  !Y.length||(Da=D++,B.push({id:Da,language:P.language,primary:P.primary,audio:P,video:aa,bandwidth:(P.bandwidth||0)+(aa.bandwidth||0),drmInfos:Y,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),F=t(A),G=F.next();!G.done;G=F.next())H=G.value,J=D++,B.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.bb?H:null,video:H.type==d.Na?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
592
- a.l=B;z(Fa)}})}function up(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.vc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&gb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.vc=c}}
595
+ a.l=B;z(Fa)}})}function up(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.wc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&gb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.wc=c}}
593
596
  function wp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&gb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
594
- function vp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Uc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&gb(e.roles,h.roles)&&sf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Uc=c}}
597
+ function vp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Vc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&gb(e.roles,h.roles)&&sf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Vc=c}}
595
598
  function xp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
596
599
  function Cp(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P;return L(function(R){switch(R.g){case 1:b=qc;if(1==a.length)return R["return"](a[0]);c=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.bb})});d=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Na})});e=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Z})});f=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Rb})});g=t(e);for(h=g.next();!h.done;h=g.next())k=
597
600
  h.value,k.push(Dp(b.Z));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Dp(b.Rb));return u(R,zp([],c,0,Ep,Fp),2);case 2:return p=R.h,u(R,zp([],d,0,Ep,Fp),3);case 3:return q=R.h,u(R,zp([],e,0,Ep,Fp),4);case 4:return v=R.h,u(R,zp([],f,0,Ep,Fp),5);case 5:y=R.h;w=0;if(q.length&&p.length)for(F=t(p),G=F.next();!G.done;G=F.next())for(H=G.value,J=t(q),I=J.next();!I.done;I=J.next())K=I.value,P=w++,K.variantIds.push(P),H.variantIds.push(P);else for(x=q.concat(p),D=t(x),B=D.next();!B.done;B=D.next())A=
@@ -618,52 +621,52 @@ function Sp(a,b,c){if(b==a&&a!=c)return Up;if(c==a&&a!=b)return Tp;if(b>a){if(c<
618
621
  r.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return C(c,2),u(c,Zp(a),4);if(2!=c.g)return va(c,0);b=E(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};r.onExpirationUpdated=function(){};
619
622
  function Zp(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=Xe(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Se(a.o,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,aq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
620
623
  function aq(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g){d=yo(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](bq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Oo(d,a.g.retryParameters,f,c,a.h.networkingEngine);Se(a.o,g);return u(k,g.promise,2)}h=k.h;return k["return"](bq(a,h,c))})}
621
- function bq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da,Fa,ya;return L(function(Ia){switch(Ia.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=go(b,"Location").map(mo).filter(Rb);0<f.length&&(g=kc(e,f),e=a.m=g);h=go(b,"BaseURL");k=h.map(mo);l=kc(e,k);m=0;h&&h.length&&(m=oo(h[0],"availabilityTimeOffset",vo)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=oo(b,"minBufferTime",qo)||0);a.F=oo(b,"minimumUpdatePeriod",qo,-1);q=oo(b,"availabilityStartTime",po);v=oo(b,
622
- "timeShiftBufferDepth",qo);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=oo(b,"suggestedPresentationDelay",qo));x=a.g.dash.ignoreMaxSegmentDuration;D=null;x||(D=oo(b,"maxSegmentDuration",qo));B=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,F=t(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.cb(A.Qa());else J=a.g.defaultPresentationDelay||1.5*p,I=null!=w?w:J,A=new S(q,I,a.g.dash.autoCorrectDrift);A.nc("static"==B);(K=A.T())&&
623
- !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.Td(v);P=b.getAttribute("profiles")||"";R={Wa:"static"!=B,presentationTimeline:A,aa:null,U:null,ka:null,H:null,bandwidth:0,le:!1,yb:m,profiles:P.split(",")};ba=cq(a,R,l,b);aa=ba.duration;Y=ba.periods;"static"!=B&&ba.ee||A.Ia(aa||Infinity);a.u&&!a.C&&(Da=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());a.C?A.ye(a.u):a.u&&Ua("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.");
624
- A.Cd(D||1);return u(Ia,tp(a.j,Y,R.Wa),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ia.B(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!A.De()){Ia.B(4);break}Fa=go(b,"UTCTiming");return u(Ia,dq(a,l,Fa),5);case 5:ya=Ia.h;if(!a.h)return Ia["return"]();A.ze(ya);case 4:A.vd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Ia)}})}
625
- function cq(a,b,c,d){var e=oo(d,"mediaPresentationDuration",qo),f=[],g=0;d=go(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=oo(k,"start",qo,g),n=k.id,p=oo(k,"duration",qo),q=null;if(l){var v=oo(l,"start",qo);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.s&&null!==n&&null!==m&&m<a.s)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=eq(a,b,c,{start:m,duration:q,node:k,ne:null==q||!l});f.push(g);b.aa.id&&q&&(a.N[b.aa.id]=q);if(null==q){g=
626
- null;break}g=m+q}}a.L=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,ee:!1}:{periods:f,duration:g,ee:!0}}
627
- function eq(a,b,c,d){b.aa=fq(d.node,null,c);b.U=d;b.aa.yb=b.yb;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=go(d.node,"EventStream");c=b.presentationTimeline.Qa();e=t(e);for(var f=e.next();!f.done;f=e.next())gq(a,d.start,d.duration,f.value,c);c=go(d.node,"AdaptationSet").map(function(m){return hq(a,b,m)}).filter(Rb);if(b.Wa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Of);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
628
- }d=c.filter(function(m){return!m.Wd});c=c.filter(function(m){return m.Wd});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Wd.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={uc:h.uc},l=k.next())h.uc=l.value,h.uc.trickModeVideo=e.streams.find(function(m){return function(n){return cd(m.uc.codecs)==cd(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:iq(d,"audio");g=a.g.disableVideo?[]:iq(d,"video");f=a.g.disableText?
629
- []:iq(d,pc);c=a.g.disableThumbnails?[]:iq(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ja(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ja(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ja(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ja(h.value.streams));return{id:b.aa.id,vc:d,Uc:e,textStreams:g,imageStreams:f}}
624
+ function bq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da,Fa,xa;return L(function(Ia){switch(Ia.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=go(b,"Location").map(mo).filter(Rb);0<f.length&&(g=kc(e,f),e=a.m=g);h=go(b,"BaseURL");k=h.map(mo);l=kc(e,k);m=0;h&&h.length&&(m=oo(h[0],"availabilityTimeOffset",vo)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=oo(b,"minBufferTime",qo)||0);a.F=oo(b,"minimumUpdatePeriod",qo,-1);q=oo(b,"availabilityStartTime",po);v=oo(b,
625
+ "timeShiftBufferDepth",qo);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=oo(b,"suggestedPresentationDelay",qo));x=a.g.dash.ignoreMaxSegmentDuration;D=null;x||(D=oo(b,"maxSegmentDuration",qo));B=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,F=t(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.cb(A.Qa());else J=a.g.defaultPresentationDelay||1.5*p,I=null!=w?w:J,A=new S(q,I,a.g.dash.autoCorrectDrift);A.oc("static"==B);(K=A.T())&&
626
+ !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.Vd(v);P=b.getAttribute("profiles")||"";R={Wa:"static"!=B,presentationTimeline:A,aa:null,U:null,ka:null,H:null,bandwidth:0,me:!1,yb:m,profiles:P.split(",")};ba=cq(a,R,l,b);aa=ba.duration;Y=ba.periods;"static"!=B&&ba.fe||A.Ia(aa||Infinity);a.u&&!a.C&&(Da=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());a.C?A.ze(a.u):a.u&&Ua("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.");
627
+ A.Ed(D||1);return u(Ia,tp(a.j,Y,R.Wa),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ia.B(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!A.Ee()){Ia.B(4);break}Fa=go(b,"UTCTiming");return u(Ia,dq(a,l,Fa),5);case 5:xa=Ia.h;if(!a.h)return Ia["return"]();A.Ae(xa);case 4:A.xd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Ia)}})}
628
+ function cq(a,b,c,d){var e=oo(d,"mediaPresentationDuration",qo),f=[],g=0;d=go(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=oo(k,"start",qo,g),n=k.id,p=oo(k,"duration",qo),q=null;if(l){var v=oo(l,"start",qo);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.s&&null!==n&&null!==m&&m<a.s)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=eq(a,b,c,{start:m,duration:q,node:k,oe:null==q||!l});f.push(g);b.aa.id&&q&&(a.N[b.aa.id]=q);if(null==q){g=
629
+ null;break}g=m+q}}a.L=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,fe:!1}:{periods:f,duration:g,fe:!0}}
630
+ function eq(a,b,c,d){b.aa=fq(d.node,null,c);b.U=d;b.aa.yb=b.yb;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=go(d.node,"EventStream");c=b.presentationTimeline.Qa();e=t(e);for(var f=e.next();!f.done;f=e.next())gq(a,d.start,d.duration,f.value,c);c=go(d.node,"AdaptationSet").map(function(m){return hq(a,b,m)}).filter(Rb);if(b.Wa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Pf);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
631
+ }d=c.filter(function(m){return!m.Yd});c=c.filter(function(m){return m.Yd});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Yd.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={vc:h.vc},l=k.next())h.vc=l.value,h.vc.trickModeVideo=e.streams.find(function(m){return function(n){return cd(m.vc.codecs)==cd(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:iq(d,"audio");g=a.g.disableVideo?[]:iq(d,"video");f=a.g.disableText?
632
+ []:iq(d,pc);c=a.g.disableThumbnails?[]:iq(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ja(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ja(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ja(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ja(h.value.streams));return{id:b.aa.id,wc:d,Vc:e,textStreams:g,imageStreams:f}}
630
633
  function iq(a,b){return a.filter(function(c){return c.contentType==b})}
631
634
  function hq(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ka=fq(c,b.aa,null);var e=!1,f=go(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Rb),h=void 0,k=b.ka.contentType==pc;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
632
635
  l}}var n;m=go(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var q=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=go(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
633
636
  10)));m=go(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(q=p.value,p=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=q){q=q.split(";");for(var y=t(q),w=y.next();!w.done;w=y.next()){var x=w.value,D=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],D=x[1]||"und"):(w="CC"+p,2==q.length?p+=2:p++,D=x);v.set(w,rd(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
634
637
  1,null!=q)for(q=t(q.split(";")),w=q.next();!w.done;w=q.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,x=w),v.set(y,rd(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=go(c,"ContentProtection");var B=zo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=rd(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=go(c,"Label"))&&l.length&&
635
638
  (l=l[0],l.textContent&&(F=l.textContent));l=go(c,"Representation");c=l.map(function(G){if(G=jq(a,b,B,h,A,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.ka.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ka.contentType||"application"==b.ka.contentType)for(b.ka.contentType=kq(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ka.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
636
- m.value,p=t(B.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ja(q.keyIds),ja(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Rb);return{id:b.ka.id||"__fake__"+a.G++,contentType:b.ka.contentType,language:A,Kg:e,streams:c,drmInfos:B.drmInfos,Wd:f,Of:k}}
637
- function jq(a,b,c,d,e,f,g,h,k,l){b.H=fq(l,b.ka,null);a.u=Math.min(a.u,b.H.yb);if(!lq(b.H))return null;var m=b.U.start;b.bandwidth=oo(l,"bandwidth",to)||0;var n=b.H.contentType,p=n==pc||"application"==n;n="image"==n;try{var q=function(H,J,I){return mq(a,H,J,I)};if(b.H.lc)var v=ap(b,q);else if(b.H.$a)v=gp(b,a.l);else if(b.H.mc)v=lp(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.H.ya,w=b.U.duration||0;v={Ab:function(){return Promise.resolve(Ki(m,w,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
639
+ m.value,p=t(B.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ja(q.keyIds),ja(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Rb);return{id:b.ka.id||"__fake__"+a.G++,contentType:b.ka.contentType,language:A,Lg:e,streams:c,drmInfos:B.drmInfos,Yd:f,Pf:k}}
640
+ function jq(a,b,c,d,e,f,g,h,k,l){b.H=fq(l,b.ka,null);a.u=Math.min(a.u,b.H.yb);if(!lq(b.H))return null;var m=b.U.start;b.bandwidth=oo(l,"bandwidth",to)||0;var n=b.H.contentType,p=n==pc||"application"==n;n="image"==n;try{var q=function(H,J,I){return mq(a,H,J,I)};if(b.H.mc)var v=ap(b,q);else if(b.H.$a)v=gp(b,a.l);else if(b.H.nc)v=lp(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.H.ya,w=b.U.duration||0;v={Ab:function(){return Promise.resolve(Ki(m,w,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
638
641
  throw H;}q=go(l,"ContentProtection");q=Co(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var x=!1;go(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(n&&((l=go(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
639
642
  (B=l.getAttribute("value")),!B))return null;var A;l=b.H.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(A="PQ");var F=b.H.id?b.aa.id+","+b.H.id:"",G={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,J,I;return L(function(K){if(1==K.g){J=(H=F&&b.Wa&&a.l[F])?a.l[F]:G;if(J.segmentIndex)return K.B(0);I=J;return u(K,v.Ab(),3)}I.segmentIndex=K.h;z(K)})},closeSegmentIndex:function(){G.segmentIndex&&
640
- (G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ka.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.H.Lc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:x,closedCaptions:k,
643
+ (G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ka.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.H.Mc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:x,closedCaptions:k,
641
644
  hdr:A,tilesLayout:B,matchedStreams:[]};F&&b.Wa&&!a.l[F]&&(a.l[F]=G);return G}function Yp(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,Zp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=E(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();$p(a,b);z(d)}})}function $p(a,b){0>a.F||a.D.S(Math.max(3,a.F-b,Qa(a.I)))}
642
- function fq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Lc:null,audioSamplingRate:null,yb:0};c=c||b.ya;var d=go(a,"BaseURL"),e=d.map(mo),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=oo(a,"frameRate",wo)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=go(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
643
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=go(a,"AudioChannelConfiguration");m=nq(m)||b.Lc;p=oo(a,"audioSamplingRate",uo)||b.audioSamplingRate;f||(f=kq(g,h));var q=fo(a,"SegmentBase"),v=fo(a,"SegmentTemplate"),y=q?oo(q,"availabilityTimeOffset",vo)||0:0,w=v?oo(v,"availabilityTimeOffset",vo)||0:0;d=d&&d.length?oo(d[0],"availabilityTimeOffset",vo)||0:0;d=b.yb+d+y+w;return{ya:kc(c,e),lc:q||b.lc,$a:fo(a,"SegmentList")||b.$a,mc:v||b.mc,width:oo(a,"width",uo)||b.width,height:oo(a,
644
- "height",uo)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Lc:m,audioSamplingRate:p,yb:d}}
645
+ function fq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Mc:null,audioSamplingRate:null,yb:0};c=c||b.ya;var d=go(a,"BaseURL"),e=d.map(mo),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=oo(a,"frameRate",wo)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=go(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
646
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=go(a,"AudioChannelConfiguration");m=nq(m)||b.Mc;p=oo(a,"audioSamplingRate",uo)||b.audioSamplingRate;f||(f=kq(g,h));var q=fo(a,"SegmentBase"),v=fo(a,"SegmentTemplate"),y=q?oo(q,"availabilityTimeOffset",vo)||0:0,w=v?oo(v,"availabilityTimeOffset",vo)||0:0;d=d&&d.length?oo(d[0],"availabilityTimeOffset",vo)||0:0;d=b.yb+d+y+w;return{ya:kc(c,e),mc:q||b.mc,$a:fo(a,"SegmentList")||b.$a,nc:v||b.nc,width:oo(a,"width",uo)||b.width,height:oo(a,
647
+ "height",uo)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Mc:m,audioSamplingRate:p,yb:d}}
645
648
  function nq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
646
- 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 lq(a){var b=a.lc?1:0;b+=a.$a?1:0;b+=a.mc?1:0;if(0==b)return a.contentType==pc||"application"==a.contentType?!0:!1;1!=b&&(a.lc&&(a.$a=null),a.mc=null);return!0}
647
- function oq(a,b,c,d){var e,f,g,h,k,l;return L(function(m){if(1==m.g)return e=kc(b,[c]),f=Xe(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Se(a.o,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=Ic(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
649
+ 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 lq(a){var b=a.mc?1:0;b+=a.$a?1:0;b+=a.nc?1:0;if(0==b)return a.contentType==pc||"application"==a.contentType?!0:!1;1!=b&&(a.mc&&(a.$a=null),a.nc=null);return!0}
650
+ function oq(a,b,c,d){var e,f,g,h,k,l;return L(function(m){if(1==m.g)return e=kc(b,[c]),f=Xe(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Se(a.o,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=Jc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
648
651
  function dq(a,b,c){var d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;C(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.B(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.B(8);
649
652
  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":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return u(n,oq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,oq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
650
653
  case 9:va(n,3);break;case 5:E(n);case 3:g=f.next();n.B(2);break;case 4:return Ua("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
651
654
  function gq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=oo(d,"timescale",uo)||1;d=t(go(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=oo(k,"presentationTime",uo)||0,m=oo(k,"duration",uo)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
652
655
  function mq(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=cf,f=$i(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Se(a.o,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function kq(a,b){return gd(ad(a,b))?pc:a.split("/")[0]}M("shaka.dash.DashParser",Xp);ig.mpd=function(){return new Xp};gg["application/dash+xml"]=function(){return new Xp};gg["video/vnd.mpeg.dash.mpd"]=function(){return new Xp};function pq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function qq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}qq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
653
656
  qq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function rq(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function sq(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.i=c}function tq(a,b){this.name=a;this.value=b};function uq(a,b){return a.filter(function(c){return c.name==b})}function vq(a,b){return a.filter(function(c){return rq(c,"TYPE")==b})}function wq(a,b){var c=uq(a,b);return c.length?c[0]:null}function xq(a,b,c){c=void 0===c?0:c;return(a=wq(a,b))?Number(a.value):c};function yq(a){this.h=a;this.g=0}function zq(a){Aq(a,/[ \t]+/gm)}function Aq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function Bq(a){return a.g==a.h.length?null:(a=Aq(a,/[^ \t\n]*/gm))?a[0]:null};function Cq(){this.g=0}
654
- function Dq(a,b,c){b=Ic(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new N(2,4,4015);b=0;for(var e=!0,f=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Eq(a,g),--a.g,Fq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Eq(a,h);if(Gq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
657
+ function Dq(a,b,c){b=Jc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new N(2,4,4015);b=0;for(var e=!0,f=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Eq(a,g),--a.g,Fq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Eq(a,h);if(Gq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
655
658
  var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Eq(a,m),Fq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=kc([d],[m.trim()])[0],h&&g.push(h),e.push(new sq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new sq("",g,k)));return new pq(c,b,f,e)}f.push(h);
656
659
  "EXT-X-STREAM-INF"==h.name&&(h.g.push(new tq("URI",k)),e=!0)}}return new pq(c,b,f)}function Eq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new N(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new yq(f);var h;(h=Aq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Aq(f,k);)d.push(new tq(h[1],h[2]||h[3])),zq(f)}return new qq(c,e,d,g)}
657
- var Fq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Gq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Hq(){}function Iq(a){try{var b=Jq(a);return Je({uri:a,qe:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return He(c)}}function Jq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(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=Sc(a):e=Mc(a);return{data:e,contentType:c}}
660
+ var Fq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Gq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Hq(){}function Iq(a){try{var b=Jq(a);return Je({uri:a,re:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return He(c)}}function Jq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(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=Sc(a):e=Nc(a);return{data:e,contentType:c}}
658
661
  M("shaka.net.DataUriPlugin",Hq);Hq.parse=Iq;Ue("data",Iq);function Kq(){var a=this;this.g=this.i=null;this.La=1;this.o=new Map;this.u=new Map;this.xa=new Set;this.h=new Map;this.j=null;this.N="";this.da=new Cq;this.wa=0;this.C=new O(function(){Lq(a)});this.m=Mq;this.D=null;this.fa=0;this.G=Infinity;this.ca=this.ja=0;this.F=new Re;this.W=[];this.L=new Map;this.Ma=!1;this.s=new Map;this.V=null;this.ea=new Map;this.I=new Map;this.l=!1}r=Kq.prototype;r.configure=function(a){this.g=a};
659
662
  r.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),u(f,Nq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,u(f,Oq(c,d.data),3);e=c.wa;0<e&&c.C.S(e);return f["return"](c.D)})};r.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.F&&(a.push(this.F.destroy()),this.F=null);this.g=this.i=null;this.xa.clear();this.D=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
660
663
  r.update=function(){var a=this,b,c,d;return L(function(e){if(1==e.g){if(a.m==Mq)return e["return"]();b=[];a.V=null;c=Array.from(a.h.values());return c.length?u(e,Pq(a,c[0]),2):e.B(2)}for(d=1;d<c.length;d++)b.push(Pq(a,c[d]));return u(e,Promise.all(b),0)})};
661
- function Pq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){if(1==y.g)return c=Qq,d=b.He,e=new Xb(d),a.l&&b.Me&&$b(e,new bc("_HLS_skip=YES")),u(y,Nq(a,e.toString()),2);if(3!=y.g){f=y.h;g=Dq(a.da,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=uq(g.g,"EXT-X-DEFINE");k=Rq(a,h);l=b.stream;return u(y,Sq(a,b.Tc,g,l.type,l.mimeType,b.yd,k,b.Te,l.codecs,l.bandwidth),3)}m=y.h;l.segmentIndex.Eb(m,a.j.Qa());m.length&&(n=xq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.yd.get(n),l.segmentIndex.cb(p));q=m[m.length-
662
- 1];if(v=wq(g.g,"EXT-X-ENDLIST"))Tq(a,c.Ge),a.j.Ia(q.endTime);z(y)})}r.onExpirationUpdated=function(){};
663
- function Oq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da,Fa,ya,Ia,Pb,ld;return L(function(Ya){switch(Ya.g){case 1:c=Dq(a.da,b,a.N);if(0!=c.type)throw new N(2,4,4022);d=uq(c.g,"EXT-X-DEFINE");Uq(a,d);e=uq(c.g,"EXT-X-MEDIA");f=uq(c.g,"EXT-X-STREAM-INF");g=uq(c.g,"EXT-X-IMAGE-STREAM-INF");Vq(a,f);h=uq(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Z(m,"DATA-ID"),p=Z(m,"URI"),q=Z(m,"LANGUAGE"),v=Z(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
664
- kc([a.N],[p])[0]),q&&y.set("language",q),v&&y.set("value",v),w=new Q("sessiondata",y),a.i)a.i.onEvent(w);return u(Ya,Wq(a,e),2);case 2:return Xq(a,e),u(Ya,Yq(a,f),3);case 3:return x=Ya.h,u(Ya,Zq(a,e),4);case 4:return D=Ya.h,u(Ya,$q(a,g),5);case 5:B=Ya.h;if(!a.i)throw new N(2,7,7001);if(a.Ma&&0==x.length)throw new N(2,4,4034);F=A=Infinity;G=t(a.h.values());for(H=G.next();!H.done;H=G.next())J=H.value,A=Math.min(A,J.oe),"text"!=J.stream.type&&(F=Math.min(F,J.Bf-J.oe));a.m!=Mq?(a.j=new S(0,a.g.defaultPresentationDelay?
665
- a.g.defaultPresentationDelay:a.ca?a.ca:3*a.fa),a.j.nc(!1)):(a.j=new S(null,0),a.j.nc(!0));if(a.m!=Mq)a.wa=a.G,I=Qq,a.m==I.Fe&&(K=a.j.Qc,isNaN(a.g.availabilityWindowOverride)||(K=a.g.availabilityWindowOverride),a.j.Td(K));else for(a.j.Ia(F),a.j.offset(-A),P=t(a.h.values()),H=P.next();!H.done;H=P.next())R=H.value,R.stream.segmentIndex.offset(-A),R.stream.segmentIndex.Xa(0,F);a.W=[];ba=[];aa=t(x);for(Y=aa.next();!Y.done;Y=aa.next())for(Da=Y.value,Fa=t([Da.video,Da.audio]),ya=Fa.next();!ya.done;ya=Fa.next())(Ia=
666
- ya.value)&&ba.push(Ia);return u(Ya,Promise.all(ba.map(function(Fc){return L(function(ie){return u(ie,Fc.createSegmentIndex(),0)})})),6);case 6:Pb=t(ba);for(ya=Pb.next();!ya.done;ya=Pb.next())ld=ya.value,a.W.push(ld.segmentIndex.K);ar(a);a.j.vd();a.D={presentationTimeline:a.j,variants:x,textStreams:D,imageStreams:B,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.D);z(Ya)}})}
664
+ function Pq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){if(1==y.g)return c=Qq,d=b.Ie,e=new Xb(d),a.l&&b.Ne&&$b(e,new bc("_HLS_skip=YES")),u(y,Nq(a,e.toString()),2);if(3!=y.g){f=y.h;g=Dq(a.da,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=uq(g.g,"EXT-X-DEFINE");k=Rq(a,h);l=b.stream;return u(y,Sq(a,b.Uc,g,l.type,l.mimeType,b.Bd,k,b.Ue,l.codecs,l.bandwidth),3)}m=y.h;l.segmentIndex.Eb(m,a.j.Qa());m.length&&(n=xq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.Bd.get(n),l.segmentIndex.cb(p));q=m[m.length-
665
+ 1];if(v=wq(g.g,"EXT-X-ENDLIST"))Tq(a,c.He),a.j.Ia(q.endTime);z(y)})}r.onExpirationUpdated=function(){};
666
+ function Oq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da,Fa,xa,Ia,Pb,ld;return L(function(Ya){switch(Ya.g){case 1:c=Dq(a.da,b,a.N);if(0!=c.type)throw new N(2,4,4022);d=uq(c.g,"EXT-X-DEFINE");Uq(a,d);e=uq(c.g,"EXT-X-MEDIA");f=uq(c.g,"EXT-X-STREAM-INF");g=uq(c.g,"EXT-X-IMAGE-STREAM-INF");Vq(a,f);h=uq(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Z(m,"DATA-ID"),p=Z(m,"URI"),q=Z(m,"LANGUAGE"),v=Z(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
667
+ kc([a.N],[p])[0]),q&&y.set("language",q),v&&y.set("value",v),w=new Q("sessiondata",y),a.i)a.i.onEvent(w);return u(Ya,Wq(a,e),2);case 2:return Xq(a,e),u(Ya,Yq(a,f),3);case 3:return x=Ya.h,u(Ya,Zq(a,e),4);case 4:return D=Ya.h,u(Ya,$q(a,g),5);case 5:B=Ya.h;if(!a.i)throw new N(2,7,7001);if(a.Ma&&0==x.length)throw new N(2,4,4034);F=A=Infinity;G=t(a.h.values());for(H=G.next();!H.done;H=G.next())J=H.value,A=Math.min(A,J.pe),"text"!=J.stream.type&&(F=Math.min(F,J.Cf-J.pe));a.m!=Mq?(a.j=new S(0,a.g.defaultPresentationDelay?
668
+ a.g.defaultPresentationDelay:a.ca?a.ca:3*a.fa),a.j.oc(!1)):(a.j=new S(null,0),a.j.oc(!0));if(a.m!=Mq)a.wa=a.G,I=Qq,a.m==I.Ge&&(K=a.j.Rc,isNaN(a.g.availabilityWindowOverride)||(K=a.g.availabilityWindowOverride),a.j.Vd(K));else for(a.j.Ia(F),a.j.offset(-A),P=t(a.h.values()),H=P.next();!H.done;H=P.next())R=H.value,R.stream.segmentIndex.offset(-A),R.stream.segmentIndex.Xa(0,F);a.W=[];ba=[];aa=t(x);for(Y=aa.next();!Y.done;Y=aa.next())for(Da=Y.value,Fa=t([Da.video,Da.audio]),xa=Fa.next();!xa.done;xa=Fa.next())(Ia=
669
+ xa.value)&&ba.push(Ia);return u(Ya,Promise.all(ba.map(function(Fc){return L(function(ke){return u(ke,Fc.createSegmentIndex(),0)})})),6);case 6:Pb=t(ba);for(xa=Pb.next();!xa.done;xa=Pb.next())ld=xa.value,a.W.push(ld.segmentIndex.K);ar(a);a.j.xd();a.D={presentationTimeline:a.j,variants:x,textStreams:D,imageStreams:B,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.D);z(Ya)}})}
667
670
  function Uq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.o.has(d)||a.o.set(d,e))}}function Rq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.o.get(f))&&c.set(f,e)}return c}
668
671
  function Vq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=br(a,e);if(g){var h=nc(pc,e);a.s.set(g,h);fb(e,h)}f&&(g=mc("audio",e),a.s.set(f,g));d&&(f=mc("video",e),a.s.set(d,f))}}
669
672
  function Zq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q;return L(function(v){if(1==v.g)return c=vq(b,"SUBTITLES"),d=c.map(function(y){var w,x,D;return L(function(B){if(1==B.g){if(w=a.g.disableText)return B["return"](null);C(B,2);return u(B,cr(a,y),4)}if(2!=B.g)return x=B.h,B["return"](x.stream);D=E(B);if(a.g.hls.ignoreTextStreamFailures)return B["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=rq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(n=
@@ -671,9 +674,9 @@ t(m),p=n.next();!p.done;p=n.next())q=p.value,q.stream.codecs=l;return v["return"
671
674
  function $q(a,b){var c,d;return L(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return L(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);C(l,2);return u(l,dr(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=E(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
672
675
  function Wq(a,b){var c;return L(function(d){if(1==d.g)return b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f}),b.length?u(d,cr(a,b[0]),2):d.B(2);c=b.slice(1).map(function(e){return cr(a,e)});return u(d,Promise.all(c),0)})}
673
676
  function Yq(a,b){var c,d,e;return L(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,q,v;return L(function(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(rq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,q=Z(g,"VIDEO-RANGE"),u(y,er(a,g,k),2);if(v=y.h){for(var w=y["return"],x=v.audio,D=v.video,B=t(D),A=B.next();!A.done;A=B.next())if(A=A.value.stream)A.width=Number(n)||void 0,A.height=Number(p)||
674
- void 0,A.frameRate=Number(h)||void 0,A.hdr=q||void 0;B=a.g.disableAudio;if(!x.length||B)x=[null];B=a.g.disableVideo;if(!D.length||B)D=[null];B=[];x=t(x);for(A=x.next();!A.done;A=x.next()){A=A.value;for(var F=t(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=A?A.stream:null;var J=H?H.stream:null,I=A?A.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.Tc:"")+" - "+(A?A.Tc:"");G&&J&&I.length&&K.length&&!(0<cg(I,K).length)||a.xa.has(H)||(G={id:a.La++,language:G?G.language:"und",primary:!!G&&G.primary||
677
+ void 0,A.frameRate=Number(h)||void 0,A.hdr=q||void 0;B=a.g.disableAudio;if(!x.length||B)x=[null];B=a.g.disableVideo;if(!D.length||B)D=[null];B=[];x=t(x);for(A=x.next();!A.done;A=x.next()){A=A.value;for(var F=t(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=A?A.stream:null;var J=H?H.stream:null,I=A?A.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.Uc:"")+" - "+(A?A.Uc:"");G&&J&&I.length&&K.length&&!(0<cg(I,K).length)||a.xa.has(H)||(G={id:a.La++,language:G?G.language:"und",primary:!!G&&G.primary||
675
678
  !!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},B.push(G),a.xa.add(H))}}y=w.call(y,B)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Ob,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
676
- function er(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w;return L(function(x){if(1==x.g)return d=qc,e=br(a,b),f=Z(b,"AUDIO"),g=Z(b,"VIDEO"),k=(h=f||g)&&a.u.has(h)?a.u.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=rq(b,"URI"),q=l.audio.find(function(D){return D&&D.Tc==p}),v=nc(d.Na,e),(y=nc(d.bb,e))&&!v?m=d.bb:!k.length&&y&&v?(m=d.Na,e=[[v,y].join()]):l.audio.length&&q?(m=d.bb,n=!0):m=l.video.length?d.bb:d.Na,n?x.B(2):u(x,fr(a,b,e,m,c),3);2!=x.g&&(w=x.h);if(w)l[w.stream.type]=[w];else if(null===w)return x["return"](null);
679
+ function er(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,w;return L(function(x){if(1==x.g)return d=qc,e=br(a,b),f=Z(b,"AUDIO"),g=Z(b,"VIDEO"),k=(h=f||g)&&a.u.has(h)?a.u.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=rq(b,"URI"),q=l.audio.find(function(D){return D&&D.Uc==p}),v=nc(d.Na,e),(y=nc(d.bb,e))&&!v?m=d.bb:!k.length&&y&&v?(m=d.Na,e=[[v,y].join()]):l.audio.length&&q?(m=d.bb,n=!0):m=l.video.length?d.bb:d.Na,n?x.B(2):u(x,fr(a,b,e,m,c),3);2!=x.g&&(w=x.h);if(w)l[w.stream.type]=[w];else if(null===w)return x["return"](null);
677
680
  gr(l);return x["return"](l)})}function br(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=dd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function hr(a){a=Z(a,"LANGUAGE")||"und";return rd(a)}
678
681
  function gr(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Xq(a,b){var c=vq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=hr(e);var f=rq(e,"GROUP-ID");e=rq(e,"INSTREAM-ID");a.L.get(f)||a.L.set(f,new Map);a.L.get(f).set(e,d)}}
679
682
  function cr(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(w){if(1==w.g){c=rq(b,"GROUP-ID");d="";var x=rq(b,"TYPE").toLowerCase();"subtitles"==x&&(x=pc);e=x;e!=pc&&c&&a.s.has(c)&&(d=a.s.get(c));f=ir(rq(b,"URI"),a.o);if(a.h.has(f))return w["return"](a.h.get(f));g=hr(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?x=(x=Z(b,"CHANNELS"))?parseInt(x.split("/")[0],10):null:x=null;m=x;"audio"==e?x=(x=Z(b,"CHANNELS"))?x.includes("/JOC"):!1:x=!1;n=x;p=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
@@ -681,44 +684,44 @@ v="YES"==q;return u(w,jr(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=w.h;a.u.has(c)?a.u.get
681
684
  function dr(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(p){if(1==p.g){c=ir(rq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=hr(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,jr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Z(b,"RESOLUTION"))if(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=
682
685
  Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
683
686
  function fr(a,b,c,d,e){var f,g,h,k;return L(function(l){if(1==l.g){f=ir(rq(b,"URI"),a.o);if(a.h.has(f))return l["return"](a.h.get(f));var m=Z(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.L.get(m):null;h=mc(d,c);return u(l,jr(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
684
- function jr(a,b,c,d,e,f,g,h,k,l,m,n,p){var q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da,Fa,ya,Ia,Pb,ld,Ya,Fc,ie,An,Bn,Cn,Dn,gi,hi,Df,En,Fn,Gn,Hn;return L(function(cb){switch(cb.g){case 1:return q=kc([a.N],[b])[0],u(cb,Nq(a,q),2);case 2:v=cb.h;q=v.uri;y=Dq(a.da,v.data,q);if(1!=y.type)throw new N(2,4,4017);w=[];if(y.segments)for(x=t(y.segments),D=x.next();!D.done;D=x.next())B=D.value,A=uq(B.g,"EXT-X-KEY"),w.push.apply(w,ja(A));F=!1;G=[];H=new Set;J=t(w);for(I=J.next();!I.done;I=J.next())if(K=I.value,
685
- P=rq(K,"METHOD"),"NONE"!=P){F=!0;if("AES-128"==P)return a.Ma=!0,cb["return"](null);R=rq(K,"KEYFORMAT");if(aa=(ba=kr[R])?ba(K):null){if(aa.keyIds)for(Y=t(aa.keyIds),Da=Y.next();!Da.done;Da=Y.next())Fa=Da.value,H.add(Fa);G.push(aa)}}if(F&&!G.length)throw new N(2,4,4026);ya=uq(y.g,"EXT-X-DEFINE");Ia=Rq(a,ya);lr(a,y);return u(cb,mr(a,d,c,y,Ia),3);case 3:return Pb=cb.h,nr.includes(Pb)&&(c=""),ld=new Map,Ya=new Map,C(cb,4),u(cb,Sq(a,b,y,d,Pb,ld,Ia,Ya,c,p),6);case 6:Fc=cb.h;va(cb,5);break;case 4:ie=E(cb);
686
- if(4035==ie.code)return Ua("Skipping unsupported HLS stream",Pb,b),cb["return"](null);throw ie;case 5:An=Fc[0].startTime;Bn=Fc[Fc.length-1].endTime;Cn=new T(Fc);Dn=d==pc?"subtitle":void 0;gi=[];if(l)for(hi=t(l.split(",")),Df=hi.next();!Df.done;Df=hi.next())En=Df.value,gi.push(En);Gn=(Fn=wq(y.g,"EXT-X-SERVER-CONTROL"))?null!=Fn.getAttribute("CAN-SKIP-UNTIL"):!1;Hn={id:a.La++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Cn,mimeType:Pb,codecs:c,kind:Dn,encrypted:F,
687
- drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:gi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return cb["return"]({stream:Hn,Tc:b,He:q,oe:An,Bf:Bn,yd:ld,Te:Ya,Me:Gn})}})}
687
+ function jr(a,b,c,d,e,f,g,h,k,l,m,n,p){var q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa,Y,Da,Fa,xa,Ia,Pb,ld,Ya,Fc,ke,An,Bn,Cn,Dn,hi,ii,Ff,En,Fn,Gn,Hn;return L(function(cb){switch(cb.g){case 1:return q=kc([a.N],[b])[0],u(cb,Nq(a,q),2);case 2:v=cb.h;q=v.uri;y=Dq(a.da,v.data,q);if(1!=y.type)throw new N(2,4,4017);w=[];if(y.segments)for(x=t(y.segments),D=x.next();!D.done;D=x.next())B=D.value,A=uq(B.g,"EXT-X-KEY"),w.push.apply(w,ja(A));F=!1;G=[];H=new Set;J=t(w);for(I=J.next();!I.done;I=J.next())if(K=I.value,
688
+ P=rq(K,"METHOD"),"NONE"!=P){F=!0;if("AES-128"==P)return a.Ma=!0,cb["return"](null);R=rq(K,"KEYFORMAT");if(aa=(ba=kr[R])?ba(K):null){if(aa.keyIds)for(Y=t(aa.keyIds),Da=Y.next();!Da.done;Da=Y.next())Fa=Da.value,H.add(Fa);G.push(aa)}}if(F&&!G.length)throw new N(2,4,4026);xa=uq(y.g,"EXT-X-DEFINE");Ia=Rq(a,xa);lr(a,y);return u(cb,mr(a,d,c,y,Ia),3);case 3:return Pb=cb.h,nr.includes(Pb)&&(c=""),ld=new Map,Ya=new Map,C(cb,4),u(cb,Sq(a,b,y,d,Pb,ld,Ia,Ya,c,p),6);case 6:Fc=cb.h;va(cb,5);break;case 4:ke=E(cb);
689
+ if(4035==ke.code)return Ua("Skipping unsupported HLS stream",Pb,b),cb["return"](null);throw ke;case 5:An=Fc[0].startTime;Bn=Fc[Fc.length-1].endTime;Cn=new T(Fc);Dn=d==pc?"subtitle":void 0;hi=[];if(l)for(ii=t(l.split(",")),Ff=ii.next();!Ff.done;Ff=ii.next())En=Ff.value,hi.push(En);Gn=(Fn=wq(y.g,"EXT-X-SERVER-CONTROL"))?null!=Fn.getAttribute("CAN-SKIP-UNTIL"):!1;Hn={id:a.La++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Cn,mimeType:Pb,codecs:c,kind:Dn,encrypted:F,
690
+ drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:hi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return cb["return"]({stream:Hn,Uc:b,Ie:q,pe:An,Cf:Bn,Bd:ld,Ue:Ya,Ne:Gn})}})}
688
691
  function lr(a,b){var c=wq(b.g,"EXT-X-PLAYLIST-TYPE"),d=wq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Tq(a,Mq);else{c?Tq(a,or):Tq(a,pr);d=wq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=wq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ja=Number(rq(c,"PART-TARGET")),a.G=Math.min(a.ja,a.G),c=wq(b.g,"EXT-X-SERVER-CONTROL"),a.ca=c?Number(rq(c,"PART-HOLD-BACK")):0):a.G=Math.min(d,a.G);a.fa=Math.max(d,a.fa)}}
689
692
  function qr(a,b,c,d){c=wq(c,"EXT-X-MAP");if(!c)return null;var e=rq(c,"URI");d=ir(kc([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=rr(d,c),a.ea.set(b,c));return a.ea.get(b)}function rr(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new ki(function(){return[a]},c,d)}
690
- function sr(a,b,c,d,e,f,g,h,k){var l=d.g,m=ir(d.h,g),n=wq(l,"EXTINF"),p=g=0,q=null;if(!n){if(0==d.i.length)throw new N(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},w=0;w<d.i.length;y={bd:y.bd},w++){var x=d.i[w],D=0==w?c:v[v.length-1],B=0==w?e:D.endTime,A=Number(Z(x,"DURATION"))||a.ja;if(A){A=B+A;var F=0,G=null;"EXT-X-PRELOAD-HINT"==x.name?F=(D=Z(x,"BYTERANGE-START"))?Number(D):0:(F=Z(x,"BYTERANGE"),D=t(tr(D,F)),F=D.next().value,G=D.next().value);if(x=Z(x,"URI"))y.bd=kc([h],
691
- [x])[0],v.push(new mi(B,A,function(H){return function(){return[H.bd]}}(y),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=wq(l,"EXT-X-BYTERANGE"))?(q=t(tr(c,a.value)),p=q.next().value,q=q.next().value):v.length&&(p=v[0].pa,q=v[v.length-1].ga);c="";a=null;"image"==k&&(c="1x1",k=wq(l,"EXT-X-TILES"))&&(c=rq(k,"LAYOUT"),(k=Z(k,"DURATION"))&&(a=Number(k)));return new mi(e,g,function(){return m.length?[m]:[]},p,q,b,f,0,Infinity,v,c,a)}
693
+ function sr(a,b,c,d,e,f,g,h,k){var l=d.g,m=ir(d.h,g),n=wq(l,"EXTINF"),p=g=0,q=null;if(!n){if(0==d.i.length)throw new N(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},w=0;w<d.i.length;y={cd:y.cd},w++){var x=d.i[w],D=0==w?c:v[v.length-1],B=0==w?e:D.endTime,A=Number(Z(x,"DURATION"))||a.ja;if(A){A=B+A;var F=0,G=null;"EXT-X-PRELOAD-HINT"==x.name?F=(D=Z(x,"BYTERANGE-START"))?Number(D):0:(F=Z(x,"BYTERANGE"),D=t(tr(D,F)),F=D.next().value,G=D.next().value);if(x=Z(x,"URI"))y.cd=kc([h],
694
+ [x])[0],v.push(new mi(B,A,function(H){return function(){return[H.cd]}}(y),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=wq(l,"EXT-X-BYTERANGE"))?(q=t(tr(c,a.value)),p=q.next().value,q=q.next().value):v.length&&(p=v[0].pa,q=v[v.length-1].ga);c="";a=null;"image"==k&&(c="1x1",k=wq(l,"EXT-X-TILES"))&&(c=rq(k,"LAYOUT"),(k=Z(k,"DURATION"))&&(a=Number(k)));return new mi(e,g,function(){return m.length?[m]:[]},p,q,b,f,0,Infinity,v,c,a)}
692
695
  function tr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ga+1,d=c+d-1);return[c,d]}function ar(a){if(a.j){for(var b=t(a.W),c=b.next();!c.done;c=b.next())a.j.Fb(c.value);a.W=[]}}
693
696
  function Sq(a,b,c,d,e,f,g,h,k,l){var m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa;return L(function(Y){switch(Y.g){case 1:m=c.segments;p=xq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(q=wq(c.g,"EXT-X-SKIP"))?Number(Z(q,"SKIPPED-SEGMENTS")):0;y=p+v;if(a.m!=Mq&&f.has(y)){w=f.get(y);Y.B(2);break}if(null!=a.V){Y.B(3);break}n=qr(a,c.h,m[0].g,g);x=a;return u(Y,ur(a,b,n,e,y,!1,m[0],g,d,k,l),4);case 4:x.V=Y.h;case 3:w=a.V;case 2:D=m[0].h;D.split("/").pop();B=xq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(B)||
694
697
  h.set(B,y),v))for(A=h;A.has(B+1)&&A.get(B+1)<y;)B++;F=a.I.get(B)||0;G=[];H=0;case 5:if(!(H<m.length)){Y.B(7);break}J=m[H];I=G[G.length-1];K=0==H?w:I.endTime;y=p+v+H;f.set(y,K);n=qr(a,c.h,J.g,g);P=wq(J.g,"EXT-X-DISCONTINUITY");if(!P){Y.B(8);break}B++;h.set(B,y);return u(Y,vr(a,B,b,n,e,y,J,g,K,d,k,l),9);case 9:F=Y.h;case 8:!a.l&&(R=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());ba=wq(J.g,"EXTINF");a.l||ba?(aa=sr(a,n,I,J,K,F,g,c.h,d))&&G.push(aa):a.l||Ua("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.");
695
698
  H++;Y.B(5);break;case 7:return Y["return"](G)}})}function vr(a,b,c,d,e,f,g,h,k,l,m,n){var p,q;return L(function(v){if(1==v.g)return p=0,a.I.has(b)?(p=a.I.get(b),v.B(2)):u(v,ur(a,c,d,e,f,!0,g,h,l,m,n),3);2!=v.g&&(q=v.h,p=k-q,a.I.set(b,p));return v["return"](p)})}
696
699
  function wr(a,b,c,d,e,f){var g,h,k,l,m,n;return L(function(p){switch(p.g){case 1:g=cf;h=$i(b.sa(),b.pa,b.ga,a.g.retryParameters);a.i.modifySegmentRequest(h,{type:c,init:b instanceof ki,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});if(a.g.hls.useFullSegmentsForStartTime)return p["return"](xr(a,h,g));k=$i(b.sa(),b.pa,b.pa+2048-1,a.g.retryParameters);a.i.modifySegmentRequest(k,{type:c,init:b instanceof ki,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});C(p,2);return u(p,
697
700
  xr(a,k,g),4);case 4:return l=p.h,p["return"](l);case 2:m=E(p);if(7001==m.code)throw m;Ua("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",k.uris[0]);return u(p,xr(a,h,g),5);case 5:return n=p.h,p["return"](n)}})}
698
- function ur(a,b,c,d,e,f,g,h,k,l,m){var n,p,q,v,y,w,x,D;return L(function(B){switch(B.g){case 1:n=sr(a,c,null,g,0,0,h,"",k);if(a.D&&!f&&(p=a.h.get(b),q=p.yd.get(e),void 0!=q))return B["return"](q);d=d.toLowerCase();if(nr.includes(d))throw Ua("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Ua("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){B.B(2);break}v=[wr(a,n,k,d,l,m)];c&&v.push(wr(a,c,k,d,l,m));return u(B,
701
+ function ur(a,b,c,d,e,f,g,h,k,l,m){var n,p,q,v,y,w,x,D;return L(function(B){switch(B.g){case 1:n=sr(a,c,null,g,0,0,h,"",k);if(a.D&&!f&&(p=a.h.get(b),q=p.Bd.get(e),void 0!=q))return B["return"](q);d=d.toLowerCase();if(nr.includes(d))throw Ua("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Ua("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){B.B(2);break}v=[wr(a,n,k,d,l,m)];c&&v.push(wr(a,c,k,d,l,m));return u(B,
699
702
  Promise.all(v),3);case 3:return y=B.h,w=y[0],x=y[1]||y[0],B["return"](yr(b,w.uri,w.data,x.data));case 2:if("video/mp2t"!=d){B.B(4);break}return u(B,wr(a,n,k,d,l,m),5);case 5:return D=B.h,B["return"](zr(b,D.uri,D.data));case 4:throw new N(2,4,4030,b);}})}
700
- function yr(a,b,c,d){var e=0;(new ng).box("moov",rg).box("trak",rg).box("mdia",rg).R("mdhd",function(h){e=Eh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new N(2,4,4030,a,b);var f=0,g=!1;(new ng).box("moof",rg).box("traf",rg).R("tfdt",function(h){f=Dh(h.reader,h.version).ld/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
701
- function zr(a,b,c){function d(){f.seek(g+188);h=f.Y();71!=h&&(f.seek(g+192),h=f.Y());71!=h&&(f.seek(g+204),h=f.Y());71!=h&&e();f.te(1)}function e(){throw new N(2,4,4030,a,b);}var f=new kg(c,0),g=0,h=0;for(c=Math.min(f.O.byteLength-188,940);;){g=f.X();h=f.Y();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Ib();if(8191==(k&8191))d();else if(k&16384)if(k=(f.Y()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.Y(),f.skip(k)),1!=f.M()>>8)d();else{f.skip(3);c=f.Y()>>6;0!=c&&1!=c||e();0==f.Y()&&e();c=f.Y();k=f.Ib();var l=
703
+ function yr(a,b,c,d){var e=0;(new ng).box("moov",rg).box("trak",rg).box("mdia",rg).R("mdhd",function(h){e=Eh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new N(2,4,4030,a,b);var f=0,g=!1;(new ng).box("moof",rg).box("traf",rg).R("tfdt",function(h){f=Dh(h.reader,h.version).md/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
704
+ function zr(a,b,c){function d(){f.seek(g+188);h=f.Y();71!=h&&(f.seek(g+192),h=f.Y());71!=h&&(f.seek(g+204),h=f.Y());71!=h&&e();f.ue(1)}function e(){throw new N(2,4,4030,a,b);}var f=new kg(c,0),g=0,h=0;for(c=Math.min(f.O.byteLength-188,940);;){g=f.X();h=f.Y();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Ib();if(8191==(k&8191))d();else if(k&16384)if(k=(f.Y()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.Y(),f.skip(k)),1!=f.M()>>8)d();else{f.skip(3);c=f.Y()>>6;0!=c&&1!=c||e();0==f.Y()&&e();c=f.Y();k=f.Ib();var l=
702
705
  f.Ib();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function ir(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
703
706
  function mr(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y;return L(function(w){if(1==w.g){f=qc;g=cf;h=ir(d.segments[0].h,e);k=new Xb(h);l=k.va.split(".").pop();m=Ar[b];if(n=m[l])return w["return"](n);if(b==f.Z)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.Rb&&(!c||"jpeg"==c))return w["return"]("image/jpeg");p=Xe([h],a.g.retryParameters);p.method="HEAD";return u(w,xr(a,p,g),2)}q=w.h;v=q.headers["content-type"];return v?w["return"](v.split(";")[0]):(y=m.mp4,w["return"](y))})}
704
- function Nq(a,b){var c=Xe([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return xr(a,c,0)}function Lq(a){var b,c;L(function(d){if(1==d.g){if(!a.i)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.wa,a.C.S(b),va(d,0);c=E(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.C.S(.1);z(d)})}function Tq(a,b){a.m=b;a.j&&a.j.nc(a.m==Mq);a.m!=Mq||a.C.stop()}
707
+ function Nq(a,b){var c=Xe([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return xr(a,c,0)}function Lq(a){var b,c;L(function(d){if(1==d.g){if(!a.i)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.wa,a.C.S(b),va(d,0);c=E(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.C.S(.1);z(d)})}function Tq(a,b){a.m=b;a.j&&a.j.oc(a.m==Mq);a.m!=Mq||a.C.stop()}
705
708
  function xr(a,b,c){if(!a.F)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b);Se(a.F,b);return b.promise}M("shaka.hls.HlsParser",Kq);
706
709
  var nr=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Ar={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",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},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"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
707
710
  vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},kr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=rq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=rq(a,"URI");b=Jq(b);b=Fb(b.data);b=lc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
708
- rq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=rq(a,"URI");a=Jq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=co(a,b);return lc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Mq="VOD",pr="EVENT",or="LIVE",Qq={Ge:Mq,lg:pr,Fe:or};ig.m3u8=function(){return new Kq};gg["application/x-mpegurl"]=function(){return new Kq};gg["application/vnd.apple.mpegurl"]=function(){return new Kq};function Br(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,qe:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Lc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Cr(){}function Dr(a,b,c,d,e){var f=new Er;qf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Fr,h={Zd:!1,Ce:!1};a=Gr(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 Ge(a,function(){h.Zd=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Ce=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
711
+ rq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=rq(a,"URI");a=Jq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=co(a,b);return lc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Mq="VOD",pr="EVENT",or="LIVE",Qq={He:Mq,mg:pr,Ge:or};ig.m3u8=function(){return new Kq};gg["application/x-mpegurl"]=function(){return new Kq};gg["application/vnd.apple.mpegurl"]=function(){return new Kq};function Br(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,re:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Mc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Cr(){}function Dr(a,b,c,d,e){var f=new Er;qf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Fr,h={ae:!1,De:!1};a=Gr(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 Ge(a,function(){h.ae=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.De=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
709
712
  function Gr(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,w,x,D,B;return L(function(A){switch(A.g){case 1:return h=Hr,k=Ir,p=n=0,q=Date.now(),C(A,2),u(A,h(a,c),4);case 4:return l=A.h,f(Jr(l.headers)),v=l.clone().body.getReader(),w=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,x=function(F){function G(){var H,J;return L(function(I){switch(I.g){case 1:return C(I,2),u(I,v.read(),4);case 4:H=I.h;va(I,3);break;case 2:return E(I),I["return"]();case 3:if(H.done){I.B(5);break}n+=H.value.byteLength;if(!g){I.B(5);
710
- break}return u(I,g(H.value),5);case 5:J=Date.now();if(100<J-q||H.done)e(J-q,n-p,w-n),p=n,q=J;H.done?F.close():(F.enqueue(H.value),G());z(I)}})}G()},new k({start:x}),u(A,l.arrayBuffer(),5);case 5:m=A.h;va(A,3);break;case 2:D=E(A);if(d.Zd)throw new N(1,1,7001,a,b);if(d.Ce)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return B=Jr(l.headers),A["return"](Br(B,m,l.status,a,l.url,b))}})}function Jr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
713
+ break}return u(I,g(H.value),5);case 5:J=Date.now();if(100<J-q||H.done)e(J-q,n-p,w-n),p=n,q=J;H.done?F.close():(F.enqueue(H.value),G());z(I)}})}G()},new k({start:x}),u(A,l.arrayBuffer(),5);case 5:m=A.h;va(A,3);break;case 2:D=E(A);if(d.ae)throw new N(1,1,7001,a,b);if(d.De)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return B=Jr(l.headers),A["return"](Br(B,m,l.status,a,l.url,b))}})}function Jr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
711
714
  function Kr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Cr);Cr.isSupported=Kr;Cr.parse=Dr;var Hr=window.fetch,Fr=window.AbortController,Ir=window.ReadableStream,Er=window.Headers;Kr()&&(Ue("http",Dr,2,!0),Ue("https",Dr,2,!0),Ue("blob",Dr,2,!0));function Lr(){}
712
715
  function Mr(a,b,c,d,e){var f=new Nr,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 N(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=Or(f);e(q);n=!0}};f.onload=function(){var q=Or(f),v=f.response;try{var y=Br(q,v,f.status,a,f.responseURL,c);l(y)}catch(w){m(w)}};f.onerror=function(q){m(new N(1,1,1002,a,q,
713
716
  c))};f.ontimeout=function(){m(new N(1,1,1003,a,c))};f.onprogress=function(q){var v=Date.now();if(100<v-g||q.lengthComputable&&q.loaded==q.total)d(v-g,q.loaded-h,q.total-q.loaded),h=q.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Ge(k,function(){f.abort();return Promise.resolve()})}
714
717
  function Or(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}M("shaka.net.HttpXHRPlugin",Lr);Lr.parse=Mr;var Nr=window.XMLHttpRequest;Ue("http",Mr,1,!0);Ue("https",Mr,1,!0);Ue("blob",Mr,1,!0);function Pr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Qr(a){return a.sa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.pa+":"+a.ga}function Rr(a,b){return $i(a.g.sa(),a.g.pa,a.g.ga,b.streaming.retryParameters)};function Sr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Tr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Sr.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 Ur(a){var b=this;this.o=a;this.j=new Map;this.i=new df(function(){return Vr(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Sr}Ur.prototype.destroy=function(){return this.i.destroy()};function Wr(a,b,c){a.m=b;a.l=c}function Vr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
715
718
  function Xr(a,b,c,d,e,f){ef(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return L(function(v){if(1==v.g)return u(v,Yr(a,c),2);h=v.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=Fb(h),l=new bo(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 y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function Zr(a){return L(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
716
719
  function Yr(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=cf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;fb(a.h,e);return g["return"](f.data)})};function $r(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new rc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}$r.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}C(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);E(b);z(b)})};
717
- function as(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}$r.prototype.store=function(){return this.h};$r.prototype.promise=function(){return this.g};function bs(a){this.h=a;this.g=[]}bs.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function cs(a,b){return ds(a,b,"readwrite")}function ds(a,b,c){c=a.h.transaction([b],c);var d=new $r(c,b);a.g.push(d);d.promise().then(function(){fb(a.g,d)},function(){fb(a.g,d)});return d};function es(a,b,c){this.h=new bs(a);this.i=b;this.g=c}r=es.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return fs(this.i)};r.removeSegments=function(a,b){return gs(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,hs(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.$d(e)}))})};r.addManifests=function(){return fs(this.g)};
720
+ function as(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}$r.prototype.store=function(){return this.h};$r.prototype.promise=function(){return this.g};function bs(a){this.h=a;this.g=[]}bs.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function cs(a,b){return ds(a,b,"readwrite")}function ds(a,b,c){c=a.h.transaction([b],c);var d=new $r(c,b);a.g.push(d);d.promise().then(function(){fb(a.g,d)},function(){fb(a.g,d)});return d};function es(a,b,c){this.h=new bs(a);this.i=b;this.g=c}r=es.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return fs(this.i)};r.removeSegments=function(a,b){return gs(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,hs(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.be(e)}))})};r.addManifests=function(){return fs(this.g)};
718
721
  r.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function is(a,b,c){a=cs(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=cs(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 gs(this,this.g,a,b)};
719
- r.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,hs(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Zb(e)})))})};r.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=ds(a.h,a.g,"readonly"),c=new Map,u(d,as(b,function(e,f){var g;return L(function(h){if(1==h.g)return u(h,a.Zb(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.$d=function(a){return a};r.Zb=function(a){return Promise.resolve(a)};
720
- function fs(a){return Promise.reject(new N(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 L(function(m){if(1==m.g){d=cs(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={tc:g.tc},k=h.next())l=k.value,g.tc=e.add(l),g.tc.onsuccess=function(n){return function(){f.push(n.tc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
721
- function gs(a,b,c,d){a=cs(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={sc:e.sc},f=c.next())e.sc=f.value,b["delete"](e.sc).onsuccess=function(g){return function(){return d(g.sc)}}(e);return a.promise()}
722
+ r.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,hs(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Zb(e)})))})};r.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=ds(a.h,a.g,"readonly"),c=new Map,u(d,as(b,function(e,f){var g;return L(function(h){if(1==h.g)return u(h,a.Zb(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.be=function(a){return a};r.Zb=function(a){return Promise.resolve(a)};
723
+ function fs(a){return Promise.reject(new N(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 L(function(m){if(1==m.g){d=cs(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={uc:g.uc},k=h.next())l=k.value,g.uc=e.add(l),g.uc.onsuccess=function(n){return function(){f.push(n.uc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
724
+ function gs(a,b,c,d){a=cs(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={tc:e.tc},f=c.next())e.tc=f.value,b["delete"](e.tc).onsuccess=function(g){return function(){return d(g.tc)}}(e);return a.promise()}
722
725
  function hs(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=ds(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Qb:h.Qb,Ob:h.Ob},l=k.next())h.Ob=l.value,h.Qb=e.get(h.Ob),h.Qb.onsuccess=function(n){return function(){void 0==n.Qb.result&&g.push(n.Ob);f[n.Ob]=n.Qb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function js(a){this.g=new bs(a)}js.prototype.destroy=function(){return this.g.destroy()};js.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=ds(a.g,"session-ids","readonly"),c=[],u(d,as(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};js.prototype.add=function(a){var b=cs(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()};
723
726
  js.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=cs(b.g,"session-ids"),u(d,as(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function ks(){this.g=new Map}ks.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)};ks.prototype.init=function(){var a=this;ls.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});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)};
724
727
  function ms(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ba:d,la:f},la:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function ns(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ba:d,la:f},e)})})}
@@ -727,7 +730,7 @@ function rs(a){var b,c,d;return L(function(e){return 1==e.g?(b=Array.from(a.g.va
727
730
  ts.prototype.Zb=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=us(a.periods[c],e),b.push(f);return u(h,Cp(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata})})};
728
731
  function us(a,b){vs(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return ws(e,a.startTime,b)})}
729
732
  function ws(a,b,c){var d=a.initSegmentUri?xs(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=xs(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
730
- dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}ts.prototype.$d=function(a){return{data:a.data}};function xs(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new N(2,9,9004,"Could not parse uri "+a);}
733
+ dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}ts.prototype.be=function(a){return{data:a.data}};function xs(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new N(2,9,9004,"Could not parse uri "+a);}
731
734
  function vs(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
732
735
  f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function ys(){es.apply(this,arguments)}qa(ys,es);
733
736
  ys.prototype.Zb=function(a){var b,c,d,e,f,g;return L(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(zs(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Cp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
@@ -739,7 +742,7 @@ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new As(d,"segment-v5","man
739
742
  r.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
740
743
  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};
741
744
  r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,Cs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
742
- function Cs(){var a=new rc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}ss("idb",function(){return Ac()||xc()||!window.indexedDB?null:new Bs});function Ds(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ds.prototype.Ba=function(){return this.i};Ds.prototype.la=function(){return this.h};Ds.prototype.key=function(){return this.l};Ds.prototype.toString=function(){return this.j};
745
+ function Cs(){var a=new rc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}ss("idb",function(){return Bc()||xc()||!window.indexedDB?null:new Bs});function Ds(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ds.prototype.Ba=function(){return this.i};Ds.prototype.la=function(){return this.h};Ds.prototype.key=function(){return this.l};Ds.prototype.toString=function(){return this.j};
743
746
  function Es(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 Ds(b,c,d,Number(a[4])):null};function Fs(a,b){this.h=a;this.g=b}
744
747
  function Gs(a,b){var c=new S(null,0);c.Ia(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Hs(a,d,e,c);e=b.streams.filter(function(l){return l.type==pc}).map(function(l){return Is(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Is(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=
745
748
  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}}
@@ -748,21 +751,21 @@ e.value,g=Is(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.va
748
751
  function Is(a,b,c){var d=b.segments.map(function(e){return Js(a,e)});c.Fb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new T(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
749
752
  roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Js(a,b){var c=new Ds("segment",a.h,a.g,b.dataKey);return new mi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ks(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
750
753
  function Ks(a,b){var c=new Ds("segment",a.h,a.g,b);return new ki(function(){return[c.toString()]},0,null)};function Ls(){this.g=null}r=Ls.prototype;r.configure=function(){};
751
- r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=Es(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new ks;ua(m);return u(m,e.init(),4);case 4:return u(m,os(e,d.Ba(),d.la()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Fs(d.Ba(),d.la()),l=Gs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};r.stop=function(){return Promise.resolve()};
752
- r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new ks,C(m,2,3),u(m,e.init(),5);case 5:return u(m,os(e,d.Ba(),d.la()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.B(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:E(m),m.B(3)}})};
753
- gg["application/x-offline-manifest"]=function(){return new Ls};function Ms(){}function Ns(a){var b=Es(a);b&&"manifest"==b.g?(a={uri:a,qe:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Je(a)):a=b&&"segment"==b.g?Os(b.key(),b):He(new N(2,1,9004,a));return a}
754
+ r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=Es(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new ks;ua(m);return u(m,e.init(),4);case 4:return u(m,os(e,d.Ba(),d.la()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Fs(d.Ba(),d.la()),l=Gs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};r.stop=function(){return Promise.resolve()};
755
+ r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new ks,C(m,2,3),u(m,e.init(),5);case 5:return u(m,os(e,d.Ba(),d.la()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.B(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:E(m),m.B(3)}})};
756
+ gg["application/x-offline-manifest"]=function(){return new Ls};function Ms(){}function Ns(a){var b=Es(a);b&&"manifest"==b.g?(a={uri:a,re:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Je(a)):a=b&&"segment"==b.g?Os(b.key(),b):He(new N(2,1,9004,a));return a}
754
757
  function Os(a,b){var c=new ks;return Je(void 0).$(function(){return c.init()}).$(function(){return os(c,b.Ba(),b.la())}).$(function(d){return d.getSegments([b.key()])}).$(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",Ms);Ms.plugin=Ns;Ue("offline",Ns);function Ps(a,b,c){var d,e,f,g,h,k;return L(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,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,Qs(y.info,p)){y.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.B(4);break}g=f.value;h=Rs(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l["return"](d)}})}
755
- function Rs(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new tf({mb:b,onError:function(){},Nc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,Bf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return E(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return C(f,6),u(f,Lf(d),8);case 8:va(f,7);break;case 6:return E(f),u(f,d.destroy(),
758
+ function Rs(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new tf({mb:b,onError:function(){},Oc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,Bf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return E(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return C(f,6),u(f,Lf(d),8);case 8:va(f,7);break;case 6:return E(f),u(f,d.destroy(),
756
759
  9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==h.g)return C(h,2),u(h,Mf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);E(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
757
760
  function Qs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&gb(a.audioCapabilities,b.audioCapabilities,c)&&gb(a.videoCapabilities,b.videoCapabilities,c)};function Ss(a,b,c){var d=b.presentationTimeline.getDuration();b=Ts(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Us(a,b){var c=Gs(new Fs(a.Ba(),a.la()),b),d=b.appMetadata||{};c=Ts(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}}
758
- function Ts(a){var b=[],c=je(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push($d(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ae(c.value));return b};function Vs(){this.g={}}function Ws(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 Xs(a,b){a.g[b.id]=b.bandwidth||2048}function Ys(a,b){var c=a.g[b];null==c&&(c=0);return c};function Zs(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.bc()):(this.h=xk(),this.g=new Te);this.i=[];this.j=[];var c=!a;this.l=new df(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Vr(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 u(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return u(k,b.g.destroy(),4);
761
+ function Ts(a){var b=[],c=ie(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push($d(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ae(c.value));return b};function Vs(){this.g={}}function Ws(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 Xs(a,b){a.g[b.id]=b.bandwidth||2048}function Ys(a,b){var c=a.g[b];null==c&&(c=0);return c};function Zs(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.bc()):(this.h=xk(),this.g=new Te);this.i=[];this.j=[];var c=!a;this.l=new df(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Vr(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 u(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return u(k,b.g.destroy(),4);
759
762
  case 4:b.h=null,b.g=null,z(k)}})})}function $s(){if(uc())a:{var a=t(ls.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=Zs.prototype;r.destroy=function(){return this.l.destroy()};
760
763
  r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=uk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Kb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return zk(this.h,a)};r.getConfiguration=function(){var a=xk();zk(a,this.h,xk());return a};r.bc=function(){return this.g};
761
764
  r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Ur(this.g);this.j.push(f);b=at(this,a,b||{},function(){var h;return L(function(k){if(1==k.g)return u(k,fg(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Sb(h))})},e,f);var g=new Ge(b,function(){return Vr(f)});g["finally"](function(){fb(d.j,f)});g.then=function(h){Kb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
762
- return g.promise.then(h)};return bt(this,g)};r.mf=function(){Kb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
765
+ return g.promise.then(h)};return bt(this,g)};r.nf=function(){Kb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
763
766
  function at(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,w,x,D,B;return L(function(A){switch(A.g){case 1:return ct(),h=g=null,k=new ks,n=m=l=null,C(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,dt(a,b,g,e),6);case 6:p=A.h;et(a);q=!p.presentationTimeline.T()&&!p.presentationTimeline.lb();if(!q)throw new N(2,9,9005,b);return u(A,ft(a,p,function(F){n=n||F},e),7);case 7:h=A.h;et(a);if(n)throw n;return u(A,gt(p,e),8);case 8:return u(A,k.init(),9);case 9:return et(a),u(A,ms(k),10);case 10:return l=A.h,et(a),v=ht(h,
764
- p,b,c,e,f),y=v.zf,w=v.Vd,u(A,l.la.addManifests([y]),11);case 11:x=A.h;et(a);m=x[0];et(a);if(n)throw n;return u(A,it(a,w,m,y,f,e,l.la,p,h),12);case 12:return et(a),D=new Ds("manifest",l.path.Ba,l.path.la,m),A["return"](Us(D,y));case 3:return wa(A),u(A,k.destroy(),13);case 13:if(!g){A.B(14);break}return u(A,g.stop(),14);case 14:if(!h){A.B(16);break}return u(A,h.destroy(),16);case 16:xa(A,0);break;case 2:B=E(A);if(null==m){A.B(18);break}return u(A,jt(m),18);case 18:throw n||B;}})}
765
- function it(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,y,w,x,D;return L(function(B){switch(B.g){case 1:l={};m=0;n=function(A,F){var G,H,J,I,K,P,R;return L(function(ba){if(1==ba.g){G={};H=t(A);for(J=H.next();!J.done;G={ab:G.ab},J=H.next())G.ab=J.value,I=Rr(G.ab,f),K=G.ab.i,P=G.ab.h,R=function(aa){return function(Y){var Da,Fa,ya;return L(function(Ia){if(1==Ia.g)return u(Ia,g.addSegments([{data:Y}]),2);Da=Ia.h;et(a);Fa=aa.ab.g;ya=Qr(Fa);l[ya]=Da[0];m+=Y.byteLength;z(Ia)})}}(G),Xr(e,G.ab.groupId,I,K,P,R);return u(ba,
767
+ p,b,c,e,f),y=v.Af,w=v.Xd,u(A,l.la.addManifests([y]),11);case 11:x=A.h;et(a);m=x[0];et(a);if(n)throw n;return u(A,it(a,w,m,y,f,e,l.la,p,h),12);case 12:return et(a),D=new Ds("manifest",l.path.Ba,l.path.la,m),A["return"](Us(D,y));case 3:return wa(A),u(A,k.destroy(),13);case 13:if(!g){A.B(14);break}return u(A,g.stop(),14);case 14:if(!h){A.B(16);break}return u(A,h.destroy(),16);case 16:ya(A,0);break;case 2:B=E(A);if(null==m){A.B(18);break}return u(A,jt(m),18);case 18:throw n||B;}})}
768
+ function it(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,y,w,x,D;return L(function(B){switch(B.g){case 1:l={};m=0;n=function(A,F){var G,H,J,I,K,P,R;return L(function(ba){if(1==ba.g){G={};H=t(A);for(J=H.next();!J.done;G={ab:G.ab},J=H.next())G.ab=J.value,I=Rr(G.ab,f),K=G.ab.i,P=G.ab.h,R=function(aa){return function(Y){var Da,Fa,xa;return L(function(Ia){if(1==Ia.g)return u(Ia,g.addSegments([{data:Y}]),2);Da=Ia.h;et(a);Fa=aa.ab.g;xa=Qr(Fa);l[xa]=Da[0];m+=Y.byteLength;z(Ia)})}}(G),Xr(e,G.ab.groupId,I,K,P,R);return u(ba,
766
769
  Zr(e),2)}if(!F)return ba.B(0);et(a);kt(h,d,k,f);return u(ba,g.updateManifest(c,d),0)})};p=!1;C(B,2);if(!lt(h)||!p||mt(h)){B.B(4);break}return u(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return et(a),b=b.filter(function(A){return!A.h}),q=l,v=m,l={},m=0,u(B,nt(g,c,d,q,v,function(){return et(a)}),6);case 6:et(a);case 4:if(p){B.B(7);break}return u(B,n(b,!1),8);case 8:return et(a),y=l,w=m,l={},m=0,u(B,nt(g,c,d,y,w,function(){return et(a)}),9);case 9:et(a);case 7:va(B,0);break;case 2:return x=
767
770
  E(B),D=Object.values(l),u(B,g.removeSegments(D,function(){}),10);case 10:throw x;}})}function jt(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new ks,u(f,b.init(),2);case 2:return u(f,ms(b),3);case 3:return c=f.h,d=new Ds("manifest",c.path.Ba,c.path.la,a),u(f,b.destroy(),4);case 4:return e=new Zs,u(f,e.remove(d.toString()),0)}})}
768
771
  function nt(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,w;return L(function(x){switch(x.g){case 1:g=!1;C(x,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,v=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=v&&(q.dataKey=v,q.pendingSegmentRefId=void 0),v=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=v&&(q.initSegmentKey=v,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
@@ -770,40 +773,40 @@ function nt(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,w;return L(function(x){switch(x
770
773
  function gt(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,w,x,D,B,A,F,G,H,J,I,K,P,R,ba,aa;return L(function(Y){switch(Y.g){case 1:return c={width:Infinity,height:Infinity},Nd(a,b.restrictions,c),u(Y,Qd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Bd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push($d(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
771
774
  d.push(ae(q));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())w=y.value,d.push(be(w));return u(Y,b.offline.trackSelectionCallback(d),3);case 3:x=Y.h;D=a.presentationTimeline.getDuration();B=0;A=t(x);for(F=A.next();!F.done;F=A.next())G=F.value,H=G.bandwidth*D/8,B+=H;C(Y,4);return u(Y,b.offline.downloadSizeCallback(B),6);case 6:J=Y.h;if(!J)throw new N(2,9,9014);va(Y,5);break;case 4:I=E(Y);if(I instanceof N)throw I;throw new N(2,9,9015);case 5:K=new Set;P=new Set;R=new Set;ba=t(x);for(F=ba.next();!F.done;F=
772
775
  ba.next())aa=F.value,"variant"==aa.type&&K.add(aa.id),"text"==aa.type&&P.add(aa.id),"image"==aa.type&&R.add(aa.id);a.variants=a.variants.filter(function(Da){return K.has(Da.id)});a.textStreams=a.textStreams.filter(function(Da){return P.has(Da.id)});a.imageStreams=a.imageStreams.filter(function(Da){return R.has(Da.id)});ot(a);z(Y)}})}
773
- function ht(a,b,c,d,e,f){var g=Ss(c,b,d),h=e.offline.progressCallback;Wr(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&Kf(a,"cenc",q)});var k=lt(b)&&!mt(b),l=null;k&&(l=pt.get(a.g.keySystem));for(var m=new Vs,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())Xs(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Ws(m,n.value);m=qt(f,m,b);f=m.streams;m=m.Vd;p=a.g;n=e.offline.usePersistentLicense;
774
- p&&n&&(p.initData=[]);return{zf:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ac(),streams:f,sessionIds:n?Qf(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},Vd:m}}function lt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
776
+ function ht(a,b,c,d,e,f){var g=Ss(c,b,d),h=e.offline.progressCallback;Wr(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&Kf(a,"cenc",q)});var k=lt(b)&&!mt(b),l=null;k&&(l=pt.get(a.g.keySystem));for(var m=new Vs,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())Xs(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Ws(m,n.value);m=qt(f,m,b);f=m.streams;m=m.Xd;p=a.g;n=e.offline.usePersistentLicense;
777
+ p&&n&&(p.initData=[]);return{Af:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ac(),streams:f,sessionIds:n?Qf(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},Xd:m}}function lt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
775
778
  function mt(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 kt(a,b,c,d){b.expiration=c.ac();c=Qf(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(lt(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}r.remove=function(a){return rt(this,st(this,a))};
776
- function st(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:ct();c=Es(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new ks;ua(k);return u(k,e.init(),4);case 4:return u(k,os(e,d.Ba(),d.la()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([tt(a,h,e),ut(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
779
+ function st(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:ct();c=Es(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new ks;ua(k);return u(k,e.init(),4);case 4:return u(k,os(e,d.Ba(),d.la()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([tt(a,h,e),ut(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
777
780
  function vt(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:ad(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:ad(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function tt(a,b,c){return L(function(d){return u(d,wt(a.g,a.h.drm,c,b),0)})}
778
- function ut(a,b,c){function d(){}var e=xt(c);Us(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Nf=function(){return rt(this,yt(this))};
779
- function yt(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return ct(),b=a.g,c=a.h.drm,d=new ks,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],ps(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,Ps(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return wa(n),u(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
780
- r.list=function(){return rt(this,zt())};function zt(){var a,b,c;return L(function(d){switch(d.g){case 1:return ct(),a=[],b=new ks,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),ns(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Us(new Ds("manifest",e.Ba,e.la,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
781
+ function ut(a,b,c){function d(){}var e=xt(c);Us(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Of=function(){return rt(this,yt(this))};
782
+ function yt(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return ct(),b=a.g,c=a.h.drm,d=new ks,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],ps(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,Ps(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return wa(n),u(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n["return"](!e)}})}
783
+ r.list=function(){return rt(this,zt())};function zt(){var a,b,c;return L(function(d){switch(d.g){case 1:return ct(),a=[],b=new ks,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),ns(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Us(new Ds("manifest",e.Ba,e.la,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d["return"](a)}})}
781
784
  function dt(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),et(a),u(l,c.start(b,
782
- g),2);if(3!=l.g)return h=l.h,et(a),k=At(h),u(l,Promise.all(of(k,function(m){return m.createSegmentIndex()})),3);et(a);if(e)throw e;return l["return"](h)})}function ft(a,b,c,d){var e;return L(function(f){switch(f.g){case 1:return e=new tf({mb:a.g,onError:c,Nc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,yf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Lf(e),3);case 3:return u(f,Jf(e),4);case 4:return f["return"](e)}})}
783
- function qt(a,b,c){var d=new Map,e=At(c),f=new Map;e=t(e);for(var g=e.next();!g.done;g=e.next()){g=g.value;var h=Bt(a,b,c,g,d);f.set(g.id,h)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&f.get(b.audio.id).variantIds.push(b.id),b.video&&f.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(f.values()),Vd:Array.from(d.values())}}
785
+ g),2);if(3!=l.g)return h=l.h,et(a),k=At(h),u(l,Promise.all(of(k,function(m){return m.createSegmentIndex()})),3);et(a);if(e)throw e;return l["return"](h)})}function ft(a,b,c,d){var e;return L(function(f){switch(f.g){case 1:return e=new tf({mb:a.g,onError:c,Oc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,yf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Lf(e),3);case 3:return u(f,Jf(e),4);case 4:return f["return"](e)}})}
786
+ function qt(a,b,c){var d=new Map,e=At(c),f=new Map;e=t(e);for(var g=e.next();!g.done;g=e.next()){g=g.value;var h=Bt(a,b,c,g,d);f.set(g.id,h)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&f.get(b.audio.id).variantIds.push(b.id),b.video&&f.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(f.values()),Xd:Array.from(d.values())}}
784
787
  function Bt(a,b,c,d,e){var f={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
785
788
  tilesLayout:d.tilesLayout};Ct(d,c.presentationTimeline.Qa(),function(g){var h=Qr(g),k=void 0;if(!e.has(h)){var l=g.endTime-g.startTime;l=Ys(b,d.id)*l;l=Tr(a.g,l);e.set(h,new Pr(g,l,d.id,!1))}g.g&&(k=Qr(g.g),e.has(k)||(l=.5*Ys(b,d.id),l=Tr(a.g,l),e.set(k,new Pr(g.g,l,d.id,!0))));f.segments.push({pendingInitSegmentRefId:k,initSegmentKey:k?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,
786
- pendingSegmentRefId:h,dataKey:0})});return f}function Ct(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function et(a){if(a.l.g)throw new N(2,9,7001);}function ct(){if(!$s())throw new N(2,9,9E3);}function rt(a,b){return L(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);fb(a.i,b);return xa(c,0)})}function bt(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){fb(a.i,c)})}
789
+ pendingSegmentRefId:h,dataKey:0})});return f}function Ct(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function et(a){if(a.l.g)throw new N(2,9,7001);}function ct(){if(!$s())throw new N(2,9,9E3);}function rt(a,b){return L(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);fb(a.i,b);return ya(c,0)})}function bt(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){fb(a.i,c)})}
787
790
  function xt(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
788
791
  function wt(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=qs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:vt(d,!1),videoCapabilities:vt(d,!0)}});return u(h,Ps(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
789
792
  function At(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
790
- function ot(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",Zs);Zs.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new ks,ua(b),u(b,rs(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};Zs.prototype.list=Zs.prototype.list;
791
- Zs.prototype.removeEmeSessions=Zs.prototype.Nf;Zs.prototype.remove=Zs.prototype.remove;Zs.prototype.getStoreInProgress=Zs.prototype.mf;Zs.prototype.store=Zs.prototype.store;Zs.prototype.getNetworkingEngine=Zs.prototype.bc;Zs.prototype.getConfiguration=Zs.prototype.getConfiguration;Zs.prototype.configure=Zs.prototype.configure;Zs.prototype.destroy=Zs.prototype.destroy;Zs.support=$s;
793
+ function ot(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",Zs);Zs.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new ks,ua(b),u(b,rs(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):ya(b,0)})};Zs.prototype.list=Zs.prototype.list;
794
+ Zs.prototype.removeEmeSessions=Zs.prototype.Of;Zs.prototype.remove=Zs.prototype.remove;Zs.prototype.getStoreInProgress=Zs.prototype.nf;Zs.prototype.store=Zs.prototype.store;Zs.prototype.getNetworkingEngine=Zs.prototype.bc;Zs.prototype.getConfiguration=Zs.prototype.getConfiguration;Zs.prototype.configure=Zs.prototype.configure;Zs.prototype.destroy=Zs.prototype.destroy;Zs.support=$s;
792
795
  var pt=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
793
- Cm.offline=$s;function Dt(){}function Et(a,b){for(var c={priority:b||0,Ke:a},d=0;d<Ft.length;d++)if(Ft[d].priority<c.priority){Ft.splice(d,0,c);return}Ft.push(c)}M("shaka.polyfill",Dt);Dt.register=Et;Dt.installAll=function(){for(var a=t(Ft),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Ke()}catch(c){Ua("Error installing polyfill!",c)}}};var Ft=[];function Gt(){}function Ht(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())It(b.value)}function It(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)}})}Dt.Aria=Gt;Gt.install=Ht;Et(Ht);function Jt(){}function Kt(){Lt()}Dt.EncryptionScheme=Jt;Jt.install=Kt;Et(Kt,-2);function Mt(){}
796
+ Cm.offline=$s;function Dt(){}function Et(a,b){for(var c={priority:b||0,Le:a},d=0;d<Ft.length;d++)if(Ft[d].priority<c.priority){Ft.splice(d,0,c);return}Ft.push(c)}M("shaka.polyfill",Dt);Dt.register=Et;Dt.installAll=function(){for(var a=t(Ft),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Le()}catch(c){Ua("Error installing polyfill!",c)}}};var Ft=[];function Gt(){}function Ht(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())It(b.value)}function It(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)}})}Dt.Aria=Gt;Gt.install=Ht;Et(Ht);function Jt(){}function Kt(){Lt()}Dt.EncryptionScheme=Jt;Jt.install=Kt;Et(Kt,-2);function Mt(){}
794
797
  function Nt(){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}}),
795
798
  Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Ot);document.addEventListener("webkitfullscreenerror",Ot);document.addEventListener("mozfullscreenchange",Ot);document.addEventListener("mozfullscreenerror",Ot);document.addEventListener("MSFullscreenChange",Ot);document.addEventListener("MSFullscreenError",Ot)}}
796
- function Ot(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)}Dt.Fullscreen=Mt;Mt.install=Nt;Et(Nt);function Pt(){}function Qt(){}Dt.MathRound=Pt;Pt.install=Qt;Et(Qt);function Rt(){}function St(){if(Ac()||Bc()||Cc()||yc("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Tt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Ut}
799
+ function Ot(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)}Dt.Fullscreen=Mt;Mt.install=Nt;Et(Nt);function Pt(){}function Qt(){}Dt.MathRound=Pt;Pt.install=Qt;Et(Qt);function Rt(){}function St(){if(Bc()||Cc()||Dc()||yc("PlayStation 5")||Ac()||zc()||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Tt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Ut}
797
800
  function Ut(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,w;return L(function(x){switch(x.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return x["return"](b);if("media-source"==a.type){if(!uc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return x["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=vc(g),!h)||a.audio&&(k=a.audio.contentType,
798
801
  l=vc(k),!l))return x["return"](b)}else return x["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,x["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(q={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(q));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
799
- n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);C(x,3);return u(x,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:w=x.h;va(x,4);break;case 3:E(x);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return x["return"](b)}})}Dt.MediaCapabilities=Rt;Rt.install=St;var Tt=null;Rt.originalMcap=Tt;Et(St,-1);function Vt(){}function Wt(){var a=Dc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Xt():a?(Yt(),12>=a?(Zt(),$t()):Zt()):(yc("Tizen 2")||yc("Tizen 3")||yc("Tizen 4"))&&au());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&bu()}
802
+ n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);C(x,3);return u(x,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:w=x.h;va(x,4);break;case 3:E(x);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return x["return"](b)}})}Dt.MediaCapabilities=Rt;Rt.install=St;var Tt=null;Rt.originalMcap=Tt;Et(St,-1);function Vt(){}function Wt(){var a=Ec();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Xt():a?(Yt(),12>=a?(Zt(),$t()):Zt()):(yc("Tizen 2")||yc("Tizen 3")||yc("Tizen 4"))&&au());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&bu()}
800
803
  function Zt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function $t(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Yt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
801
804
  function au(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=dd(b)[0]&&a(b)}}function Xt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
802
- function bu(){var a=MediaSource.isTypeSupported;yc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Dt.MediaSource=Vt;Vt.install=Wt;Et(Wt);function cu(){}function du(){screen.orientation||void 0!=window.orientation&&eu()}function eu(){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 fu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}Dt.Orientation=cu;
805
+ function bu(){var a=MediaSource.isTypeSupported;Ac()||(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)})}Dt.MediaSource=Vt;Vt.install=Wt;Et(Wt);function cu(){}function du(){screen.orientation||void 0!=window.orientation&&eu()}function eu(){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 fu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}Dt.Orientation=cu;
803
806
  cu.install=du;function fu(){Oe.call(this);this.type="";this.angle=0}qa(fu,Oe);
804
807
  fu.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)};
805
808
  fu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Et(du);function gu(){}function hu(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=iu,window.MediaKeys=ju,window.MediaKeySystemAccess=ku,navigator.requestMediaKeySystemAccess=lu)}function lu(a,b){try{var c=new ku(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
806
- function iu(a){var b=this.mediaKeys;b&&b!=a&&mu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?mu(a,this):Promise.resolve()}function nu(a){a=Fb(a.initData);if(Ib(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Kc(a.subarray(4),!0);a=Mc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gb(a);this.dispatchEvent(b)}Dt.PatchedMediaKeysApple=gu;gu.install=hu;
809
+ function iu(a){var b=this.mediaKeys;b&&b!=a&&mu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?mu(a,this):Promise.resolve()}function nu(a){a=Fb(a.initData);if(Ib(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Kc(a.subarray(4),!0);a=Nc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gb(a);this.dispatchEvent(b)}Dt.PatchedMediaKeysApple=gu;gu.install=hu;
807
810
  function ku(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
808
811
  k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=t(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
809
812
  ku.prototype.createMediaKeys=function(){var a=new ju(this.keySystem);return Promise.resolve(a)};ku.prototype.getConfiguration=function(){return this.g};function ju(a){this.h=new WebKitMediaKeys(a);this.g=new ff}ju.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new ou(this.h,a)};ju.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
@@ -831,16 +834,16 @@ function Qu(a,b){a.h=b;a.g.Sa();var c=Ku;b&&(a.g.A(b,c+"needkey",function(d){var
831
834
  d.g&&d.g.resolve(),d.g=null}),a.g.A(b,c+"keyerror",function(d){var e=Ru(a,d.sessionId);e&&e.handleError(d)}))}Nu.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 Tu(b,this.l,a);this.i.push(a);return a};Nu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
832
835
  function Ru(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 Tu(a,b,c){Oe.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 rc;this.keyStatuses=new Uu}qa(Tu,Oe);r=Tu.prototype;
833
836
  r.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Su(this,"output-restricted"):1==b?Su(this,"expired"):Su(this,"internal-error"))};
834
- function Vu(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=Fb(Mc("LOAD_SESSION|"+c));else{var e=Mc("PERSISTENT|");d=Vc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new rc;var f=Pu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
835
- function Wu(a,b,c){if(a.g)a.g.then(function(){return Wu(a,b,c)})["catch"](function(){return Wu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Ic(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=Sc(e.keys[0].k);e=Sc(e.keys[0].kid)}else d=Fb(c),e=null;var f=Pu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
837
+ function Vu(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=Fb(Nc("LOAD_SESSION|"+c));else{var e=Nc("PERSISTENT|");d=Vc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new rc;var f=Pu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
838
+ function Wu(a,b,c){if(a.g)a.g.then(function(){return Wu(a,b,c)})["catch"](function(){return Wu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Jc(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=Sc(e.keys[0].k);e=Sc(e.keys[0].kid)}else d=Fb(c),e=null;var f=Pu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
836
839
  function Su(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}r.generateRequest=function(a,b){return Vu(this,b,null)};r.load=function(a){return"persistent-license"==this.l?Vu(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new rc;Wu(this,b,a);return b};
837
840
  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=Pu("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 Uu(){this.size=0;this.g=void 0}r=Uu.prototype;r.forEach=function(a){this.g&&a(this.g,dg.value())};r.get=function(a){if(this.has(a))return this.g};
838
841
  r.has=function(a){var b=dg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var Ku="";Et(Ju);function Xu(){}function Yu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Zu,Object.defineProperty(a,"disablePictureInPicture",{get:$u,set:av,enumerable:!0,configurable:!0}),document.exitPictureInPicture=bv,document.addEventListener("webkitpresentationmodechanged",cv,!0))}}
839
842
  function cv(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
840
843
  function Zu(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function bv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
841
- function $u(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function av(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Dt.PiPWebkit=Xu;Xu.install=Yu;Et(Yu);function dv(){}function ev(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=fv))}function fv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Dt.RandomUUID=dv;dv.install=ev;Et(ev);function gv(){}function hv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=iv)}function iv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Dt.StorageEstimate=gv;gv.install=hv;Et(hv);function jv(){}function kv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:lv})}function lv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Dt.Symbol=jv;jv.install=kv;Et(kv);function mv(){}function nv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Dt.VideoPlayPromise=mv;mv.install=nv;Et(nv);function ov(){}function pv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||yc("Web0S")&&yc("Chrome/38.0.2125.122 Safari/537.36"))&&(a.getVideoPlaybackQuality=qv)}}function qv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Dt.VideoPlaybackQuality=ov;ov.install=pv;Et(pv);function rv(){}function sv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=tv;else if(6==b)a=uv;else{try{var c=!!tv(1,2,"")}catch(d){c=!1}c&&(a=tv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function tv(a,b,c){return new window.TextTrackCue(a,b,c)}function uv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Dt.VTTCue=rv;rv.install=sv;Et(sv);function vv(){}vv.prototype.parseInit=function(){};vv.prototype.parseMedia=function(a,b){var c=null,d=[],e=Ic(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=wv.exec(f))){var g=xv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new ib(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};M("shaka.text.LrcTextParser",vv);vv.prototype.parseMedia=vv.prototype.parseMedia;
844
+ function $u(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function av(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Dt.PiPWebkit=Xu;Xu.install=Yu;Et(Yu);function dv(){}function ev(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=fv))}function fv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Dt.RandomUUID=dv;dv.install=ev;Et(ev);function gv(){}function hv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=iv)}function iv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Dt.StorageEstimate=gv;gv.install=hv;Et(hv);function jv(){}function kv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:lv})}function lv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Dt.Symbol=jv;jv.install=kv;Et(kv);function mv(){}function nv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Dt.VideoPlayPromise=mv;mv.install=nv;Et(nv);function ov(){}function pv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||yc("Web0S")&&yc("Chrome/38.0.2125.122 Safari/537.36"))&&(a.getVideoPlaybackQuality=qv)}}function qv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Dt.VideoPlaybackQuality=ov;ov.install=pv;Et(pv);function rv(){}function sv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=tv;else if(6==b)a=uv;else{try{var c=!!tv(1,2,"")}catch(d){c=!1}c&&(a=tv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function tv(a,b,c){return new window.TextTrackCue(a,b,c)}function uv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Dt.VTTCue=rv;rv.install=sv;Et(sv);function vv(){}vv.prototype.parseInit=function(){};vv.prototype.parseMedia=function(a,b){var c=null,d=[],e=Jc(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=wv.exec(f))){var g=xv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new ib(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};M("shaka.text.LrcTextParser",vv);vv.prototype.parseMedia=vv.prototype.parseMedia;
842
845
  vv.prototype.parseInit=vv.prototype.parseInit;var wv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,xv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;hd["application/x-subtitle-lrc"]=function(){return new vv};function yv(){}yv.prototype.parseInit=function(){};
843
- yv.prototype.parseMedia=function(a,b){var c=Ic(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(B){throw new N(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new N(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new N(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=lo(g,zv,"frameRate"),k=lo(g,zv,"subFrameRate"),l=lo(g,zv,"frameRateMultiplier"),
846
+ yv.prototype.parseMedia=function(a,b){var c=Jc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(B){throw new N(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new N(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new N(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=lo(g,zv,"frameRate"),k=lo(g,zv,"subFrameRate"),l=lo(g,zv,"frameRateMultiplier"),
844
847
  m=lo(g,zv,"tickRate"),n=lo(g,zv,"cellResolution");c=g.getAttribute("xml:space")||"default";e=lo(g,Av,"extent");if("default"!=c&&"preserve"!=c)throw new N(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Bv(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?jo(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=t(g),q=p.next();!q.done;q=
845
848
  p.next()){var v=q.value;q=new kb;var y=v.getAttribute("xml:id");if(y){q.id=y;var w=null;e&&(w=Cv.exec(e)||Dv.exec(e));y=w?Number(w[1]):null;w=w?Number(w[2]):null;var x,D;if(x=Ev(v,l,"extent"))x=(D=Cv.exec(x))||Dv.exec(x),null!=x&&(q.width=Number(x[1]),q.height=Number(x[2]),D||(null!=y&&(q.width=100*q.width/y),null!=w&&(q.height=100*q.height/w)),q.widthUnits=D||null!=y?Ab:0,q.heightUnits=D||null!=w?Ab:0);if(v=Ev(v,l,"origin"))x=(D=Cv.exec(v))||Dv.exec(v),null!=x&&(q.viewportAnchorX=Number(x[1]),q.viewportAnchorY=
846
849
  Number(x[2]),D||(null!=w&&(q.viewportAnchorY=100*q.viewportAnchorY/w),null!=y&&(q.viewportAnchorX=100*q.viewportAnchorX/y)),q.viewportAnchorUnits=D||null!=y?Ab:0)}else q=null;q&&m.push(q)}if(go(f,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=t(go(f,"div"));for(p=e.next();!p.done;p=e.next())if(go(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");(f=Fv(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
@@ -862,7 +865,7 @@ function Wv(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)
862
865
  var Cv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Pv=/^(\d{1,2}(?:\.\d+)?|100)%$/,Ov=/^(\d+px|\d+em|\d*\.?\d+c)$/,Dv=/^(\d+)px (\d+)px$/,Uv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Vv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Xv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Yv=/^(\d*(?:\.\d*)?)f$/,Zv=/^(\d*(?:\.\d*)?)t$/,$v=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Nv={left:pb,center:"center",right:"end",start:pb,
863
866
  end:"end"},Mv={left:"line-left",center:"center",right:"line-right"},zv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Av=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Gv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];hd["application/ttml+xml"]=function(){return new yv};function aw(){this.g=new yv}aw.prototype.parseInit=function(a){var b=!1;(new ng).box("moov",rg).box("trak",rg).box("mdia",rg).box("minf",rg).box("stbl",rg).R("stsd",tg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};aw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new ng).box("mdat",ug(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};M("shaka.text.Mp4TtmlParser",aw);aw.prototype.parseMedia=aw.prototype.parseMedia;
864
867
  aw.prototype.parseInit=aw.prototype.parseInit;hd['application/mp4; codecs="stpp"']=function(){return new aw};hd['application/mp4; codecs="stpp.ttml"']=function(){return new aw};hd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new aw};hd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new aw};function bw(){}bw.prototype.parseInit=function(){};
865
- bw.prototype.parseMedia=function(a,b){var c=Ic(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new N(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=cw(new yq(e[1]));if(null==c)throw new N(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
868
+ bw.prototype.parseMedia=function(a,b){var c=Jc(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new N(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=cw(new yq(e[1]));if(null==c)throw new N(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
866
869
  [];e=t(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new yq(g);var h=new kb;Bq(g);zq(g);for(var k=Bq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
867
870
  (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");zq(g);k=Bq(g)}f.push(h)}e=new Map;dw(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new ib(0,0,"");for(var n=!1,p=0;p<k.length;p++){var q=
868
871
  /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(q){var v=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=sb;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
@@ -875,13 +878,13 @@ function hw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeNa
875
878
  function fw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=mb:a.textAlign=ub[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
876
879
  b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=jw(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ob,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function jw(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
877
880
  function cw(a){a=Aq(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)}M("shaka.text.VttTextParser",bw);bw.prototype.parseMedia=bw.prototype.parseMedia;bw.prototype.parseInit=bw.prototype.parseInit;hd["text/vtt"]=function(){return new bw};hd['text/vtt; codecs="vtt"']=function(){return new bw};hd['text/vtt; codecs="wvtt"']=function(){return new bw};function kw(){this.g=null}kw.prototype.parseInit=function(a){var b=this,c=!1;(new ng).box("moov",rg).box("trak",rg).box("mdia",rg).R("mdhd",function(d){d=Eh(d.reader,d.version);b.g=d.timescale}).box("minf",rg).box("stbl",rg).R("stsd",tg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
878
- kw.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new ng).box("moof",rg).box("traf",rg).R("tfdt",function(A){g=!0;c=Dh(A.reader,A.version).ld}).R("tfhd",function(A){l=Ch(A.reader,A.flags).de}).R("trun",function(A){h=!0;d=Fh(A.reader,A.version,A.flags).ue}).box("mdat",ug(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new kg(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;var v=q.Md||l,y=q.Rc?
879
- c+q.Rc:m;m=y+(v||0);var w=0;do{var x=n.M();w+=x;var D=n.M(),B=null;"vttc"==vg(D)?8<x&&(B=n.Za(x-8)):n.skip(x-8);v&&B&&(x=lw(B,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(x))}while(q.sampleSize&&w<q.sampleSize)}return f.filter(Rb)};function lw(a,b,c){var d,e,f;(new ng).box("payl",ug(function(g){d=Ic(g)})).box("iden",ug(function(g){e=Ic(g)})).box("sttg",ug(function(g){f=Ic(g)})).parse(a);return d?mw(d,e,f,b,c):null}
880
- function mw(a,b,c,d,e){d=new ib(d,e,"");ew(a,d,new Map);b&&(d.id=b);if(c)for(a=new yq(c),b=Bq(a);b;)fw(d,b,[]),zq(a),b=Bq(a);return d}M("shaka.text.Mp4VttParser",kw);kw.prototype.parseMedia=kw.prototype.parseMedia;kw.prototype.parseInit=kw.prototype.parseInit;hd['application/mp4; codecs="wvtt"']=function(){return new kw};function nw(){}nw.prototype.parseInit=function(){};nw.prototype.parseMedia=function(a){var b=Ic(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 yq(c[0]),e=ow(d),f=Aq(d,/,/g);d=ow(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ib(e,d,c.slice(1).join("\n").trim()))}return a};
881
- function ow(a){a=Aq(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)}M("shaka.text.SbvTextParser",nw);nw.prototype.parseMedia=nw.prototype.parseMedia;nw.prototype.parseInit=nw.prototype.parseInit;hd["text/x-subviewer"]=function(){return new nw};function pw(){this.g=new bw}pw.prototype.parseInit=function(){};pw.prototype.parseMedia=function(a,b){var c=Ic(a);c=qw(c);c=Fb(Mc(c));return this.g.parseMedia(c,b)};function qw(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")+"\n\n";return b}M("shaka.text.SrtTextParser",pw);pw.srt2webvtt=qw;pw.prototype.parseMedia=pw.prototype.parseMedia;
881
+ kw.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new ng).box("moof",rg).box("traf",rg).R("tfdt",function(A){g=!0;c=Dh(A.reader,A.version).md}).R("tfhd",function(A){l=Ch(A.reader,A.flags).ee}).R("trun",function(A){h=!0;d=Fh(A.reader,A.version,A.flags).ve}).box("mdat",ug(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new kg(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;var v=q.Od||l,y=q.Sc?
882
+ c+q.Sc:m;m=y+(v||0);var w=0;do{var x=n.M();w+=x;var D=n.M(),B=null;"vttc"==vg(D)?8<x&&(B=n.Za(x-8)):n.skip(x-8);v&&B&&(x=lw(B,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(x))}while(q.sampleSize&&w<q.sampleSize)}return f.filter(Rb)};function lw(a,b,c){var d,e,f;(new ng).box("payl",ug(function(g){d=Jc(g)})).box("iden",ug(function(g){e=Jc(g)})).box("sttg",ug(function(g){f=Jc(g)})).parse(a);return d?mw(d,e,f,b,c):null}
883
+ function mw(a,b,c,d,e){d=new ib(d,e,"");ew(a,d,new Map);b&&(d.id=b);if(c)for(a=new yq(c),b=Bq(a);b;)fw(d,b,[]),zq(a),b=Bq(a);return d}M("shaka.text.Mp4VttParser",kw);kw.prototype.parseMedia=kw.prototype.parseMedia;kw.prototype.parseInit=kw.prototype.parseInit;hd['application/mp4; codecs="wvtt"']=function(){return new kw};function nw(){}nw.prototype.parseInit=function(){};nw.prototype.parseMedia=function(a){var b=Jc(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 yq(c[0]),e=ow(d),f=Aq(d,/,/g);d=ow(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ib(e,d,c.slice(1).join("\n").trim()))}return a};
884
+ function ow(a){a=Aq(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)}M("shaka.text.SbvTextParser",nw);nw.prototype.parseMedia=nw.prototype.parseMedia;nw.prototype.parseInit=nw.prototype.parseInit;hd["text/x-subviewer"]=function(){return new nw};function pw(){this.g=new bw}pw.prototype.parseInit=function(){};pw.prototype.parseMedia=function(a,b){var c=Jc(a);c=qw(c);c=Fb(Nc(c));return this.g.parseMedia(c,b)};function qw(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")+"\n\n";return b}M("shaka.text.SrtTextParser",pw);pw.srt2webvtt=qw;pw.prototype.parseMedia=pw.prototype.parseMedia;
882
885
  pw.prototype.parseInit=pw.prototype.parseInit;hd["text/srt"]=function(){return new pw};function rw(){}rw.prototype.parseInit=function(){};
883
- rw.prototype.parseMedia=function(a){var b="",c="";a=Ic(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=sw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=tw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(uw);else if("Style"==e){e=f.split(uw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
884
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={hd:e.hd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=tw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(uw);else if("Dialogue"==f){g=g.split(uw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=vw(f.Start);var k=vw(f.End);g=new ib(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.hd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.hd}}(e)))&&ww(g,f);d.push(g)}return d};
886
+ rw.prototype.parseMedia=function(a){var b="",c="";a=Jc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=sw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=tw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(uw);else if("Style"==e){e=f.split(uw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
887
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={jd:e.jd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=tw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(uw);else if("Dialogue"==f){g=g.split(uw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=vw(f.Start);var k=vw(f.End);g=new ib(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.jd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.jd}}(e)))&&ww(g,f);d.push(g)}return d};
885
888
  function ww(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=xw(c))a.color=c;if(c=b.BackColour)if(c=xw(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=qb;a.textAlign="start";break;case 2:a.displayAlign=qb;a.textAlign=mb;break;case 3:a.displayAlign=qb;a.textAlign="end";
886
889
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=mb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=mb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
887
890
  function xw(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function vw(a){a=yw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",rw);rw.prototype.parseMedia=rw.prototype.parseMedia;rw.prototype.parseInit=rw.prototype.parseInit;var sw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,tw=/^\s*([^:]+):\s*(.*)/,uw=/\s*,\s*/,yw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
@@ -897,13 +900,14 @@ a,b))})}
897
900
  function Ew(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return L(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Fw(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Gw(h.videoCapabilities,d),l=Gw(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."),
898
901
  n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q,Aw.call(c,a,e),2)}p=q.h;return q["return"](new Hw(p,d))})}function Gw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",zw);zw.install=Bw;function Iw(){}var Jw;
899
902
  function Kw(){Jw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Jw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Lw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
900
- function Lw(a){var b=this,c,d;return L(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(e,Jw.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Dw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Jw,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
901
- navigator.mediaCapabilities.decodingInfo=Mw;return e["return"](Mw.call(b,a))})}
902
- function Mw(a){var b=this,c,d,e,f,g,h,k,l,m;return L(function(n){switch(n.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Fw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):u(n,Jw.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
903
- new Hw(k.keySystemAccess,c);n.B(3);break}if(!a.keySystemConfiguration){n.B(3);break}var p=a.keySystemConfiguration,q=[],v=[];p.audio&&q.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&v.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};q.length&&(p.audioCapabilities=q);v.length&&(p.videoCapabilities=
904
- v);l=p;m=k;return u(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}M("McEncryptionSchemePolyfill",Iw);Iw.install=Kw;function Hw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
903
+ function Lw(a){var b=this,c,d,e;return L(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,Jw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&Dw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Jw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
904
+ navigator.mediaCapabilities.decodingInfo=Mw;if(d){f.B(3);break}e=c;return u(f,Nw(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](Mw.call(b,a))}})}
905
+ function Mw(a){var b=this,c,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Fw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,Jw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
906
+ new Hw(k.keySystemAccess,c);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return u(m,Nw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
907
+ function Nw(a){var b,c;return L(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
908
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}M("McEncryptionSchemePolyfill",Iw);Iw.install=Kw;function Hw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
905
909
  Hw.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Hw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
906
- function Fw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Dw(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function Nw(){}
907
- function Lt(){Bw();Kw()}M("EncryptionSchemePolyfills",Nw);Nw.install=Lt;"undefined"!==typeof module&&module.exports&&(module.exports=Nw);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
910
+ function Fw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Dw(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
911
+ function Ow(){}function Lt(){Bw();Kw()}M("EncryptionSchemePolyfills",Ow);Ow.install=Lt;"undefined"!==typeof module&&module.exports&&(module.exports=Ow);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
908
912
 
909
913
  //# sourceMappingURL=shaka-player.compiled.map