shaka-player 3.2.3 → 3.2.4

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 (47) hide show
  1. package/.github/workflows/build_and_test.yaml +73 -0
  2. package/.github/workflows/release.yaml +53 -0
  3. package/CHANGELOG.md +13 -1
  4. package/build/checkversion.py +1 -1
  5. package/build/test.py +6 -0
  6. package/dist/controls.css +1 -1
  7. package/dist/deps.js +3 -3
  8. package/dist/locales.js +30 -30
  9. package/dist/shaka-player.compiled.d.ts +2 -1
  10. package/dist/shaka-player.compiled.debug.d.ts +2 -1
  11. package/dist/shaka-player.compiled.debug.externs.js +17 -12
  12. package/dist/shaka-player.compiled.debug.js +95 -93
  13. package/dist/shaka-player.compiled.debug.map +4 -4
  14. package/dist/shaka-player.compiled.externs.js +17 -12
  15. package/dist/shaka-player.compiled.js +610 -608
  16. package/dist/shaka-player.compiled.map +3 -3
  17. package/dist/shaka-player.ui.d.ts +4 -12
  18. package/dist/shaka-player.ui.debug.d.ts +4 -12
  19. package/dist/shaka-player.ui.debug.externs.js +19 -23
  20. package/dist/shaka-player.ui.debug.js +109 -108
  21. package/dist/shaka-player.ui.debug.map +4 -4
  22. package/dist/shaka-player.ui.externs.js +19 -23
  23. package/dist/shaka-player.ui.js +774 -773
  24. package/dist/shaka-player.ui.map +3 -3
  25. package/karma.conf.js +19 -15
  26. package/lib/ads/ad_manager.js +1 -0
  27. package/lib/cast/cast_proxy.js +3 -0
  28. package/lib/cast/cast_receiver.js +3 -0
  29. package/lib/dash/dash_parser.js +31 -19
  30. package/lib/hls/manifest_text_parser.js +1 -0
  31. package/lib/media/region_observer.js +39 -33
  32. package/lib/media/region_timeline.js +17 -19
  33. package/lib/media/streaming_engine.js +1 -1
  34. package/lib/net/networking_engine.js +4 -0
  35. package/lib/offline/storage.js +8 -9
  36. package/lib/player.js +25 -9
  37. package/lib/util/fake_event_target.js +21 -1
  38. package/package.json +3 -6
  39. package/test/dash/dash_parser_live_unit.js +43 -0
  40. package/test/dash/dash_parser_manifest_unit.js +2 -1
  41. package/test/hls/hls_parser_unit.js +74 -0
  42. package/test/media/region_observer_unit.js +40 -5
  43. package/test/media/region_timeline_unit.js +40 -22
  44. package/test/test/util/util.js +10 -7
  45. package/test/ui/text_displayer_layout_unit.js +8 -7
  46. package/ui/controls.js +3 -0
  47. package/ui/localization.js +12 -36
@@ -14,28 +14,28 @@ function ea(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof win
14
14
  ha("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;da(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
15
15
  ha("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=fa[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&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
- 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 qa=la;
18
- function ra(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Dg=b.prototype}function sa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.D=this.i=null}function ta(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}sa.prototype.u=function(a){this.h=a};
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 ra(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.Dg=b.prototype}function sa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.D=this.i=null}function ta(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}sa.prototype.u=function(a){this.h=a};
19
19
  function ua(a,b){a.i={ae:b,ge:!0};a.g=a.m||a.j}sa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}sa.prototype.v=function(a){this.g=a};function z(a){a.g=0}function A(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function va(a){a.m=0;a.j=2}function wa(a,b){a.g=b;a.m=0}function E(a){a.m=0;var b=a.i.ae;a.i=null;return b}function xa(a){a.D=[a.i];a.m=0;a.j=0}
20
- function Aa(a,b){var c=a.D.splice(0)[0];(c=a.i=a.i||c)?c.ge?a.g=a.m||a.j:void 0!=c.v&&a.j<c.v?(a.g=c.v,a.i=null):a.g=a.j:a.g=b}function Ba(a){this.g=new sa;this.h=a}function Da(a,b){ta(a.g);var c=a.g.l;if(c)return Ea(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Fa(a)}
20
+ function ya(a,b){var c=a.D.splice(0)[0];(c=a.i=a.i||c)?c.ge?a.g=a.m||a.j:void 0!=c.v&&a.j<c.v?(a.g=c.v,a.i=null):a.g=a.j:a.g=b}function Ba(a){this.g=new sa;this.h=a}function Da(a,b){ta(a.g);var c=a.g.l;if(c)return Ea(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Fa(a)}
21
21
  function Ea(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,ua(a.g,g),Fa(a)}a.g.l=null;d.call(a.g,f);return Fa(a)}
22
22
  function Fa(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ua(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.ge)throw b.ae;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
- function Ha(a){this.next=function(b){ta(a.g);a.g.l?b=Ea(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Fa(a));return b};this["throw"]=function(b){ta(a.g);a.g.l?b=Ea(a,a.g.l["throw"],b,a.g.u):(ua(a.g,b),b=Fa(a));return b};this["return"]=function(b){return Da(a,b)};this[Symbol.iterator]=function(){return this}}function Ia(a,b){var c=new Ha(new Ba(b));qa&&a.prototype&&qa(c,a.prototype);return c}
23
+ function Ha(a){this.next=function(b){ta(a.g);a.g.l?b=Ea(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Fa(a));return b};this["throw"]=function(b){ta(a.g);a.g.l?b=Ea(a,a.g.l["throw"],b,a.g.u):(ua(a.g,b),b=Fa(a));return b};this["return"]=function(b){return Da(a,b)};this[Symbol.iterator]=function(){return this}}function Ia(a,b){var c=new Ha(new Ba(b));pa&&a.prototype&&pa(c,a.prototype);return c}
24
24
  function Ja(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 K(a){return Ja(new Ha(new Ba(a)))}
25
25
  ha("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.s=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=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.I),reject:g(this.l)}};b.prototype.I=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.O(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.H(g):this.m(g)}};
27
- b.prototype.H=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.T(h,g):this.m(g)};b.prototype.l=function(g){this.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=function(g,h){if(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.L();this.D()};b.prototype.L=function(){var g=this;e(function(){if(g.F()){var h=fa.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
27
+ b.prototype.H=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.V(h,g):this.m(g)};b.prototype.l=function(g){this.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=function(g,h){if(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.L();this.D()};b.prototype.L=function(){var g=this;e(function(){if(g.F()){var h=fa.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
28
28
  function(){if(this.s)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.D=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.O=function(g){var h=this.j();g.wc(h.resolve,h.reject)};b.prototype.T=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,r){return"function"==typeof p?function(v){try{l(p(v))}catch(y){m(y)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});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);
29
+ b.prototype.O=function(g){var h=this.j();g.wc(h.resolve,h.reject)};b.prototype.V=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,r){return"function"==typeof p?function(v){try{l(p(v))}catch(y){m(y)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});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
30
  break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.s=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=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;r--;0==r&&l(p)}}var p=[],r=0;do p.push(void 0),r++,d(k.value).wc(n(p.length-1),m),k=h.next();
31
31
  while(!k.done)})};return b});function Ka(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(!Ka(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(!Ka(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ka(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
34
  Ka(k,g)&&Ka(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ka(k,g)&&Ka(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
- ha("Map",function(a){function b(){var h={};return h.Ua=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.Ua;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ka(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,ia:p}}return{id:l,
35
+ ha("Map",function(a){function b(){var h={};return h.Wa=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.Wa;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ka(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,ia:p}}return{id:l,
36
36
  list:m,index:-1,ia:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
- "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ia?l.ia.value=k:(l.ia={next:this.g,Ua:this.g.Ua,head:this.g,key:h,value:k},l.list.push(l.ia),this.g.Ua.next=l.ia,this.g.Ua=l.ia,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ia&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ia.Ua.next=h.ia.next,h.ia.next.Ua=h.ia.Ua,
38
- h.ia.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Ua=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ia};e.prototype.get=function(h){return(h=d(this,h).ia)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
37
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ia?l.ia.value=k:(l.ia={next:this.g,Wa:this.g.Wa,head:this.g,key:h,value:k},l.list.push(l.ia),this.g.Wa.next=l.ia,this.g.Wa=l.ia,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ia&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ia.Wa.next=h.ia.next,h.ia.next.Wa=h.ia.Wa,
38
+ h.ia.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Wa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ia};e.prototype.get=function(h){return(h=d(this,h).ia)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
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;
@@ -53,7 +53,7 @@ ha("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ka(
53
53
  Copyright 2016 Google LLC
54
54
  SPDX-License-Identifier: Apache-2.0
55
55
  */
56
- function Qa(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}function Ra(a,b,c){var d=Math.pow(a.i,b);c=c*(1-d)+d*a.g;isNaN(c)||(a.g=c,a.h+=b)}function Ta(a){return a.g/(1-Math.pow(a.i,a.h))};function Ua(){this.h=new Qa(2);this.i=new Qa(5);this.g=0}Ua.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(Ta(this.h),Ta(this.i))};function Va(){}function Wa(){}function Xa(){}function Ya(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Za.has(a)||(Za.add(a),Xa.apply(Va,ja(c)))}function $a(){}function ab(){}function bb(){}function cb(){}var Za=new Set;
56
+ function Qa(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}function Ra(a,b,c){var d=Math.pow(a.i,b);c=c*(1-d)+d*a.g;isNaN(c)||(a.g=c,a.h+=b)}function Sa(a){return a.g/(1-Math.pow(a.i,a.h))};function Ua(){this.h=new Qa(2);this.i=new Qa(5);this.g=0}Ua.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(Sa(this.h),Sa(this.i))};function Va(){}function Wa(){}function Xa(){}function Ya(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Za.has(a)||(Za.add(a),Xa.apply(Va,ja(c)))}function $a(){}function ab(){}function bb(){}function cb(){}var Za=new Set;
57
57
  if(window.console&&window.console.log.bind){var eb={},fb=(eb[1]=console.error.bind(console),eb[2]=console.warn.bind(console),eb[3]=console.info.bind(console),eb[4]=console.log.bind(console),eb[5]=console.debug.bind(console),eb[6]=console.debug.bind(console),eb);Xa=fb[2];Wa=fb[1]};function gb(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function hb(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}
58
58
  var jb=function ib(a){var c;return Ia(ib,function(d){1==d.g&&(c=0);if(3!=d.g)return c<a?u(d,c,3):d.v(0);c++;return d.v(2)})},lb=function kb(a){var c,d,e,f,g,h;return Ia(kb,function(k){1==k.g&&(c=-1,e=d=void 0,f=t(a),g=f.next());if(5!=k.g){if(g.done)return-1==c?k.v(0):u(k,{ga:c,Ef:d,item:e,next:void 0},0);h=g.value;return 0<=c?u(k,{ga:c,item:e,Ef:d,next:h},5):k.v(5)}c++;d=e;e=h;g=f.next();return k.v(2)})};function mb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function nb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function ob(a,b,c){c||(c=mb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Vc:d.Vc},e=a.next()){d.Vc=e.value;e=b.findIndex(function(f){return function(g){return c(f.Vc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
59
59
  function pb(a,b,c){c||(c=mb);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 qb(a,b,c){this.startTime=a;this.direction=rb;this.endTime=b;this.payload=c;this.region=new sb;this.position=null;this.positionAlign=tb;this.size=0;this.textAlign=ub;this.writingMode=vb;this.lineInterpretation=wb;this.line=null;this.lineHeight="";this.lineAlign=xb;this.displayAlign=yb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=zb;this.fontStyle=Ab;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
@@ -86,11 +86,11 @@ h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.p
86
86
  function ic(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function kc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,qc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function qc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var lc=/[#\/\?@]/g,nc=/[#\?:]/g,mc=/[#\?]/g,pc=/[#\?@]/g,oc=/#/g;function jc(a){this.g=a||null}q=jc.prototype;q.wa=null;q.yc=null;
87
87
  q.add=function(a,b){if(!this.wa&&(this.wa={},this.yc=0,this.g))for(var c=this.g.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.g=null;(c=this.wa.hasOwnProperty(a)&&this.wa[a])||(this.wa[a]=c=[]);c.push(b);this.yc++;return this};
88
88
  q.toString=function(){if(this.g)return this.g;if(!this.wa)return"";var a=[],b;for(b in this.wa)for(var c=encodeURIComponent(b),d=this.wa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new jc;a.g=this.g;if(this.wa){var b={},c;for(c in this.wa)b[c]=this.wa[c].concat();a.wa=b;a.yc=this.yc}return a};function rc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new ec(d)});return a.map(function(d){return new ec(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Xb,[]).map(function(d){return d.toString()})}function sc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
89
- function tc(a,b){if(1==b.length)return b[0];var c=uc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function uc(a,b){for(var c=t(vc[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==wc?"":null}var wc="text",xc={Qa:"video",eb:"audio",ba:wc,Ob:"image",ag:"application"},vc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function yc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}yc.prototype.resolve=function(){};yc.prototype.reject=function(){};function zc(a){this.h=a;this.g=void 0}zc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Ac(){}function Bc(a){if(!a)return"";a=Ob(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Wa('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}
89
+ function tc(a,b){if(1==b.length)return b[0];var c=uc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function uc(a,b){for(var c=t(vc[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==wc?"":null}var wc="text",xc={Ra:"video",eb:"audio",ba:wc,Ob:"image",ag:"application"},vc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function yc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}yc.prototype.resolve=function(){};yc.prototype.reject=function(){};function zc(a){this.h=a;this.g=void 0}zc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Ac(){}function Bc(a){if(!a)return"";a=Ob(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Wa('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}
90
90
  function Cc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);var d=Math.floor(a.byteLength/2);c=new Uint16Array(d);a=Rb(a);d=t(jb(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return Dc.value()(c)}
91
91
  function Ec(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Ob(a);if(239==c[0]&&187==c[1]&&191==c[2])return Bc(c);if(254==c[0]&&255==c[1])return Cc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Cc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Cc(a,!1);if(0==c[1]&&0==c[3])return Cc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Bc(a);throw new N(2,2,2003);}function Fc(a){var b=new TextEncoder;return Pb(b.encode(a))}
92
92
  function Gc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=t(lb(a)),f=e.next();!f.done;f=e.next())f=f.value,d.setUint16(2*f.ga,f.item.charCodeAt(0),b);return c}M("shaka.util.StringUtils",Ac);Ac.resetFromCharCode=function(){Dc.g=void 0};Ac.toUTF16=Gc;Ac.toUTF8=Fc;Ac.fromBytesAutoDetect=Ec;Ac.fromUTF16=Cc;Ac.fromUTF8=Bc;
93
- var Dc=new zc(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={Wa:65536};0<b.Wa;b={Wa:b.Wa},b.Wa/=2)if(a(b.Wa))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Wa)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Wa));return e}}(b);return null});function Hc(){}function Ic(a){a=Ob(a);a=Dc.value()(a);return btoa(a)}function Jc(a,b){b=void 0==b?!0:b;var c=Ic(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Kc(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=t(lb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.ga]=c.item.charCodeAt(0);return a}
93
+ var Dc=new zc(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={Ya:65536};0<b.Ya;b={Ya:b.Ya},b.Ya/=2)if(a(b.Ya))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ya)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ya));return e}}(b);return null});function Hc(){}function Ic(a){a=Ob(a);a=Dc.value()(a);return btoa(a)}function Jc(a,b){b=void 0==b?!0:b;var c=Ic(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Kc(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=t(lb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.ga]=c.item.charCodeAt(0);return a}
94
94
  function Lc(a){var b=a.length/2,c=new Uint8Array(b);b=t(jb(b));for(var d=b.next();!d.done;d=b.next())d=d.value,c[d]=window.parseInt(a.substr(2*d,2),16);return c}function Mc(a){var b=Ob(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}
95
95
  function Nc(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];var d=0,e=t(b);for(c=e.next();!c.done;c=e.next())d+=c.value.byteLength;d=new Uint8Array(d);e=0;b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,d.set(Ob(c),e),e+=c.byteLength;return d}M("shaka.util.Uint8ArrayUtils",Hc);Hc.concat=Nc;Hc.toHex=Mc;Hc.fromHex=Lc;Hc.fromBase64=Kc;Hc.toBase64=Jc;Hc.toStandardBase64=Ic;
96
96
  Hc.equal=function(a,b){Tb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Mb(a,b)};function Oc(){var a=this;this.s=bc.get("muxjs")();this.g=new this.s.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(Nc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Nc.apply(Hc,ja(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Oc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
@@ -108,9 +108,9 @@ var jd=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
108
108
  "is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
109
109
  "mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
110
110
  "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",
111
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function nd(){this.g={}}q=nd.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function od(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function pd(a){this.h=a;this.g=null}pd.prototype.V=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};pd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Jb=function(){this.stop();this.h();return this};O.prototype.V=function(a){var b=this;this.stop();this.g=(new pd(function(){b.h()})).V(a);return this};O.prototype.Da=function(a){var b=this;this.stop();this.g=(new pd(function(){b.g.V(a);b.h()})).V(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.Da;O.prototype.tickAfter=O.prototype.V;
111
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function nd(){this.g={}}q=nd.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function od(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function pd(a){this.h=a;this.g=null}pd.prototype.U=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};pd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Jb=function(){this.stop();this.h();return this};O.prototype.U=function(a){var b=this;this.stop();this.g=(new pd(function(){b.h()})).U(a);return this};O.prototype.Da=function(a){var b=this;this.stop();this.g=(new pd(function(){b.g.U(a);b.h()})).U(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.Da;O.prototype.tickAfter=O.prototype.U;
112
112
  O.prototype.tickNow=O.prototype.Jb;function qd(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function rd(a){return""!=sd().canPlayType(a)}function td(){return ud("Tizen")}function vd(){return ud("CrKey")}function wd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!td()}function xd(){if(!wd())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}
113
- function ud(a){return(navigator.userAgent||"").includes(a)}function sd(){if(yd)return yd;zd||(zd=new O(function(){yd=null}));(yd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(yd=document.createElement("video"));zd.V(1);return yd}var zd=null,yd=null;function Ad(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Bd(f,b,c);f=Cd(f,d);b=Dd(f);b=Ed(b);var g=Fd(b,e);a.variants=a.variants.filter(function(h){return Gd(h)==g?!0:!1})}function Dd(a){var b=new nd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Gd(c);b.push(d,c)}return b}
113
+ function ud(a){return(navigator.userAgent||"").includes(a)}function sd(){if(yd)return yd;zd||(zd=new O(function(){yd=null}));(yd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(yd=document.createElement("video"));zd.U(1);return yd}var zd=null,yd=null;function Ad(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Bd(f,b,c);f=Cd(f,d);b=Dd(f);b=Ed(b);var g=Fd(b,e);a.variants=a.variants.filter(function(h){return Gd(h)==g?!0:!1})}function Dd(a){var b=new nd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Gd(c);b.push(d,c)}return b}
114
114
  function Ed(a){var b=0,c=new Map,d=a.size();od(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 nd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
115
115
  function Bd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={fd:d.fd},e=b.next())if(d.fd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.fd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Sc:d.Sc},b=c.next())if(d.Sc=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Sc)}}(d)),b.length){a=b;break}return a}
116
116
  function Fd(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Hd||d==Id){if(a=Jd(a,d),1==a.size())return a.keys()[0]}else if(d==Kd)break;return Ld(a)}function Jd(a,b){var c=0,d=new nd;od(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}
@@ -134,8 +134,8 @@ function $d(a){return{id:a.id,active:!1,type:wc,bandwidth:0,language:a.language,
134
134
  originalTextId:a.originalId,originalImageId:null}}
135
135
  function ae(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,
136
136
  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 be(a){a.__shaka_id||(a.__shaka_id=ce++);return a.__shaka_id}
137
- function de(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}
138
- function fe(a){return{id:be(a),active:!1,type:"",bandwidth:0,language:gd(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}}
137
+ function de(a){var b=ee(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=ee(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}
138
+ function ee(a){return{id:be(a),active:!1,type:"",bandwidth:0,language:gd(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}}
139
139
  function he(a){return a.allowedByApplication&&a.allowedByKeySystem}function ie(a){return a.filter(function(b){return he(b)})}
140
140
  function Cd(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)))}
141
141
  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=md(gd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return gd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=ke(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(Xb,[]);return a.length?
@@ -150,37 +150,38 @@ function re(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").ma
150
150
  function se(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function te(a){this.g=a;this.h=new ue(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}te.prototype.create=function(a){var b=this,c=a.filter(function(d){return qe(b.g,d)});return c.length?new pe(c[0],c):this.h.create(a)};function ue(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
151
151
  ue.prototype.create=function(a){var b=[];b=ve(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=we(b,this.j);a.length&&(b=a);this.g&&(a=Cd(b,this.g),a.length&&(b=a));this.h&&(a=xe(b,this.h),a.length&&(b=a));a=new pe(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,qe(a.h,c)&&a.add(c);return a};function ve(a,b){var c=gd(b),d=md(c,a.map(function(e){return ld(e)}));return d?a.filter(function(e){return d==ld(e)}):[]}
152
152
  function we(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function xe(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function ye(){this.g=ze;this.h=(new Map).set(ze,2).set(Ae,1)}function Be(a,b,c){a.h.set(ze,c).set(Ae,b)}var Ae=0,ze=1;function Ce(a,b){var c=De();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
153
- function Ee(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new N(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.s);return u(d,new Promise(function(e){(new O(e)).V(c/1E3)}),2)}a.h*=a.m;z(d)})}function De(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Fe(a,b){this.promise=a;this.i=b;this.g=!1}function Ge(a){return new Fe(Promise.reject(a),function(){return Promise.resolve()})}function He(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new Fe(a,function(){return Promise.resolve()})}function Ie(a){return new Fe(Promise.resolve(a),function(){return Promise.resolve()})}function Je(a){return new Fe(a,function(){return a["catch"](function(){})})}Fe.prototype.abort=function(){this.g=!0;return this.i()};
153
+ function Ee(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new N(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.s);return u(d,new Promise(function(e){(new O(e)).U(c/1E3)}),2)}a.h*=a.m;z(d)})}function De(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Fe(a,b){this.promise=a;this.i=b;this.g=!1}function Ge(a){return new Fe(Promise.reject(a),function(){return Promise.resolve()})}function He(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new Fe(a,function(){return Promise.resolve()})}function Ie(a){return new Fe(Promise.resolve(a),function(){return Promise.resolve()})}function Je(a){return new Fe(a,function(){return a["catch"](function(){})})}Fe.prototype.abort=function(){this.g=!0;return this.i()};
154
154
  function Ke(a){return new Fe(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Fe.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
155
155
  Fe.prototype.ca=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Le(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new yc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Fe(f,function(){return d()})};
156
- function Le(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",Fe);Fe.prototype.chain=Fe.prototype.ca;Fe.prototype["finally"]=Fe.prototype["finally"];Fe.all=Ke;Fe.prototype.abort=Fe.prototype.abort;Fe.notAbortable=Je;Fe.completed=Ie;Fe.aborted=He;Fe.failed=Ge;function R(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 Me(a){var b=new R(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}R.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};R.prototype.stopImmediatePropagation=function(){this.g=!0};R.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",R);function Ne(){this.tc=new nd;this.sc=this}Ne.prototype.addEventListener=function(a,b){this.tc.push(a,b)};Ne.prototype.removeEventListener=function(a,b){this.tc.remove(a,b)};Ne.prototype.dispatchEvent=function(a){var b=this.tc.get(a.type)||[],c=this.tc.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.sc;a.currentTarget=this.sc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};function Oe(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 Pe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Qe(){this.g=[]}function Re(a,b){a.g.push(b["finally"](function(){nb(a.g,b)}))}Qe.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 Se(a){Ne.call(this);this.i=!1;this.l=new Qe;this.g=new Set;this.h=new Set;this.j=a||null;this.m=!1}ra(Se,Ne);q=Se.prototype;q.Nd=function(a){this.m=a};function Te(a,b,c,d){c=c||Ue;var e=Ve[a];if(!e||c>=e.priority)Ve[a]={priority:c,Df:b,Ff:void 0===d?!1:d}}q.Gf=function(a){this.g.add(a)};q.Xf=function(a){this.g["delete"](a)};q.Me=function(){this.g.clear()};q.Hf=function(a){this.h.add(a)};q.Yf=function(a){this.h["delete"](a)};q.Ne=function(){this.h.clear()};
158
- function We(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}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();return this.l.destroy()};
156
+ function Le(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",Fe);Fe.prototype.chain=Fe.prototype.ca;Fe.prototype["finally"]=Fe.prototype["finally"];Fe.all=Ke;Fe.prototype.abort=Fe.prototype.abort;Fe.notAbortable=Je;Fe.completed=Ie;Fe.aborted=He;Fe.failed=Ge;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 Me(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 Ne(){this.V=new nd;this.tc=this}Ne.prototype.addEventListener=function(a,b){this.V&&this.V.push(a,b)};Ne.prototype.removeEventListener=function(a,b){this.V&&this.V.remove(a,b)};Ne.prototype.dispatchEvent=function(a){if(!this.V)return!0;var b=this.V.get(a.type)||[],c=this.V.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.tc;a.currentTarget=this.tc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
158
+ Ne.prototype.release=function(){this.V=null};function Oe(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 Pe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Qe(){this.g=[]}function Re(a,b){a.g.push(b["finally"](function(){nb(a.g,b)}))}Qe.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 Se(a){Ne.call(this);this.i=!1;this.l=new Qe;this.g=new Set;this.h=new Set;this.j=a||null;this.m=!1}ra(Se,Ne);q=Se.prototype;q.Nd=function(a){this.m=a};function Te(a,b,c,d){c=c||Ue;var e=Ve[a];if(!e||c>=e.priority)Ve[a]={priority:c,Df:b,Ff:void 0===d?!1:d}}q.Gf=function(a){this.g.add(a)};q.Xf=function(a){this.g["delete"](a)};q.Me=function(){this.g.clear()};q.Hf=function(a){this.h.add(a)};q.Yf=function(a){this.h["delete"](a)};q.Ne=function(){this.h.clear()};
159
+ function We(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}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Ne.prototype.release.call(this);return this.l.destroy()};
159
160
  q.request=function(a,b){var c=this,d=new Xe;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new Ye(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Oe(b.retryParameters):De();b.uris=Oe(b.uris);e=Ze(this,a,b);var f=e.ca(function(){return $e(c,a,b,new Ce(b.retryParameters,!1),0,null,d)}),g=f.ca(function(n){return af(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
160
161
  var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.ca(function(n){var p=Date.now()-l,r=n.response;r.timeMs+=k;r.timeMs+=p;n.uf||!c.j||r.fromCache||a!=bf||c.j(r.timeMs,r.data.byteLength);return r},function(n){n&&(n.severity=2);throw n;});e=new Ye(m.promise,function(){return m.abort()},d);Re(this.l,e);return e};
161
162
  function Ze(a,b,c){var d=Ie(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={ad:e.ad},f=a.next())e.ad=f.value,d=d.ca(function(g){return function(){c.body&&(c.body=Pb(c.body));return g.ad(b,c)}}(e));return d.ca(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
162
- function $e(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new ec(c.uris[e]),k=h.Ga,l=!1;k||(k=location.protocol,k=k.slice(0,-1),fc(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ve[k])?k.Df:null;if(!m)return Ge(new N(2,1,1E3,h));var n=k.Ff,p=null,r=null,v=!1,y;return Je(Ee(d)).ca(function(){if(a.i)return He();y=Date.now();var x=m(c.uris[e],c,b,function(D,B,F){p&&p.stop();r&&r.V(C/1E3);a.j&&b==bf&&(a.j(D,B),l=!0,g.g=F)});if(!n)return x;var w=c.retryParameters.connectionTimeout;
163
- w&&(p=new O(function(){v=!0;x.abort()}),p.V(w/1E3));var C=c.retryParameters.stallTimeout;C&&(r=new O(function(){v=!0;x.abort()}));return x}).ca(function(x){p&&p.stop();r&&r.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);return{response:x,uf:l}},function(x){p&&p.stop();r&&r.stop();if(a.i)return He();v&&(x=new N(1,1,1003,c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity){var w=(new Map).set("error",x);w=new R("retry",w);a.dispatchEvent(w);e=(e+1)%c.uris.length;
163
+ function $e(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new ec(c.uris[e]),k=h.Ga,l=!1;k||(k=location.protocol,k=k.slice(0,-1),fc(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ve[k])?k.Df:null;if(!m)return Ge(new N(2,1,1E3,h));var n=k.Ff,p=null,r=null,v=!1,y;return Je(Ee(d)).ca(function(){if(a.i)return He();y=Date.now();var x=m(c.uris[e],c,b,function(D,B,F){p&&p.stop();r&&r.U(C/1E3);a.j&&b==bf&&(a.j(D,B),l=!0,g.g=F)});if(!n)return x;var w=c.retryParameters.connectionTimeout;
164
+ w&&(p=new O(function(){v=!0;x.abort()}),p.U(w/1E3));var C=c.retryParameters.stallTimeout;C&&(r=new O(function(){v=!0;x.abort()}));return x}).ca(function(x){p&&p.stop();r&&r.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);return{response:x,uf:l}},function(x){p&&p.stop();r&&r.stop();if(a.i)return He();v&&(x=new N(1,1,1003,c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity){var w=(new Map).set("error",x);w=new Q("retry",w);a.dispatchEvent(w);e=(e+1)%c.uris.length;
164
165
  return $e(a,b,c,d,e,x,g)}}throw x;})}function af(a,b,c){var d=Ie(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={bd:e.bd},f=a.next())e.bd=f.value,d=d.ca(function(g){return function(){var h=c.response;h.data&&(h.data=Pb(h.data));return g.bd(b,h)}}(e));return d.ca(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",Se);Se.prototype.request=Se.prototype.request;Se.prototype.destroy=Se.prototype.destroy;
165
166
  Se.makeRequest=We;Se.defaultRetryParameters=function(){return De()};Se.prototype.clearAllResponseFilters=Se.prototype.Ne;Se.prototype.unregisterResponseFilter=Se.prototype.Yf;Se.prototype.registerResponseFilter=Se.prototype.Hf;Se.prototype.clearAllRequestFilters=Se.prototype.Me;Se.prototype.unregisterRequestFilter=Se.prototype.Xf;Se.prototype.registerRequestFilter=Se.prototype.Gf;Se.unregisterScheme=function(a){delete Ve[a]};Se.registerScheme=Te;Se.prototype.setForceHTTPS=Se.prototype.Nd;
166
167
  function Xe(){this.g=0}Se.NumBytesRemainingClass=Xe;function Ye(a,b,c){Fe.call(this,a,b);this.h=c}ra(Ye,Fe);Se.PendingRequest=Ye;var bf=1;Se.RequestType={MANIFEST:0,SEGMENT:bf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Ue=3;Se.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Ue};var Ve={};function cf(a){this.g=!1;this.h=new yc;this.i=a}cf.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 df(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function ef(){this.g=new nd}q=ef.prototype;q.release=function(){this.pb();this.g=null};q.A=function(a,b,c,d){this.g&&(a=new ff(a,b,c,d),this.g.push(b,a))};q.xa=function(a,b,c,d){function e(g){f.Ea(a,b,e);c(g)}var f=this;this.A(a,b,e,d)};q.Ea=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.Ea(),this.g.remove(b,e))}};
167
168
  q.pb=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.Ea();this.g.g={}}};M("shaka.util.EventManager",ef);ef.prototype.removeAll=ef.prototype.pb;ef.prototype.unlisten=ef.prototype.Ea;ef.prototype.listenOnce=ef.prototype.xa;ef.prototype.listen=ef.prototype.A;ef.prototype.release=ef.prototype.release;function ff(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=gf(a,d);this.target.addEventListener(b,c,this.g)}
168
169
  ff.prototype.Ea=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function gf(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 hf(a)?b:b.capture||!1}
169
- function hf(a){var b=jf;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}jf=b}return b||!1}var jf=void 0;function kf(){}function lf(a){a=Ec(a);return(new ec(a)).Ia}function mf(a,b,c){function d(h){Rb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ob(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Gc(b,!0):e=b;a=Ec(a);a=Gc(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",kf);kf.initDataTransform=mf;kf.defaultGetContentId=lf;function nf(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 of(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function pf(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 qf(a,b){var c=this;b=void 0===b?1:b;this.C=a;this.D=new Set;this.g=this.m=null;this.ra=this.Z=!1;this.F=0;this.i=null;this.h=new ef;this.j=new Map;this.u=[];this.s=new yc;this.o=null;this.l=function(d){c.s.reject(d);a.onError(d)};this.sa=new Map;this.ea=new Map;this.O=new O(function(){return tf(c)});this.I=!1;this.H=[];this.L=!1;this.qa=(new O(function(){uf(c)})).Da(b);this.s["catch"](function(){});this.J=new cf(function(){return vf(c)});this.T=!1}q=qf.prototype;q.destroy=function(){return this.J.destroy()};
170
- function vf(a){return K(function(b){switch(b.g){case 1:return a.h.release(),a.h=null,a.s.reject(),a.qa.stop(),a.qa=null,a.O.stop(),a.O=null,u(b,wf(a),2);case 2:if(!a.g){b.v(3);break}A(b,4);return u(b,a.g.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:E(b);case 5:a.g=null;case 3:a.i=null,a.D.clear(),a.m=null,a.u=[],a.o=null,a.l=function(){},a.C=null,a.T=!1,z(b)}})}q.configure=function(a){this.o=a};function xf(a,b,c){a.ra=!0;a.u=[];a.I=c;return yf(a,b)}
170
+ function hf(a){var b=jf;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}jf=b}return b||!1}var jf=void 0;function kf(){}function lf(a){a=Ec(a);return(new ec(a)).Ia}function mf(a,b,c){function d(h){Rb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ob(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Gc(b,!0):e=b;a=Ec(a);a=Gc(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",kf);kf.initDataTransform=mf;kf.defaultGetContentId=lf;function nf(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 of(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function pf(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 qf(a,b){var c=this;b=void 0===b?1:b;this.C=a;this.D=new Set;this.g=this.m=null;this.ra=this.Y=!1;this.F=0;this.i=null;this.h=new ef;this.j=new Map;this.u=[];this.s=new yc;this.o=null;this.l=function(d){c.s.reject(d);a.onError(d)};this.sa=new Map;this.ea=new Map;this.O=new O(function(){return rf(c)});this.I=!1;this.H=[];this.L=!1;this.la=(new O(function(){uf(c)})).Da(b);this.s["catch"](function(){});this.J=new cf(function(){return vf(c)});this.V=!1}q=qf.prototype;q.destroy=function(){return this.J.destroy()};
171
+ function vf(a){return K(function(b){switch(b.g){case 1:return a.h.release(),a.h=null,a.s.reject(),a.la.stop(),a.la=null,a.O.stop(),a.O=null,u(b,wf(a),2);case 2:if(!a.g){b.v(3);break}A(b,4);return u(b,a.g.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:E(b);case 5:a.g=null;case 3:a.i=null,a.D.clear(),a.m=null,a.u=[],a.o=null,a.l=function(){},a.C=null,a.V=!1,z(b)}})}q.configure=function(a){this.o=a};function xf(a,b,c){a.ra=!0;a.u=[];a.I=c;return yf(a,b)}
171
172
  function zf(a,b,c){a.u=c;a.I=0<c.length;return yf(a,b)}function Af(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 Bf(a,g,[])}
172
173
  function yf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return K(function(x){if(1==x.g){if(c=Cf(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(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=nf(a.o.servers),Df(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Ef(l),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,Ff(r,nf(a.o.servers),nf(a.o.advanced||{}));return u(x,
173
- Td(b,a.I,a.T),2)}v=g||Object.keys(a.o.servers).length;if(!v)return a.Z=!0,x["return"](Promise.resolve());y=Bf(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}
174
- q.Rb=function(a){var b=this,c,d;return K(function(e){if(1==e.g){if(!b.m)return b.h.xa(a,"encrypted",function(){b.l(new N(2,6,6010))}),e["return"]();b.g=a;b.h.xa(b.g,"play",function(){for(var f=t(b.H),g=f.next();!g.done;g=f.next())Gf(b,g.value);b.L=!0;b.H=[]});"webkitCurrentPlaybackTargetIsWireless"in b.g&&b.h.A(b.g,"webkitcurrentplaybacktargetiswirelesschanged",function(){return wf(b)});c=b.g.setMediaKeys(b.m);c=c["catch"](function(f){return Promise.reject(new N(2,6,6003,f.message))});return u(e,
174
+ Td(b,a.I,a.V),2)}v=g||Object.keys(a.o.servers).length;if(!v)return a.Y=!0,x["return"](Promise.resolve());y=Bf(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}
175
+ q.Sb=function(a){var b=this,c,d;return K(function(e){if(1==e.g){if(!b.m)return b.h.xa(a,"encrypted",function(){b.l(new N(2,6,6010))}),e["return"]();b.g=a;b.h.xa(b.g,"play",function(){for(var f=t(b.H),g=f.next();!g.done;g=f.next())Gf(b,g.value);b.L=!0;b.H=[]});"webkitCurrentPlaybackTargetIsWireless"in b.g&&b.h.A(b.g,"webkitcurrentplaybacktargetiswirelesschanged",function(){return wf(b)});c=b.g.setMediaKeys(b.m);c=c["catch"](function(f){return Promise.reject(new N(2,6,6003,f.message))});return u(e,
175
176
  c,2)}df(b.J);Hf(b);b.i.initData.length||b.u.length||(d=function(f){return If(b,f.initDataType,Ob(f.initData))},b.h.A(b.g,"encrypted",d));z(e)})};
176
177
  function Jf(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.m||!a.i)return g["return"]();if(!a.i.serverCertificateUri||a.i.serverCertificate&&a.i.serverCertificate.length){g.v(2);break}b=We([a.i.serverCertificateUri],a.o.retryParameters);A(g,3);c=a.C.nb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.i.serverCertificate=Ob(d.data);wa(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.i.serverCertificate||!a.i.serverCertificate.length)return g["return"]();
177
178
  A(g,6);return u(g,a.m.setServerCertificate(a.i.serverCertificate),8);case 8:wa(g,0);break;case 6:throw f=E(g),new N(2,6,6004,f.message);}})}function Kf(a,b){var c,d,e;return K(function(f){if(1==f.g)return u(f,Lf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.j.get(c))e.Na=new yc,d.push(e.Na);d.push(c.remove());return u(f,Promise.all(d),3)}a.j["delete"](c);z(f)})}
178
179
  function Hf(a){for(var b=(a.i?a.i.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,If(a,d.initDataType,d.initData);c=t(a.u);for(d=c.next();!d.done;d=c.next())Lf(a,d.value);b.length||a.u.length||a.s.resolve();return a.s}function If(a,b,c){var d=a.j.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Mb(c,e.value.initData)&&!ud("Tizen 2"))return;Mf(a,b,c,a.i.sessionType)}function Nf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
179
- function Of(a){a=a.j.keys();a=gb(a,function(b){return b.sessionId});return Array.from(a)}q.Vb=function(){var a=Infinity,b=this.j.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Bc=function(){return of(this.ea)};
180
+ function Of(a){a=a.j.keys();a=gb(a,function(b){return b.sessionId});return Array.from(a)}q.Wb=function(){var a=Infinity,b=this.j.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Bc=function(){return of(this.ea)};
180
181
  function Bf(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y;return K(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Pf(a,c,d);x.v(2);break}return u(x,Qf(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new N(2,6,6001);df(a.J);A(x,4);a.D.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.D.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())r=m.value,a.D.add(r.contentType.toLowerCase());if(c.length){var w=
181
182
  f.keySystem;var C=d.get(f.keySystem);var D=[],B=[],F=[],G=[],H=new Set;Rf(C,D,F,B,G,H);var L=a.I?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:D[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||L,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};C=t(C);for(D=C.next();!D.done;D=
182
183
  C.next())D=D.value,D.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(w.persistentStateRequired=D.persistentStateRequired);C=w}else C=f.keySystem,w=b.get(f.keySystem),D=[],B=[],F=[],G=[],H=new Set,Rf(w.drmInfos,D,F,B,G,H),C={keySystem:C,licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
183
- w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};a.i=C;if(!a.i.licenseServerUri)throw new N(2,6,6012,a.i.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,df(a.J),a.m=v,a.Z=!0,u(x,Jf(a),7);case 7:df(a.J);wa(x,0);break;case 4:y=E(x);df(a.J,y);a.i=null;a.D.clear();if(y instanceof N)throw y;throw new N(2,6,6002,y.message);}})}
184
+ w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};a.i=C;if(!a.i.licenseServerUri)throw new N(2,6,6012,a.i.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,df(a.J),a.m=v,a.Y=!0,u(x,Jf(a),7);case 7:df(a.J);wa(x,0);break;case 4:y=E(x);df(a.J,y);a.i=null;a.D.clear();if(y instanceof N)throw y;throw new N(2,6,6002,y.message);}})}
184
185
  function Pf(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Ef(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.o.preferredKeySystems);for(e=a.next();!e.done;d={Zc:d.Zc},e=a.next())for(d.Zc=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==
185
186
  l.Zc}}(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}
186
187
  function Qf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x;return K(function(w){switch(w.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.o.preferredKeySystems);h=g.next();case 2:if(h.done){w.v(4);break}k=h.value;if(!b.has(k)){w.v(3);break}l=b.get(k);A(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
@@ -192,32 +193,32 @@ if(!f)return a.j["delete"](c),a.l(new N(2,6,6013)),h["return"](Promise.resolve()
192
193
  function Mf(a,b,c,d){try{var e=a.m.createSession(d)}catch(f){a.l(new N(2,6,6005,f.message));return}a.h.A(e,"message",function(f){a.g&&a.o.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.L?a.H.push(f):Gf(a,f)});a.h.A(e,"keystatuseschange",function(f){return Sf(a,f)});a.j.set(e,{initData:c,loaded:!1,Dd:Infinity,Na:null,type:d});try{c=a.o.initDataTransform(c,b,a.i)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.l(b);return}a.o.logLicenseExchange&&Jc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.J.g){a.j["delete"](e);
193
194
  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.l(new N(2,6,6006,f.message,f,h))}})}function Uf(a,b,c){"skd"==b&&(b=c.serverCertificate,c=lf(a),a=mf(a,c,b));return a}
194
195
  function Gf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;K(function(x){switch(x.g){case 1:return c=b.target,a.o.logLicenseExchange&&Jc(b.message),d=a.j.get(c),e=a.i.licenseServerUri,f=a.o.advanced[a.i.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=We([e],a.o.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Nf(a.i.keySystem)&&Vf(g),h=Date.now(),A(x,2),l=a.C.nb.request(2,g),u(x,
195
- l.promise,4);case 4:k=x.h;wa(x,3);break;case 2:return m=E(x),n=new N(2,6,6007,m),a.l(n),d&&d.Na&&d.Na.reject(n),x["return"]();case 3:if(a.J.g)return x["return"]();a.F+=(Date.now()-h)/1E3;a.o.logLicenseExchange&&Jc(k.data);A(x,5);return u(x,c.update(k.data),7);case 7:wa(x,6);break;case 5:return p=E(x),r=new N(2,6,6008,p.message),a.l(r),d&&d.Na&&d.Na.reject(r),x["return"]();case 6:v=new R("drmsessionupdate"),a.C.onEvent(v),d&&(d.Na&&d.Na.resolve(),y=new O(function(){d.loaded=!0;Tf(a)&&a.s.resolve()}),
196
- y.V(Wf)),z(x)}})}function Vf(a){var b=Cc(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=Kc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
196
+ l.promise,4);case 4:k=x.h;wa(x,3);break;case 2:return m=E(x),n=new N(2,6,6007,m),a.l(n),d&&d.Na&&d.Na.reject(n),x["return"]();case 3:if(a.J.g)return x["return"]();a.F+=(Date.now()-h)/1E3;a.o.logLicenseExchange&&Jc(k.data);A(x,5);return u(x,c.update(k.data),7);case 7:wa(x,6);break;case 5:return p=E(x),r=new N(2,6,6008,p.message),a.l(r),d&&d.Na&&d.Na.reject(r),x["return"]();case 6:v=new Q("drmsessionupdate"),a.C.onEvent(v),d&&(d.Na&&d.Na.resolve(),y=new O(function(){d.loaded=!0;Tf(a)&&a.s.resolve()}),
197
+ y.U(Wf)),z(x)}})}function Vf(a){var b=Cc(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=Kc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
197
198
  function Sf(a,b){var c=b.target,d=a.j.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Nf(a.i.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Rb(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=Mc(h);a.sa.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Na&&(a.j["delete"](c),c.close()["catch"](function(){}));
198
- Tf(a)&&(a.s.resolve(),a.O.V(Xf))}function tf(a){var b=a.sa,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.l(new N(2,6,6014));a.C.Ic(of(c))}
199
+ Tf(a)&&(a.s.resolve(),a.O.U(Xf))}function rf(a){var b=a.sa,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.l(new N(2,6,6014));a.C.Ic(of(c))}
199
200
  function Yf(){var a,b,c,d,e,f,g,h;return K(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,
200
201
  c],f=new Map,g=function(l){var m,n,p;return K(function(r){switch(r.g){case 1:return A(r,2),u(r,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=r.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,ud("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(r,m.createMediaKeys(),5);case 5:wa(r,0);break;case 2:E(r),f.set(l,null),z(r)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](of(f))})}
201
- function Zf(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).V($f)}),A(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return wa(c,0);E(c);z(c)})}
202
+ function Zf(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).U($f)}),A(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return wa(c,0);E(c);z(c)})}
202
203
  function wf(a){var b;return K(function(c){b=Array.from(a.j.entries());a.j.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return A(g,2),a.ra||a.u.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Zf(e),5):u(g,e.remove(),5);if(2!=g.g)return wa(g,0);E(g);z(g)})})),0)})}
203
204
  function ag(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={Fa:f.Fa},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Fa=[];f.Fa=f.Fa.concat(e.initData||[]);f.Fa=f.Fa.concat(h.initData||[]);f.Fa=f.Fa.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Fa.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ja(e.keyIds),ja(h.keyIds))):
204
205
  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,
205
206
  initData:f.Fa,keyIds:g});break}}return c}function Ef(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function uf(a){a.j.forEach(function(b,c){var d=b.Dd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Dd=e)})}function Tf(a){a=a.j.values();return hb(a,function(b){return b.loaded})}
206
207
  function Df(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)}
207
- function Rf(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={pa:g.pa},h=a.next()){g.pa=h.value;b.includes(g.pa.licenseServerUri)||b.push(g.pa.licenseServerUri);d.includes(g.pa.serverCertificateUri)||d.push(g.pa.serverCertificateUri);g.pa.serverCertificate&&(c.some(function(m){return function(n){return Mb(n,m.pa.serverCertificate)}}(g))||c.push(g.pa.serverCertificate));if(g.pa.initData){h={};for(var k=t(g.pa.initData),l=k.next();!l.done;h={mc:h.mc},l=k.next())h.mc=l.value,e.some(function(m){return function(n){var p=
208
- m.mc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Mb(n.initData,p.initData)}}(h))||e.push(h.mc)}if(g.pa.keyIds)for(h=t(g.pa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
208
+ function Rf(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={qa:g.qa},h=a.next()){g.qa=h.value;b.includes(g.qa.licenseServerUri)||b.push(g.qa.licenseServerUri);d.includes(g.qa.serverCertificateUri)||d.push(g.qa.serverCertificateUri);g.qa.serverCertificate&&(c.some(function(m){return function(n){return Mb(n,m.qa.serverCertificate)}}(g))||c.push(g.qa.serverCertificate));if(g.qa.initData){h={};for(var k=t(g.qa.initData),l=k.next();!l.done;h={nc:h.nc},l=k.next())h.nc=l.value,e.some(function(m){return function(n){var p=
209
+ m.nc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Mb(n.initData,p.initData)}}(h))||e.push(h.nc)}if(g.qa.keyIds)for(h=t(g.qa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
209
210
  function Ff(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||
210
211
  (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 $f=1,Wf=5,Xf=.5,bg=new zc(function(){return Pb(new Uint8Array([0]))});function cg(){}function dg(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){if(d&&(e=eg[d.toLowerCase()]))return k["return"](e);if(f=fg(a))if(g=gg[f])return k["return"](g);return d?k.v(2):u(k,hg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=eg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
211
212
  function hg(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=We([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 fg(a){a=(new ec(a)).za.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",cg);cg.unregisterParserByMime=function(a){delete eg[a]};cg.registerParserByMime=function(a,b){eg[a]=b};
212
- cg.registerParserByExtension=function(a,b){gg[a]=b};var eg={},gg={};function ig(a,b){this.R=Rb(a);this.h=b==jg;this.g=0}q=ig.prototype;q.oa=function(){return this.g<this.R.byteLength};q.$=function(){return this.g};q.Ze=function(){return this.R.byteLength};q.aa=function(){try{var a=this.R.getUint8(this.g);this.g+=1;return a}catch(b){throw kg();}};q.Gb=function(){try{var a=this.R.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw kg();}};q.N=function(){try{var a=this.R.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw kg();}};
213
+ cg.registerParserByExtension=function(a,b){gg[a]=b};var eg={},gg={};function ig(a,b){this.R=Rb(a);this.h=b==jg;this.g=0}q=ig.prototype;q.pa=function(){return this.g<this.R.byteLength};q.$=function(){return this.g};q.Ze=function(){return this.R.byteLength};q.aa=function(){try{var a=this.R.getUint8(this.g);this.g+=1;return a}catch(b){throw kg();}};q.Gb=function(){try{var a=this.R.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw kg();}};q.N=function(){try{var a=this.R.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw kg();}};
213
214
  q.ne=function(){try{var a=this.R.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw kg();}};q.Hb=function(){try{if(this.h){var a=this.R.getUint32(this.g,!0);var b=this.R.getUint32(this.g+4,!0)}else b=this.R.getUint32(this.g,!1),a=this.R.getUint32(this.g+4,!1)}catch(c){throw kg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.bb=function(a){if(this.g+a>this.R.byteLength)throw kg();var b=Ob(this.R,this.g,a);this.g+=a;return b};
214
- q.skip=function(a){if(this.g+a>this.R.byteLength)throw kg();this.g+=a};q.pe=function(a){if(this.g<a)throw kg();this.g-=a};q.seek=function(a){if(0>a||a>this.R.byteLength)throw kg();this.g=a};q.dc=function(){for(var a=this.g;this.oa()&&0!=this.R.getUint8(this.g);)this.g+=1;a=Ob(this.R,a,this.g-a);this.g+=1;return Bc(a)};function kg(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",ig);ig.prototype.readTerminatedString=ig.prototype.dc;ig.prototype.seek=ig.prototype.seek;ig.prototype.rewind=ig.prototype.pe;
215
- ig.prototype.skip=ig.prototype.skip;ig.prototype.readBytes=ig.prototype.bb;ig.prototype.readUint64=ig.prototype.Hb;ig.prototype.readInt32=ig.prototype.ne;ig.prototype.readUint32=ig.prototype.N;ig.prototype.readUint16=ig.prototype.Gb;ig.prototype.readUint8=ig.prototype.aa;ig.prototype.getLength=ig.prototype.Ze;ig.prototype.getPosition=ig.prototype.$;ig.prototype.hasMoreData=ig.prototype.oa;var jg=1;ig.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:jg};function lg(){this.i=[];this.h=[];this.g=!1}q=lg.prototype;q.box=function(a,b){var c=mg(a);this.i[c]=ng;this.h[c]=b;return this};q.U=function(a,b){var c=mg(a);this.i[c]=og;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new ig(a,0);for(this.g=!1;a.oa()&&!this.g;)this.Kc(0,a,b,c)};
215
+ q.skip=function(a){if(this.g+a>this.R.byteLength)throw kg();this.g+=a};q.pe=function(a){if(this.g<a)throw kg();this.g-=a};q.seek=function(a){if(0>a||a>this.R.byteLength)throw kg();this.g=a};q.ec=function(){for(var a=this.g;this.pa()&&0!=this.R.getUint8(this.g);)this.g+=1;a=Ob(this.R,a,this.g-a);this.g+=1;return Bc(a)};function kg(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",ig);ig.prototype.readTerminatedString=ig.prototype.ec;ig.prototype.seek=ig.prototype.seek;ig.prototype.rewind=ig.prototype.pe;
216
+ ig.prototype.skip=ig.prototype.skip;ig.prototype.readBytes=ig.prototype.bb;ig.prototype.readUint64=ig.prototype.Hb;ig.prototype.readInt32=ig.prototype.ne;ig.prototype.readUint32=ig.prototype.N;ig.prototype.readUint16=ig.prototype.Gb;ig.prototype.readUint8=ig.prototype.aa;ig.prototype.getLength=ig.prototype.Ze;ig.prototype.getPosition=ig.prototype.$;ig.prototype.hasMoreData=ig.prototype.pa;var jg=1;ig.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:jg};function lg(){this.i=[];this.h=[];this.g=!1}q=lg.prototype;q.box=function(a,b){var c=mg(a);this.i[c]=ng;this.h[c]=b;return this};q.T=function(a,b){var c=mg(a);this.i[c]=og;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new ig(a,0);for(this.g=!1;a.pa()&&!this.g;)this.Kc(0,a,b,c)};
216
217
  q.Kc=function(a,b,c,d){var e=b.$();if(d&&e+8>b.R.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=!1;switch(f){case 0:f=b.R.byteLength-e;break;case 1:if(d&&b.$()+8>b.R.byteLength){this.g=!0;return}f=b.Hb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==og){if(d&&b.$()+4>b.R.byteLength){this.g=!0;return}m=b.N();l=m>>>24;m&=16777215}g=e+f;c&&g>b.R.byteLength&&(g=b.R.byteLength);d&&g>b.R.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b.bb(d):new Uint8Array(0),b=new ig(b,0),k({parser:this,partialOkay:c||
217
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.R.byteLength-b.$()))}};function pg(a){for(var b=qg(a);a.reader.oa()&&!a.parser.g;)a.parser.Kc(a.start+b,a.reader,a.partialOkay)}function rg(a){var b=qg(a),c=a.reader.N();c=t(jb(c));for(var d=c.next();!d.done&&(a.parser.Kc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d=c.next());}function sg(a){return function(b){a(b.reader.bb(b.reader.R.byteLength-b.reader.$()))}}
218
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.R.byteLength-b.$()))}};function pg(a){for(var b=qg(a);a.reader.pa()&&!a.parser.g;)a.parser.Kc(a.start+b,a.reader,a.partialOkay)}function rg(a){var b=qg(a),c=a.reader.N();c=t(jb(c));for(var d=c.next();!d.done&&(a.parser.Kc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d=c.next());}function sg(a){return function(b){a(b.reader.bb(b.reader.R.byteLength-b.reader.$()))}}
218
219
  function mg(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 tg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function qg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",lg);lg.headerSize=qg;lg.typeToString=tg;lg.allData=sg;lg.sampleDescription=rg;lg.children=pg;lg.prototype.parseNext=lg.prototype.Kc;lg.prototype.parse=lg.prototype.parse;lg.prototype.stop=lg.prototype.stop;
219
- lg.prototype.fullBox=lg.prototype.U;lg.prototype.box=lg.prototype.box;var ng=0,og=1;function ug(a){function b(){d=!0}function c(l){f.push(l);pg(l)}a=Ob(a);var d=!1,e,f=[],g=[];(new lg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).U("stsd",function(l){e=l;f.push(l);rg(l)}).U("encv",b).U("enca",b).U("avc1",function(l){g.push({box:l,ac:1701733238})}).U("avc3",function(l){g.push({box:l,ac:1701733238})}).U("ac-3",function(l){g.push({box:l,ac:1701733217})}).U("ec-3",function(l){g.push({box:l,ac:1701733217})}).U("mp4a",function(l){g.push({box:l,ac:1701733217})}).parse(a);
220
- if(d)return a;if(0==g.length||!e)throw cb(Mc(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=vg(a,e,k.box,f,k.ac);return a}
220
+ lg.prototype.fullBox=lg.prototype.T;lg.prototype.box=lg.prototype.box;var ng=0,og=1;function ug(a){function b(){d=!0}function c(l){f.push(l);pg(l)}a=Ob(a);var d=!1,e,f=[],g=[];(new lg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).T("stsd",function(l){e=l;f.push(l);rg(l)}).T("encv",b).T("enca",b).T("avc1",function(l){g.push({box:l,bc:1701733238})}).T("avc3",function(l){g.push({box:l,bc:1701733238})}).T("ac-3",function(l){g.push({box:l,bc:1701733217})}).T("ec-3",function(l){g.push({box:l,bc:1701733217})}).T("mp4a",function(l){g.push({box:l,bc:1701733217})}).parse(a);
221
+ if(d)return a;if(0==g.length||!e)throw cb(Mc(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=vg(a,e,k.box,f,k.bc);return a}
221
222
  function vg(a,b,c,d,e){var f=wg.value(),g=a.subarray(c.start,c.start+c.size),h=Rb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Rb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);xg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=ud("Xbox One")?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,xg(e,d.start,d.size+k.byteLength);k=Rb(e,b.start);b=qg(b);
222
223
  a=k.getUint32(b);k.setUint32(b,a+1);return e}function xg(a,b,c){a=Rb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var wg=new zc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function yg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=zg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){r=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
223
224
  r||-1===v)p=Ag(d,e),a.nestedCues.push(p);else{for(;r<=v;r++)if(y=p[r]){var x=y.l,w=y.i,C=y.j,D=y.h;if(x!=h||w!=k||C!=l||D!=m)n.payload&&a.nestedCues.push(n),n=zg(d,e,x,w,C,D),h=x,k=w,l=C,m=D;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Ag(d,e),a.nestedCues.push(n));n=zg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
@@ -227,661 +228,662 @@ var Hg=0,Jg=1,Lg=2,Ng=3,Ig=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[9
227
228
  [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Og=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
228
229
  [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function Qg(a,b){this.h=Rg;this.s=new Cg(a,b);this.i=new Cg(a,b);this.l=new Cg(a,b);this.g=this.i;this.j=0;this.m=null}function Sg(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Tg&&a.h!==Ug&&(e=Eg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Fg(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Fg(c,0,15),d.g=15);a.h=Tg;d.h=b;return e}function Vg(a){a.h=Wg;a.g=a.l;a.g.h=0}function Xg(a){Ya("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=Ug}
229
230
  var Rg=0,Wg=1,Tg=3,Ug=4,Yg="black green blue cyan red yellow magenta black".split(" "),Zg="white green blue cyan red yellow magenta white_italics".split(" ");function $g(){this.l=!1;this.F=this.I=0;this.H=ah;this.i=[];this.g=this.h=this.j=0;this.D=this.s=!1;this.u="white";this.m="black";bh(this)}function bh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(ch())}function ch(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function dh(a,b){eh(a)&&(a.i[a.h][a.g]=new Bg(b,a.D,a.s,a.m,a.u),a.g++)}function eh(a){var b=a.g<a.F&&0<=a.g;return a.h<a.I&&0<=a.h&&b}$g.prototype.isVisible=function(){return this.l};
230
- function fh(a,b,c){var d=new qb(a.j,b,"");d.textAlign=a.H===gh?"left":a.H===hh?"right":ub;if(c=yg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var gh=0,hh=1,ah=2;function ih(){this.i=[];this.h=null;this.g=0}function jh(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new kh(a.h)),a.h=null,a.g=0))}function kh(a){this.g=0;this.h=a}kh.prototype.oa=function(){return this.g<this.h.length};kh.prototype.$=function(){return this.g};function lh(a){if(!a.oa())throw new N(2,2,3E3);return a.h[a.g++]}kh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function mh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
231
+ function fh(a,b,c){var d=new qb(a.j,b,"");d.textAlign=a.H===gh?"left":a.H===hh?"right":ub;if(c=yg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var gh=0,hh=1,ah=2;function ih(){this.i=[];this.h=null;this.g=0}function jh(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new kh(a.h)),a.h=null,a.g=0))}function kh(a){this.g=0;this.h=a}kh.prototype.pa=function(){return this.g<this.h.length};kh.prototype.$=function(){return this.g};function lh(a){if(!a.pa())throw new N(2,2,3E3);return a.h[a.g++]}kh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function mh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
231
232
  function nh(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=lh(b).value;b=null;c=t(oh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=fh(e,d,a.i)),bh(e);return b}if(137===c)for(b=lh(b).value,b=t(oh(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=lh(b).value;b=null;c=t(oh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=fh(e,d,a.i)),e.l=!1;return b}if(139===c){c=lh(b).value;
232
233
  b=null;c=t(oh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=fh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=lh(b).value,ph(a,b,d);if(143===c)return d=ph(a,255,d),qh(a),d;if(144===c)b.skip(1),d=lh(b).value,a.g&&(a.g.s=0<(d&128),a.g.D=0<(d&64));else if(145===c)d=lh(b).value,c=lh(b).value,b.skip(1),a.g&&(b=rh((c&48)>>4,(c&12)>>2,c&3),a.g.u=rh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=lh(b).value,b=lh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
233
234
  b.skip(1),d=lh(b).value,b.skip(1),a.g&&(a.g.H=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new $g;f.j=d;a.h[c]=f}d=lh(b).value;lh(b);lh(b);f=lh(b).value;var g=lh(b).value;b=lh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.D=!1,b.s=!1,b.u="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.I=(f&15)+1;b.F=(g&63)+1;a.g=a.h[c]}}}return null}
234
235
  var oh=function sh(a,b){var d,e;return Ia(sh,function(f){1==f.g&&(d=0);if(5!=f.g)return 8>d?(e=1===(b&1))&&a.h[d]?u(f,d,5):f.v(5):f.v(0);b>>=1;d++;return f.v(2)})};function ph(a,b,c){var d=null;b=t(oh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=fh(f,c,a.i));a.h[e]=null}return d}function qh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function rh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return th[a<<2|b<<1|c]}
235
236
  var uh=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),th="black blue green cyan red magenta yellow white".split(" ");function vh(){this.h=[];this.g=[];this.i=new ih;this.l=0;this.u=new Map([["CC1",new Qg(0,0)],["CC2",new Qg(0,1)],["CC3",new Qg(1,0)],["CC4",new Qg(1,1)]]);this.s=this.m=0;this.j=new Map;wh(this)}function wh(a){a.m=0;a.s=0;a=t(a.u.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Dg(b.i),Dg(b.l),Dg(b.s)}
236
237
  function xh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=t(a.h),e=d.next();!e.done;e=d.next())(e=yh(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())jh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=zh(a,e.value),c.push.apply(c,ja(e));a.i.i=[];a.h=[];a.g=[];return c}
237
- function yh(a,b){var c=b.type;if(16===(b.Ba&112)){var d=b.Ba>>3&1;0===c?a.m=d:a.s=d}c=a.u.get("CC"+(c<<1|(c?a.s:a.m)+1));if(255===b.Ba&&255===b.Sa||!b.Ba&&!b.Sa||!Ah(b.Ba)||!Ah(b.Sa))return 45<=++a.l&&wh(a),null;a.l=0;b.Ba&=127;b.Sa&=127;if(!b.Ba&&!b.Sa)return null;d=null;if(16===(b.Ba&112))a:{var e=b.Ba;d=b.Sa;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Zg[f]:7===f&&(h=!0);
238
+ function yh(a,b){var c=b.type;if(16===(b.Ba&112)){var d=b.Ba>>3&1;0===c?a.m=d:a.s=d}c=a.u.get("CC"+(c<<1|(c?a.s:a.m)+1));if(255===b.Ba&&255===b.Ta||!b.Ba&&!b.Ta||!Ah(b.Ba)||!Ah(b.Ta))return 45<=++a.l&&wh(a),null;a.l=0;b.Ba&=127;b.Ta&=127;if(!b.Ba&&!b.Ta)return null;d=null;if(16===(b.Ba&112))a:{var e=b.Ba;d=b.Ta;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Zg[f]:7===f&&(h=!0);
238
239
  d=1===(d&1);if(c.h!==Ug){f=c.g;if(c.h===Tg&&e!==f.g){var k=1+e-f.h;Pg(f,k,1+f.g-f.h,f.h);Fg(f,0,k-1);Fg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.s="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Gg(c.g,Hg,32),g=!1,e=Zg[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=Yg[(d&14)>>1]),c.g.s=g;else if(17===(e&247)&&48===(d&240))Gg(c.g,Jg,d);else if(18===
239
- (e&246)&&32===(d&224))Gg(c.g,e&1?Ng:Lg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Sa){case 32:Vg(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Sg(c,2,d);break;case 38:e=Sg(c,3,d);break;case 39:e=Sg(c,4,d);break;case 40:Gg(c.g,Hg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Dg(c.s);Xg(c);break;case 43:Xg(c);break;case 44:e=c.i;g=null;c.h!==Ug&&(g=Eg(e,c.j,d));Fg(e,0,15);e=g;break;case 45:e=c.g;c.h!==Tg?e=null:(g=Eg(e,c.j,d),h=e.g-e.h+1,Pg(e,h-1,h,e.h),Fg(e,
240
- 0,h-1),Fg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Fg(c.l,0,15);break;case 47:e=null,c.h!==Ug&&(e=Eg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Vg(c),c.j=d}d=e;break a}d=null}else e=b.Sa,Gg(c.g,Hg,b.Ba),Gg(c.g,Hg,e);return d}
241
- function zh(a,b){var c=[];try{for(;b.oa();){var d=lh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=lh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new mh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=lh(e),l=k.value,m=k.pts;if(16===l){var n=lh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var r=g.g;e=null;switch(l){case 8:!eh(r)||0>=r.g&&0>=r.h||(0>=r.g?(r.g=r.F-1,r.h--):r.g--,r.i[r.h][r.g]=null);break;case 13:r.isVisible()&&(e=fh(r,p,g.i));if(r.h+1>=r.I){p=r;for(var v=0,y=1;15>y;y++,
240
+ (e&246)&&32===(d&224))Gg(c.g,e&1?Ng:Lg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Ta){case 32:Vg(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Sg(c,2,d);break;case 38:e=Sg(c,3,d);break;case 39:e=Sg(c,4,d);break;case 40:Gg(c.g,Hg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Dg(c.s);Xg(c);break;case 43:Xg(c);break;case 44:e=c.i;g=null;c.h!==Ug&&(g=Eg(e,c.j,d));Fg(e,0,15);e=g;break;case 45:e=c.g;c.h!==Tg?e=null:(g=Eg(e,c.j,d),h=e.g-e.h+1,Pg(e,h-1,h,e.h),Fg(e,
241
+ 0,h-1),Fg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Fg(c.l,0,15);break;case 47:e=null,c.h!==Ug&&(e=Eg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Vg(c),c.j=d}d=e;break a}d=null}else e=b.Ta,Gg(c.g,Hg,b.Ba),Gg(c.g,Hg,e);return d}
242
+ function zh(a,b){var c=[];try{for(;b.pa();){var d=lh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=lh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new mh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=lh(e),l=k.value,m=k.pts;if(16===l){var n=lh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var r=g.g;e=null;switch(l){case 8:!eh(r)||0>=r.g&&0>=r.h||(0>=r.g?(r.g=r.F-1,r.h--):r.g--,r.i[r.h][r.g]=null);break;case 13:r.isVisible()&&(e=fh(r,p,g.i));if(r.h+1>=r.I){p=r;for(var v=0,y=1;15>y;y++,
242
243
  v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=ch()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=fh(r,p,g.i));r.i[r.h]=ch();r.g=0;break;case 12:r.isVisible()&&(e=fh(r,p,g.i)),bh(r),p=r,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=nh(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?dh(g.g,"\u266a"):dh(g.g,
243
244
  String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&dh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(uh.has(e)){var w=uh.get(e);dh(g.g,w)}else dh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?dh(g.g,"_"):dh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(C){if(C instanceof N&&3E3===C.code)Ya("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function Ah(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Bh(){}var Dh=function Ch(a,b){var d,e,f,g;return Ia(Ch,function(h){if(1==h.g){for(var k=b,l=0,m=0;m<k.length;)2==l&&3==k[m]?(l=0,k=[].concat(ja(k)),k.splice(m,1),k=new Uint8Array(k)):0==k[m]?l++:l=0,m++;d=k;e=0}if(4!=h.g){if(!(e<d.length))return h.v(0);for(f=0;255==d[e];)f+=255,e++;f+=d[e++];for(g=0;255==d[e];)g+=255,e++;g+=d[e++];return 4!=f?h.v(4):u(h,d.subarray(e,e+g),4)}e+=g;return h.v(2)})};function Eh(a,b){var c=null,d=null,e=a.N();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:e,Zd:c,Pe:d}}function Fh(a,b){return{jd:1==b?a.Hb():a.N()}}function Gh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
244
245
  function Hh(a,b,c){var d=a.N(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=t(jb(d)),g=f.next();!g.done;g=f.next())g={Jd:null,sampleSize:null,Mc:null},c&256&&(g.Jd=a.N()),c&512&&(g.sampleSize=a.N()),c&1024&&a.skip(4),c&2048&&(g.Mc=0==b?a.N():a.ne()),e.push(g);return{Cg:d,qe:e}};function Ih(){this.j=new Bh;this.i=new Map;this.h=this.g=0}
245
- Ih.prototype.init=function(a){var b=this,c=[],d=[];(new lg).box("moov",pg).box("mvex",pg).U("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.N();f=f.N();b.g=e;b.h=f}).box("trak",pg).U("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.N();c.push(e)}).box("mdia",pg).U("mdhd",function(e){e=Gh(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])})};
246
- Ih.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new lg).box("moof",pg).box("traf",pg).U("trun",function(k){f=Hh(k.reader,k.version,k.flags).qe}).U("tfhd",function(k){k=Eh(k.reader,k.flags);d=k.Zd||b.g;e=k.Pe||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=Fh(k.reader,k.version).jd}).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,r=f,v=0,y=p;for(r.length&&(y=r[0].sampleSize||p);k.oa();){var x=k.N();if(6==
246
+ Ih.prototype.init=function(a){var b=this,c=[],d=[];(new lg).box("moov",pg).box("mvex",pg).T("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.N();f=f.N();b.g=e;b.h=f}).box("trak",pg).T("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.N();c.push(e)}).box("mdia",pg).T("mdhd",function(e){e=Gh(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])})};
247
+ Ih.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new lg).box("moof",pg).box("traf",pg).T("trun",function(k){f=Hh(k.reader,k.version,k.flags).qe}).T("tfhd",function(k){k=Eh(k.reader,k.flags);d=k.Zd||b.g;e=k.Pe||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).T("tfdt",function(k){g=Fh(k.reader,k.version).jd}).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,r=f,v=0,y=p;for(r.length&&(y=r[0].sampleSize||p);k.pa();){var x=k.N();if(6==
247
248
  (k.aa()&31)){var w=0;r.length>v&&(w=r[v].Mc||0);w=(l+w)/m;for(var C=t(Dh(b.j,k.bb(x-1))),D=C.next();!D.done;D=C.next())c.push({Cf:D.value,pts:w})}else k.skip(x-1);y-=x+4;0==y&&(l=r.length>v?l+(r[v].Jd||n):l+n,v++,y=r.length>v?r[v].sampleSize||p:p)}}).parse(a,!1);return c};function Jh(){this.h=new Ih;this.g=new vh}Jh.prototype.init=function(a){this.h.init(a)};
248
- function Kh(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=Ob(e.Cf);if(0<f.length&&(d=a.g,e=e.pts,f=new ig(f,0),181===f.aa()&&49===f.Gb()&&1195456820===f.N()&&3===f.aa())){var g=f.aa();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.aa(),l=(k&4)>>2,m=f.aa(),n=f.aa();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Ba:m,Sa: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 xh(a.g)}
249
- ;function Lh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Oh(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 Ph(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(Qh(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}
250
- function Rh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Qh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Qh(a){if(!a)return[];for(var b=[],c=t(jb(a.length)),d=c.next();!d.done;d=c.next())d=d.value,b.push({start:a.start(d),end:a.end(d)});return b};function Sh(a,b,c,d){var e=this;this.g=a;this.m=c;this.j={};this.I={};this.i=null;this.L=d||function(){};this.l={};this.h=new ef;this.u={};this.D=b;this.F=new yc;this.s=Th(this,this.F);this.J=new cf(function(){return Uh(e)});this.H=""}function Th(a,b){var c=new MediaSource;a.h.xa(c,"sourceopen",function(){URL.revokeObjectURL(a.H);b.resolve()});a.H=Vh(c);a.g.src=a.H;return c}q=Sh.prototype;q.destroy=function(){return this.J.destroy()};
249
+ function Kh(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=Ob(e.Cf);if(0<f.length&&(d=a.g,e=e.pts,f=new ig(f,0),181===f.aa()&&49===f.Gb()&&1195456820===f.N()&&3===f.aa())){var g=f.aa();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.aa(),l=(k&4)>>2,m=f.aa(),n=f.aa();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Ba:m,Ta: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 xh(a.g)}
250
+ ;function Lh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Mh(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 Nh(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(Oh(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}
251
+ function Rh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Oh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Oh(a){if(!a)return[];for(var b=[],c=t(jb(a.length)),d=c.next();!d.done;d=c.next())d=d.value,b.push({start:a.start(d),end:a.end(d)});return b};function Sh(a,b,c,d){var e=this;this.g=a;this.m=c;this.j={};this.I={};this.i=null;this.L=d||function(){};this.l={};this.h=new ef;this.u={};this.D=b;this.F=new yc;this.s=Th(this,this.F);this.J=new cf(function(){return Uh(e)});this.H=""}function Th(a,b){var c=new MediaSource;a.h.xa(c,"sourceopen",function(){URL.revokeObjectURL(a.H);b.resolve()});a.H=Vh(c);a.g.src=a.H;return c}q=Sh.prototype;q.destroy=function(){return this.J.destroy()};
251
252
  function Uh(a){var b,c,d,e,f,g,h,k;return K(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p["catch"](Yb)),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.i&&b.push(a.i.destroy());a.m&&b.push(a.m.destroy());for(k in a.u)b.push(a.u[k].destroy());return u(l,Promise.all(b),2)}a.h&&(a.h.release(),a.h=null);a.g&&(a.g.removeAttribute("src"),a.g.load(),a.g=null);a.s=null;a.i=null;a.m=null;a.j={};a.u={};a.D=null;a.l=
252
253
  {};z(l)})}
253
254
  q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return d=xc,u(m,c.F,2);e={};f=t(a.keys());for(g=f.next();!g.done;e={ta:e.ta},g=f.next())e.ta=g.value,h=a.get(e.ta),k=Tc(h.mimeType,h.codecs),e.ta==d.ba?Wh(c,k):(!b&&MediaSource.isTypeSupported(k)||!Pc(k,e.ta)||(c.u[e.ta]=new Oc,k=Rc(e.ta,k)),l=c.s.addSourceBuffer(k),c.h.A(l,"error",function(n){return function(){c.l[n.ta][0].p.reject(new N(2,3,3014,c.g.error?c.g.error.code:0))}}(e)),c.h.A(l,"updateend",function(n){return function(){return Xh(c,n.ta)}}(e)),
254
255
  c.j[e.ta]=l,c.I[e.ta]=k,c.l[e.ta]=[]);z(m)})};function Wh(a,b){a.i||(a.i=new Xc(a.m));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.i.s=$b(Zc[b]))}function Yh(a){return a.s?"ended"==a.s.readyState:!0}function Zh(a,b){if(b==wc)var c=a.i.g;else c=$h(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function ai(a,b){return b==wc?a.i.h:Lh($h(a,b))}
255
- function bi(a,b,c){if(b==wc)return a=a.i,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=$h(a,b);return Ph(a,c)}q.zc=function(){var a={total:Qh(this.g.buffered),audio:Qh($h(this,"audio")),video:Qh($h(this,"video")),text:[]};if(this.i){var b=this.i.g,c=this.i.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function $h(a,b){try{return a.j[b].buffered}catch(c){return null}}
256
- function ci(a,b,c,d,e,f){var g,h,k,l,m,n,p,r;return K(function(v){if(1==v.g){g=xc;if(b==g.ba)return u(v,$c(a.i,c,d,e),0);if(a.u[b])return u(v,Sc(a.u[b],c),10);if(f)return a.i||Wh(a,"text/vtt"),null==d&&null==e?a.D.init(c):(h=Kh(a.D,c),h.length&&(k=a.j[g.Qa].timestampOffset,ed(a.i,h,d,e,k))),c=di(a,c,d,b),u(v,ei(a,b,function(){a.j[b].appendBuffer(c)}),0);c=di(a,c,d,b);return u(v,ei(a,b,function(){a.j[b].appendBuffer(c)}),0)}l=v.h;a.i||Wh(a,"text/vtt");l.metadata&&(m=a.j[b].timestampOffset,a.L(l.metadata,
257
- m,e));l.captions&&l.captions.length&&(n=a.j[g.Qa].timestampOffset,p=cd(l.captions),ed(a.i,p,d,e,n));r=l.data;r=di(a,r,d,b);return u(v,ei(a,b,function(){a.j[b].appendBuffer(r)}),0)})}function fi(a,b){var c=ai(a,"video")||0;bd(a.i,b,c)}function gi(a){a.i&&bd(a.i,"",0)}q.remove=function(a,b,c){var d=this,e;return K(function(f){e=xc;return a==e.ba?u(f,d.i.remove(b,c),0):u(f,ei(d,a,function(){c<=b?Xh(d,a):d.j[a].remove(b,c)}),0)})};
256
+ function bi(a,b,c){if(b==wc)return a=a.i,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=$h(a,b);return Nh(a,c)}q.zc=function(){var a={total:Oh(this.g.buffered),audio:Oh($h(this,"audio")),video:Oh($h(this,"video")),text:[]};if(this.i){var b=this.i.g,c=this.i.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function $h(a,b){try{return a.j[b].buffered}catch(c){return null}}
257
+ function ci(a,b,c,d,e,f){var g,h,k,l,m,n,p,r;return K(function(v){if(1==v.g){g=xc;if(b==g.ba)return u(v,$c(a.i,c,d,e),0);if(a.u[b])return u(v,Sc(a.u[b],c),10);if(f)return a.i||Wh(a,"text/vtt"),null==d&&null==e?a.D.init(c):(h=Kh(a.D,c),h.length&&(k=a.j[g.Ra].timestampOffset,ed(a.i,h,d,e,k))),c=di(a,c,d,b),u(v,ei(a,b,function(){a.j[b].appendBuffer(c)}),0);c=di(a,c,d,b);return u(v,ei(a,b,function(){a.j[b].appendBuffer(c)}),0)}l=v.h;a.i||Wh(a,"text/vtt");l.metadata&&(m=a.j[b].timestampOffset,a.L(l.metadata,
258
+ m,e));l.captions&&l.captions.length&&(n=a.j[g.Ra].timestampOffset,p=cd(l.captions),ed(a.i,p,d,e,n));r=l.data;r=di(a,r,d,b);return u(v,ei(a,b,function(){a.j[b].appendBuffer(r)}),0)})}function fi(a,b){var c=ai(a,"video")||0;bd(a.i,b,c)}function gi(a){a.i&&bd(a.i,"",0)}q.remove=function(a,b,c){var d=this,e;return K(function(f){e=xc;return a==e.ba?u(f,d.i.remove(b,c),0):u(f,ei(d,a,function(){c<=b?Xh(d,a):d.j[a].remove(b,c)}),0)})};
258
259
  function hi(a,b){var c;return K(function(d){c=xc;return b==c.ba?a.i?u(d,a.i.remove(0,Infinity),0):d["return"]():u(d,ei(a,b,function(){var e=a.s.duration;0>=e?Xh(a,b):a.j[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return K(function(d){c=xc;return a==c.ba?d["return"]():u(d,ei(b,a,function(){b.g.currentTime-=.001;Xh(b,a)}),0)})};
259
260
  function ii(a,b,c,d,e){var f;return K(function(g){f=xc;return b==f.ba?(a.i.D=c,ad(a.i,d,e),g["return"]()):u(g,Promise.all([ei(a,b,function(){var h=a.j[b].appendWindowStart,k=a.j[b].appendWindowEnd;a.j[b].abort();a.j[b].appendWindowStart=h;a.j[b].appendWindowEnd=k;Xh(a,b)}),ei(a,b,function(){var h=c;0>h&&(h+=.001);a.j[b].timestampOffset=h;Xh(a,b)}),ei(a,b,function(){a.j[b].appendWindowStart=0;a.j[b].appendWindowEnd=e;a.j[b].appendWindowStart=d;Xh(a,b)})]),0)})}
260
261
  q.endOfStream=function(a){var b=this;return K(function(c){return u(c,ji(b,function(){Yh(b)||(a?b.s.endOfStream(a):b.s.endOfStream())}),0)})};q.Ma=function(a){var b=this;return K(function(c){return u(c,ji(b,function(){b.s.duration=a}),0)})};q.getDuration=function(){return this.s.duration};function Xh(a,b){var c=a.l[b][0];c&&(c.p.resolve(),ki(a,b))}function ei(a,b,c){df(a.J);c={start:c,p:new yc};a.l[b].push(c);1==a.l[b].length&&li(a,b);return c.p}
261
262
  function ji(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:df(a.J);c=[];d={};for(e in a.j)d.Mb=new yc,f={start:function(l){return function(){return l.Mb.resolve()}}(d),p:d.Mb},a.l[e].push(f),c.push(d.Mb),1==a.l[e].length&&f.start(),d={Mb:d.Mb};A(k,2);return u(k,Promise.all(c),4);case 4:wa(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.j)ki(a,h)}z(k)}})}function ki(a,b){a.l[b].shift();li(a,b)}
262
- function li(a,b){var c=a.l[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)),ki(a,b)}}function di(a,b,c,d){var e=a.g.mediaKeys;null==c&&e&&(td()||ud("Xbox One"))&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=ug(b));return b}var Vh=window.URL.createObjectURL;function mi(a,b,c){this.na=a;this.ka=b;this.fa=c}mi.prototype.Yb=function(){return this.ka};mi.prototype.Ub=function(){return this.fa};function ni(a,b){return a&&b?a.Yb()==b.Yb()&&a.Ub()==b.Ub()&&pb(a.na(),b.na()):a==b}M("shaka.media.InitSegmentReference",mi);mi.prototype.getEndByte=mi.prototype.Ub;mi.prototype.getStartByte=mi.prototype.Yb;
263
- function oi(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.ka=d;this.fa=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=oi.prototype;q.na=function(){return this.j()};q.kf=function(){return this.startTime};q.Xe=function(){return this.endTime};q.Yb=function(){return this.ka};q.Ub=function(){return this.fa};q.rf=function(){return this.tilesLayout};
264
- q.qf=function(){return this.i};M("shaka.media.SegmentReference",oi);oi.prototype.getTileDuration=oi.prototype.qf;oi.prototype.getTilesLayout=oi.prototype.rf;oi.prototype.getEndByte=oi.prototype.Ub;oi.prototype.getStartByte=oi.prototype.Yb;oi.prototype.getEndTime=oi.prototype.Xe;oi.prototype.getStartTime=oi.prototype.kf;oi.prototype.getUris=oi.prototype.na;function S(a,b,c){this.j=a;this.Lc=b;this.m=this.l=Infinity;this.g=1;this.h=this.i=null;this.s=0;this.u=!0;this.D=0;this.F=void 0===c?!0:c;this.H=0}q=S.prototype;q.getDuration=function(){return this.l};q.cf=function(){return this.g};q.Ma=function(a){this.l=a};q.jf=function(){return this.j};q.ve=function(a){this.s=a};q.ic=function(a){this.u=a};q.Qd=function(a){this.m=a};q.Sf=function(a){this.Lc=a};q.We=function(){return this.Lc};
265
- q.Db=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Bd(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.j&&this.F&&(this.j=(Date.now()+this.s)/1E3-this.h-this.g)}};q.Bd=function(a){this.i=null==this.i?a:Math.min(this.i,a)};q.zd=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.i&&(this.i+=a);null!=this.h&&(this.h+=a)};q.Y=function(){return Infinity==this.l&&!this.u};
266
- q.mb=function(){return Infinity!=this.l&&!this.u};q.ab=function(){return Math.max(this.D,this.ib()-this.m)};q.we=function(a){this.D=a};q.ib=function(){return this.Y()||this.mb()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.j)+this.H,this.l):this.h||this.l};q.Xb=function(a){var b=Math.max(this.i,this.D);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.ib()-this.m+a,this.Ta()))};q.Ab=function(){return this.Xb(0)};
267
- q.Ta=function(){return Math.max(0,this.ib()-(this.Y()||this.mb()?this.Lc:0))};q.ze=function(){return null==this.j||null!=this.h&&this.F?!1:!0};q.ue=function(a){this.H=a};M("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.ue;S.prototype.usingPresentationStartTime=S.prototype.ze;S.prototype.getSeekRangeEnd=S.prototype.Ta;S.prototype.getSeekRangeStart=S.prototype.Ab;S.prototype.getSafeSeekRangeStart=S.prototype.Xb;S.prototype.getSegmentAvailabilityEnd=S.prototype.ib;
268
- S.prototype.setUserSeekStart=S.prototype.we;S.prototype.getSegmentAvailabilityStart=S.prototype.ab;S.prototype.isInProgress=S.prototype.mb;S.prototype.isLive=S.prototype.Y;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.zd;S.prototype.notifyMinSegmentStartTime=S.prototype.Bd;S.prototype.notifySegments=S.prototype.Db;S.prototype.getDelay=S.prototype.We;S.prototype.setDelay=S.prototype.Sf;S.prototype.setSegmentAvailabilityDuration=S.prototype.Qd;
269
- S.prototype.setStatic=S.prototype.ic;S.prototype.setClockOffset=S.prototype.ve;S.prototype.getPresentationStartTime=S.prototype.jf;S.prototype.setDuration=S.prototype.Ma;S.prototype.getMaxSegmentDuration=S.prototype.cf;S.prototype.getDuration=S.prototype.getDuration;function pi(a,b){this.j=a;this.m=qi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.s=b;this.i=function(){}}pi.prototype.release=function(){this.j=null;this.i=function(){}};function ri(a,b){a.i=b}function si(a){this.g=a}function qi(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(Qh(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 ti(a,b,c,d,e){var f=this;this.g=a;this.D=b;this.o=c;this.u=e;this.h=new ef;this.s=!1;this.F=a.readyState;this.j=!1;this.i=d;this.m=!1;this.h.A(a,"waiting",function(){return ui(f)});this.l=(new O(function(){ui(f)})).Da(.25)}ti.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.l&&(this.l.stop(),this.l=null);this.i&&(this.i.release(),this.i=null);this.g=this.D=this.u=null};ti.prototype.Ed=function(){this.m=!0;ui(this)};
263
+ function li(a,b){var c=a.l[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)),ki(a,b)}}function di(a,b,c,d){var e=a.g.mediaKeys;null==c&&e&&(td()||ud("Xbox One"))&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=ug(b));return b}var Vh=window.URL.createObjectURL;function mi(a,b,c){this.oa=a;this.ka=b;this.fa=c}mi.prototype.Zb=function(){return this.ka};mi.prototype.Vb=function(){return this.fa};function ni(a,b){return a&&b?a.Zb()==b.Zb()&&a.Vb()==b.Vb()&&pb(a.oa(),b.oa()):a==b}M("shaka.media.InitSegmentReference",mi);mi.prototype.getEndByte=mi.prototype.Vb;mi.prototype.getStartByte=mi.prototype.Zb;
264
+ function oi(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.ka=d;this.fa=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=oi.prototype;q.oa=function(){return this.j()};q.kf=function(){return this.startTime};q.Xe=function(){return this.endTime};q.Zb=function(){return this.ka};q.Vb=function(){return this.fa};q.rf=function(){return this.tilesLayout};
265
+ q.qf=function(){return this.i};M("shaka.media.SegmentReference",oi);oi.prototype.getTileDuration=oi.prototype.qf;oi.prototype.getTilesLayout=oi.prototype.rf;oi.prototype.getEndByte=oi.prototype.Vb;oi.prototype.getStartByte=oi.prototype.Zb;oi.prototype.getEndTime=oi.prototype.Xe;oi.prototype.getStartTime=oi.prototype.kf;oi.prototype.getUris=oi.prototype.oa;function T(a,b,c){this.j=a;this.Lc=b;this.m=this.l=Infinity;this.g=1;this.h=this.i=null;this.s=0;this.u=!0;this.D=0;this.F=void 0===c?!0:c;this.H=0}q=T.prototype;q.getDuration=function(){return this.l};q.cf=function(){return this.g};q.Ma=function(a){this.l=a};q.jf=function(){return this.j};q.ve=function(a){this.s=a};q.jc=function(a){this.u=a};q.Qd=function(a){this.m=a};q.Sf=function(a){this.Lc=a};q.We=function(){return this.Lc};
266
+ q.Db=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Bd(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.j&&this.F&&(this.j=(Date.now()+this.s)/1E3-this.h-this.g)}};q.Bd=function(a){this.i=null==this.i?a:Math.min(this.i,a)};q.zd=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.i&&(this.i+=a);null!=this.h&&(this.h+=a)};q.Z=function(){return Infinity==this.l&&!this.u};
267
+ q.mb=function(){return Infinity!=this.l&&!this.u};q.Va=function(){return Math.max(this.D,this.ib()-this.m)};q.we=function(a){this.D=a};q.ib=function(){return this.Z()||this.mb()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.j)+this.H,this.l):this.h||this.l};q.Yb=function(a){var b=Math.max(this.i,this.D);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.ib()-this.m+a,this.Ua()))};q.Ab=function(){return this.Yb(0)};
268
+ q.Ua=function(){return Math.max(0,this.ib()-(this.Z()||this.mb()?this.Lc:0))};q.ze=function(){return null==this.j||null!=this.h&&this.F?!1:!0};q.ue=function(a){this.H=a};M("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.ue;T.prototype.usingPresentationStartTime=T.prototype.ze;T.prototype.getSeekRangeEnd=T.prototype.Ua;T.prototype.getSeekRangeStart=T.prototype.Ab;T.prototype.getSafeSeekRangeStart=T.prototype.Yb;T.prototype.getSegmentAvailabilityEnd=T.prototype.ib;
269
+ T.prototype.setUserSeekStart=T.prototype.we;T.prototype.getSegmentAvailabilityStart=T.prototype.Va;T.prototype.isInProgress=T.prototype.mb;T.prototype.isLive=T.prototype.Z;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.zd;T.prototype.notifyMinSegmentStartTime=T.prototype.Bd;T.prototype.notifySegments=T.prototype.Db;T.prototype.getDelay=T.prototype.We;T.prototype.setDelay=T.prototype.Sf;T.prototype.setSegmentAvailabilityDuration=T.prototype.Qd;
270
+ T.prototype.setStatic=T.prototype.jc;T.prototype.setClockOffset=T.prototype.ve;T.prototype.getPresentationStartTime=T.prototype.jf;T.prototype.setDuration=T.prototype.Ma;T.prototype.getMaxSegmentDuration=T.prototype.cf;T.prototype.getDuration=T.prototype.getDuration;function pi(a,b){this.j=a;this.m=qi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.s=b;this.i=function(){}}pi.prototype.release=function(){this.j=null;this.i=function(){}};function ri(a,b){a.i=b}function si(a){this.g=a}function qi(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(Oh(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 ti(a,b,c,d,e){var f=this;this.g=a;this.D=b;this.o=c;this.u=e;this.h=new ef;this.s=!1;this.F=a.readyState;this.j=!1;this.i=d;this.m=!1;this.h.A(a,"waiting",function(){return ui(f)});this.l=(new O(function(){ui(f)})).Da(.25)}ti.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.l&&(this.l.stop(),this.l=null);this.i&&(this.i.release(),this.i=null);this.g=this.D=this.u=null};ti.prototype.Ed=function(){this.m=!0;ui(this)};
270
271
  function ui(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.F&&(a.j=!1,a.F=a.g.readyState);var b;if(!(b=!a.i)){b=a.i;var c=b.j,d=qi(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.s&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.o.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Rh(b,g,a.o.gapDetectionThreshold);if(!(null==
271
- c||0==c&&!a.m||(d=b.start(c),d>=a.D.Ta()))){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 R("largegap",g),g.cancelable=!0,a.u(g),a.o.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function vi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=wi.value().get(b),c.xa(a,b,d))}var wi=new zc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function xi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new ef;this.i=new yi(a);vi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){zi(d,d.j)})}xi.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 Ai(a){return a.m?a.g.currentTime:a.j}function Bi(a,b){0<a.g.readyState?Ci(a.i,b):vi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){zi(a,a.j)})}
272
+ c||0==c&&!a.m||(d=b.start(c),d>=a.D.Ua()))){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.o.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function vi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=wi.value().get(b),c.xa(a,b,d))}var wi=new zc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function xi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new ef;this.i=new yi(a);vi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){zi(d,d.j)})}xi.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 Ai(a){return a.m?a.g.currentTime:a.j}function Bi(a,b){0<a.g.readyState?Ci(a.i,b):vi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){zi(a,a.j)})}
272
273
  function zi(a,b){.001>Math.abs(a.g.currentTime-b)?Di(a):(a.h.xa(a.g,"seeking",function(){Di(a)}),Ci(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Di(a){a.m=!0;a.h.A(a.g,"seeking",function(){return a.l()})}function yi(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--)})}yi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
273
274
  function Ci(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Da(.1)};function Ei(a){function b(){null==c.i||0==c.i?c.j=!0:(c.h.xa(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.i))}var c=this;this.g=a;this.j=!1;this.i=null;this.h=new ef;vi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,function(){b()})}Ei.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.g=null};Ei.prototype.m=function(a){this.i=this.j?this.i:a};Ei.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0};Ei.prototype.F=function(){};
274
- function Fi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.H=b.minBufferTime||0;this.o=c;this.D=e;this.u=null;this.j=new ti(a,b.presentationTimeline,c,Gi(a,c),f);this.h=new xi(a,function(){a:{var h=g.j;h.s=!0;h.m=!1;h.j=!1;var k=Ai(g.h);h=Hi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;Bi(g.h,h);h=void 0;break a}g.D();h=void 0}return h},Ii(this,d));this.s=(new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ai(g.h),k=g.g.Ab(),l=g.g.Ta();3>l-k&&(k=
275
+ function Fi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.H=b.minBufferTime||0;this.o=c;this.D=e;this.u=null;this.j=new ti(a,b.presentationTimeline,c,Gi(a,c),f);this.h=new xi(a,function(){a:{var h=g.j;h.s=!0;h.m=!1;h.j=!1;var k=Ai(g.h);h=Hi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;Bi(g.h,h);h=void 0;break a}g.D();h=void 0}return h},Ii(this,d));this.s=(new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ai(g.h),k=g.g.Ab(),l=g.g.Ua();3>l-k&&(k=
275
276
  l-3);h<k&&(h=Hi(g,h),g.i.currentTime=h)}})).Da(.25)}Fi.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.o=null;this.D=function(){}};Fi.prototype.m=function(a){Bi(this.h,a)};Fi.prototype.l=function(){var a=Ai(this.h);return 0<this.i.readyState&&!this.i.paused?Ji(this,a):a};
276
- function Ii(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Ab():a.g.Ta():0>b&&(b=a.g.Ta()+b);return Ki(a,Ji(a,b))}Fi.prototype.F=function(){this.j.Ed()};function Ki(a,b){var c=a.g.getDuration();return b>=c?c-a.o.durationBackoff:b}function Hi(a,b){var c=Math.max(a.H,a.o.rebufferingGoal),d=a.o.safeSeekOffset,e=a.g.Ab(),f=a.g.Ta(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Xb(c),k=a.g.Xb(d);c=a.g.Xb(c+d);return b>=g?Ki(a,b):b>f?f:b<e?Oh(a.i.buffered,k)?k:c:b>=h||Oh(a.i.buffered,b)?b:c}
277
- function Ji(a,b){var c=a.g.Ab();if(b<c)return c;c=a.g.Ta();return b>c?c:b}function Gi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new pi(new si(a),b.stallThreshold);ri(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function U(a){this.M=a;this.g=null;this.h=0;this.i=!1}q=U.prototype;q.destroy=function(){Tb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.M=[],this.g&&this.g.stop(),this.g=null)};q.xf=function(){this.i=!0};
277
+ function Ii(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Ab():a.g.Ua():0>b&&(b=a.g.Ua()+b);return Ki(a,Ji(a,b))}Fi.prototype.F=function(){this.j.Ed()};function Ki(a,b){var c=a.g.getDuration();return b>=c?c-a.o.durationBackoff:b}function Hi(a,b){var c=Math.max(a.H,a.o.rebufferingGoal),d=a.o.safeSeekOffset,e=a.g.Ab(),f=a.g.Ua(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Yb(c),k=a.g.Yb(d);c=a.g.Yb(c+d);return b>=g?Ki(a,b):b>f?f:b<e?Mh(a.i.buffered,k)?k:c:b>=h||Mh(a.i.buffered,b)?b:c}
278
+ function Ji(a,b){var c=a.g.Ab();if(b<c)return c;c=a.g.Ua();return b>c?c:b}function Gi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new pi(new si(a),b.stallThreshold);ri(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function U(a){this.M=a;this.g=null;this.h=0;this.i=!1}q=U.prototype;q.destroy=function(){Tb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.M=[],this.g&&this.g.stop(),this.g=null)};q.xf=function(){this.i=!0};
278
279
  q.find=function(a){for(var b=this.M.length-1,c=b;0<=c;--c){var d=this.M[c],e=c<b?this.M[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.M.length&&a<this.M[0].startTime?this.h:null};q.get=function(a){if(0==this.M.length)return null;a-=this.h;return 0>a||a>=this.M.length?null:this.M[a]};q.offset=function(a){if(!this.i)for(var b=t(this.M),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
279
280
  q.Gc=function(a){!this.i&&a.length&&(this.M=this.M.filter(function(b){return b.startTime<a[0].startTime}),this.M.push.apply(this.M,ja(a)))};q.Cb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.M.length||d.endTime>c.M[0].startTime)});this.Gc(a);this.gb(b)};q.gb=function(a){if(!this.i){var b=this.M.length;this.M=this.M.filter(function(c){return c.endTime>a});this.h+=b-this.M.length}};
280
- q.$a=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.M.length;)if(this.M[this.M.length-1].startTime>=b)this.M.pop();else break;for(;this.M.length;)if(this.M[0].endTime<=a)this.M.shift(),c||this.h++;else break;0!=this.M.length&&(a=this.M[this.M.length-1],this.M[this.M.length-1]=new oi(a.startTime,b,a.j,a.ka,a.fa,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.i))}};
281
+ q.ab=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.M.length;)if(this.M[this.M.length-1].startTime>=b)this.M.pop();else break;for(;this.M.length;)if(this.M[0].endTime<=a)this.M.shift(),c||this.h++;else break;0!=this.M.length&&(a=this.M[this.M.length-1],this.M[this.M.length-1]=new oi(a.startTime,b,a.j,a.ka,a.fa,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.i))}};
281
282
  q.Oc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.M.push.apply(c.M,ja(d)):(c.g.stop(),c.g=null)}),this.g.Da(a))};U.prototype[Symbol.iterator]=function(){return this.zb(0)};U.prototype.zb=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.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Li(this,b,d)};
282
- function Mi(a,b,c){return new U([new oi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",U);U.forSingleSegment=Mi;U.prototype.getIteratorForTime=U.prototype.zb;U.prototype.updateEvery=U.prototype.Oc;U.prototype.fit=U.prototype.$a;U.prototype.evict=U.prototype.gb;U.prototype.mergeAndEvict=U.prototype.Cb;U.prototype.merge=U.prototype.Gc;U.prototype.offset=U.prototype.offset;U.prototype.get=U.prototype.get;U.prototype.find=U.prototype.find;U.prototype.markImmutable=U.prototype.xf;
283
+ function Mi(a,b,c){return new U([new oi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",U);U.forSingleSegment=Mi;U.prototype.getIteratorForTime=U.prototype.zb;U.prototype.updateEvery=U.prototype.Oc;U.prototype.fit=U.prototype.ab;U.prototype.evict=U.prototype.gb;U.prototype.mergeAndEvict=U.prototype.Cb;U.prototype.merge=U.prototype.Gc;U.prototype.offset=U.prototype.offset;U.prototype.get=U.prototype.get;U.prototype.find=U.prototype.find;U.prototype.markImmutable=U.prototype.xf;
283
284
  U.prototype.release=U.prototype.release;U.prototype.destroy=U.prototype.destroy;function Li(a,b,c){this.i=a;this.h=b;this.g=c}Li.prototype.seek=function(a){Tb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.zb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
284
- Li.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.na().length&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};Li.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.g.length?(this.g++,a.na().length&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Li);Li.prototype.next=Li.prototype.next;Li.prototype.current=Li.prototype.current;
285
+ Li.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.oa().length&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};Li.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.g.length?(this.g++,a.oa().length&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Li);Li.prototype.next=Li.prototype.next;Li.prototype.current=Li.prototype.current;
285
286
  Li.prototype.seek=Li.prototype.seek;function Ni(){U.call(this,[]);this.j=[]}ra(Ni,U);q=Ni.prototype;q.clone=function(){var a=new Ni;a.j=this.j.slice();return a};q.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.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.M.length}return null};
286
- q.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.M.length}return null};q.offset=function(){};q.Gc=function(){};q.gb=function(){};q.Cb=function(){};q.$a=function(){};q.Oc=function(){};M("shaka.media.MetaSegmentIndex",Ni);Ni.prototype.updateEvery=Ni.prototype.Oc;Ni.prototype.fit=Ni.prototype.$a;Ni.prototype.mergeAndEvict=Ni.prototype.Cb;Ni.prototype.evict=Ni.prototype.gb;Ni.prototype.merge=Ni.prototype.Gc;
287
+ q.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.M.length}return null};q.offset=function(){};q.Gc=function(){};q.gb=function(){};q.Cb=function(){};q.ab=function(){};q.Oc=function(){};M("shaka.media.MetaSegmentIndex",Ni);Ni.prototype.updateEvery=Ni.prototype.Oc;Ni.prototype.fit=Ni.prototype.ab;Ni.prototype.mergeAndEvict=Ni.prototype.Cb;Ni.prototype.evict=Ni.prototype.gb;Ni.prototype.merge=Ni.prototype.Gc;
287
288
  Ni.prototype.offset=Ni.prototype.offset;Ni.prototype.get=Ni.prototype.get;Ni.prototype.find=Ni.prototype.find;Ni.prototype.release=Ni.prototype.release;function Oi(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Dc();this.h=new O(function(){b.g.le(.25*b.i)})}Oi.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Oi.prototype.set=function(a){this.i=a;Pi(this)};Oi.prototype.Ac=function(){return this.g.Ac()};function Pi(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Dc()!=b&&a.g.Pd(b);return}catch(c){}a.h.Da(.25);0!=a.g.Dc()&&a.g.Pd(0)};function Qi(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){Ri(b,!1)})).Da(.25)}Qi.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()};
288
- function Ri(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=t(d.l.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.j.get(h),l=e<h.startTime?Si:e>h.endTime?Ti:Ui;d.j.set(h,l);for(var m=t(d.m),n=m.next();!n.done;n=m.next())n=n.value,n.ub==k&&n.tb==l&&n.lb(h,f)}}};function Vi(a){var b=this;this.h=function(){};this.g=new Set;this.j=a;this.i=(new O(function(){for(var c=b.j(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&b.g["delete"](e)})).Da(2)}Vi.prototype.release=function(){this.h=function(){};this.g.clear();this.i.stop()};function Wi(a,b){a.h=b};function Xi(a){var b=this;this.l=a;this.j=new Map;this.g=function(){};this.h=function(){};this.i=function(){};this.m=[{ub:null,tb:Ui,lb:function(c,d){return b.g(c,d)}},{ub:Si,tb:Ui,lb:function(c,d){return b.g(c,d)}},{ub:Ti,tb:Ui,lb:function(c,d){return b.g(c,d)}},{ub:Ui,tb:Si,lb:function(c,d){return b.h(c,d)}},{ub:Ui,tb:Ti,lb:function(c,d){return b.h(c,d)}},{ub:Si,tb:Ti,lb:function(c,d){return b.i(c,d)}},{ub:Ti,tb:Si,lb:function(c,d){return b.i(c,d)}}]}
289
- Xi.prototype.release=function(){this.l=null;this.j.clear();this.g=function(){};this.h=function(){};this.i=function(){}};function Yi(a,b,c,d){a.g=b;a.h=c;a.i=d}var Si=1,Ui=2,Ti=3;function Zi(a,b,c,d,e){a=We(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function $i(a,b){var c=this;this.C=b;this.B=a;this.o=null;this.l=1;this.i=this.h=null;this.g=new Map;this.m=!1;this.s=null;this.j=!1;this.J=new cf(function(){return aj(c)})}$i.prototype.destroy=function(){return this.J.destroy()};function aj(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.g.values());for(d=c.next();!d.done;d=c.next())e=d.value,bj(e),b.push(cj(e));return u(f,Promise.all(b),2)}a.g.clear();a.C=null;a.B=null;a.o=null;z(f)})}
290
- $i.prototype.configure=function(a){this.o=a;this.s=new Ce({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)};$i.prototype.start=function(){var a=this;return K(function(b){if(1==b.g)return u(b,dj(a),2);df(a.J);a.m=!0;z(b)})};
291
- function ej(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=xc,A(k,2),u(k,hi(a.C.S,c.ba),4);case 4:wa(k,3);break;case 2:if(d=E(k),a.C)a.C.onError(d);case 3:e=Tc(b.mimeType,b.codecs);Wh(a.C.S,e);f=a.C.S.m;if(g=f.isTextVisible()||a.o.alwaysStreamText)h=fj(b),a.g.set(c.ba,h),gj(a,h,0);z(k)}})}function hj(a){var b=a.g.get(wc);b&&(bj(b),cj(b)["catch"](function(){}),a.g["delete"](wc));a.i=null}
292
- function ij(a,b){var c=a.g.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.qb&&(jj(a,e,!1,0,!1),c.qb=d)}else if(d=c.qb)c.qb=null,jj(a,d,!0,0,!1)}}function kj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.h=b;a.m&&(b.video&&jj(a,b.video,c,d,e),b.audio&&jj(a,b.audio,c,d,e))}function lj(a,b){a.i=b;a.m&&jj(a,b,!0,0,!1)}
293
- function jj(a,b,c,d,e){var f=a.g.get(b.type);f||b.type!=wc?f&&(f.qb&&(b.trickModeVideo?(f.qb=b,b=b.trickModeVideo):f.qb=null),f.stream!=b||e)&&(b.type==wc&&Wh(a.C.S,Tc(b.mimeType,b.codecs)),f.stream=b,f.da=null,c&&(f.Sb?f.Rc=!0:f.La?(f.sb=!0,f.xc=d,f.Rc=!0):(bj(f),mj(a,f,!0,d)["catch"](function(g){if(a.C)a.C.onError(g)}))),nj(a,f)["catch"](function(g){if(a.C)a.C.onError(g)})):ej(a,b)}
294
- function nj(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.ya)return e["return"]();c=b.stream;d=b.ya;return c.segmentIndex?e.v(2):u(e,c.createSegmentIndex(),2)}if(b.ya!=d||b.stream!=c)return e["return"]();var f=a.C.Cc();var g=ai(a.C.S,b.type),h=b.stream.segmentIndex.find(b.Ca?b.Ca.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.fa?k.fa-k.ka:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.fa?k.fa-k.ka:null)||0),k=a.C.getBandwidthEstimate(),
295
- f=8*h/k<(g||0)-f-Math.max(a.B.minBufferTime||0,a.o.rebufferingGoal)||b.ya.h.g>h?!0:!1):f=!1;f&&b.ya.abort();z(e)})}function oj(a,b){b.Sb||b.sb||(b.La?(b.sb=!0,b.xc=0):null==Zh(a.C.S,b.type)?null==b.Oa&&gj(a,b,0):(bj(b),mj(a,b,!1,0)["catch"](function(c){if(a.C)a.C.onError(c)})))}
296
- function dj(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){if(1==n.g){b=xc;if(!a.h)throw new N(2,5,5006);c=new Map;d=new Set;a.h.audio&&(c.set(b.eb,a.h.audio),d.add(a.h.audio));a.h.video&&(c.set(b.Qa,a.h.video),d.add(a.h.video));a.i&&(c.set(b.ba,a.i),d.add(a.i));e=a.C.S;f=a.o.forceTransmuxTS;return u(n,e.init(c,f),2)}df(a.J);var p=a.B.presentationTimeline.getDuration();Infinity>p?a.C.S.Ma(p):a.C.S.Ma(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.g.has(k)||
297
- (m=fj(l),a.g.set(k,m),gj(a,m,0));z(n)})}function fj(a){return{stream:a,type:a.type,da:null,Ca:null,Fc:null,wd:null,vd:null,ud:null,qb:null,endOfStream:!1,La:!1,Oa:null,sb:!1,xc:0,Rc:!1,Sb:!1,Hd:!1,Zb:!1,ya:null}}
298
- $i.prototype.bc=function(a){var b=this,c,d,e,f,g;return K(function(h){switch(h.g){case 1:df(b.J);if(a.La||null==a.Oa||a.Sb)return h["return"]();a.Oa=null;if(!a.sb){h.v(2);break}return u(h,mj(b,a,a.Rc,a.xc),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.v(4);break}c=a.stream;return u(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.Oa&&gj(b,a,0),h["return"]();case 4:A(h,6);d=pj(b,a);null!=d&&(gj(b,a,d),a.Zb=!1);wa(h,7);break;case 6:return e=E(h),u(h,qj(b,e),
289
+ function Ri(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=t(d.i.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.g.get(h),l=e<h.startTime?Si:e>h.endTime?Ti:Ui;d.g.set(h,l);for(var m=t(d.j),n=m.next();!n.done;n=m.next())n=n.value,n.ub==k&&n.tb==l&&n.lb(h,f)}}};function Vi(a){Ne.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))})).Da(2)}ra(Vi,Ne);Vi.prototype.release=function(){this.g.clear();this.h.stop();Ne.prototype.release.call(this)};function Wi(a){Ne.call(this);var b=this;this.i=a;this.g=new Map;this.j=[{ub:null,tb:Ui,lb:function(c,d){return Xi(b,"enter",c,d)}},{ub:Si,tb:Ui,lb:function(c,d){return Xi(b,"enter",c,d)}},{ub:Ti,tb:Ui,lb:function(c,d){return Xi(b,"enter",c,d)}},{ub:Ui,tb:Si,lb:function(c,d){return Xi(b,"exit",c,d)}},{ub:Ui,tb:Ti,lb:function(c,d){return Xi(b,"exit",c,d)}},{ub:Si,tb:Ti,lb:function(c,d){return Xi(b,"skip",c,d)}},{ub:Ti,tb:Si,lb:function(c,d){return Xi(b,"skip",c,d)}}];this.h=new ef;this.h.A(this.i,"regionremove",
290
+ function(c){b.g["delete"](c.region)})}ra(Wi,Ne);Wi.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Ne.prototype.release.call(this)};function Xi(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Si=1,Ui=2,Ti=3;function Yi(a,b,c,d,e){a=We(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Zi(a,b){var c=this;this.C=b;this.B=a;this.o=null;this.l=1;this.i=this.h=null;this.g=new Map;this.m=!1;this.s=null;this.j=!1;this.J=new cf(function(){return $i(c)})}Zi.prototype.destroy=function(){return this.J.destroy()};function $i(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.g.values());for(d=c.next();!d.done;d=c.next())e=d.value,aj(e),b.push(bj(e));return u(f,Promise.all(b),2)}a.g.clear();a.C=null;a.B=null;a.o=null;z(f)})}
291
+ Zi.prototype.configure=function(a){this.o=a;this.s=new Ce({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)};Zi.prototype.start=function(){var a=this;return K(function(b){if(1==b.g)return u(b,cj(a),2);df(a.J);a.m=!0;z(b)})};
292
+ function dj(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=xc,A(k,2),u(k,hi(a.C.S,c.ba),4);case 4:wa(k,3);break;case 2:if(d=E(k),a.C)a.C.onError(d);case 3:e=Tc(b.mimeType,b.codecs);Wh(a.C.S,e);f=a.C.S.m;if(g=f.isTextVisible()||a.o.alwaysStreamText)h=ej(b),a.g.set(c.ba,h),fj(a,h,0);z(k)}})}function gj(a){var b=a.g.get(wc);b&&(aj(b),bj(b)["catch"](function(){}),a.g["delete"](wc));a.i=null}
293
+ function hj(a,b){var c=a.g.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.qb&&(ij(a,e,!1,0,!1),c.qb=d)}else if(d=c.qb)c.qb=null,ij(a,d,!0,0,!1)}}function jj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.h=b;a.m&&(b.video&&ij(a,b.video,c,d,e),b.audio&&ij(a,b.audio,c,d,e))}function kj(a,b){a.i=b;a.m&&ij(a,b,!0,0,!1)}
294
+ function ij(a,b,c,d,e){var f=a.g.get(b.type);f||b.type!=wc?f&&(f.qb&&(b.trickModeVideo?(f.qb=b,b=b.trickModeVideo):f.qb=null),f.stream!=b||e)&&(b.type==wc&&Wh(a.C.S,Tc(b.mimeType,b.codecs)),f.stream=b,f.da=null,c&&(f.Tb?f.Rc=!0:f.La?(f.sb=!0,f.xc=d,f.Rc=!0):(aj(f),lj(a,f,!0,d)["catch"](function(g){if(a.C)a.C.onError(g)}))),mj(a,f)["catch"](function(g){if(a.C)a.C.onError(g)})):dj(a,b)}
295
+ function mj(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.ya)return e["return"]();c=b.stream;d=b.ya;return c.segmentIndex?e.v(2):u(e,c.createSegmentIndex(),2)}if(b.ya!=d||b.stream!=c)return e["return"]();var f=a.C.Cc();var g=ai(a.C.S,b.type),h=b.stream.segmentIndex.find(b.Ca?b.Ca.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.fa?k.fa-k.ka:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.fa?k.fa-k.ka:null)||0),k=a.C.getBandwidthEstimate(),
296
+ f=8*h/k<(g||0)-f-Math.max(a.B.minBufferTime||0,a.o.rebufferingGoal)||b.ya.h.g>h?!0:!1):f=!1;f&&b.ya.abort();z(e)})}function nj(a,b){b.Tb||b.sb||(b.La?(b.sb=!0,b.xc=0):null==Zh(a.C.S,b.type)?null==b.Oa&&fj(a,b,0):(aj(b),lj(a,b,!1,0)["catch"](function(c){if(a.C)a.C.onError(c)})))}
297
+ function cj(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){if(1==n.g){b=xc;if(!a.h)throw new N(2,5,5006);c=new Map;d=new Set;a.h.audio&&(c.set(b.eb,a.h.audio),d.add(a.h.audio));a.h.video&&(c.set(b.Ra,a.h.video),d.add(a.h.video));a.i&&(c.set(b.ba,a.i),d.add(a.i));e=a.C.S;f=a.o.forceTransmuxTS;return u(n,e.init(c,f),2)}df(a.J);var p=a.B.presentationTimeline.getDuration();Infinity>p?a.C.S.Ma(p):a.C.S.Ma(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.g.has(k)||
298
+ (m=ej(l),a.g.set(k,m),fj(a,m,0));z(n)})}function ej(a){return{stream:a,type:a.type,da:null,Ca:null,Fc:null,wd:null,vd:null,ud:null,qb:null,endOfStream:!1,La:!1,Oa:null,sb:!1,xc:0,Rc:!1,Tb:!1,Hd:!1,$b:!1,ya:null}}
299
+ Zi.prototype.cc=function(a){var b=this,c,d,e,f,g;return K(function(h){switch(h.g){case 1:df(b.J);if(a.La||null==a.Oa||a.Tb)return h["return"]();a.Oa=null;if(!a.sb){h.v(2);break}return u(h,lj(b,a,a.Rc,a.xc),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.v(4);break}c=a.stream;return u(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.Oa&&fj(b,a,0),h["return"]();case 4:A(h,6);d=oj(b,a);null!=d&&(fj(b,a,d),a.$b=!1);wa(h,7);break;case 6:return e=E(h),u(h,pj(b,e),
299
300
  8);case 8:return h["return"]();case 7:f=Array.from(b.g.values());if(!b.m||!f.every(function(k){return k.endOfStream})){h.v(0);break}return u(h,b.C.S.endOfStream(),10);case 10:df(b.J),g=b.C.S.getDuration(),0!=g&&g<b.B.presentationTimeline.getDuration()&&b.B.presentationTimeline.Ma(g),z(h)}})};
300
- function pj(a,b){if(rj(b))return fi(a.C.S,b.stream.originalId||""),null;b.type==wc&&gi(a.C.S);var c=a.C.Cc(),d=b.Ca?b.Ca.endTime:c,e=bi(a.C.S,b.type,c),f=Math.max(a.B.minBufferTime||0,a.o.rebufferingGoal,a.o.bufferingGoal)*a.l;if(1E-6>a.B.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.g.get(wc))&&rj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.o.updateIntervalSeconds/2;e=ai(a.C.S,b.type);e=sj(a,b,c,e);if(!e)return a.o.updateIntervalSeconds;f=Infinity;
301
- var g=Array.from(a.g.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,rj(h)||h.da&&!h.da.current()||(f=Math.min(f,h.Ca?h.Ca.endTime:c));if(d>=f+a.B.presentationTimeline.g)return a.o.updateIntervalSeconds;tj(a,b,c,e)["catch"](function(){});return null}
302
- function sj(a,b,c,d){if(b.da)return b.da.current();if(b.Ca||d)return b.da=b.stream.segmentIndex.zb(b.Ca?b.Ca.endTime:d),b.da&&b.da.next().value;a=a.o.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.da=b.stream.segmentIndex.zb(d),e=b.da&&b.da.next().value);e||(b.da=b.stream.segmentIndex.zb(c),e=b.da&&b.da.next().value);return e}
303
- function tj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,v,y;return K(function(x){switch(x.g){case 1:return e=xc,f=b.stream,g=b.da,b.La=!0,A(x,2),u(x,uj(a,b,d),4);case 4:df(a.J);if(a.j)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.o.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(w){var C,D,B;return K(function(F){df(a.J);if(a.j)return F["return"]();n=vj(n,w);C=!1;D=0;(new lg).box("mdat",function(G){D=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C)return F.v(0);
304
- B=n.subarray(0,D);n=n.subarray(D);return u(F,wj(a,b,c,f,d,B),0)})},u(x,xj(a,b,d,p),6);l=xj(a,b,d);return u(x,l,7);case 7:return m=x.h,df(a.J),a.j?x["return"]():b.sb?(b.La=!1,gj(a,b,0),x["return"]()):u(x,wj(a,b,c,f,d,m),6);case 6:df(a.J);if(a.j)return x["return"]();b.Ca=d;g.next();b.La=!1;b.Hd=!1;r=a.C.S.zc();v=r[b.type];bb(JSON.stringify(v));b.sb||a.C.Ed();gj(a,b,0);wa(x,0);break;case 2:y=E(x);df(a.J,y);if(a.j)return x["return"]();b.La=!1;if(7001==y.code)b.La=!1,b.Oa=null,gj(a,b,0),x.v(0);else if(b.type==
305
- e.ba&&a.o.ignoreTextStreamFailures)a.g["delete"](e.ba),x.v(0);else if(3017==y.code)yj(a,b,y),x.v(0);else if(1001==y.code&&y.data&&404==y.data[1])b.La=!1,b.Oa=null,gj(a,b,1),x.v(0);else return b.Zb=!0,y.severity=2,u(x,qj(a,y),0)}})}function vj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
306
- function yj(a,b,c){if(!Array.from(a.g.values()).some(function(e){return e!=b&&e.Hd})){var d=Math.round(100*a.l);if(20<d)a.l-=.2;else if(4<d)a.l-=.04;else{b.Zb=!0;a.j=!0;a.C.onError(c);return}b.Hd=!0}gj(a,b,4)}
307
- function uj(a,b,c){var d,e,f,g,h,k,l;return K(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 K(function(p){if(1==p.g)return A(p,2),b.vd=e,b.ud=f,b.wd=g,u(p,ii(a.C.S,b.type,g,e,f),4);if(2!=p.g)return wa(p,0);n=E(p);b.vd=null;b.ud=null;b.wd=null;throw n;})},d.push(h());!ni(c.h,b.Fc)&&(b.Fc=c.h)&&(k=xj(a,b,c.h),l=function(){var n,p,r;return K(function(v){switch(v.g){case 1:return A(v,2),u(v,k,4);
301
+ function oj(a,b){if(qj(b))return fi(a.C.S,b.stream.originalId||""),null;b.type==wc&&gi(a.C.S);var c=a.C.Cc(),d=b.Ca?b.Ca.endTime:c,e=bi(a.C.S,b.type,c),f=Math.max(a.B.minBufferTime||0,a.o.rebufferingGoal,a.o.bufferingGoal)*a.l;if(1E-6>a.B.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.g.get(wc))&&qj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.o.updateIntervalSeconds/2;e=ai(a.C.S,b.type);e=rj(a,b,c,e);if(!e)return a.o.updateIntervalSeconds;f=Infinity;
302
+ var g=Array.from(a.g.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,qj(h)||h.da&&!h.da.current()||(f=Math.min(f,h.Ca?h.Ca.endTime:c));if(d>=f+a.B.presentationTimeline.g)return a.o.updateIntervalSeconds;sj(a,b,c,e)["catch"](function(){});return null}
303
+ function rj(a,b,c,d){if(b.da)return b.da.current();if(b.Ca||d)return b.da=b.stream.segmentIndex.zb(b.Ca?b.Ca.endTime:d),b.da&&b.da.next().value;a=a.o.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.da=b.stream.segmentIndex.zb(d),e=b.da&&b.da.next().value);e||(b.da=b.stream.segmentIndex.zb(c),e=b.da&&b.da.next().value);return e}
304
+ function sj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,v,y;return K(function(x){switch(x.g){case 1:return e=xc,f=b.stream,g=b.da,b.La=!0,A(x,2),u(x,tj(a,b,d),4);case 4:df(a.J);if(a.j)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.o.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(w){var C,D,B;return K(function(F){df(a.J);if(a.j)return F["return"]();n=uj(n,w);C=!1;D=0;(new lg).box("mdat",function(G){D=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C)return F.v(0);
305
+ B=n.subarray(0,D);n=n.subarray(D);return u(F,vj(a,b,c,f,d,B),0)})},u(x,wj(a,b,d,p),6);l=wj(a,b,d);return u(x,l,7);case 7:return m=x.h,df(a.J),a.j?x["return"]():b.sb?(b.La=!1,fj(a,b,0),x["return"]()):u(x,vj(a,b,c,f,d,m),6);case 6:df(a.J);if(a.j)return x["return"]();b.Ca=d;g.next();b.La=!1;b.Hd=!1;r=a.C.S.zc();v=r[b.type];bb(JSON.stringify(v));b.sb||a.C.Ed();fj(a,b,0);wa(x,0);break;case 2:y=E(x);df(a.J,y);if(a.j)return x["return"]();b.La=!1;if(7001==y.code)b.La=!1,b.Oa=null,fj(a,b,0),x.v(0);else if(b.type==
306
+ e.ba&&a.o.ignoreTextStreamFailures)a.g["delete"](e.ba),x.v(0);else if(3017==y.code)xj(a,b,y),x.v(0);else if(1001==y.code&&y.data&&404==y.data[1])b.La=!1,b.Oa=null,fj(a,b,1),x.v(0);else return b.$b=!0,y.severity=2,u(x,pj(a,y),0)}})}function uj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
307
+ function xj(a,b,c){if(!Array.from(a.g.values()).some(function(e){return e!=b&&e.Hd})){var d=Math.round(100*a.l);if(20<d)a.l-=.2;else if(4<d)a.l-=.04;else{b.$b=!0;a.j=!0;a.C.onError(c);return}b.Hd=!0}fj(a,b,4)}
308
+ function tj(a,b,c){var d,e,f,g,h,k,l;return K(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 K(function(p){if(1==p.g)return A(p,2),b.vd=e,b.ud=f,b.wd=g,u(p,ii(a.C.S,b.type,g,e,f),4);if(2!=p.g)return wa(p,0);n=E(p);b.vd=null;b.ud=null;b.wd=null;throw n;})},d.push(h());!ni(c.h,b.Fc)&&(b.Fc=c.h)&&(k=wj(a,b,c.h),l=function(){var n,p,r;return K(function(v){switch(v.g){case 1:return A(v,2),u(v,k,4);
308
309
  case 4:return n=v.h,df(a.J),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,ci(a.C.S,b.type,n,null,null,p),5);case 5:wa(v,0);break;case 2:throw r=E(v),b.Fc=null,r;}})},d.push(l()));return u(m,Promise.all(d),0)})}
309
- function wj(a,b,c,d,e,f){var g;return K(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new lg).U("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.dc();var n=k.reader.dc();var p=k.reader.N();var r=k.reader.N();var v=k.reader.N();var y=k.reader.N();var x=e.startTime+r/p}else p=k.reader.N(),x=k.reader.Hb()/p+e.timestampOffset,r=x-e.startTime,v=k.reader.N(),y=k.reader.N(),m=k.reader.dc(),n=k.reader.dc();
310
- k=k.reader.bb(k.reader.R.byteLength-k.reader.$());l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.C.Bf():(l=(new Map).set("detail",{startTime:x,endTime:x+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:r,eventDuration:v,id:y,messageData:k}),l=new R(zj,l),a.C.onEvent(l)))}).parse(f),u(h,Aj(a,b,c),2);if(3!=h.g)return df(a.J),u(h,ci(a.C.S,b.type,f,e.startTime,e.endTime,g),3);df(a.J);z(h)})}
311
- function Aj(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.o.bufferBehind,a.B.presentationTimeline.g);e=Zh(a.C.S,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.C.S.remove(b.type,e,e+g),2)}df(a.J);z(h)})}function rj(a){return a&&a.type==wc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
312
- function xj(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g)return e=bf,f=Zi(c.na(),c.ka,c.fa,a.o.retryParameters,d),g=a.C.nb.request(e,f),b.ya=g,u(k,g.promise,2);h=k.h;b.ya=null;return k["return"](h.data)})}
313
- function mj(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.sb=!1,b.Rc=!1,b.xc=0,b.Sb=!0,b.Ca=null,b.Fc=null,b.da=null,d?(e=a.C.Cc(),f=a.C.S.getDuration(),u(g,a.C.S.remove(b.type,e+d,f),3)):u(g,hi(a.C.S,b.type),4);if(3!=g.g)return df(a.J),c?u(g,a.C.S.flush(b.type),3):g.v(3);df(a.J);b.Sb=!1;b.endOfStream=!1;gj(a,b,0);z(g)})}
314
- function gj(a,b,c){var d=b.type;if(d!=wc||a.g.has(d))b.Oa=(new pd(function(){var e;return K(function(f){if(1==f.g)return A(f,2),u(f,a.bc(b),4);if(2!=f.g)return wa(f,0);e=E(f);if(a.C)a.C.onError(e);z(f)})})).V(c)}function bj(a){null!=a.Oa&&(a.Oa.stop(),a.Oa=null)}function cj(a){return K(function(b){return a.ya?u(b,a.ya.abort(),0):b.v(0)})}function qj(a,b){return K(function(c){if(1==c.g)return u(c,Ee(a.s),2);df(a.J);a.C.onError(b);b.handled||a.o.failureCallback(b);z(c)})};function Bj(a,b){var c=Cj(),d=this;this.j=b;this.i=a;this.l=c;this.s=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Dj(d)});this.J=new cf(function(){return Ej(d)})}Bj.prototype.destroy=function(){return this.J.destroy()};function Ej(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),Fj(a),u(e,a.u,2);a.g&&a.g.Ja.ob();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ja.ob();a.g=null;a.m=[];a.j=null;z(e)})}
315
- function Gj(a,b){var c={Eb:function(){},Hc:function(){},ob:function(){},onError:function(){},Jc:function(){},Bg:function(){}};a.m.push({create:b,Ja:c});a.h&&a.h.abort();Fj(a);return c}
316
- function Dj(a){return K(function(b){if(a.J.g)b=b.v(0);else{if(0==a.m.length||a.g&&!a.g.kb)var c=!1;else{a.g&&(a.g.Ja.ob(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ja.Eb(),a.g={node:d.node,payload:d.payload,kb:d.kb,Ja:c.Ja}):c.Ja.Jc();c=!0}c?c=Promise.resolve():a.g?c=Hj(a):(a.j.Af(a.i),a.s=new yc,c=a.s);b=u(b,c,1)}return b})}
317
- function Hj(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.ef(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.Re(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.Ja.Hc(),a.g=null);wa(d,0);break;case 2:b=E(d);if(7001==b.code)a.g.Ja.ob();else a.g.Ja.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 Fj(a){a.s&&(a.s.resolve(),a.s=null)};function Ij(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"}q=Ij.prototype;q.remove=function(a,b){if(!this.g)return!1;Jj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
310
+ function vj(a,b,c,d,e,f){var g;return K(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new lg).T("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.ec();var n=k.reader.ec();var p=k.reader.N();var r=k.reader.N();var v=k.reader.N();var y=k.reader.N();var x=e.startTime+r/p}else p=k.reader.N(),x=k.reader.Hb()/p+e.timestampOffset,r=x-e.startTime,v=k.reader.N(),y=k.reader.N(),m=k.reader.ec(),n=k.reader.ec();
311
+ k=k.reader.bb(k.reader.R.byteLength-k.reader.$());l&&l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.C.Bf():(l=(new Map).set("detail",{startTime:x,endTime:x+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:r,eventDuration:v,id:y,messageData:k}),l=new Q(yj,l),a.C.onEvent(l)))}).parse(f),u(h,zj(a,b,c),2);if(3!=h.g)return df(a.J),u(h,ci(a.C.S,b.type,f,e.startTime,e.endTime,g),3);df(a.J);z(h)})}
312
+ function zj(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.o.bufferBehind,a.B.presentationTimeline.g);e=Zh(a.C.S,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.C.S.remove(b.type,e,e+g),2)}df(a.J);z(h)})}function qj(a){return a&&a.type==wc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
313
+ function wj(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g)return e=bf,f=Yi(c.oa(),c.ka,c.fa,a.o.retryParameters,d),g=a.C.nb.request(e,f),b.ya=g,u(k,g.promise,2);h=k.h;b.ya=null;return k["return"](h.data)})}
314
+ function lj(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.sb=!1,b.Rc=!1,b.xc=0,b.Tb=!0,b.Ca=null,b.Fc=null,b.da=null,d?(e=a.C.Cc(),f=a.C.S.getDuration(),u(g,a.C.S.remove(b.type,e+d,f),3)):u(g,hi(a.C.S,b.type),4);if(3!=g.g)return df(a.J),c?u(g,a.C.S.flush(b.type),3):g.v(3);df(a.J);b.Tb=!1;b.endOfStream=!1;fj(a,b,0);z(g)})}
315
+ function fj(a,b,c){var d=b.type;if(d!=wc||a.g.has(d))b.Oa=(new pd(function(){var e;return K(function(f){if(1==f.g)return A(f,2),u(f,a.cc(b),4);if(2!=f.g)return wa(f,0);e=E(f);if(a.C)a.C.onError(e);z(f)})})).U(c)}function aj(a){null!=a.Oa&&(a.Oa.stop(),a.Oa=null)}function bj(a){return K(function(b){return a.ya?u(b,a.ya.abort(),0):b.v(0)})}function pj(a,b){return K(function(c){if(1==c.g)return u(c,Ee(a.s),2);df(a.J);a.C.onError(b);b.handled||a.o.failureCallback(b);z(c)})};function Aj(a,b){var c=Bj(),d=this;this.j=b;this.i=a;this.l=c;this.s=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Cj(d)});this.J=new cf(function(){return Dj(d)})}Aj.prototype.destroy=function(){return this.J.destroy()};function Dj(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),Ej(a),u(e,a.u,2);a.g&&a.g.Ja.ob();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ja.ob();a.g=null;a.m=[];a.j=null;z(e)})}
316
+ function Fj(a,b){var c={Eb:function(){},Hc:function(){},ob:function(){},onError:function(){},Jc:function(){},Bg:function(){}};a.m.push({create:b,Ja:c});a.h&&a.h.abort();Ej(a);return c}
317
+ function Cj(a){return K(function(b){if(a.J.g)b=b.v(0);else{if(0==a.m.length||a.g&&!a.g.kb)var c=!1;else{a.g&&(a.g.Ja.ob(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ja.Eb(),a.g={node:d.node,payload:d.payload,kb:d.kb,Ja:c.Ja}):c.Ja.Jc();c=!0}c?c=Promise.resolve():a.g?c=Gj(a):(a.j.Af(a.i),a.s=new yc,c=a.s);b=u(b,c,1)}return b})}
318
+ function Gj(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.ef(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.Re(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.Ja.Hc(),a.g=null);wa(d,0);break;case 2:b=E(d);if(7001==b.code)a.g.Ja.ob();else a.g.Ja.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 Ej(a){a.s&&(a.s.resolve(),a.s=null)};function Hj(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"}q=Hj.prototype;q.remove=function(a,b){if(!this.g)return!1;Ij(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
318
319
  q.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&&Tb("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=
319
- 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={vb:e.vb},f=c.next())e.vb=f.value,a.some(function(g){return function(h){return h.startTime==g.vb.startTime&&h.endTime==g.vb.endTime&&h.text==g.vb.payload?!0:!1}}(e))||(f=Kj(e.vb))&&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)-
320
- 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)};q.destroy=function(){this.g&&(Jj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
321
- function Kj(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}
322
- function Jj(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",Ij);Ij.prototype.setTextVisibility=Ij.prototype.setTextVisibility;Ij.prototype.isTextVisible=Ij.prototype.isTextVisible;Ij.prototype.destroy=Ij.prototype.destroy;Ij.prototype.append=Ij.prototype.append;Ij.prototype.remove=Ij.prototype.remove;function Lj(){}function Mj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Lj);Lj.removeAllChildren=Mj;function Nj(a,b){var c=this;this.m=!1;this.l=[];this.g=a;this.u=b;this.i=document.createElement("div");this.i.classList.add("shaka-text-container");this.i.style.textAlign="center";this.i.style.display="flex";this.i.style.flexDirection="column";this.i.style.alignItems="center";this.i.style.justifyContent="flex-end";this.u.appendChild(this.i);this.D=(new O(function(){Oj(c)})).Da(.25);this.j=new Map;this.h=new ef;this.h.A(document,"fullscreenchange",function(){Oj(c,!0)});this.s=null;"ResizeObserver"in
323
- window&&(this.s=new ResizeObserver(function(){Oj(c,!0)}),this.s.observe(this.i))}q=Nj.prototype;q.append=function(a){var b=[].concat(ja(this.l)),c={};a=t(a);for(var d=a.next();!d.done;c={kc:c.kc},d=a.next())c.kc=d.value,b.some(function(e){return function(f){return Cb(f,e.kc)}}(c))||this.l.push(c.kc);Oj(this)};
324
- q.destroy=function(){this.u.removeChild(this.i);this.i=null;this.m=!1;this.l=[];this.D&&this.D.stop();this.j.clear();this.h&&(this.h.release(),this.h=null);this.s&&(this.s.disconnect(),this.s=null)};q.remove=function(a,b){if(!this.i)return!1;var c=this.l.length;this.l=this.l.filter(function(d){return d.startTime<a||d.endTime>=b});Oj(this,c>this.l.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};
325
- function Pj(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.j.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Be:null;l&&(g.push(l.Xd),m||(f=!0,a.j["delete"](k),l=null));m&&(h.push(k),l||(Qj(a,k,e),l=a.j.get(k),n=l.Be,f=!0));0<k.nestedCues.length&&n&&Pj(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,r){return p.startTime!=r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});
326
- h=t(h);for(k=h.next();!k.done;k=h.next())d=a.j.get(k.value),c.appendChild(d.Xd)}}function Oj(a,b){if(a.i){var c=a.g.currentTime;(!a.m||(void 0===b?0:b))&&0<a.j.size&&(Mj(a.i),a.j.clear());if(a.m){for(var d=new Map,e=t(a.j.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.j.get(f));Pj(a,a.l,a.i,c,[])}}}
327
- function Qj(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Tb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Rj(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.j.set(b,{Xd:f,Be:c})}
328
- function Rj(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.backgroundColor=c.backgroundColor;f.border=c.border;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Sj(c.linePadding,c,a.u);f.paddingRight=Sj(c.linePadding,c,a.u);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition=
329
- "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=Tj(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?"center":"flex-end");
330
- g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Sj(c.fontSize,c,a.u);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==vb?(f.width="100%",c.lineAlign==xb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==xb?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==
320
+ 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={vb:e.vb},f=c.next())e.vb=f.value,a.some(function(g){return function(h){return h.startTime==g.vb.startTime&&h.endTime==g.vb.endTime&&h.text==g.vb.payload?!0:!1}}(e))||(f=Jj(e.vb))&&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)-
321
+ 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)};q.destroy=function(){this.g&&(Ij(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
322
+ function Jj(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}
323
+ function Ij(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",Hj);Hj.prototype.setTextVisibility=Hj.prototype.setTextVisibility;Hj.prototype.isTextVisible=Hj.prototype.isTextVisible;Hj.prototype.destroy=Hj.prototype.destroy;Hj.prototype.append=Hj.prototype.append;Hj.prototype.remove=Hj.prototype.remove;function Kj(){}function Lj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Kj);Kj.removeAllChildren=Lj;function Mj(a,b){var c=this;this.m=!1;this.l=[];this.g=a;this.u=b;this.i=document.createElement("div");this.i.classList.add("shaka-text-container");this.i.style.textAlign="center";this.i.style.display="flex";this.i.style.flexDirection="column";this.i.style.alignItems="center";this.i.style.justifyContent="flex-end";this.u.appendChild(this.i);this.D=(new O(function(){Nj(c)})).Da(.25);this.j=new Map;this.h=new ef;this.h.A(document,"fullscreenchange",function(){Nj(c,!0)});this.s=null;"ResizeObserver"in
324
+ window&&(this.s=new ResizeObserver(function(){Nj(c,!0)}),this.s.observe(this.i))}q=Mj.prototype;q.append=function(a){var b=[].concat(ja(this.l)),c={};a=t(a);for(var d=a.next();!d.done;c={lc:c.lc},d=a.next())c.lc=d.value,b.some(function(e){return function(f){return Cb(f,e.lc)}}(c))||this.l.push(c.lc);Nj(this)};
325
+ q.destroy=function(){this.u.removeChild(this.i);this.i=null;this.m=!1;this.l=[];this.D&&this.D.stop();this.j.clear();this.h&&(this.h.release(),this.h=null);this.s&&(this.s.disconnect(),this.s=null)};q.remove=function(a,b){if(!this.i)return!1;var c=this.l.length;this.l=this.l.filter(function(d){return d.startTime<a||d.endTime>=b});Nj(this,c>this.l.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};
326
+ function Oj(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.j.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Be:null;l&&(g.push(l.Xd),m||(f=!0,a.j["delete"](k),l=null));m&&(h.push(k),l||(Pj(a,k,e),l=a.j.get(k),n=l.Be,f=!0));0<k.nestedCues.length&&n&&Oj(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,r){return p.startTime!=r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});
327
+ h=t(h);for(k=h.next();!k.done;k=h.next())d=a.j.get(k.value),c.appendChild(d.Xd)}}function Nj(a,b){if(a.i){var c=a.g.currentTime;(!a.m||(void 0===b?0:b))&&0<a.j.size&&(Lj(a.i),a.j.clear());if(a.m){for(var d=new Map,e=t(a.j.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.j.get(f));Oj(a,a.l,a.i,c,[])}}}
328
+ function Pj(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Tb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Qj(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.j.set(b,{Xd:f,Be:c})}
329
+ function Qj(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.backgroundColor=c.backgroundColor;f.border=c.border;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Rj(c.linePadding,c,a.u);f.paddingRight=Rj(c.linePadding,c,a.u);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition=
330
+ "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=Sj(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?"center":"flex-end");
331
+ g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Rj(c.fontSize,c,a.u);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==vb?(f.width="100%",c.lineAlign==xb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==xb?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==
331
332
  xb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Jb?"%":"px",d=c.region.viewportAnchorUnits==Jb?"%":"px",f.height=c.region.height+(c.region.heightUnits==Jb?"%":"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==vb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==
332
333
  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==vb?f.width=c.size+"%":f.height=c.size+"%")}
333
- function Sj(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),Wf:d[2]}:null;if(!d)return a;var e=d.value;switch(d.Wf){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function Tj(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",Nj);Nj.prototype.setTextVisibility=Nj.prototype.setTextVisibility;
334
- Nj.prototype.isTextVisible=Nj.prototype.isTextVisible;Nj.prototype.remove=Nj.prototype.remove;Nj.prototype.destroy=Nj.prototype.destroy;Nj.prototype.append=Nj.prototype.append;function Uj(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,r){return p+"<"+r+">"},
334
+ function Rj(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),Wf:d[2]}:null;if(!d)return a;var e=d.value;switch(d.Wf){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function Sj(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",Mj);Mj.prototype.setTextVisibility=Mj.prototype.setTextVisibility;
335
+ Mj.prototype.isTextVisible=Mj.prototype.isTextVisible;Mj.prototype.remove=Mj.prototype.remove;Mj.prototype.destroy=Mj.prototype.destroy;Mj.prototype.append=Mj.prototype.append;function Tj(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,r){return p+"<"+r+">"},
335
336
  "");k=k.reduceRight(function(p,r){return p+"</"+r+">"},"");return h.lineBreak||h.spacer?(h.spacer&&Tb("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");
336
- break;case "right":k.push("align:right");break;case ub: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 Vj(){}
337
- function Wj(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]=Oe(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Oe(l)),k=Wj(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?(Wa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Xa("Unexpected number of arguments for "+k),a[h]=b[h]):(Wa("Invalid config, unrecognized key "+
338
- k),g=!1)}return g}function Xj(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}M("shaka.util.ConfigUtils",Vj);Vj.convertToConfigObject=Xj;Vj.mergeConfigObjects=Wj;function Yj(){}
339
- function Zj(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:De(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Uf,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:De(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
337
+ break;case "right":k.push("align:right");break;case ub: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 Uj(){}
338
+ function Vj(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]=Oe(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Oe(l)),k=Vj(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?(Wa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Xa("Unexpected number of arguments for "+k),a[h]=b[h]):(Wa("Invalid config, unrecognized key "+
339
+ k),g=!1)}return g}function Wj(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}M("shaka.util.ConfigUtils",Uj);Uj.convertToConfigObject=Wj;Uj.mergeConfigObjects=Vj;function Xj(){}
340
+ function Yj(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:De(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Uf,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:De(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
340
341
  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"},
341
342
  manifestPreprocessor:function(g){return g}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1}},d={retryParameters:De(),failureCallback:function(g){return[g]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,
342
343
  inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1};if(navigator.userAgent.match(/Edge\//)||td()||vd())d.gapDetectionThreshold=.5;if(ud("Web0S")||td()||vd())d.stallSkip=0;var e={trackSelectionCallback:function(g){return K(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return K(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);
343
344
  h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return[g,h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new me},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},
344
345
  preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};e.trackSelectionCallback=
345
- function(g){return K(function(h){return h["return"](ak(g,f.preferredAudioLanguage))})};return f}function bk(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 Wj(a,b,c||Zj(),d,"")}
346
- function ak(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=md(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return gd(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/
347
- 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!=wc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",Yj);Yj.mergeConfigObjects=bk;function ck(){this.g=null;this.h=[]}function dk(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 ek(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}
348
- function fk(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 gk(){this.i=this.h=null;this.g=[]}function hk(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 ik(){this.s=this.u=this.I=this.F=this.m=this.j=this.H=this.l=this.i=this.L=this.O=this.T=this.D=this.Z=NaN;this.g=new ck;this.h=new gk};function V(a,b){Ne.call(this);var c=this;this.l=jk;this.qc=this.g=null;this.Z=!1;this.h=new ef;this.gd=this.u=this.Ya=this.B=this.uc=this.s=this.i=this.jc=this.I=this.rc=this.H=this.Ha=this.F=this.L=this.m=this.P=null;this.od=1E9;this.o=kk(this);this.nd={width:Infinity,height:Infinity};this.j=null;this.qa=new ue(this.o.preferredAudioLanguage,this.o.preferredVariantRole,this.o.preferredAudioChannelCount);this.ra=this.o.preferredTextLanguage;this.Pb=this.o.preferredTextRole;this.Za=this.o.preferForcedSubs;
349
- this.hd=[];b&&b(this);this.P=lk(this);this.P.Nd(this.o.streaming.forceHTTPS);this.D=null;mk&&(this.D=$b(mk));this.h.A(window,"online",function(){c.Id()});this.ua={name:"detach"};this.Ra={name:"attach"};this.T={name:"unload"};this.qd={name:"manifest-parser"};this.md={name:"manifest"};this.sa={name:"media-source"};this.kd={name:"drm-engine"};this.O={name:"load"};this.rd={name:"src-equals-drm-engine"};this.Pa={name:"src-equals"};var d=new Map;d.set(this.Ra,function(e,f){return Je(nk(c,e,f))});d.set(this.ua,
350
- function(e){e.G&&(c.h.Ea(e.G,"error"),e.G=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Je(e)});d.set(this.T,function(e){return Je(ok(c,e))});d.set(this.sa,function(e){e=pk(c,e);return Je(e)});d.set(this.qd,function(e,f){var g=qk(c,e,f);return Je(g)});d.set(this.md,function(e){return rk(c,e)});d.set(this.kd,function(e){e=sk(c,e);return Je(e)});d.set(this.O,function(e,f){return Je(tk(c,e,f))});d.set(this.rd,function(e,f){var g=uk(c,e,f);return Je(g)});d.set(this.Pa,function(e,f){return vk(c,
351
- e,f)});this.ea=new Bj(this.ua,{ef:function(e,f,g,h){var k=null;e==c.ua&&(k=g==c.ua?c.ua:c.Ra);e==c.Ra&&(k=g==c.ua||f.G!=h.G?c.ua:g==c.Ra?c.Ra:g==c.sa||g==c.O?c.sa:g==c.Pa?c.rd:null);e==c.sa&&(k=g==c.O&&f.G==h.G?c.qd:c.T);e==c.qd&&(k=wk(c.O,c.md,c.T,g,f,h));e==c.md&&(k=wk(c.O,c.kd,c.T,g,f,h));e==c.kd&&(k=wk(c.O,c.O,c.T,g,f,h));e==c.rd&&(k=g==c.Pa&&f.G==h.G?c.Pa:c.T);if(e==c.O||e==c.Pa)k=c.T;e==c.T&&(k=h.G&&f.G==h.G?c.Ra:c.ua);return k},Re:function(e,f,g){c.dispatchEvent(xk(yk,(new Map).set("state",
352
- e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?u(f,ok(c,e),2):f["return"](e.G?c.Ra:c.ua)})},Af:function(e){c.dispatchEvent(xk(zk,(new Map).set("state",e.name)))}});a&&this.Rb(a,!0)}ra(V,Ne);function xk(a,b){return new R(a,b)}q=V.prototype;
353
- q.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==Ak)return c["return"]();a.l=Ak;b=Gj(a.ea,function(){return{node:a.ua,payload:Cj(),kb:!1}});return u(c,new Promise(function(d){b.Eb=function(){};b.Hc=function(){d()};b.ob=function(){d()};b.onError=function(){d()};b.Jc=function(){d()}}),2);case 2:return u(c,a.ea.destroy(),3);case 3:a.h&&(a.h.release(),a.h=null);a.gd=null;a.u=null;a.o=null;a.j=null;a.qc=null;if(!a.P){c.v(0);break}return u(c,a.P.destroy(),5);case 5:a.P=
354
- null,z(c)}})};q.Rb=function(a,b){b=void 0===b?!0:b;if(this.l==Ak)return Promise.reject(Bk());var c=Cj();c.G=a;qd()||(b=!1);var d=b?this.sa:this.Ra,e=Gj(this.ea,function(){return{node:d,payload:c,kb:!1}});e.Eb=function(){};return Ck(e)};q.detach=function(){var a=this;if(this.l==Ak)return Promise.reject(Bk());var b=Gj(this.ea,function(){return{node:a.ua,payload:Cj(),kb:!1}});b.Eb=function(){};return Ck(b)};
355
- q.Td=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Ak)return Promise.reject(Bk());qd()||(a=!1);var c=Cj(),d=Gj(this.ea,function(e){var f=e.G&&a?b.sa:e.G?b.Ra:b.ua;c.G=e.G;return{node:f,payload:c,kb:!1}});d.Eb=function(){};return Ck(d)};
356
- q.load=function(a,b,c){var d=this;if(this.l==Ak)return Promise.reject(Bk());this.dispatchEvent(xk(Dk));var e=Cj();e.uri=a;e.Rd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Ek(this,e)?this.Pa:this.O,g=Gj(this.ea,function(h){if(null==h.G)return null;e.G=h.G;return{node:f,payload:e,kb:!0}});this.j=new ik;g.Eb=function(){};return new Promise(function(h,k){g.Jc=function(){return k(new N(2,7,7002))};g.Hc=function(){h();d.dispatchEvent(xk(Fk))};g.ob=function(){return k(Bk())};g.onError=
357
- function(l){return k(l)}})};function Ek(a,b){if(!qd())return!0;var c=b.mimeType,d=b.uri||"";c||(c=fg(d),c=Gk[c]);if(c){if(""==(b.G||sd()).canPlayType(c))return!1;if(!qd()||!(c in eg||fg(d)in gg)||a.o.streaming.preferNativeHls)return!0;if(wd())return a.o.streaming.useNativeHlsOnSafari}return!1}function nk(a,b,c){null==b.G&&(b.G=c.G,a.h.A(b.G,"error",function(){var d=Hk(a);d&&Ik(a,d)}));a.g=b.G;return Promise.resolve()}
358
- function ok(a,b){var c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return a.l!=Ak&&(a.l=jk),c=a.hd.map(function(p){return p()}),a.hd=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(xk(Jk));b.mimeType=null;b.startTime=null;b.uri=null;b.G&&(a.h.Ea(b.G,"loadedmetadata"),a.h.Ea(b.G,"playing"),a.h.Ea(b.G,"pause"),a.h.Ea(b.G,"ended"),a.h.Ea(b.G,"ratechange"));a.Ha&&(a.Ha.release(),a.Ha=null);a.rc&&(a.rc.stop(),a.rc=null);if(!a.s){n.v(3);break}return u(n,a.s.stop(),4);case 4:a.s=null,a.uc=null;
359
- case 3:if(!a.u){n.v(5);break}return u(n,a.u.stop(),5);case 5:if(!a.i){n.v(7);break}return u(n,a.i.destroy(),8);case 8:a.i=null;case 7:a.H&&(a.H.release(),a.H=null);a.F&&(a.F.release(),a.F=null);if(!a.L){n.v(9);break}return u(n,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.G||!b.G.src){n.v(11);break}return u(n,new Promise(function(p){return(new O(p)).V(.1)}),12);case 12:for(b.G.removeAttribute("src"),b.G.load();b.G.lastChild;)b.G.removeChild(b.G.firstChild);case 11:if(!a.m){n.v(13);
360
- break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Ya=null;a.I=null;if(a.B){d=t(a.B.variants);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.B.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.B=null;a.j=new ik;a.ld=null;Kk(a);z(n)}})}
361
- function pk(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=new Jh,d=a.o.textDisplayFactory,e=$b(d),a.ld=d,f=Lk(b.G,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,r=t(m.frames),v=r.next();!v.done;v=r.next())Mk(a,n,p,"ID3",v.value);if(a.D)a.D.onHlsTimedMetadata(m,n)}}),u(g,f.F,2);a.L=f;z(g)})}
362
- function qk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.P,a.Ya=d,f=a,u(h,dg(d,e,a.o.manifest.retryParameters,b.mimeType),2);f.uc=h.h;a.s=$b(a.uc);g=Oe(a.o.manifest);c.G&&"AUDIO"===c.G.nodeName&&(g.disableVideo=!0);a.s.configure(g);z(h)})}
363
- function rk(a,b){var c=b.uri,d=a.P;a.jc=new Vi(function(){return a.ec()});Wi(a.jc,function(g){Nk(a,Ok,g);if(a.D)a.D.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return Pk(a,g)},makeTextStreamsForClosedCaptions:function(g){return Qk(a,g)},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),
364
- h.h(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Ik(a,g)},isLowLatencyMode:function(){return a.o.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.o.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Fe(function(){var g,h,k,l;return K(function(m){if(1==m.g)return g=a,u(m,a.s.start(c,e),2);g.B=m.h;h=xk(Rk);a.dispatchEvent(h);if(0==a.B.variants.length)throw new N(2,
365
- 4,4036);Sk(a.B);k=Date.now()/1E3;l=k-f;a.j.H=l;z(m)})}(),function(){return a.s.stop()})}function sk(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Tk(a,{nb:a.P,onError:function(f){Ik(a,f)},Ic:function(f){Uk(a,f)},onExpirationUpdated:function(f,g){Vk(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Wk&&d&&(d=!1,a.j.j=Date.now()/1E3-c)}}),a.m.configure(a.o.drm),u(e,zf(a.m,a.B.variants,a.B.offlineSessionIds),2)):3!=e.g?u(e,a.m.Rb(b.G),3):u(e,Pk(a,a.B),0)})}
366
- function tk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v;return K(function(y){switch(y.g){case 1:b.startTime=c.startTime;d=b.G;e=b.uri;a.Ya=e;a.H=new Oi({Dc:function(){return b.G.playbackRate},Ac:function(){return b.G.defaultPlaybackRate},Pd:function(x){b.G.playbackRate=x},le:function(x){b.G.currentTime+=x}});f=function(){return Xk(a)};g=function(){return Yk(a)};a.h.A(d,"playing",f);a.h.A(d,"pause",f);a.h.A(d,"ended",f);a.h.A(d,"ratechange",g);h=a.o.abrFactory;a.u&&a.gd==h||(a.gd=h,a.u=$b(h),"function"!=typeof a.u.playbackRateChanged&&
367
- (Tb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.o.abr));a.qa=new ue(a.o.preferredAudioLanguage,a.o.preferredVariantRole,a.o.preferredAudioChannelCount);a.ra=a.o.preferredTextLanguage;a.Pb=a.o.preferredTextRole;a.Za=a.o.preferForcedSubs;Zk(a.B.presentationTimeline,a.o.playRangeStart,a.o.playRangeEnd);a.u.init(function(x,w,C){a.i&&x!=a.i.h&&$k(a,x,!0,void 0===w?!1:w,void 0===C?0:C)});a.F=al(a,b.startTime);a.Ha=bl(a);
368
- k=Math.max(a.B.minBufferTime,a.o.streaming.rebufferingGoal);cl(a,k);Ad(a.B,a.o.preferredVideoCodecs,a.o.preferredAudioCodecs,a.o.preferredAudioChannelCount,a.o.preferredDecodingAttributes);a.i=dl(a);a.i.configure(a.o.streaming);a.l=el;a.dispatchEvent(xk(fl));l=null;if(m=a.Ec().find(function(x){return x.active})){y.v(2);break}l=gl(a)?a.u.chooseVariant():null;$k(a,l,!0,!1,0);if(!a.o.streaming.startAtSegmentBoundary){y.v(3);break}n=a.F.l();return u(y,hl(l,n),4);case 4:p=y.h,a.F.m(p);case 3:il(a,null,
369
- Zd(l));case 2:return r=a.jb().find(function(x){return x.active}),r||((v=je(a.B.textStreams,a.ra,a.Pb,a.Za)[0]||null)&&hk(a.j.h,v,!0),l&&(v?(l.audio&&jl(a,l.audio,v)&&(a.Z=!0),a.Z&&a.L.m.setTextVisibility(!0),kl(a)):a.Z=!1),v&&(a.o.streaming.alwaysStreamText||a.td())&&lj(a.i,v)),u(y,a.i.start(),5);case 5:a.o.abr.enabled&&(a.u.enable(),ll(a)),Qd(a.i?a.i.h:null,a.B),ml(a.B),nl(a),gl(a),a.B.variants.some(function(x){return x.primary}),a.h.xa(d,"loadedmetadata",function(){a.j.l=Date.now()/1E3-c.Rd}),z(y)}})}
370
- function uk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=xc,e=Date.now()/1E3,f=!0,a.m=Tk(a,{nb:a.P,onError:function(n){Ik(a,n)},Ic:function(n){Uk(a,n)},onExpirationUpdated:function(n,p){Vk(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==Wk&&f&&(f=!1,a.j.j=Date.now()/1E3-e)}}),a.m.configure(a.o.drm),g=c.uri||"",h=fg(g),k=Gk[h],"application/x-mpegurl"==k&&wd()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
371
- createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Wc(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Qa,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.T=!0,u(m,zf(a.m,[l],[]),2)):u(m,a.m.Rb(b.G),
346
+ function(g){return K(function(h){return h["return"](Zj(g,f.preferredAudioLanguage))})};return f}function ak(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 Vj(a,b,c||Yj(),d,"")}
347
+ function Zj(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=md(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return gd(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/
348
+ 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!=wc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",Xj);Xj.mergeConfigObjects=ak;function bk(){this.g=null;this.h=[]}function ck(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 dk(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}
349
+ function ek(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 fk(){this.i=this.h=null;this.g=[]}function gk(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 hk(){this.s=this.u=this.I=this.F=this.m=this.j=this.H=this.l=this.i=this.L=this.O=this.V=this.D=this.Y=NaN;this.g=new bk;this.h=new fk};function V(a,b){Ne.call(this);var c=this;this.l=ik;this.rc=this.g=null;this.ea=!1;this.h=new ef;this.gd=this.u=this.$a=this.B=this.uc=this.s=this.i=this.kc=this.I=this.sc=this.H=this.Pa=this.F=this.L=this.m=this.P=null;this.od=1E9;this.o=jk(this);this.nd={width:Infinity,height:Infinity};this.j=null;this.ra=new ue(this.o.preferredAudioLanguage,this.o.preferredVariantRole,this.o.preferredAudioChannelCount);this.sa=this.o.preferredTextLanguage;this.Qb=this.o.preferredTextRole;this.Pb=this.o.preferForcedSubs;
350
+ this.hd=[];b&&b(this);this.P=kk(this);this.P.Nd(this.o.streaming.forceHTTPS);this.D=null;lk&&(this.D=$b(lk));this.h.A(window,"online",function(){c.Id()});this.ua={name:"detach"};this.Sa={name:"attach"};this.Y={name:"unload"};this.qd={name:"manifest-parser"};this.md={name:"manifest"};this.Ha={name:"media-source"};this.kd={name:"drm-engine"};this.O={name:"load"};this.rd={name:"src-equals-drm-engine"};this.Qa={name:"src-equals"};var d=new Map;d.set(this.Sa,function(e,f){return Je(mk(c,e,f))});d.set(this.ua,
351
+ function(e){e.G&&(c.h.Ea(e.G,"error"),e.G=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Je(e)});d.set(this.Y,function(e){return Je(nk(c,e))});d.set(this.Ha,function(e){e=ok(c,e);return Je(e)});d.set(this.qd,function(e,f){var g=pk(c,e,f);return Je(g)});d.set(this.md,function(e){return qk(c,e)});d.set(this.kd,function(e){e=rk(c,e);return Je(e)});d.set(this.O,function(e,f){return Je(sk(c,e,f))});d.set(this.rd,function(e,f){var g=tk(c,e,f);return Je(g)});d.set(this.Qa,function(e,f){return uk(c,
352
+ e,f)});this.la=new Aj(this.ua,{ef:function(e,f,g,h){var k=null;e==c.ua&&(k=g==c.ua?c.ua:c.Sa);e==c.Sa&&(k=g==c.ua||f.G!=h.G?c.ua:g==c.Sa?c.Sa:g==c.Ha||g==c.O?c.Ha:g==c.Qa?c.rd:null);e==c.Ha&&(k=g==c.O&&f.G==h.G?c.qd:c.Y);e==c.qd&&(k=vk(c.O,c.md,c.Y,g,f,h));e==c.md&&(k=vk(c.O,c.kd,c.Y,g,f,h));e==c.kd&&(k=vk(c.O,c.O,c.Y,g,f,h));e==c.rd&&(k=g==c.Qa&&f.G==h.G?c.Qa:c.Y);if(e==c.O||e==c.Qa)k=c.Y;e==c.Y&&(k=h.G&&f.G==h.G?c.Sa:c.ua);return k},Re:function(e,f,g){c.dispatchEvent(wk(xk,(new Map).set("state",
353
+ e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?u(f,nk(c,e),2):f["return"](e.G?c.Sa:c.ua)})},Af:function(e){c.dispatchEvent(wk(yk,(new Map).set("state",e.name)))}});a&&this.Sb(a,!0)}ra(V,Ne);function wk(a,b){return new Q(a,b)}q=V.prototype;
354
+ q.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==zk)return c["return"]();a.l=zk;b=Fj(a.la,function(){return{node:a.ua,payload:Bj(),kb:!1}});return u(c,new Promise(function(d){b.Eb=function(){};b.Hc=function(){d()};b.ob=function(){d()};b.onError=function(){d()};b.Jc=function(){d()}}),2);case 2:return u(c,a.la.destroy(),3);case 3:a.h&&(a.h.release(),a.h=null);a.gd=null;a.u=null;a.o=null;a.j=null;a.rc=null;if(!a.P){c.v(4);break}return u(c,a.P.destroy(),5);case 5:a.P=
355
+ null;case 4:Ne.prototype.release.call(a),z(c)}})};q.Sb=function(a,b){b=void 0===b?!0:b;if(this.l==zk)return Promise.reject(Ak());var c=Bj();c.G=a;qd()||(b=!1);var d=b?this.Ha:this.Sa,e=Fj(this.la,function(){return{node:d,payload:c,kb:!1}});e.Eb=function(){};return Bk(e)};q.detach=function(){var a=this;if(this.l==zk)return Promise.reject(Ak());var b=Fj(this.la,function(){return{node:a.ua,payload:Bj(),kb:!1}});b.Eb=function(){};return Bk(b)};
356
+ q.Td=function(a){var b=this;a=void 0===a?!0:a;if(this.l==zk)return Promise.reject(Ak());qd()||(a=!1);var c=Bj(),d=Fj(this.la,function(e){var f=e.G&&a?b.Ha:e.G?b.Sa:b.ua;c.G=e.G;return{node:f,payload:c,kb:!1}});d.Eb=function(){};return Bk(d)};
357
+ q.load=function(a,b,c){var d=this;if(this.l==zk)return Promise.reject(Ak());this.dispatchEvent(wk(Ck));var e=Bj();e.uri=a;e.Rd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Dk(this,e)?this.Qa:this.O,g=Fj(this.la,function(h){if(null==h.G)return null;e.G=h.G;return{node:f,payload:e,kb:!0}});this.j=new hk;g.Eb=function(){};return new Promise(function(h,k){g.Jc=function(){return k(new N(2,7,7002))};g.Hc=function(){h();d.dispatchEvent(wk(Ek))};g.ob=function(){return k(Ak())};g.onError=
358
+ function(l){return k(l)}})};function Dk(a,b){if(!qd())return!0;var c=b.mimeType,d=b.uri||"";c||(c=fg(d),c=Fk[c]);if(c){if(""==(b.G||sd()).canPlayType(c))return!1;if(!qd()||!(c in eg||fg(d)in gg)||a.o.streaming.preferNativeHls)return!0;if(wd())return a.o.streaming.useNativeHlsOnSafari}return!1}function mk(a,b,c){null==b.G&&(b.G=c.G,a.h.A(b.G,"error",function(){var d=Gk(a);d&&Hk(a,d)}));a.g=b.G;return Promise.resolve()}
359
+ function nk(a,b){var c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return a.l!=zk&&(a.l=ik),c=a.hd.map(function(p){return p()}),a.hd=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(wk(Ik));b.mimeType=null;b.startTime=null;b.uri=null;b.G&&(a.h.Ea(b.G,"loadedmetadata"),a.h.Ea(b.G,"playing"),a.h.Ea(b.G,"pause"),a.h.Ea(b.G,"ended"),a.h.Ea(b.G,"ratechange"));a.Pa&&(a.Pa.release(),a.Pa=null);a.sc&&(a.sc.stop(),a.sc=null);if(!a.s){n.v(3);break}return u(n,a.s.stop(),4);case 4:a.s=null,a.uc=null;
360
+ case 3:if(!a.u){n.v(5);break}return u(n,a.u.stop(),5);case 5:if(!a.i){n.v(7);break}return u(n,a.i.destroy(),8);case 8:a.i=null;case 7:a.H&&(a.H.release(),a.H=null);a.F&&(a.F.release(),a.F=null);if(!a.L){n.v(9);break}return u(n,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.G||!b.G.src){n.v(11);break}return u(n,new Promise(function(p){return(new O(p)).U(.1)}),12);case 12:for(b.G.removeAttribute("src"),b.G.load();b.G.lastChild;)b.G.removeChild(b.G.firstChild);case 11:if(!a.m){n.v(13);
361
+ break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.$a=null;a.I=null;if(a.B){d=t(a.B.variants);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.B.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.B=null;a.j=new hk;a.ld=null;Jk(a);z(n)}})}
362
+ function ok(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=new Jh,d=a.o.textDisplayFactory,e=$b(d),a.ld=d,f=Kk(b.G,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,r=t(m.frames),v=r.next();!v.done;v=r.next())Lk(a,n,p,"ID3",v.value);if(a.D)a.D.onHlsTimedMetadata(m,n)}}),u(g,f.F,2);a.L=f;z(g)})}
363
+ function pk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.P,a.$a=d,f=a,u(h,dg(d,e,a.o.manifest.retryParameters,b.mimeType),2);f.uc=h.h;a.s=$b(a.uc);g=Oe(a.o.manifest);c.G&&"AUDIO"===c.G.nodeName&&(g.disableVideo=!0);a.s.configure(g);z(h)})}
364
+ function qk(a,b){var c=b.uri,d=a.P;a.kc=new Vi(function(){return a.fc()});a.kc.addEventListener("regionadd",function(g){g=g.region;Mk(a,Nk,g);if(a.D)a.D.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return Ok(a,g)},makeTextStreamsForClosedCaptions:function(g){return Pk(a,g)},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=
365
+ 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 Hk(a,g)},isLowLatencyMode:function(){return a.o.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.o.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Fe(function(){var g,h,k,l;return K(function(m){if(1==m.g)return g=a,u(m,
366
+ a.s.start(c,e),2);g.B=m.h;h=wk(Qk);a.dispatchEvent(h);if(0==a.B.variants.length)throw new N(2,4,4036);Rk(a.B);k=Date.now()/1E3;l=k-f;a.j.H=l;z(m)})}(),function(){return a.s.stop()})}
367
+ function rk(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Sk(a,{nb:a.P,onError:function(f){Hk(a,f)},Ic:function(f){Tk(a,f)},onExpirationUpdated:function(f,g){Uk(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Vk&&d&&(d=!1,a.j.j=Date.now()/1E3-c)}}),a.m.configure(a.o.drm),u(e,zf(a.m,a.B.variants,a.B.offlineSessionIds),2)):3!=e.g?u(e,a.m.Sb(b.G),3):u(e,Ok(a,a.B),0)})}
368
+ function sk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v;return K(function(y){switch(y.g){case 1:b.startTime=c.startTime;d=b.G;e=b.uri;a.$a=e;a.H=new Oi({Dc:function(){return b.G.playbackRate},Ac:function(){return b.G.defaultPlaybackRate},Pd:function(x){b.G.playbackRate=x},le:function(x){b.G.currentTime+=x}});f=function(){return Wk(a)};g=function(){return Xk(a)};a.h.A(d,"playing",f);a.h.A(d,"pause",f);a.h.A(d,"ended",f);a.h.A(d,"ratechange",g);h=a.o.abrFactory;a.u&&a.gd==h||(a.gd=h,a.u=$b(h),"function"!=typeof a.u.playbackRateChanged&&
369
+ (Tb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.o.abr));a.ra=new ue(a.o.preferredAudioLanguage,a.o.preferredVariantRole,a.o.preferredAudioChannelCount);a.sa=a.o.preferredTextLanguage;a.Qb=a.o.preferredTextRole;a.Pb=a.o.preferForcedSubs;Yk(a.B.presentationTimeline,a.o.playRangeStart,a.o.playRangeEnd);a.u.init(function(x,w,C){a.i&&x!=a.i.h&&Zk(a,x,!0,void 0===w?!1:w,void 0===C?0:C)});a.F=$k(a,b.startTime);a.Pa=al(a);
370
+ k=Math.max(a.B.minBufferTime,a.o.streaming.rebufferingGoal);bl(a,k);Ad(a.B,a.o.preferredVideoCodecs,a.o.preferredAudioCodecs,a.o.preferredAudioChannelCount,a.o.preferredDecodingAttributes);a.i=cl(a);a.i.configure(a.o.streaming);a.l=dl;a.dispatchEvent(wk(el));l=null;if(m=a.Ec().find(function(x){return x.active})){y.v(2);break}l=fl(a)?a.u.chooseVariant():null;Zk(a,l,!0,!1,0);if(!a.o.streaming.startAtSegmentBoundary){y.v(3);break}n=a.F.l();return u(y,gl(l,n),4);case 4:p=y.h,a.F.m(p);case 3:hl(a,null,
371
+ Zd(l));case 2:return r=a.jb().find(function(x){return x.active}),r||((v=je(a.B.textStreams,a.sa,a.Qb,a.Pb)[0]||null)&&gk(a.j.h,v,!0),l&&(v?(l.audio&&il(a,l.audio,v)&&(a.ea=!0),a.ea&&a.L.m.setTextVisibility(!0),jl(a)):a.ea=!1),v&&(a.o.streaming.alwaysStreamText||a.td())&&kj(a.i,v)),u(y,a.i.start(),5);case 5:a.o.abr.enabled&&(a.u.enable(),kl(a)),Qd(a.i?a.i.h:null,a.B),ll(a.B),ml(a),fl(a),a.B.variants.some(function(x){return x.primary}),a.h.xa(d,"loadedmetadata",function(){a.j.l=Date.now()/1E3-c.Rd}),
372
+ z(y)}})}
373
+ function tk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=xc,e=Date.now()/1E3,f=!0,a.m=Sk(a,{nb:a.P,onError:function(n){Hk(a,n)},Ic:function(n){Tk(a,n)},onExpirationUpdated:function(n,p){Uk(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==Vk&&f&&(f=!1,a.j.j=Date.now()/1E3-e)}}),a.m.configure(a.o.drm),g=c.uri||"",h=fg(g),k=Fk[h],"application/x-mpegurl"==k&&wd()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
374
+ createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Wc(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ra,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.V=!0,u(m,zf(a.m,[l],[]),2)):u(m,a.m.Sb(b.G),
372
375
  0)})}
373
- function vk(a,b,c){function d(){return Xk(a)}b.uri=c.uri;b.startTime=c.startTime;a.Ya=b.uri;a.F=new Ei(b.G);null!=b.startTime&&a.F.m(b.startTime);a.H=new Oi({Dc:function(){return b.G.playbackRate},Ac:function(){return b.G.defaultPlaybackRate},Pd:function(g){b.G.playbackRate=g},le:function(g){b.G.currentTime+=g}});cl(a,a.o.streaming.rebufferingGoal);a.h.A(b.G,"playing",d);a.h.A(b.G,"pause",d);a.h.A(b.G,"ended",d);a.h.A(b.G,"ratechange",function(){return Yk(a)});"none"!=a.g.preload&&a.h.xa(a.g,"loadedmetadata",
374
- function(){a.j.l=Date.now()/1E3-c.Rd});a.g.audioTracks&&(a.h.A(a.g.audioTracks,"addtrack",function(){return nl(a)}),a.h.A(a.g.audioTracks,"removetrack",function(){return nl(a)}),a.h.A(a.g.audioTracks,"change",function(){return nl(a)}));a.g.textTracks&&(a.h.A(a.g.textTracks,"addtrack",function(g){if(g.track)switch(g=g.track,g.kind){case "metadata":ol(a,g);break;case "chapters":pl(a,g);break;default:nl(a)}}),a.h.A(a.g.textTracks,"removetrack",function(){return nl(a)}),a.h.A(a.g.textTracks,"change",
375
- function(){return nl(a)}));b.G.src=b.uri;(td()||ud("Web0S"))&&b.G.load();a.l=ql;a.dispatchEvent(xk(fl));var e=new yc;vi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){e.resolve()});var f=!1;a.hd.push(function(){f=!0});vi(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){var g;return K(function(h){if(1==h.g){if(f)return h["return"]();rl(a);g=sl(a);return g.find(function(k){return"disabled"!=k.mode})?h.v(2):u(h,new Promise(function(k){a.h.xa(a.g.textTracks,"change",k);(new O(k)).V(1)}),2)}if(f)return h["return"]();
376
- tl(a);z(h)})});a.g.error?e.reject(Hk(a)):"none"==a.g.preload&&(Xa('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.'),e.resolve());a.h.xa(a.g,"error",function(){e.reject(Hk(a))});return new Fe(e,function(){e.reject(new N(2,7,7001));return Promise.resolve()})}
377
- function rl(a){var b=a.o.preferredAudioLanguage;if(""!=b){a.Kd(b);var c=a.o.preferredVariantRole;""!=c&&a.Kd(b,c)}}function tl(a){var b=a.o.preferredTextLanguage,c=a.o.preferForcedSubs;if(""!=b){a.Ld(b,"",c);var d=a.o.preferredTextRole;""!=d&&a.Ld(b,d,c)}}
378
- function ol(a,b){"metadata"==b.kind&&(b.mode="hidden",a.h.A(b,"cuechange",function(){if(b.activeCues)for(var c=t(b.activeCues),d=c.next();!d.done;d=c.next())if(d=d.value,Mk(a,d.startTime,d.endTime,d.type,d.value),a.D)a.D.onCueMetadataChange(d.value)}),(new O(function(){var c=ul(a);c=t(c);for(var d=c.next();!d.done;d=c.next())d.value.mode="hidden"})).Jb().V(.5))}function Mk(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(xk(vl,b))}
379
- function pl(a,b){b&&"chapters"==b.kind&&(b.mode="hidden",(new O(function(){var c=wl(a);c=t(c);for(var d=c.next();!d.done;d=c.next())d.value.mode="hidden"})).Jb().V(.5))}function Sk(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 Tk(a,b){return new qf(b,a.o.drm.updateExpirationTime)}function lk(a){return new Se(function(b,c){a.u&&a.u.segmentDownloaded(b,c)})}
380
- function al(a,b){return new Fi(a.g,a.B,a.o.streaming,b,function(){a.Ha&&Ri(a.Ha,!0);if(a.i)for(var c=a.i,d=c.C.Cc(),e=c.o.smallGapLimit,f=t(c.g.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.g.get(g);h.da=null;var k=c.C.S;g==wc?(k=k.i,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=$h(k,g),k=Oh(k,d,e));if(!k&&((null!=ai(c.C.S,g)||h.La)&&oj(c,h),h.ya&&(h.ya.abort(),h.ya=null),g===wc))for(g=c.C.S.D.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,wh(g),g=t(g.j.values()),h=g.next();!h.done;h=g.next())qh(h.value)}a.I&&
381
- xl(a)},function(c){return a.dispatchEvent(c)})}function bl(a){var b=new Xi(a.jc);Yi(b,function(d){Nk(a,yl,d)},function(d){Nk(a,zl,d)},function(d,e){e||(Nk(a,yl,d),Nk(a,zl,d))});var c=new Qi(a.g);c.g.add(b);return c}function cl(a,b){a.I=new ye;a.I.g=Ae;Be(a.I,b,Math.min(.5,b/2));Kk(a);a.rc=(new O(function(){xl(a)})).Da(.25)}
382
- function xl(a){switch(a.l){case ql:if(a.g.ended)var b=!0;else{var c=Lh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case el:a:if(a.g.ended||Yh(a.L))b=!0;else{if(a.B.presentationTimeline.Y()){c=a.B.presentationTimeline.ib();var d=Lh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ph(a.g.buffered,a.g.currentTime);c=a.I;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?ze:Ae;c.g=d;b!=d&&Kk(a)}function Lk(a,b,c,d){return new Sh(a,b,c,d)}
383
- function dl(a){return new $i(a.B,{Cc:function(){return a.F.l()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},S:a.L,nb:a.P,onError:function(b){return Ik(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Bf:function(){a.s&&a.s.update&&a.s.update()},Ed:function(){a.F&&a.F.F();xl(a)}})}
384
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Xj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Tb("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=
385
- 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=bk(this.o,a,kk(this));Al(this);return c};
386
- function Al(a){if(a.s){var b=Oe(a.o.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.s.configure(b)}a.m&&a.m.configure(a.o.drm);if(a.i){a.i.configure(a.o.streaming);try{Bl(a,a.B)}catch(f){Ik(a,f)}a.u&&gl(a);b=a.i.h;!b||b.allowedByApplication&&b.allowedByKeySystem||Cl(a)}a.P&&a.P.Nd(a.o.streaming.forceHTTPS);if(a.L&&(b=a.o.textDisplayFactory,a.ld!=b)){var c=$b(b),d=a.L,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.i&&(d.i.i=c);a.ld=b;a.i&&(b=a.i,(c=b.g.get(wc))&&
387
- jj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.o.abr),a.o.abr.enabled?a.u.enable():a.u.disable(),ll(a));a.I&&(b=a.o.streaming.rebufferingGoal,a.B&&(b=Math.max(b,a.B.minBufferTime)),Be(a.I,b,Math.min(.5,b/2)));a.B&&Zk(a.B.presentationTimeline,a.o.playRangeStart,a.o.playRangeEnd)}q.getConfiguration=function(){var a=kk(this);bk(a,this.o,kk(this));return a};
388
- q.Ue=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.ec().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Mf=function(){for(var a in this.o)delete this.o[a];bk(this.o,kk(this),kk(this));Al(this)};q.$e=function(){return this.l};q.df=function(){return this.g};q.Wb=function(){return this.P};q.pd=function(){return this.Ya};
389
- q.ce=function(){return this.D?this.D:null};q.Y=function(){return this.B?this.B.presentationTimeline.Y():this.g&&this.g.src?Infinity==this.g.duration:!1};q.mb=function(){return this.B?this.B.presentationTimeline.mb():!1};q.vf=function(){if(this.B){var a=this.B.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};
390
- q.ec=function(){if(this.B){var a=this.B.presentationTimeline;return{start:a.Ab(),end:a.Ta()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.tf=function(){this.Y()&&(this.g.currentTime=this.ec().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.i:null};q.Vb=function(){return this.m?this.m.Vb():Infinity};q.Bc=function(){return this.m?this.m.Bc():{}};
391
- q.sd=function(){return this.I?this.I.g==Ae:!1};q.ff=function(){return this.g?this.H?this.H.i:1:0};q.Vf=function(a){0==a?Xa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.l==el&&(this.u.playbackRateChanged(a),ij(this.i,1<Math.abs(a))))};q.Ke=function(){var a=this.H.Ac();this.l==ql&&this.H.set(a);this.l==el&&(this.H.set(a),this.u.playbackRateChanged(a),ij(this.i,!1))};
376
+ function uk(a,b,c){function d(){return Wk(a)}b.uri=c.uri;b.startTime=c.startTime;a.$a=b.uri;a.F=new Ei(b.G);null!=b.startTime&&a.F.m(b.startTime);a.H=new Oi({Dc:function(){return b.G.playbackRate},Ac:function(){return b.G.defaultPlaybackRate},Pd:function(g){b.G.playbackRate=g},le:function(g){b.G.currentTime+=g}});bl(a,a.o.streaming.rebufferingGoal);a.h.A(b.G,"playing",d);a.h.A(b.G,"pause",d);a.h.A(b.G,"ended",d);a.h.A(b.G,"ratechange",function(){return Xk(a)});"none"!=a.g.preload&&a.h.xa(a.g,"loadedmetadata",
377
+ function(){a.j.l=Date.now()/1E3-c.Rd});a.g.audioTracks&&(a.h.A(a.g.audioTracks,"addtrack",function(){return ml(a)}),a.h.A(a.g.audioTracks,"removetrack",function(){return ml(a)}),a.h.A(a.g.audioTracks,"change",function(){return ml(a)}));a.g.textTracks&&(a.h.A(a.g.textTracks,"addtrack",function(g){if(g.track)switch(g=g.track,g.kind){case "metadata":nl(a,g);break;case "chapters":ol(a,g);break;default:ml(a)}}),a.h.A(a.g.textTracks,"removetrack",function(){return ml(a)}),a.h.A(a.g.textTracks,"change",
378
+ function(){return ml(a)}));b.G.src=b.uri;(td()||ud("Web0S"))&&b.G.load();a.l=pl;a.dispatchEvent(wk(el));var e=new yc;vi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){e.resolve()});var f=!1;a.hd.push(function(){f=!0});vi(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){var g;return K(function(h){if(1==h.g){if(f)return h["return"]();ql(a);g=rl(a);return g.find(function(k){return"disabled"!=k.mode})?h.v(2):u(h,new Promise(function(k){a.h.xa(a.g.textTracks,"change",k);(new O(k)).U(1)}),2)}if(f)return h["return"]();
379
+ sl(a);z(h)})});a.g.error?e.reject(Gk(a)):"none"==a.g.preload&&(Xa('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.'),e.resolve());a.h.xa(a.g,"error",function(){e.reject(Gk(a))});return new Fe(e,function(){e.reject(new N(2,7,7001));return Promise.resolve()})}
380
+ function ql(a){var b=a.o.preferredAudioLanguage;if(""!=b){a.Kd(b);var c=a.o.preferredVariantRole;""!=c&&a.Kd(b,c)}}function sl(a){var b=a.o.preferredTextLanguage,c=a.o.preferForcedSubs;if(""!=b){a.Ld(b,"",c);var d=a.o.preferredTextRole;""!=d&&a.Ld(b,d,c)}}
381
+ function nl(a,b){"metadata"==b.kind&&(b.mode="hidden",a.h.A(b,"cuechange",function(){if(b.activeCues)for(var c=t(b.activeCues),d=c.next();!d.done;d=c.next())if(d=d.value,Lk(a,d.startTime,d.endTime,d.type,d.value),a.D)a.D.onCueMetadataChange(d.value)}),(new O(function(){var c=tl(a);c=t(c);for(var d=c.next();!d.done;d=c.next())d.value.mode="hidden"})).Jb().U(.5))}function Lk(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(wk(ul,b))}
382
+ function ol(a,b){b&&"chapters"==b.kind&&(b.mode="hidden",(new O(function(){var c=vl(a);c=t(c);for(var d=c.next();!d.done;d=c.next())d.value.mode="hidden"})).Jb().U(.5))}function Rk(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 Sk(a,b){return new qf(b,a.o.drm.updateExpirationTime)}function kk(a){return new Se(function(b,c){a.u&&a.u.segmentDownloaded(b,c)})}
383
+ function $k(a,b){return new Fi(a.g,a.B,a.o.streaming,b,function(){a.Pa&&Ri(a.Pa,!0);if(a.i)for(var c=a.i,d=c.C.Cc(),e=c.o.smallGapLimit,f=t(c.g.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.g.get(g);h.da=null;var k=c.C.S;g==wc?(k=k.i,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=$h(k,g),k=Mh(k,d,e));if(!k&&((null!=ai(c.C.S,g)||h.La)&&nj(c,h),h.ya&&(h.ya.abort(),h.ya=null),g===wc))for(g=c.C.S.D.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,wh(g),g=t(g.j.values()),h=g.next();!h.done;h=g.next())qh(h.value)}a.I&&
384
+ wl(a)},function(c){return a.dispatchEvent(c)})}function al(a){var b=new Wi(a.kc);b.addEventListener("enter",function(d){Mk(a,xl,d.region)});b.addEventListener("exit",function(d){Mk(a,yl,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Mk(a,xl,e),Mk(a,yl,e))});var c=new Qi(a.g);c.g.add(b);return c}function bl(a,b){a.I=new ye;a.I.g=Ae;Be(a.I,b,Math.min(.5,b/2));Jk(a);a.sc=(new O(function(){wl(a)})).Da(.25)}
385
+ function wl(a){switch(a.l){case pl:if(a.g.ended)var b=!0;else{var c=Lh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case dl:a:if(a.g.ended||Yh(a.L))b=!0;else{if(a.B.presentationTimeline.Z()){c=a.B.presentationTimeline.ib();var d=Lh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Nh(a.g.buffered,a.g.currentTime);c=a.I;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?ze:Ae;c.g=d;b!=d&&Jk(a)}function Kk(a,b,c,d){return new Sh(a,b,c,d)}
386
+ function cl(a){return new Zi(a.B,{Cc:function(){return a.F.l()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},S:a.L,nb:a.P,onError:function(b){return Hk(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Bf:function(){a.s&&a.s.update&&a.s.update()},Ed:function(){a.F&&a.F.F();wl(a)}})}
387
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Wj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Tb("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=
388
+ 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=ak(this.o,a,jk(this));zl(this);return c};
389
+ function zl(a){if(a.s){var b=Oe(a.o.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.s.configure(b)}a.m&&a.m.configure(a.o.drm);if(a.i){a.i.configure(a.o.streaming);try{Al(a,a.B)}catch(f){Hk(a,f)}a.u&&fl(a);b=a.i.h;!b||b.allowedByApplication&&b.allowedByKeySystem||Bl(a)}a.P&&a.P.Nd(a.o.streaming.forceHTTPS);if(a.L&&(b=a.o.textDisplayFactory,a.ld!=b)){var c=$b(b),d=a.L,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.i&&(d.i.i=c);a.ld=b;a.i&&(b=a.i,(c=b.g.get(wc))&&
390
+ ij(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.o.abr),a.o.abr.enabled?a.u.enable():a.u.disable(),kl(a));a.I&&(b=a.o.streaming.rebufferingGoal,a.B&&(b=Math.max(b,a.B.minBufferTime)),Be(a.I,b,Math.min(.5,b/2)));a.B&&Yk(a.B.presentationTimeline,a.o.playRangeStart,a.o.playRangeEnd)}q.getConfiguration=function(){var a=jk(this);ak(a,this.o,jk(this));return a};
391
+ q.Ue=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.fc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Mf=function(){for(var a in this.o)delete this.o[a];ak(this.o,jk(this),jk(this));zl(this)};q.$e=function(){return this.l};q.df=function(){return this.g};q.Xb=function(){return this.P};q.pd=function(){return this.$a};
392
+ q.ce=function(){return this.D?this.D:null};q.Z=function(){return this.B?this.B.presentationTimeline.Z():this.g&&this.g.src?Infinity==this.g.duration:!1};q.mb=function(){return this.B?this.B.presentationTimeline.mb():!1};q.vf=function(){if(this.B){var a=this.B.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};
393
+ q.fc=function(){if(this.B){var a=this.B.presentationTimeline;return{start:a.Ab(),end:a.Ua()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.tf=function(){this.Z()&&(this.g.currentTime=this.fc().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.i:null};q.Wb=function(){return this.m?this.m.Wb():Infinity};q.Bc=function(){return this.m?this.m.Bc():{}};
394
+ q.sd=function(){return this.I?this.I.g==Ae:!1};q.ff=function(){return this.g?this.H?this.H.i:1:0};q.Vf=function(a){0==a?Xa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.l==dl&&(this.u.playbackRateChanged(a),hj(this.i,1<Math.abs(a))))};q.Ke=function(){var a=this.H.Ac();this.l==pl&&this.H.set(a);this.l==dl&&(this.H.set(a),this.u.playbackRateChanged(a),hj(this.i,!1))};
392
395
  q.Ec=function(){if(this.B){for(var a=this.i?this.i.h:null,b=[],c=0,d=t(this.B.variants),e=d.next();!e.done;e=d.next())if(e=e.value,he(e)){var f=Zd(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)}):[]};
393
- q.jb=function(){if(this.B){for(var a=this.i?this.i.i:null,b=[],c=t(this.B.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=$d(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 de(f)}):[]};q.Ye=function(){return this.B?this.B.imageStreams.map(function(a){return ae(a)}):[]};
396
+ q.jb=function(){if(this.B){for(var a=this.i?this.i.i:null,b=[],c=t(this.B.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=$d(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?rl(this).map(function(f){return de(f)}):[]};q.Ye=function(){return this.B?this.B.imageStreams.map(function(a){return ae(a)}):[]};
394
397
  q.pf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B;return K(function(F){if(1==F.g)return c.B?(d=c.B.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.v(3):u(F,d.createSegmentIndex(),3):F["return"](null):F.v(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;r=l/n;
395
- v=m*n;y=f.l-f.startTime;x=f.i||y/v;w=f.startTime;D=C=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,C=B%m*p,D=Math.floor(B/m)*r);return F["return"]({imageHeight:l,imageWidth:k,height:r,positionX:C,positionY:D,startTime:w,duration:x,uris:f.na(),width:p})}return F["return"](null)})};
396
- q.se=function(a){if(this.B&&this.i){var b=this.B.textStreams.find(function(d){return d.id==a.id});b&&b!=this.i.i&&(hk(this.j.h,b,!1),lj(this.i,b),Dl(this),this.ra=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,be(c)==a.id?c.mode=this.Z?"showing":"hidden":c.mode="disabled";Dl(this)}};
397
- q.te=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.B&&this.i){this.o.abr.enabled&&Xa("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.B.variants.find(function(e){return e.id==a.id});d&&he(d)&&($k(this,d,!1,b,c),this.qa=new te(d),gl(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,
398
- be(c)==a.id){El(this,c);break}};q.Te=function(){return Fl(this.Ec())};q.nf=function(){return Fl(this.jb())};q.Se=function(){return Array.from(Gl(this.Ec()))};q.mf=function(){return Array.from(Gl(this.jb()))};
399
- q.Kd=function(a,b){if(this.B&&this.F){this.qa=new ue(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.i.h,e=this.qa.create(this.B.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=Zd(f),this.te(c,!0)):Cl(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=gd(a);f=d=null;e=
400
- t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ge(g);gd(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?El(this,f):d&&El(this,d)}};
401
- q.Ld=function(a,b,c){c=void 0===c?!1:c;if(this.B&&this.F){if(this.ra=a,this.Pb=b||"",this.Za=c,(a=je(this.B.textStreams,this.ra,this.Pb,this.Za)[0]||null)&&a!=this.i.i&&(hk(this.j.h,a,!1),this.o.streaming.alwaysStreamText||this.td()))lj(this.i,a),Dl(this)}else{var d=gd(a);(a=this.jb().find(function(e){return gd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.se(a)}};
402
- q.Nf=function(a){if(this.B&&this.F){for(var b=null,c=t(this.B.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.qa=new ue(b.language,"",0,a),Cl(this))}};q.td=function(){var a=this.Z;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?sl(this).some(function(b){return"showing"==b.mode}):a};q.de=function(){return this.g&&this.g.src&&this.g.textTracks?wl(this).map(function(a){return de(a)}):[]};
403
- q.Ve=function(a){var b=gd(a),c=wl(this).filter(function(f){return gd(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})}
404
- function ul(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function wl(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
405
- q.Tf=function(a){a=!!a;if(this.Z!=a){this.Z=a;if(this.l==el)this.L.m.setTextVisibility(a),this.o.streaming.alwaysStreamText||(a?this.i.i||(a=je(this.B.textStreams,this.ra,this.Pb,this.Za),0<a.length&&(lj(this.i,a[0]),Dl(this))):hj(this.i));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")}kl(this)}};
406
- q.hf=function(){if(!this.Y())return null;var a=this.ea.l,b=0;if(this.F)b=this.F.l();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.B?new Date(1E3*(this.B.presentationTimeline.j+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
407
- q.ee=function(){if(!this.Y())return null;if(this.B)return new Date(1E3*this.B.presentationTimeline.j);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.zc=function(){if(this.l==el)return this.L.zc();var a={total:[],audio:[],video:[],text:[]};this.l==ql&&(a.total=Qh(this.g.buffered));return a};
408
- q.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:[]};Xk(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.j;b=Math.round(100*b);c.i=isNaN(c.i)?
409
- b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.j,b=Number(a.totalVideoFrames),c.T=Number(a.droppedVideoFrames),c.O=b,this.j.L=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.F?a.F:NaN):a=NaN;this.j.m=a;if(this.l==el){if(a=this.i.h)this.j.u=(this.H?this.H.i:1)*a.bandwidth;a&&a.video&&(c=this.j,b=a.video.height||NaN,c.Z=a.video.width||NaN,c.D=b);this.Y()&&(a=this.ee().valueOf()+1E3*this.ec().end,this.j.F=(Date.now()-a)/1E3);this.B&&this.B.presentationTimeline&&
410
- (this.j.I=this.B.presentationTimeline.g);a=this.u.getBandwidthEstimate();this.j.s=a}var d=this.j;a=d.Z;c=d.D;b=d.u;var e=d.O,f=d.T,g=d.L,h=d.s,k=d.i,l=d.l,m=d.H,n=d.j,p=ek(d.g,"playing"),r=ek(d.g,"paused"),v=ek(d.g,"buffering"),y=d.m,x=d.F,w=d.I,C=fk(d.g),D=[];d=t(d.h.g);for(var B=d.next();!B.done;B=d.next())B=B.value,D.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
398
+ v=m*n;y=f.l-f.startTime;x=f.i||y/v;w=f.startTime;D=C=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,C=B%m*p,D=Math.floor(B/m)*r);return F["return"]({imageHeight:l,imageWidth:k,height:r,positionX:C,positionY:D,startTime:w,duration:x,uris:f.oa(),width:p})}return F["return"](null)})};
399
+ q.se=function(a){if(this.B&&this.i){var b=this.B.textStreams.find(function(d){return d.id==a.id});b&&b!=this.i.i&&(gk(this.j.h,b,!1),kj(this.i,b),Cl(this),this.sa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=rl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,be(c)==a.id?c.mode=this.ea?"showing":"hidden":c.mode="disabled";Cl(this)}};
400
+ q.te=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.B&&this.i){this.o.abr.enabled&&Xa("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.B.variants.find(function(e){return e.id==a.id});d&&he(d)&&(Zk(this,d,!1,b,c),this.ra=new te(d),fl(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,
401
+ be(c)==a.id){Dl(this,c);break}};q.Te=function(){return El(this.Ec())};q.nf=function(){return El(this.jb())};q.Se=function(){return Array.from(Fl(this.Ec()))};q.mf=function(){return Array.from(Fl(this.jb()))};
402
+ q.Kd=function(a,b){if(this.B&&this.F){this.ra=new ue(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.i.h,e=this.ra.create(this.B.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=Zd(f),this.te(c,!0)):Bl(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=gd(a);f=d=null;e=
403
+ t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ge(g);gd(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Dl(this,f):d&&Dl(this,d)}};
404
+ q.Ld=function(a,b,c){c=void 0===c?!1:c;if(this.B&&this.F){if(this.sa=a,this.Qb=b||"",this.Pb=c,(a=je(this.B.textStreams,this.sa,this.Qb,this.Pb)[0]||null)&&a!=this.i.i&&(gk(this.j.h,a,!1),this.o.streaming.alwaysStreamText||this.td()))kj(this.i,a),Cl(this)}else{var d=gd(a);(a=this.jb().find(function(e){return gd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.se(a)}};
405
+ q.Nf=function(a){if(this.B&&this.F){for(var b=null,c=t(this.B.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.ra=new ue(b.language,"",0,a),Bl(this))}};q.td=function(){var a=this.ea;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?rl(this).some(function(b){return"showing"==b.mode}):a};q.de=function(){return this.g&&this.g.src&&this.g.textTracks?vl(this).map(function(a){return de(a)}):[]};
406
+ q.Ve=function(a){var b=gd(a),c=vl(this).filter(function(f){return gd(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 rl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
407
+ function tl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function vl(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
408
+ q.Tf=function(a){a=!!a;if(this.ea!=a){this.ea=a;if(this.l==dl)this.L.m.setTextVisibility(a),this.o.streaming.alwaysStreamText||(a?this.i.i||(a=je(this.B.textStreams,this.sa,this.Qb,this.Pb),0<a.length&&(kj(this.i,a[0]),Cl(this))):gj(this.i));else if(this.g&&this.g.src&&this.g.textTracks){var b=rl(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")}jl(this)}};
409
+ q.hf=function(){if(!this.Z())return null;var a=this.la.l,b=0;if(this.F)b=this.F.l();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.B?new Date(1E3*(this.B.presentationTimeline.j+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
410
+ q.ee=function(){if(!this.Z())return null;if(this.B)return new Date(1E3*this.B.presentationTimeline.j);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.zc=function(){if(this.l==dl)return this.L.zc();var a={total:[],audio:[],video:[],text:[]};this.l==pl&&(a.total=Oh(this.g.buffered));return a};
411
+ q.getStats=function(){if(this.l!=dl&&this.l!=pl)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:[]};Wk(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.j;b=Math.round(100*b);c.i=isNaN(c.i)?
412
+ b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.j,b=Number(a.totalVideoFrames),c.V=Number(a.droppedVideoFrames),c.O=b,this.j.L=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.F?a.F:NaN):a=NaN;this.j.m=a;if(this.l==dl){if(a=this.i.h)this.j.u=(this.H?this.H.i:1)*a.bandwidth;a&&a.video&&(c=this.j,b=a.video.height||NaN,c.Y=a.video.width||NaN,c.D=b);this.Z()&&(a=this.ee().valueOf()+1E3*this.fc().end,this.j.F=(Date.now()-a)/1E3);this.B&&this.B.presentationTimeline&&
413
+ (this.j.I=this.B.presentationTimeline.g);a=this.u.getBandwidthEstimate();this.j.s=a}var d=this.j;a=d.Y;c=d.D;b=d.u;var e=d.O,f=d.V,g=d.L,h=d.s,k=d.i,l=d.l,m=d.H,n=d.j,p=dk(d.g,"playing"),r=dk(d.g,"paused"),v=dk(d.g,"buffering"),y=d.m,x=d.F,w=d.I,C=ek(d.g),D=[];d=t(d.h.g);for(var B=d.next();!B.done;B=d.next())B=B.value,D.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
411
414
  estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:r,bufferingTime:v,licenseTime:y,liveLatency:x,maxSegmentDuration:w,stateHistory:C,switchHistory:D}};
412
- q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Tb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=el&&this.l!=ql)throw new N(1,7,7004);if(!d){var h=fg(a);d=Hl[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=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.jb().find(function(k){return k.language==
413
- b&&k.label==(f||"")&&k.kind==c}))return nl(this),a;throw new N(1,2,2012);}h=this.B.presentationTimeline.getDuration();if(Infinity==h)throw new N(1,4,4033);a={id:this.od++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:wc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
414
- closedCaptions:null};if(!Yc(Tc(a.mimeType,a.codecs)))throw new N(2,2,2014,d);this.B.textStreams.push(a);nl(this);return $d(a)};
415
- q.Ge=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,v,y,x,w,C;return K(function(D){switch(D.g){case 1:if(h.l!=el&&h.l!=ql)throw new N(1,7,7004);if(d){D.v(2);break}return u(D,Il(h,a),3);case 3:d=D.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=ql){D.v(4);break}g&&(c="forced");return u(D,Jl(h,a,b,c,d,f||"",k),5);case 5:l=h.jb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return nl(h),D["return"](m);throw new N(1,2,2012);case 4:n=
416
- xc;p=h.B.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){D.v(6);break}return u(D,Kl(a,h.P,h.o.streaming.retryParameters),7);case 7:r=D.h,v=Ll(h,r,d,k),y=new Blob([v],{type:"text/vtt"}),a=Vh(y),d="text/vtt";case 6:x={id:h.od++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mi(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.ba,primary:!1,trickModeVideo:null,
417
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Tc(x.mimeType,x.codecs);C=Yc(w);if(!C)throw new N(2,2,2014,d);h.B.textStreams.push(x);nl(h);return D["return"]($d(x))}})};
418
- q.Fe=function(a,b,c){var d=this,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:if(d.l!=el&&d.l!=ql)throw new N(1,7,7004);if(c){n.v(2);break}return u(n,Il(d,a),3);case 3:c=n.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(p){}return u(n,Jl(d,a,b,"chapters",c,"",e),4);case 4:f=d.de();if(g=f.find(function(p){return p.language==b})){h=wl(d);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,pl(d,m);return n["return"](g)}throw new N(1,2,2012);}})};
419
- function Il(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=fg(b);if(d=Hl[c])return e["return"](d);A(e,2);return u(e,hg(b,a.P,a.o.streaming.retryParameters),4);case 4:d=e.h;wa(e,3);break;case 2:E(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
420
- function Jl(a,b,c,d,e,f,g){var h,k,l,m;return K(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,Kl(b,a.P,a.o.streaming.retryParameters),3):n.v(2);2!=n.g&&(h=n.h,k=Ll(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Vh(l),e="text/vtt");m=document.createElement("track");m.src=b;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);z(n)})}
421
- function Kl(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=bf,e=We([a],c),e.method="GET",u(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function Ll(a,b,c,d){var e=Zc[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Ob(b),b=c.parseMedia(b,a),Uj(b,d);throw new N(2,2,2014,c);}q.Od=function(a,b){this.nd.width=a;this.nd.height=b};
422
- q.Id=function(){if(this.l==el){var a=this.i;if(a.J.g)a=!1;else if(a.j)a=!1;else{for(var b=t(a.g.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Zb&&(c.Zb=!1,gj(a,c,.1));a=!0}}else a=!1;return a};q.af=function(){Xa("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.B};q.bf=function(){return this.uc};
423
- function kk(a){var b=Zj();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.Y()&&d.includes(c.code)&&(c.severity=1,a.Id())};b.textDisplayFactory=function(){return a.qc?new Nj(a.g,a.qc):new Ij(a.g)};return b}q.xe=function(a){this.qc=a};
424
- function Qk(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 Ni;h={id:a.od++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
425
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:wc,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 Pk(a,b){return K(function(c){if(1==c.g)return u(c,Ml(a,b),2);Bl(a,b);z(c)})}
426
- function Ml(a,b){var c;return K(function(d){if(1==d.g)return c=a.i?a.i.h:null,u(d,Od(c,b),2);ml(b);z(d)})}
427
- function Bl(a,b){if(a.l!=Ak){for(var c=a.o.restrictions,d=a.nd,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Nd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.i&&nl(a);if((c=a.m?a.m.i:null)&&a.m.m)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=
428
- f.next())g=g.value,If(a.m,g.initDataType,g.initData);Nl(a,b)}}
429
- function hl(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n;return K(function(p){if(1==p.g)return k?u(p,k.createSegmentIndex(),2):p["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return p["return"](null);n=m.startTime;return p["return"](n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
430
- function Kk(a){var b=a.sd();if(a.j&&a.I&&a.F){var c=a.H;c.j=b;Pi(c);Xk(a)}b=(new Map).set("buffering",b);a.dispatchEvent(xk(Ol,b))}function Yk(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=xk(Pl),a.dispatchEvent(b))}function Xk(a){if(a.j&&a.I){var b=a.j.g;a.I.g==Ae?dk(b,"buffering"):a.g.paused?dk(b,"paused"):a.g.ended?dk(b,"ended"):dk(b,"playing")}}
431
- function gl(a){try{Nl(a,a.B)}catch(c){return Ik(a,c),!1}var b=a.B.variants.filter(function(c){return he(c)});b=a.qa.create(b);a.u.setVariants(Array.from(b.values()));return!0}function Cl(a){var b;(b=gl(a)?a.u.chooseVariant():null)&&$k(a,b,!0,!0,0)}
432
- function $k(a,b,c,d,e){var f=a.i.h;if(b==f)d&&kj(a.i,b,d,e,!0);else{var g=a.j.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));kj(a.i,b,d,e);d=null;f&&(d=Zd(f));b=Zd(b);c?il(a,d,b):Ql(a,d,b)}}function El(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);Ql(a,c,d)}
433
- function jl(a,b,c){a=gd(a.o.preferredTextLanguage);b=gd(b.language);c=gd(c.language);return fd(c,a)&&!fd(b,c)}function il(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=xk(Rl,b);Sl(a,b)}function nl(a){var b=xk(Tl);Sl(a,b)}function Ql(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=xk(Ul,b);Sl(a,b)}function Dl(a){var b=xk(Vl);Sl(a,b)}function kl(a){var b=xk(Wl);Sl(a,b)}function ll(a){var b=(new Map).set("newStatus",a.o.abr.enabled);Sl(a,xk(Xl,b))}
434
- function Ik(a,b){if(a.l!=Ak){var c=xk(Yl,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Nk(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(xk(b,c))}
435
- function Hk(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)}
436
- function Uk(a,b){if(a.i){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.B.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&&!Zl.includes(l)}h!=f.allowedByKeySystem&&
437
- (e=!0)}}}e&&gl(a);(d=a.i.h)&&!d.allowedByKeySystem&&Cl(a);e&&nl(a)}}function Vk(a,b,c){if(a.s&&a.s.onExpirationUpdated)a.s.onExpirationUpdated(b,c);b=xk($l);a.dispatchEvent(b)}function Zk(a,b,c){0<b&&(a.Y()||a.we(b));b=a.getDuration();c<b&&(a.Y()||a.Ma(c))}
438
- function Nl(a,b){var c=a.m?a.m.Bc():{},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 r=c[d?"00":p];r?Zl.includes(r)&&h.add(r):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
439
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function ml(a){if(!a.variants.some(he))throw new N(2,4,4032);}function Sl(a,b){K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Ak&&a.dispatchEvent(b);z(c)})}function Gl(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(gd(c.language)):b.add("und");return b}
440
- function Fl(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=gd(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));
441
- h.push({language:l,role:n,label:p})}});return h}function Bk(){return new N(2,7,7E3)}function wk(a,b,c,d,e,f){return d==a&&e.G==f.G&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Cj(){return{G:null,mimeType:null,startTime:null,Rd:NaN,uri:null}}function Ck(a){return new Promise(function(b,c){a.ob=function(){return c(Bk())};a.Hc=function(){return b()};a.onError=function(d){return c(d)};a.Jc=function(){return c(Bk())}})}M("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.xe;
415
+ q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Tb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=dl&&this.l!=pl)throw new N(1,7,7004);if(!d){var h=fg(a);d=Gl[h];if(!d)throw new N(1,2,2011,h);}if(this.l==pl){if("text/vtt"!=d)throw new N(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=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.jb().find(function(k){return k.language==
416
+ b&&k.label==(f||"")&&k.kind==c}))return ml(this),a;throw new N(1,2,2012);}h=this.B.presentationTimeline.getDuration();if(Infinity==h)throw new N(1,4,4033);a={id:this.od++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:wc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
417
+ closedCaptions:null};if(!Yc(Tc(a.mimeType,a.codecs)))throw new N(2,2,2014,d);this.B.textStreams.push(a);ml(this);return $d(a)};
418
+ q.Ge=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,v,y,x,w,C;return K(function(D){switch(D.g){case 1:if(h.l!=dl&&h.l!=pl)throw new N(1,7,7004);if(d){D.v(2);break}return u(D,Hl(h,a),3);case 3:d=D.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=pl){D.v(4);break}g&&(c="forced");return u(D,Il(h,a,b,c,d,f||"",k),5);case 5:l=h.jb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return ml(h),D["return"](m);throw new N(1,2,2012);case 4:n=
419
+ xc;p=h.B.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){D.v(6);break}return u(D,Jl(a,h.P,h.o.streaming.retryParameters),7);case 7:r=D.h,v=Kl(h,r,d,k),y=new Blob([v],{type:"text/vtt"}),a=Vh(y),d="text/vtt";case 6:x={id:h.od++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mi(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.ba,primary:!1,trickModeVideo:null,
420
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Tc(x.mimeType,x.codecs);C=Yc(w);if(!C)throw new N(2,2,2014,d);h.B.textStreams.push(x);ml(h);return D["return"]($d(x))}})};
421
+ q.Fe=function(a,b,c){var d=this,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:if(d.l!=dl&&d.l!=pl)throw new N(1,7,7004);if(c){n.v(2);break}return u(n,Hl(d,a),3);case 3:c=n.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(p){}return u(n,Il(d,a,b,"chapters",c,"",e),4);case 4:f=d.de();if(g=f.find(function(p){return p.language==b})){h=vl(d);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,ol(d,m);return n["return"](g)}throw new N(1,2,2012);}})};
422
+ function Hl(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=fg(b);if(d=Gl[c])return e["return"](d);A(e,2);return u(e,hg(b,a.P,a.o.streaming.retryParameters),4);case 4:d=e.h;wa(e,3);break;case 2:E(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
423
+ function Il(a,b,c,d,e,f,g){var h,k,l,m;return K(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,Jl(b,a.P,a.o.streaming.retryParameters),3):n.v(2);2!=n.g&&(h=n.h,k=Kl(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Vh(l),e="text/vtt");m=document.createElement("track");m.src=b;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);z(n)})}
424
+ function Jl(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=bf,e=We([a],c),e.method="GET",u(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function Kl(a,b,c,d){var e=Zc[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Ob(b),b=c.parseMedia(b,a),Tj(b,d);throw new N(2,2,2014,c);}q.Od=function(a,b){this.nd.width=a;this.nd.height=b};
425
+ q.Id=function(){if(this.l==dl){var a=this.i;if(a.J.g)a=!1;else if(a.j)a=!1;else{for(var b=t(a.g.values()),c=b.next();!c.done;c=b.next())c=c.value,c.$b&&(c.$b=!1,fj(a,c,.1));a=!0}}else a=!1;return a};q.af=function(){Xa("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.B};q.bf=function(){return this.uc};
426
+ function jk(a){var b=Yj();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.Z()&&d.includes(c.code)&&(c.severity=1,a.Id())};b.textDisplayFactory=function(){return a.rc?new Mj(a.g,a.rc):new Hj(a.g)};return b}q.xe=function(a){this.rc=a};
427
+ function Pk(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 Ni;h={id:a.od++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
428
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:wc,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 Ok(a,b){return K(function(c){if(1==c.g)return u(c,Ll(a,b),2);Al(a,b);z(c)})}
429
+ function Ll(a,b){var c;return K(function(d){if(1==d.g)return c=a.i?a.i.h:null,u(d,Od(c,b),2);ll(b);z(d)})}
430
+ function Al(a,b){if(a.l!=zk){for(var c=a.o.restrictions,d=a.nd,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Nd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.i&&ml(a);if((c=a.m?a.m.i:null)&&a.m.m)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=
431
+ f.next())g=g.value,If(a.m,g.initDataType,g.initData);Ml(a,b)}}
432
+ function gl(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n;return K(function(p){if(1==p.g)return k?u(p,k.createSegmentIndex(),2):p["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return p["return"](null);n=m.startTime;return p["return"](n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
433
+ function Jk(a){var b=a.sd();if(a.j&&a.I&&a.F){var c=a.H;c.j=b;Pi(c);Wk(a)}b=(new Map).set("buffering",b);a.dispatchEvent(wk(Nl,b))}function Xk(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=wk(Ol),a.dispatchEvent(b))}function Wk(a){if(a.j&&a.I){var b=a.j.g;a.I.g==Ae?ck(b,"buffering"):a.g.paused?ck(b,"paused"):a.g.ended?ck(b,"ended"):ck(b,"playing")}}
434
+ function fl(a){try{Ml(a,a.B)}catch(c){return Hk(a,c),!1}var b=a.B.variants.filter(function(c){return he(c)});b=a.ra.create(b);a.u.setVariants(Array.from(b.values()));return!0}function Bl(a){var b;(b=fl(a)?a.u.chooseVariant():null)&&Zk(a,b,!0,!0,0)}
435
+ function Zk(a,b,c,d,e){var f=a.i.h;if(b==f)d&&jj(a.i,b,d,e,!0);else{var g=a.j.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));jj(a.i,b,d,e);d=null;f&&(d=Zd(f));b=Zd(b);c?hl(a,d,b):Pl(a,d,b)}}function Dl(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);Pl(a,c,d)}
436
+ function il(a,b,c){a=gd(a.o.preferredTextLanguage);b=gd(b.language);c=gd(c.language);return fd(c,a)&&!fd(b,c)}function hl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=wk(Ql,b);Rl(a,b)}function ml(a){var b=wk(Sl);Rl(a,b)}function Pl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=wk(Tl,b);Rl(a,b)}function Cl(a){var b=wk(Ul);Rl(a,b)}function jl(a){var b=wk(Vl);Rl(a,b)}function kl(a){var b=(new Map).set("newStatus",a.o.abr.enabled);Rl(a,wk(Wl,b))}
437
+ function Hk(a,b){if(a.l!=zk){var c=wk(Xl,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Mk(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(wk(b,c))}
438
+ function Gk(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)}
439
+ function Tk(a,b){if(a.i){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.B.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&&!Yl.includes(l)}h!=f.allowedByKeySystem&&
440
+ (e=!0)}}}e&&fl(a);(d=a.i.h)&&!d.allowedByKeySystem&&Bl(a);e&&ml(a)}}function Uk(a,b,c){if(a.s&&a.s.onExpirationUpdated)a.s.onExpirationUpdated(b,c);b=wk(Zl);a.dispatchEvent(b)}function Yk(a,b,c){0<b&&(a.Z()||a.we(b));b=a.getDuration();c<b&&(a.Z()||a.Ma(c))}
441
+ function Ml(a,b){var c=a.m?a.m.Bc():{},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 r=c[d?"00":p];r?Yl.includes(r)&&h.add(r):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
442
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function ll(a){if(!a.variants.some(he))throw new N(2,4,4032);}function Rl(a,b){K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=zk&&a.dispatchEvent(b);z(c)})}function Fl(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(gd(c.language)):b.add("und");return b}
443
+ function El(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=gd(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));
444
+ h.push({language:l,role:n,label:p})}});return h}function Ak(){return new N(2,7,7E3)}function vk(a,b,c,d,e,f){return d==a&&e.G==f.G&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Bj(){return{G:null,mimeType:null,startTime:null,Rd:NaN,uri:null}}function Bk(a){return new Promise(function(b,c){a.ob=function(){return c(Ak())};a.Hc=function(){return b()};a.onError=function(d){return c(d)};a.Jc=function(){return c(Ak())}})}M("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.xe;
442
445
  V.prototype.getManifestParserFactory=V.prototype.bf;V.prototype.getManifest=V.prototype.af;V.prototype.retryStreaming=V.prototype.Id;V.prototype.setMaxHardwareResolution=V.prototype.Od;V.prototype.addChaptersTrack=V.prototype.Fe;V.prototype.addTextTrackAsync=V.prototype.Ge;V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.getStats=V.prototype.getStats;V.prototype.getBufferedInfo=V.prototype.zc;V.prototype.getPresentationStartTimeAsDate=V.prototype.ee;
443
446
  V.prototype.getPlayheadTimeAsDate=V.prototype.hf;V.prototype.setTextTrackVisibility=V.prototype.Tf;V.prototype.getChapters=V.prototype.Ve;V.prototype.getChaptersTracks=V.prototype.de;V.prototype.isTextTrackVisible=V.prototype.td;V.prototype.selectVariantsByLabel=V.prototype.Nf;V.prototype.selectTextLanguage=V.prototype.Ld;V.prototype.selectAudioLanguage=V.prototype.Kd;V.prototype.getTextLanguages=V.prototype.mf;V.prototype.getAudioLanguages=V.prototype.Se;V.prototype.getTextLanguagesAndRoles=V.prototype.nf;
444
447
  V.prototype.getAudioLanguagesAndRoles=V.prototype.Te;V.prototype.selectVariantTrack=V.prototype.te;V.prototype.selectTextTrack=V.prototype.se;V.prototype.getThumbnails=V.prototype.pf;V.prototype.getImageTracks=V.prototype.Ye;V.prototype.getTextTracks=V.prototype.jb;V.prototype.getVariantTracks=V.prototype.Ec;V.prototype.cancelTrickPlay=V.prototype.Ke;V.prototype.trickPlay=V.prototype.Vf;V.prototype.getPlaybackRate=V.prototype.ff;V.prototype.isBuffering=V.prototype.sd;V.prototype.getKeyStatuses=V.prototype.Bc;
445
- V.prototype.getExpiration=V.prototype.Vb;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.tf;V.prototype.seekRange=V.prototype.ec;V.prototype.isAudioOnly=V.prototype.vf;V.prototype.isInProgress=V.prototype.mb;V.prototype.isLive=V.prototype.Y;V.prototype.getAdManager=V.prototype.ce;V.prototype.getAssetUri=V.prototype.pd;V.prototype.getNetworkingEngine=V.prototype.Wb;V.prototype.getMediaElement=V.prototype.df;
446
- V.prototype.getLoadMode=V.prototype.$e;V.prototype.resetConfiguration=V.prototype.Mf;V.prototype.getBufferFullness=V.prototype.Ue;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;V.prototype.load=V.prototype.load;V.prototype.unload=V.prototype.Td;V.prototype.detach=V.prototype.detach;V.prototype.attach=V.prototype.Rb;
448
+ V.prototype.getExpiration=V.prototype.Wb;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.tf;V.prototype.seekRange=V.prototype.fc;V.prototype.isAudioOnly=V.prototype.vf;V.prototype.isInProgress=V.prototype.mb;V.prototype.isLive=V.prototype.Z;V.prototype.getAdManager=V.prototype.ce;V.prototype.getAssetUri=V.prototype.pd;V.prototype.getNetworkingEngine=V.prototype.Xb;V.prototype.getMediaElement=V.prototype.df;
449
+ V.prototype.getLoadMode=V.prototype.$e;V.prototype.resetConfiguration=V.prototype.Mf;V.prototype.getBufferFullness=V.prototype.Ue;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;V.prototype.load=V.prototype.load;V.prototype.unload=V.prototype.Td;V.prototype.detach=V.prototype.detach;V.prototype.attach=V.prototype.Sb;
447
450
  V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?u(h,Yf(),3):h.v(2);2!=h.g&&(b=h.h);var k={};if(qd()){for(var l in eg)k[l]=!0;for(var m in gg)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]=qd()?!!eg[n]:rd(n);for(var p in l)k[p]=
448
451
  qd()?!!gg[p]:rd(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(","));
449
- for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=qd()?Yc(l)?!0:MediaSource.isTypeSupported(l)||Pc(l):rd(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=am;for(g in f)e[g]=f[g]();return h["return"](e)})};
452
+ for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=qd()?Yc(l)?!0:MediaSource.isTypeSupported(l)||Pc(l):rd(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=$l;for(g in f)e[g]=f[g]();return h["return"](e)})};
450
453
  V.isBrowserSupported=function(){window.Promise||Xa("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Xa("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||ud("Trident/"))return!1;var a=xd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
451
- !1:qd()?!0:rd("application/x-mpegurl")};V.setAdManagerFactory=function(a){mk=a};V.registerSupportPlugin=function(a,b){am[a]=b};V.prototype.destroy=V.prototype.destroy;
452
- var Xl="abrstatuschanged",Rl="adaptation",Ol="buffering",Wk="drmsessionupdate",zj="emsg",Yl="error",$l="expirationupdated",Fk="loaded",Dk="loading",Rk="manifestparsed",vl="metadata",yk="onstatechange",zk="onstateidle",Pl="ratechange",fl="streaming",Vl="textchanged",Wl="texttrackvisibility",Ok="timelineregionadded",yl="timelineregionenter",zl="timelineregionexit",Tl="trackschanged",Jk="unloading",Ul="variantchanged",bm={bg:Xl,cg:Rl,dg:Ol,eg:Wk,gg:zj,Error:Yl,hg:$l,ig:"largegap",jg:Fk,kg:Dk,lg:Rk,Metadata:vl,
453
- mg:yk,ng:zk,og:Pl,pg:"sessiondata",qg:fl,rg:Vl,sg:Wl,tg:Ok,ug:yl,vg:zl,wg:Tl,xg:Jk,yg:Ul},Ak=0,jk=1,el=2,ql=3;V.LoadMode={DESTROYED:Ak,NOT_LOADED:jk,MEDIA_SOURCE:el,SRC_EQUALS:ql};V.version="v3.2.3";var cm=["3","2"];Ub=new function(a){this.g=a;this.i=Vb;this.h=Wb}(new Sb(Number(cm[0]),Number(cm[1])));
454
- var Zl=["output-restricted","internal-error"],am={},mk=null,Gk={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"},Hl={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
455
- ssa:"text/x-ssa",ass:"text/x-ssa"};function dm(){this.h=[];this.j=this.i=this.g=0};function W(a,b){var c=this;this.i=a;this.g=b;this.j=!1;this.l=this.g.getVolume();this.h=new ef;this.h.A(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.j=!0});this.h.A(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.j=!1})}q=W.prototype;q.getDuration=function(){return this.i.getDuration()};q.getMinSuggestedDuration=function(){return this.i.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.j};
454
+ !1:qd()?!0:rd("application/x-mpegurl")};V.setAdManagerFactory=function(a){lk=a};V.registerSupportPlugin=function(a,b){$l[a]=b};V.prototype.destroy=V.prototype.destroy;
455
+ var Wl="abrstatuschanged",Ql="adaptation",Nl="buffering",Vk="drmsessionupdate",yj="emsg",Xl="error",Zl="expirationupdated",Ek="loaded",Ck="loading",Qk="manifestparsed",ul="metadata",xk="onstatechange",yk="onstateidle",Ol="ratechange",el="streaming",Ul="textchanged",Vl="texttrackvisibility",Nk="timelineregionadded",xl="timelineregionenter",yl="timelineregionexit",Sl="trackschanged",Ik="unloading",Tl="variantchanged",am={bg:Wl,cg:Ql,dg:Nl,eg:Vk,gg:yj,Error:Xl,hg:Zl,ig:"largegap",jg:Ek,kg:Ck,lg:Qk,Metadata:ul,
456
+ mg:xk,ng:yk,og:Ol,pg:"sessiondata",qg:el,rg:Ul,sg:Vl,tg:Nk,ug:xl,vg:yl,wg:Sl,xg:Ik,yg:Tl},zk=0,ik=1,dl=2,pl=3;V.LoadMode={DESTROYED:zk,NOT_LOADED:ik,MEDIA_SOURCE:dl,SRC_EQUALS:pl};V.version="v3.2.4";var bm=["3","2"];Ub=new function(a){this.g=a;this.i=Vb;this.h=Wb}(new Sb(Number(bm[0]),Number(bm[1])));
457
+ var Yl=["output-restricted","internal-error"],$l={},lk=null,Fk={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"},Gl={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
458
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function cm(){this.h=[];this.j=this.i=this.g=0};function W(a,b){var c=this;this.i=a;this.g=b;this.j=!1;this.l=this.g.getVolume();this.h=new ef;this.h.A(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.j=!0});this.h.A(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.j=!1})}q=W.prototype;q.getDuration=function(){return this.i.getDuration()};q.getMinSuggestedDuration=function(){return this.i.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.j};
456
459
  q.isSkippable=function(){return 0<=this.i.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
457
460
  q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.i=null};M("shaka.ads.ClientSideAd",W);
458
461
  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;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;
459
- W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function em(a,b,c,d){var e=this;this.m=a;this.g=b;this.u=null;this.D=NaN;this.j=d;this.s=null;this.h=new ef;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.g);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.3");this.i=null;this.h.xa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){fm(e,f)});this.h.A(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
460
- function(f){gm(e,f)});this.g.onended=function(){e.l.contentComplete()}}em.prototype.stop=function(){this.i&&this.i.stop();this.m&&Mj(this.m)};em.prototype.release=function(){this.stop();this.u&&this.u.disconnect();this.h&&this.h.release();this.i&&this.i.destroy();this.l.destroy()};function gm(a,b){b.getError();hm(a,null);a.j(new R("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
461
- function fm(a,b){a.j(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.D)));a.i=b.getAdsManager(a.g);a.j(new R("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.i)));var c=a.i.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 R("ad-cue-points-changed",(new Map).set("cuepoints",d)))}im(a);try{a.i.init(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
462
- a.h.A(a.g,"loadeddata",function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.u=new ResizeObserver(function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.u.observe(a.g)),a.i.start()}catch(f){hm(a,null)}}
463
- function im(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new R(d,e))}a.h.A(a.i,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){gm(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){jm(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.STARTED,function(c){jm(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.A(a.i,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.A(a.i,google.ima.AdEvent.Type.THIRD_QUARTILE,
464
- function(c){b(c,"ad-third-quartile")});a.h.A(a.i,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.A(a.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){hm(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){hm(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.A(a.i,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.A(a.i,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
462
+ W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function dm(a,b,c,d){var e=this;this.m=a;this.g=b;this.u=null;this.D=NaN;this.j=d;this.s=null;this.h=new ef;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.g);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.4");this.i=null;this.h.xa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){em(e,f)});this.h.A(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
463
+ function(f){fm(e,f)});this.g.onended=function(){e.l.contentComplete()}}dm.prototype.stop=function(){this.i&&this.i.stop();this.m&&Lj(this.m)};dm.prototype.release=function(){this.stop();this.u&&this.u.disconnect();this.h&&this.h.release();this.i&&this.i.destroy();this.l.destroy()};function fm(a,b){b.getError();gm(a,null);a.j(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
464
+ function em(a,b){a.j(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.D)));a.i=b.getAdsManager(a.g);a.j(new Q("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.i)));var c=a.i.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)))}hm(a);try{a.i.init(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
465
+ a.h.A(a.g,"loadeddata",function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.u=new ResizeObserver(function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.u.observe(a.g)),a.i.start()}catch(f){gm(a,null)}}
466
+ function hm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new Q(d,e))}a.h.A(a.i,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){fm(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){im(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.STARTED,function(c){im(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.A(a.i,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.A(a.i,google.ima.AdEvent.Type.THIRD_QUARTILE,
467
+ function(c){b(c,"ad-third-quartile")});a.h.A(a.i,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.A(a.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){gm(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){gm(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.A(a.i,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.A(a.i,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
465
468
  a.h.A(a.i,google.ima.AdEvent.Type.PAUSED,function(c){a.s.j=!0;b(c,"ad-paused")});a.h.A(a.i,google.ima.AdEvent.Type.RESUMED,function(c){a.s.j=!1;b(c,"ad-resumed")});a.h.A(a.i,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.A(a.i,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.A(a.i,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.A(a.i,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.A(a.i,
466
469
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.A(a.i,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.A(a.i,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.A(a.i,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.A(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.A(a.i,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.A(a.i,google.ima.AdEvent.Type.AD_METADATA,
467
- function(c){b(c,"ad-metadata")});a.h.A(a.i,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.A(a.i,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.A(a.i,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function jm(a,b){var c=b.getAd();a.s=new W(c,a.i);c=(new Map).set("ad",a.s).set("sdkAdObject",c).set("originalEvent",b);a.j(new R("ad-started",c));a.m.setAttribute("ad-active","true");a.g.pause()}
468
- function hm(a,b){a.j(new R("ad-stopped",(new Map).set("originalEvent",b)));a.m.removeAttribute("ad-active");a.g.play()};function X(a,b){this.i=a;this.h=null;this.g=b}q=X.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
470
+ function(c){b(c,"ad-metadata")});a.h.A(a.i,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.A(a.i,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.A(a.i,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function im(a,b){var c=b.getAd();a.s=new W(c,a.i);c=(new Map).set("ad",a.s).set("sdkAdObject",c).set("originalEvent",b);a.j(new Q("ad-started",c));a.m.setAttribute("ad-active","true");a.g.pause()}
471
+ function gm(a,b){a.j(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.m.removeAttribute("ad-active");a.g.play()};function X(a,b){this.i=a;this.h=null;this.g=b}q=X.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
469
472
  q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};
470
473
  q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",X);X.prototype.release=X.prototype.release;X.prototype.getPositionInSequence=X.prototype.getPositionInSequence;X.prototype.getSequenceLength=X.prototype.getSequenceLength;X.prototype.setMuted=X.prototype.setMuted;X.prototype.resize=X.prototype.resize;X.prototype.isMuted=X.prototype.isMuted;X.prototype.setVolume=X.prototype.setVolume;
471
474
  X.prototype.getVolume=X.prototype.getVolume;X.prototype.play=X.prototype.play;X.prototype.pause=X.prototype.pause;X.prototype.skip=X.prototype.skip;X.prototype.canSkipNow=X.prototype.canSkipNow;X.prototype.getTimeUntilSkippable=X.prototype.getTimeUntilSkippable;X.prototype.isSkippable=X.prototype.isSkippable;X.prototype.isPaused=X.prototype.isPaused;X.prototype.getRemainingTime=X.prototype.getRemainingTime;X.prototype.getMinSuggestedDuration=X.prototype.getMinSuggestedDuration;
472
- X.prototype.getDuration=X.prototype.getDuration;function km(a,b,c,d){var e=this;this.u=a;this.g=b;this.l=null;this.L=NaN;this.j=d;this.I=!1;this.D=this.m=this.s=null;this.F="";this.H=[];this.h=new ef;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.i=new google.ima.dai.api.StreamManager(this.g,this.u,a);this.j(new R("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.i)));this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){lm(e,f)});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
473
- e.l.resolve(e.F):e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new X(f,e.g);e.D&&(e.m.h=e.D);e.j(new R("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
474
- var f=e.g.currentTime;e.s&&e.s>f&&(e.g.currentTime=e.s,e.s=null)});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.D=f.getStreamData().adProgressData;e.m&&(e.m.h=e.D)});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.j(new R("ad-first-quartile"))});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.j(new R("ad-midpoint"))});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.j(new R("ad-third-quartile"))});
475
- this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.j(new R("ad-complete"));e.j(new R("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.j(new R("ad-skipped"));e.j(new R("ad-stopped"))});this.h.A(this.i,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.H=
476
- f;e.j(new R("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}km.prototype.stop=function(){this.F="";this.s=null;this.H=[]};km.prototype.release=function(){this.stop();this.h&&this.h.release()};km.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.i.onTimedMetadata(b)}};
477
- function lm(a,b){a.j(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.L)));var c=b.getStreamData().url;a.l.resolve(c);a.l=null;a.I||a.h.A(a.g,"seeked",function(){var d=a.g.currentTime;if(0!=d){a.i.streamTimeForContentTime(d);var e=a.i.previousCuePointForStreamTime(d);e&&!e.played&&(a.s=d,a.g.currentTime=e.start)}})};function Y(){Ne.call(this);this.g=this.h=null;this.j=new dm;this.i=navigator.language}ra(Y,Ne);q=Y.prototype;q.setLocale=function(a){this.i=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.h&&this.h.release();this.h=new em(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
478
- q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null)};q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new R("ad-stopped"));this.j=new dm};q.requestClientSideAds=function(a){if(!this.h)throw new N(1,10,10001);var b=this.h;b.D=Date.now()/1E3;b.l.requestAds(a)};
479
- q.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 km(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
480
- q.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)&&Xa('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.2.3";c=this.g;var d=b;c.l?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
481
- (c.I=!0),c.l=new yc,c.i.requestStream(a),c.F=d||"",c.L=Date.now()/1E3,c=c.l);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Xa('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.2.3";this.g.i.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.H};
475
+ X.prototype.getDuration=X.prototype.getDuration;function jm(a,b,c,d){var e=this;this.u=a;this.g=b;this.l=null;this.L=NaN;this.j=d;this.I=!1;this.D=this.m=this.s=null;this.F="";this.H=[];this.h=new ef;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.i=new google.ima.dai.api.StreamManager(this.g,this.u,a);this.j(new Q("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.i)));this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){km(e,f)});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
476
+ e.l.resolve(e.F):e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new X(f,e.g);e.D&&(e.m.h=e.D);e.j(new Q("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
477
+ var f=e.g.currentTime;e.s&&e.s>f&&(e.g.currentTime=e.s,e.s=null)});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.D=f.getStreamData().adProgressData;e.m&&(e.m.h=e.D)});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.j(new Q("ad-first-quartile"))});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.j(new Q("ad-midpoint"))});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.j(new Q("ad-third-quartile"))});
478
+ this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.j(new Q("ad-complete"));e.j(new Q("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.j(new Q("ad-skipped"));e.j(new Q("ad-stopped"))});this.h.A(this.i,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.H=
479
+ f;e.j(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}jm.prototype.stop=function(){this.F="";this.s=null;this.H=[]};jm.prototype.release=function(){this.stop();this.h&&this.h.release()};jm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.i.onTimedMetadata(b)}};
480
+ function km(a,b){a.j(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.L)));var c=b.getStreamData().url;a.l.resolve(c);a.l=null;a.I||a.h.A(a.g,"seeked",function(){var d=a.g.currentTime;if(0!=d){a.i.streamTimeForContentTime(d);var e=a.i.previousCuePointForStreamTime(d);e&&!e.played&&(a.s=d,a.g.currentTime=e.start)}})};function Y(){Ne.call(this);this.g=this.h=null;this.j=new cm;this.i=navigator.language}ra(Y,Ne);q=Y.prototype;q.setLocale=function(a){this.i=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.h&&this.h.release();this.h=new dm(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
481
+ q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);Ne.prototype.release.call(this)};q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.j=new cm};q.requestClientSideAds=function(a){if(!this.h)throw new N(1,10,10001);var b=this.h;b.D=Date.now()/1E3;b.l.requestAds(a)};
482
+ q.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 jm(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
483
+ q.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)&&Xa('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.2.4";c=this.g;var d=b;c.l?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
484
+ (c.I=!0),c.l=new yc,c.i.requestStream(a),c.F=d||"",c.L=Date.now()/1E3,c=c.l);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Xa('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.2.4";this.g.i.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.H};
482
485
  q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.i.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.i.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",Y);
483
486
  Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;
484
487
  Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";
485
488
  Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";
486
- Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";mk=function(){return new Y};function mm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof R){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
487
- TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(Qh(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
488
- function nm(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=om(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
489
- function om(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
490
- var pm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),qm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),rm=["loop","playbackRate"],sm=["pause","play"],tm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
491
- getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},um={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},vm=[["getConfiguration","configure"]],wm=[["isTextTrackVisible","setTextTrackVisibility"]],xm="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay goToLive".split(" "),
492
- ym=["attach","detach","load","unload"];function zm(a,b,c,d,e,f){var g=this;this.L=a;this.j=new O(b);this.ea=c;this.D=!1;this.u=d;this.I=e;this.T=f;this.h=this.m=!1;this.Z="";this.s=null;this.F=function(){return Am(g)};this.H=function(h,k){var l=nm(k);switch(l.type){case "event":var m=l.targetName;l=Me(l.event);g.u(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.D&&(g.ea(),g.D=!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,
493
- l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.O=0;this.i={};this.l=null;Bm.add(this)}q=zm.prototype;q.destroy=function(){Bm["delete"](this);Cm(this);Dm&&Em(this);this.j&&(this.j.stop(),this.j=null);this.I=this.u=null;this.h=this.m=!1;this.H=this.F=this.l=this.i=this.g=this.s=null;return Promise.resolve()};q.va=function(){return this.h};q.Gd=function(){return this.Z};
494
- q.init=function(){if(this.L.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Jb();var a=new chrome.cast.SessionRequest(this.L);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Bm),d=c.next();!d.done;d=c.next())Fm(d.value,b)},function(b){for(var c=t(Bm),d=c.next();!d.done;d=c.next())d=d.value,Gm="available"==b,d.j.Jb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Gm&&this.j.V(Hm);(a=Dm)&&a.status!=chrome.cast.SessionStatus.STOPPED?Fm(this,
495
- a):Dm=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Im),window.__onGCastApiAvailable!=Im&&Xa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.Md=function(a){this.s=a;this.h&&Jm(this,{type:"appData",appData:this.s})};
496
- q.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new N(1,8,8E3);if(!Gm)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new yc;chrome.cast.requestSession(function(d){return Km(b,a,d)},function(d){return Lm(b,d)});return u(c,b.l,0)})};function Mm(a){if(a.h){var b=a.T();chrome.cast.requestSession(function(c){return Km(a,b,c)},function(c){return Lm(a,c)})}}q.xb=function(){if(this.h){Cm(this);if(Dm){Em(this);try{Dm.stop(function(){},function(){})}catch(a){}Dm=null}Am(this)}};
497
- q.get=function(a,b){var c=this;if("video"==a){if(sm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.oe.apply(c,[a,b].concat(ja(e)))}}else if("player"==a){if(um[b]&&!this.get("player","isLive")())return function(){};if(xm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.oe.apply(c,[a,b].concat(ja(e)))};if(ym.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Jf.apply(c,
498
- [a,b].concat(ja(e)))};if(tm[b])return function(){return c.g[a][b]}}return this.g[a][b]};q.set=function(a,b,c){this.g[a][b]=c;Jm(this,{type:"set",targetName:a,property:b,value:c})};function Km(a,b,c){Dm=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.H);Am(a);Jm(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}
499
- function Lm(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))}q.oe=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];Jm(this,{type:"call",targetName:a,methodName:b,args:d})};q.Jf=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new yc;var f=this.O.toString();this.O++;this.i[f]=e;try{Jm(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
500
- function Fm(a,b){var c=a.T();a.l=new yc;a.D=!0;Km(a,c,b)}function Em(a){var b=Dm;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.H)}function Am(a){var b=Dm?"connected"==Dm.status:!1;if(a.h&&!b){a.I();for(var c in a.g)a.g[c]={};Cm(a)}a.h=b;a.Z=b?Dm.receiver.friendlyName:"";a.j.Jb()}function Cm(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}
501
- function Jm(a,b){var c=mm(b),d=Dm;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},$a)}catch(e){throw c=new N(2,8,8005,e),d=new R("error",(new Map).set("detail",c)),a.u("player",d),a.xb(),c;}}var Hm=.02,Gm=!1,Dm=null,Bm=new Set;function Im(a){if(a){a=t(Bm);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Nm(a,b,c){Ne.call(this);var d=this;this.j=a;this.i=b;this.h=this.s=this.l=this.u=this.m=null;this.F=c;this.D=new Map;this.g=new zm(c,function(){return Om(d)},function(){return Pm(d)},function(e,f){return Qm(d,e,f)},function(){return Rm(d)},function(){return Sm(d)});Tm(this)}ra(Nm,Ne);q=Nm.prototype;
502
- q.destroy=function(a){a&&this.g.xb();this.h&&(this.h.release(),this.h=null);a=[];this.i&&(a.push(this.i.destroy()),this.i=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.m=this.j=null;return Promise.all(a)};q.sf=function(){return this.m};q.gf=function(){return this.u};q.Ie=function(){return this.g.m&&Gm};q.va=function(){return this.g.va()};q.Gd=function(){return this.g.Gd()};
503
- q.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Sm(a),u(c,a.g.cast(b),2)):a.i?u(c,a.i.Td(),0):c["return"]()})};q.Md=function(a){this.g.Md(a)};q.Uf=function(){Mm(this.g)};q.xb=function(){this.g.xb()};
504
- q.Le=function(a){var b=this;return K(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.xb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new zm(a,function(){return Om(b)},function(){return Pm(b)},function(d,e){return Qm(b,d,e)},function(){return Rm(b)},function(){return Sm(b)});b.g.init();z(c)})};
505
- function Tm(a){a.g.init();a.h=new ef;for(var b=t(pm),c=b.next();!c.done;c=b.next())a.h.A(a.j,c.value,function(f){a.g.va()||(f=Me(f),a.l.dispatchEvent(f))});for(var d in bm)a.h.A(a.i,bm[d],function(f){a.g.va()||a.s.dispatchEvent(f)});a.m={};b={};for(var e in a.j)b.Kb=e,Object.defineProperty(a.m,b.Kb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Um(a,f.Kb)}}(b),set:function(f){return function(g){var h=f.Kb;a.g.va()?a.g.set("video",h,g):a.j[h]=g}}(b)}),b={Kb:b.Kb};a.u={};Vm(a,
506
- function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Wm(a,f)}})});Xm(a);a.l=new Ne;a.l.sc=a.m;a.s=new Ne;a.s.sc=a.u}function Xm(a){var b=new Map;Vm(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.D.set(c,e):a.D.set(e,c)}else b.set(d,c)})}
507
- function Vm(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.i,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)}}
508
- function Sm(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.i.pd(),startTime:null};a.j.pause();for(var c=t(rm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.j[d];a.j.ended||(b.startTime=a.j.currentTime);c=t(vm);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.i[e[0]]();b.player[d]=e}c=t(wm);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.i[e[0]](),b.playerAfterLoad[d]=e;return b}function Om(a){var b=new R("caststatuschanged");a.dispatchEvent(b)}
509
- function Pm(a){var b=new R(a.m.paused?"pause":"play");a.l.dispatchEvent(b)}
510
- function Rm(a){for(var b=t(vm),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.i[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.j.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.j.autoplay=!1,b=a.i.load(e,d));var g={};c=t(rm);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.j){for(var h=t(rm),k=h.next();!k.done;k=h.next())k=k.value,a.j[k]=g[k];h=t(wm);for(k=
511
- h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.i[k](l)}a.j.autoplay=f;e&&a.j.play()}},function(h){h=(new Map).set("detail",h);h=new R(Yl,h);a.i.dispatchEvent(h)})}
512
- function Um(a,b){if("addEventListener"==b)return function(d,e,f){return a.l.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.l.removeEventListener(d,e,f)};if(a.g.va()&&0==Object.keys(a.g.g.video).length){var c=a.j[b];if("function"!=typeof c)return c}return a.g.va()?a.g.get("video",b):(c=a.j[b],"function"==typeof c&&(c=c.bind(a.j)),c)}
513
- function Wm(a,b){a.D.has(b)&&(b=a.D.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.m};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.i.Wb()};if("getDrmEngine"==b)return function(){return a.i.m};if("getAdManager"==b)return function(){return a.i.ce()};
514
- if("setVideoContainer"==b)return function(c){return a.i.xe(c)};if(a.g.va()){if("getManifest"==b||"drmInfo"==b)return function(){Xa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Xa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.va()&&0==Object.keys(a.g.g.video).length&&tm[b]||!a.g.va()?a.i[b].bind(a.i):a.g.get("player",b)}function Qm(a,b,c){a.g.va()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}
515
- M("shaka.cast.CastProxy",Nm);Nm.prototype.changeReceiverId=Nm.prototype.Le;Nm.prototype.forceDisconnect=Nm.prototype.xb;Nm.prototype.suggestDisconnect=Nm.prototype.Uf;Nm.prototype.setAppData=Nm.prototype.Md;Nm.prototype.cast=Nm.prototype.cast;Nm.prototype.receiverName=Nm.prototype.Gd;Nm.prototype.isCasting=Nm.prototype.va;Nm.prototype.canCast=Nm.prototype.Ie;Nm.prototype.getPlayer=Nm.prototype.gf;Nm.prototype.getVideo=Nm.prototype.sf;Nm.prototype.destroy=Nm.prototype.destroy;function Ym(a,b,c,d){Ne.call(this);var e=this;this.g=a;this.i=b;this.h=new ef;this.O={video:a,player:b};this.H=c||function(){};this.T=d||function(f){return f};this.j=null;this.I=!1;this.s=!0;this.m=0;this.F=!1;this.D=!0;this.u=this.l=null;this.L=new O(function(){Zm(e)});$m(this)}ra(Ym,Ne);q=Ym.prototype;q.isConnected=function(){return this.I};q.wf=function(){return this.s};q.Qf=function(a){this.j=a};q.Oe=function(){this.j=null};
489
+ Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";lk=function(){return new Y};function lm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof Q){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
490
+ TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(Oh(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
491
+ function mm(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=nm(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
492
+ function nm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
493
+ var om="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),pm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),qm=["loop","playbackRate"],rm=["pause","play"],sm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
494
+ getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},tm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},um=[["getConfiguration","configure"]],vm=[["isTextTrackVisible","setTextTrackVisibility"]],wm="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay goToLive".split(" "),
495
+ xm=["attach","detach","load","unload"];function ym(a,b,c,d,e,f){var g=this;this.L=a;this.j=new O(b);this.ea=c;this.D=!1;this.u=d;this.I=e;this.V=f;this.h=this.m=!1;this.Y="";this.s=null;this.F=function(){return zm(g)};this.H=function(h,k){var l=mm(k);switch(l.type){case "event":var m=l.targetName;l=Me(l.event);g.u(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.D&&(g.ea(),g.D=!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,
496
+ l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.O=0;this.i={};this.l=null;Am.add(this)}q=ym.prototype;q.destroy=function(){Am["delete"](this);Bm(this);Cm&&Dm(this);this.j&&(this.j.stop(),this.j=null);this.I=this.u=null;this.h=this.m=!1;this.H=this.F=this.l=this.i=this.g=this.s=null;return Promise.resolve()};q.va=function(){return this.h};q.Gd=function(){return this.Y};
497
+ q.init=function(){if(this.L.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Jb();var a=new chrome.cast.SessionRequest(this.L);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Am),d=c.next();!d.done;d=c.next())Em(d.value,b)},function(b){for(var c=t(Am),d=c.next();!d.done;d=c.next())d=d.value,Fm="available"==b,d.j.Jb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Fm&&this.j.U(Gm);(a=Cm)&&a.status!=chrome.cast.SessionStatus.STOPPED?Em(this,
498
+ a):Cm=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Hm),window.__onGCastApiAvailable!=Hm&&Xa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.Md=function(a){this.s=a;this.h&&Im(this,{type:"appData",appData:this.s})};
499
+ q.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new N(1,8,8E3);if(!Fm)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new yc;chrome.cast.requestSession(function(d){return Jm(b,a,d)},function(d){return Km(b,d)});return u(c,b.l,0)})};function Lm(a){if(a.h){var b=a.V();chrome.cast.requestSession(function(c){return Jm(a,b,c)},function(c){return Km(a,c)})}}q.xb=function(){if(this.h){Bm(this);if(Cm){Dm(this);try{Cm.stop(function(){},function(){})}catch(a){}Cm=null}zm(this)}};
500
+ q.get=function(a,b){var c=this;if("video"==a){if(rm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.oe.apply(c,[a,b].concat(ja(e)))}}else if("player"==a){if(tm[b]&&!this.get("player","isLive")())return function(){};if(wm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.oe.apply(c,[a,b].concat(ja(e)))};if(xm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Jf.apply(c,
501
+ [a,b].concat(ja(e)))};if(sm[b])return function(){return c.g[a][b]}}return this.g[a][b]};q.set=function(a,b,c){this.g[a][b]=c;Im(this,{type:"set",targetName:a,property:b,value:c})};function Jm(a,b,c){Cm=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.H);zm(a);Im(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}
502
+ function Km(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))}q.oe=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];Im(this,{type:"call",targetName:a,methodName:b,args:d})};q.Jf=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new yc;var f=this.O.toString();this.O++;this.i[f]=e;try{Im(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
503
+ function Em(a,b){var c=a.V();a.l=new yc;a.D=!0;Jm(a,c,b)}function Dm(a){var b=Cm;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.H)}function zm(a){var b=Cm?"connected"==Cm.status:!1;if(a.h&&!b){a.I();for(var c in a.g)a.g[c]={};Bm(a)}a.h=b;a.Y=b?Cm.receiver.friendlyName:"";a.j.Jb()}function Bm(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}
504
+ function Im(a,b){var c=lm(b),d=Cm;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},$a)}catch(e){throw c=new N(2,8,8005,e),d=new Q("error",(new Map).set("detail",c)),a.u("player",d),a.xb(),c;}}var Gm=.02,Fm=!1,Cm=null,Am=new Set;function Hm(a){if(a){a=t(Am);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Mm(a,b,c){Ne.call(this);var d=this;this.j=a;this.i=b;this.h=this.s=this.l=this.u=this.m=null;this.F=c;this.D=new Map;this.g=new ym(c,function(){return Nm(d)},function(){return Om(d)},function(e,f){return Pm(d,e,f)},function(){return Qm(d)},function(){return Rm(d)});Sm(this)}ra(Mm,Ne);q=Mm.prototype;
505
+ q.destroy=function(a){a&&this.g.xb();this.h&&(this.h.release(),this.h=null);a=[];this.i&&(a.push(this.i.destroy()),this.i=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.m=this.j=null;Ne.prototype.release.call(this);return Promise.all(a)};q.sf=function(){return this.m};q.gf=function(){return this.u};q.Ie=function(){return this.g.m&&Fm};q.va=function(){return this.g.va()};q.Gd=function(){return this.g.Gd()};
506
+ q.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Rm(a),u(c,a.g.cast(b),2)):a.i?u(c,a.i.Td(),0):c["return"]()})};q.Md=function(a){this.g.Md(a)};q.Uf=function(){Lm(this.g)};q.xb=function(){this.g.xb()};
507
+ q.Le=function(a){var b=this;return K(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.xb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new ym(a,function(){return Nm(b)},function(){return Om(b)},function(d,e){return Pm(b,d,e)},function(){return Qm(b)},function(){return Rm(b)});b.g.init();z(c)})};
508
+ function Sm(a){a.g.init();a.h=new ef;for(var b=t(om),c=b.next();!c.done;c=b.next())a.h.A(a.j,c.value,function(f){a.g.va()||(f=Me(f),a.l.dispatchEvent(f))});for(var d in am)a.h.A(a.i,am[d],function(f){a.g.va()||a.s.dispatchEvent(f)});a.m={};b={};for(var e in a.j)b.Kb=e,Object.defineProperty(a.m,b.Kb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Tm(a,f.Kb)}}(b),set:function(f){return function(g){var h=f.Kb;a.g.va()?a.g.set("video",h,g):a.j[h]=g}}(b)}),b={Kb:b.Kb};a.u={};Um(a,
509
+ function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Vm(a,f)}})});Wm(a);a.l=new Ne;a.l.tc=a.m;a.s=new Ne;a.s.tc=a.u}function Wm(a){var b=new Map;Um(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.D.set(c,e):a.D.set(e,c)}else b.set(d,c)})}
510
+ function Um(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.i,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)}}
511
+ function Rm(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.i.pd(),startTime:null};a.j.pause();for(var c=t(qm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.j[d];a.j.ended||(b.startTime=a.j.currentTime);c=t(um);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.i[e[0]]();b.player[d]=e}c=t(vm);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.i[e[0]](),b.playerAfterLoad[d]=e;return b}function Nm(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
512
+ function Om(a){var b=new Q(a.m.paused?"pause":"play");a.l.dispatchEvent(b)}
513
+ function Qm(a){for(var b=t(um),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.i[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.j.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.j.autoplay=!1,b=a.i.load(e,d));var g={};c=t(qm);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.j){for(var h=t(qm),k=h.next();!k.done;k=h.next())k=k.value,a.j[k]=g[k];h=t(vm);for(k=
514
+ h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.i[k](l)}a.j.autoplay=f;e&&a.j.play()}},function(h){h=(new Map).set("detail",h);h=new Q(Xl,h);a.i.dispatchEvent(h)})}
515
+ function Tm(a,b){if("addEventListener"==b)return function(d,e,f){return a.l.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.l.removeEventListener(d,e,f)};if(a.g.va()&&0==Object.keys(a.g.g.video).length){var c=a.j[b];if("function"!=typeof c)return c}return a.g.va()?a.g.get("video",b):(c=a.j[b],"function"==typeof c&&(c=c.bind(a.j)),c)}
516
+ function Vm(a,b){a.D.has(b)&&(b=a.D.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.m};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.i.Xb()};if("getDrmEngine"==b)return function(){return a.i.m};if("getAdManager"==b)return function(){return a.i.ce()};
517
+ if("setVideoContainer"==b)return function(c){return a.i.xe(c)};if(a.g.va()){if("getManifest"==b||"drmInfo"==b)return function(){Xa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Xa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.va()&&0==Object.keys(a.g.g.video).length&&sm[b]||!a.g.va()?a.i[b].bind(a.i):a.g.get("player",b)}function Pm(a,b,c){a.g.va()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}
518
+ M("shaka.cast.CastProxy",Mm);Mm.prototype.changeReceiverId=Mm.prototype.Le;Mm.prototype.forceDisconnect=Mm.prototype.xb;Mm.prototype.suggestDisconnect=Mm.prototype.Uf;Mm.prototype.setAppData=Mm.prototype.Md;Mm.prototype.cast=Mm.prototype.cast;Mm.prototype.receiverName=Mm.prototype.Gd;Mm.prototype.isCasting=Mm.prototype.va;Mm.prototype.canCast=Mm.prototype.Ie;Mm.prototype.getPlayer=Mm.prototype.gf;Mm.prototype.getVideo=Mm.prototype.sf;Mm.prototype.destroy=Mm.prototype.destroy;function Xm(a,b,c,d){Ne.call(this);var e=this;this.g=a;this.i=b;this.h=new ef;this.O={video:a,player:b};this.H=c||function(){};this.Y=d||function(f){return f};this.j=null;this.I=!1;this.s=!0;this.m=0;this.F=!1;this.D=!0;this.u=this.l=null;this.L=new O(function(){Ym(e)});Zm(this)}ra(Xm,Ne);q=Xm.prototype;q.isConnected=function(){return this.I};q.wf=function(){return this.s};q.Qf=function(a){this.j=a};q.Oe=function(){this.j=null};
516
519
  q.Rf=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.title=a};q.Pf=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.images=[{url:a}]};q.Of=function(a){this.j||(this.j={});this.j.artist=a;this.j.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
517
- q.destroy=function(){var a=this,b,c;return K(function(d){if(1==d.g)return a.h&&(a.h.release(),a.h=null),b=[],a.i&&(b.push(a.i.destroy()),a.i=null),a.L&&(a.L.stop(),a.L=null),a.g=null,a.O=null,a.H=null,a.I=!1,a.s=!0,a.l=null,a.u=null,u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
518
- function $m(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return an(a)};b.onSenderDisconnected=function(){return an(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&jn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);jn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return kn(a,
519
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return ln(a,e)};b.start();b=t(pm);for(var c=b.next();!c.done;c=b.next())a.h.A(a.g,c.value,function(e){return mn(a,"video",e)});for(var d in bm)a.h.A(a.i,bm[d],function(e){return mn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.i.Od(3840,2160):a.i.Od(1920,1080);a.h.A(a.g,"loadeddata",function(){a.F=!0});a.h.A(a.i,"loading",function(){a.s=
520
- !1;nn(a)});a.h.A(a.g,"playing",function(){a.s=!1;nn(a)});a.h.A(a.g,"pause",function(){nn(a)});a.h.A(a.i,"unloading",function(){a.s=!0;nn(a)});a.h.A(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.s=!0,nn(a))})).V(on)})}function an(a){a.m=0;a.D=!0;a.I=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;nn(a)}
521
- function nn(a){var b;K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.i)return c["return"]();b=new R("caststatuschanged");a.dispatchEvent(b);pn(a)||qn(a);z(c)})}
522
- function rn(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;K(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.i[d](e);a.H(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,A(v,5),u(v,a.i.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:wa(v,3);break;case 5:return g=E(v),h=Yl,k=(new Map).set("detail",g),l=new R(h,k),a.i&&a.i.dispatchEvent(l),v["return"]();case 3:if(!a.i)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)r=b.playerAfterLoad[p],
523
- a.i[p](r);a.g.autoplay=f;b.manifest&&(a.g.play(),qn(a));z(v)}})}function mn(a,b,c){a.i&&(Zm(a),jn(a,{type:"event",targetName:b,event:c},a.l))}
524
- function Zm(a){a.L.V(sn);for(var b={video:{},player:{}},c=t(qm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.i.Y())for(var e in um)0==a.m%um[e]&&(b.player[e]=a.i[e]());for(var f in tm)0==a.m%tm[f]&&(b.player[f]=a.i[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.F&&(a.m+=1);jn(a,{type:"update",update:b},a.l);pn(a)}function pn(a){return a.D&&(a.g.duration||a.i.Y())?(tn(a),a.D=!1,!0):!1}
525
- function tn(a,b){var c={contentId:a.i.pd(),streamType:a.i.Y()?"LIVE":"BUFFERED",contentType:""};a.i.Y()||(c.duration=a.g.duration);a.j&&(c.metadata=a.j);qn(a,void 0===b?0:b,c)}
526
- function ln(a,b){var c=nm(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.D=!0;rn(a,c.initState,c.appData);Zm(a);break;case "appData":a.H(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.O[d][e]=c;break;case "call":d=a.O[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
527
- c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.O[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.D=!0}));c.then(function(){return un(a,h,g,null)},function(k){return un(a,h,g,k)})}}
528
- function kn(a,b){var c=nm(b.data);switch(c.type){case "PLAY":a.g.play();qn(a);break;case "PAUSE":a.g.pause();qn(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(),qn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),qn(a));break;case "STOP":a.i.Td().then(function(){a.i&&qn(a)});break;case "GET_STATUS":tn(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));
529
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||qn(a);break;case "LOAD":a.m=0;a.F=!1;a.D=!1;d=c.media;e=c.currentTime;f=a.T(d.contentId);g=c.autoplay||!0;a.H(d.customData);g&&(a.g.autoplay=!0);a.i.load(f,e).then(function(){a.i&&tn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");jn(a,{requestId:Number(c.requestId),type:k},a.u)});break;default:jn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
530
- function un(a,b,c,d){a.i&&jn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function jn(a,b,c,d){a.I&&(a=mm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function qn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?vn:a.i.sd()?wn:a.g.paused?xn:yn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);jn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
531
- M("shaka.cast.CastReceiver",Ym);Ym.prototype.destroy=Ym.prototype.destroy;Ym.prototype.setContentArtist=Ym.prototype.Of;Ym.prototype.setContentImage=Ym.prototype.Pf;Ym.prototype.setContentTitle=Ym.prototype.Rf;Ym.prototype.clearContentMetadata=Ym.prototype.Oe;Ym.prototype.setContentMetadata=Ym.prototype.Qf;Ym.prototype.isIdle=Ym.prototype.wf;Ym.prototype.isConnected=Ym.prototype.isConnected;var sn=.5,on=5,vn="IDLE",yn="PLAYING",wn="BUFFERING",xn="PAUSED";function zn(a){var b=this;this.g=[];this.h=[];this.data=[];(new lg).box("moov",pg).U("pssh",function(c){if(!(1<c.version)){var d=Ob(c.reader.R,-12,c.size);b.data.push(d);b.g.push(Mc(c.reader.bb(16)));if(0<c.version){d=c.reader.N();d=t(jb(d));for(var e=d.next();!e.done;e=d.next())e=Mc(c.reader.bb(16)),b.h.push(e)}}}).parse(a)}
532
- function An(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Rb(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 Bn(a){if(!a)return a;var b=new zn(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={lc:c.lc},d=b.next())c.lc=d.value,a.some(function(e){return function(f){return Mb(f,e.lc)}}(c))||a.push(c.lc);return Nc.apply(Hc,ja(a))};function Cn(a,b){var c=Dn(a,b);return 1!=c.length?null:c[0]}function En(a,b,c){a=Fn(a,b,c);return 1!=a.length?null:a[0]}function Dn(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function Gn(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}function Fn(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}
533
- function Hn(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function In(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 Jn(a){return Array.from(a.childNodes).every(Kn)?a.textContent.trim():null}function Kn(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Ln(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}
534
- function Mn(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)}function Nn(a){if(!a)return null;a=/^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}
535
- function On(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 Pn(a){a=Number(a);return 0===a%1?a:null}function Qn(a){a=Number(a);return 0===a%1&&0<a?a:null}function Rn(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Sn(a){a=Number(a);return isNaN(a)?null:a}function Tn(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}
536
- function Un(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 Vn(a,b){try{var c=Bc(a);return Un(c,b)}catch(d){return null}};function Wn(a,b,c){var d=Xn(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.re?(e=h.init||e,!1):!0}),f.length&&(a=Yn(e,f,c),0==a.length&&(a=[sc("",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(sc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
537
- t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Yd:g,zg:e,drmInfos:a,be:!0}}function Zn(a,b,c,d){var e=Wn(a,c,d);if(b.be){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.be=!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.Yd||b.Yd}
538
- function $n(a){var b=0,c=Rb(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=Ob(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
539
- function ao(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 bo(a){a=En(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Kc(a.textContent);a=$n(a).filter(function(b){return b.type===co})[0];if(!a)return"";a=Cc(a.value,!0);return(a=Un(a,"WRMHEADER"))?ao(a):""}
540
- function Yn(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.re];if(f){var g;if(g=En(e.node,"urn:microsoft:playready","pro")){g=Kc(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:An(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=sc(f,e.init||a||g);if(f=eo.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
541
- function Xn(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=fo(c.value))&&b.push(c);return b}
542
- function fo(a){var b=a.getAttribute("schemeIdUri"),c=Hn(a,"urn:mpeg:cenc:2013","default_KID"),d=Fn(a,"urn:mpeg:cenc:2013","pssh").map(Jn);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:Kc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,re:b,keyId:c,init:0<e.length?e:null}}
543
- var co=1,eo=(new Map).set("com.widevine.alpha",function(a){return(a=En(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",bo).set("com.microsoft.playready.recommendation",bo).set("com.microsoft.playready.software",bo).set("com.microsoft.playready.hardware",bo);function go(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=
520
+ q.destroy=function(){var a=this,b,c;return K(function(d){if(1==d.g)return a.h&&(a.h.release(),a.h=null),b=[],a.i&&(b.push(a.i.destroy()),a.i=null),a.L&&(a.L.stop(),a.L=null),a.g=null,a.O=null,a.H=null,a.I=!1,a.s=!0,a.l=null,a.u=null,Ne.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
521
+ function Zm(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return $m(a)};b.onSenderDisconnected=function(){return $m(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&an(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);an(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return bn(a,
522
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return kn(a,e)};b.start();b=t(om);for(var c=b.next();!c.done;c=b.next())a.h.A(a.g,c.value,function(e){return ln(a,"video",e)});for(var d in am)a.h.A(a.i,am[d],function(e){return ln(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.i.Od(3840,2160):a.i.Od(1920,1080);a.h.A(a.g,"loadeddata",function(){a.F=!0});a.h.A(a.i,"loading",function(){a.s=
523
+ !1;mn(a)});a.h.A(a.g,"playing",function(){a.s=!1;mn(a)});a.h.A(a.g,"pause",function(){mn(a)});a.h.A(a.i,"unloading",function(){a.s=!0;mn(a)});a.h.A(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.s=!0,mn(a))})).U(nn)})}function $m(a){a.m=0;a.D=!0;a.I=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;mn(a)}
524
+ function mn(a){var b;K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.i)return c["return"]();b=new Q("caststatuschanged");a.dispatchEvent(b);on(a)||pn(a);z(c)})}
525
+ function qn(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;K(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.i[d](e);a.H(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,A(v,5),u(v,a.i.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:wa(v,3);break;case 5:return g=E(v),h=Xl,k=(new Map).set("detail",g),l=new Q(h,k),a.i&&a.i.dispatchEvent(l),v["return"]();case 3:if(!a.i)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)r=b.playerAfterLoad[p],
526
+ a.i[p](r);a.g.autoplay=f;b.manifest&&(a.g.play(),pn(a));z(v)}})}function ln(a,b,c){a.i&&(Ym(a),an(a,{type:"event",targetName:b,event:c},a.l))}
527
+ function Ym(a){a.L.U(rn);for(var b={video:{},player:{}},c=t(pm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.i.Z())for(var e in tm)0==a.m%tm[e]&&(b.player[e]=a.i[e]());for(var f in sm)0==a.m%sm[f]&&(b.player[f]=a.i[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.F&&(a.m+=1);an(a,{type:"update",update:b},a.l);on(a)}function on(a){return a.D&&(a.g.duration||a.i.Z())?(sn(a),a.D=!1,!0):!1}
528
+ function sn(a,b){var c={contentId:a.i.pd(),streamType:a.i.Z()?"LIVE":"BUFFERED",contentType:""};a.i.Z()||(c.duration=a.g.duration);a.j&&(c.metadata=a.j);pn(a,void 0===b?0:b,c)}
529
+ function kn(a,b){var c=mm(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.D=!0;qn(a,c.initState,c.appData);Ym(a);break;case "appData":a.H(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.O[d][e]=c;break;case "call":d=a.O[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
530
+ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.O[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.D=!0}));c.then(function(){return tn(a,h,g,null)},function(k){return tn(a,h,g,k)})}}
531
+ function bn(a,b){var c=mm(b.data);switch(c.type){case "PLAY":a.g.play();pn(a);break;case "PAUSE":a.g.pause();pn(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(),pn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),pn(a));break;case "STOP":a.i.Td().then(function(){a.i&&pn(a)});break;case "GET_STATUS":sn(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));
532
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||pn(a);break;case "LOAD":a.m=0;a.F=!1;a.D=!1;d=c.media;e=c.currentTime;f=a.Y(d.contentId);g=c.autoplay||!0;a.H(d.customData);g&&(a.g.autoplay=!0);a.i.load(f,e).then(function(){a.i&&sn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");an(a,{requestId:Number(c.requestId),type:k},a.u)});break;default:an(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
533
+ function tn(a,b,c,d){a.i&&an(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function an(a,b,c,d){a.I&&(a=lm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function pn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?un:a.i.sd()?vn:a.g.paused?wn:xn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);an(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
534
+ M("shaka.cast.CastReceiver",Xm);Xm.prototype.destroy=Xm.prototype.destroy;Xm.prototype.setContentArtist=Xm.prototype.Of;Xm.prototype.setContentImage=Xm.prototype.Pf;Xm.prototype.setContentTitle=Xm.prototype.Rf;Xm.prototype.clearContentMetadata=Xm.prototype.Oe;Xm.prototype.setContentMetadata=Xm.prototype.Qf;Xm.prototype.isIdle=Xm.prototype.wf;Xm.prototype.isConnected=Xm.prototype.isConnected;var rn=.5,nn=5,un="IDLE",xn="PLAYING",vn="BUFFERING",wn="PAUSED";function yn(a){var b=this;this.g=[];this.h=[];this.data=[];(new lg).box("moov",pg).T("pssh",function(c){if(!(1<c.version)){var d=Ob(c.reader.R,-12,c.size);b.data.push(d);b.g.push(Mc(c.reader.bb(16)));if(0<c.version){d=c.reader.N();d=t(jb(d));for(var e=d.next();!e.done;e=d.next())e=Mc(c.reader.bb(16)),b.h.push(e)}}}).parse(a)}
535
+ function zn(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Rb(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 An(a){if(!a)return a;var b=new yn(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={mc:c.mc},d=b.next())c.mc=d.value,a.some(function(e){return function(f){return Mb(f,e.mc)}}(c))||a.push(c.mc);return Nc.apply(Hc,ja(a))};function Bn(a,b){var c=Cn(a,b);return 1!=c.length?null:c[0]}function Dn(a,b,c){a=En(a,b,c);return 1!=a.length?null:a[0]}function Cn(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function Fn(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}function En(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}
536
+ function Gn(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Hn(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 In(a){return Array.from(a.childNodes).every(Jn)?a.textContent.trim():null}function Jn(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Kn(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}
537
+ function Ln(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)}function Mn(a){if(!a)return null;a=/^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}
538
+ function Nn(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 On(a){a=Number(a);return 0===a%1?a:null}function Pn(a){a=Number(a);return 0===a%1&&0<a?a:null}function Qn(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Rn(a){a=Number(a);return isNaN(a)?null:a}function Sn(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}
539
+ function Tn(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 Un(a,b){try{var c=Bc(a);return Tn(c,b)}catch(d){return null}};function Vn(a,b,c){var d=Wn(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.re?(e=h.init||e,!1):!0}),f.length&&(a=Xn(e,f,c),0==a.length&&(a=[sc("",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(sc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
540
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Yd:g,zg:e,drmInfos:a,be:!0}}function Yn(a,b,c,d){var e=Vn(a,c,d);if(b.be){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.be=!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.Yd||b.Yd}
541
+ function Zn(a){var b=0,c=Rb(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=Ob(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
542
+ function $n(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 ao(a){a=Dn(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Kc(a.textContent);a=Zn(a).filter(function(b){return b.type===bo})[0];if(!a)return"";a=Cc(a.value,!0);return(a=Tn(a,"WRMHEADER"))?$n(a):""}
543
+ function Xn(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.re];if(f){var g;if(g=Dn(e.node,"urn:microsoft:playready","pro")){g=Kc(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:zn(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=sc(f,e.init||a||g);if(f=co.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
544
+ function Wn(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=eo(c.value))&&b.push(c);return b}
545
+ function eo(a){var b=a.getAttribute("schemeIdUri"),c=Gn(a,"urn:mpeg:cenc:2013","default_KID"),d=En(a,"urn:mpeg:cenc:2013","pssh").map(In);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:Kc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,re:b,keyId:c,init:0<e.length?e:null}}
546
+ var bo=1,co=(new Map).set("com.widevine.alpha",function(a){return(a=Dn(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",ao).set("com.microsoft.playready.recommendation",ao).set("com.microsoft.playready.software",ao).set("com.microsoft.playready.hardware",ao);function fo(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=
544
547
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
545
- function ho(a,b){var c=io(a,b,"timescale"),d=1;c&&(d=Qn(c)||1);var e=io(a,b,"duration");c=Qn(e||"");"image"==a.K.contentType&&(c=Sn(e||""));c&&(c/=d);var f=io(a,b,"startNumber");e=Number(io(a,b,"presentationTimeOffset"))||0;var g=Rn(f||"");if(null==f||null==g)g=1;var h=jo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.X.duration||Infinity,l=Dn(h,"S");h=[];var m=-e;l=t(lb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=n.item,r=n.next,v=Ln(p,"t",Rn);n=Ln(p,"d",Rn);var y=Ln(p,"r",Pn);null!=
546
- v&&(v-=e);if(!n)break;p=null!=v?v:m;v=y||0;if(0>v)if(r){r=Ln(r,"t",Rn);if(null==r)break;else if(p>=r)break;v=Math.ceil((r-p)/n)-1}else{if(Infinity==k)break;else if(p/f>=k)break;v=Math.ceil((k*f-p)/n)-1}0<h.length&&p!=m&&(h[h.length-1].end=p/f);r=t(jb(v+1));for(v=r.next();!v.done;v=r.next())m=p+n,h.push({start:p/f,end:m/f,Zf:p}),p=m}f=h}return{timescale:d,ja:c,Ib:g,Va:e/d||0,Ud:e,timeline:f}}
547
- function io(a,b,c){return[b(a.K),b(a.la),b(a.ha)].filter(Zb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}function jo(a,b,c){return[b(a.K),b(a.la),b(a.ha)].filter(Zb).map(function(d){return Cn(d,c)}).reduce(function(d,e){return d||e})}
548
- function ko(a,b,c,d,e,f){for(var g=Hn(a,"http://www.w3.org/1999/xlink","href"),h=Hn(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 Ge(new N(2,4,4028));if("onLoad"!=h)return Ge(new N(2,4,4027));var m=rc([d],[g]);return e.request(0,We(m,b)).ca(function(n){n=Vn(n.data,a.tagName);if(!n)return Ge(new N(2,4,4001,g));
549
- 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 lo(a,b,c,m[0],e,f+1)})}
550
- function lo(a,b,c,d,e,f){f=void 0===f?0:f;if(Hn(a,"http://www.w3.org/1999/xlink","href")){var g=ko(a,b,c,d,e,f);c&&(g=g.ca(void 0,function(){return lo(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Hn(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(lo(k,b,c,d,e,f)));return Ke(g).ca(function(){return a})};function mo(a,b,c,d,e,f,g){var h,k=(new lg).U("sidx",function(l){h=no(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
551
- function no(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Hb(),m=g.reader.Hb();g.reader.skip(2);var n=g.reader.Gb();a=a+g.size+m;n=t(jb(n));for(m=n.next();!m.done;m=n.next()){var p=g.reader.N();m=(p&2147483648)>>>31;p&=2147483647;var r=g.reader.N();g.reader.skip(4);if(1==m)throw new N(2,3,3006);h.push(new oi(l/k+c,(l+r)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=r;a+=p}g.parser.stop();
552
- return h};function oo(a){this.h=Rb(a);this.g=new ig(this.h,0)}oo.prototype.oa=function(){return this.g.oa()};
553
- function po(a){var b=qo(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=qo(a);a:{d=t(ro);for(var e=d.next();!e.done;e=d.next())if(Mb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.$();else{if(8==b.length&&b[1]&224)throw new N(2,3,3001);d=0;e=t(lb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.ga?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.g.$()+b<=a.h.byteLength?b:a.h.byteLength-a.g.$();d=Rb(a.h,
554
- a.g.$(),b);a.g.skip(b);return new so(c,d)}function qo(a){var b=a.g.$(),c=a.g.aa();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ob(a.h,b,c)}var ro=[[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 so(a,b){this.id=a;this.g=b}
555
- function to(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=t(jb(a.g.byteLength)),d=c.next();!d.done;d=c.next())d=a.g.getUint8(d.value),b=256*b+d;return b};function uo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new oo(a.g);for(var n=null,p=null;a.oa();){var r=po(a);if(187==r.id){var v=vo(r);v&&(r=c*v.$f,v=b+v.If,null!=n&&m.push(new oi(n+g,r+g,l,p,v-1,f,g,h,k)),n=r,p=v)}}null!=n&&m.push(new oi(n+g,d+g,l,p,null,f,g,h,k));return m}
556
- function vo(a){var b=new oo(a.g);a=po(b);if(179!=a.id)throw new N(2,3,3013);a=to(a);b=po(b);if(183!=b.id)throw new N(2,3,3012);b=new oo(b.g);for(var c=0;b.oa();){var d=po(b);if(241==d.id){c=to(d);break}}return{$f:a,If:c}};function wo(a,b){var c=jo(a,b,"Initialization");if(!c)return null;var d=a.K.Aa,e=c.getAttribute("sourceURL");e&&(d=rc(a.K.Aa,[e]));e=0;var f=null;if(c=Ln(c,"range",On))e=c.start,f=c.end;return new mi(function(){return d},e,f)}
557
- function xo(a,b){var c=Number(io(a,yo,"presentationTimeOffset"))||0,d=io(a,yo,"timescale"),e=1;d&&(e=Qn(d)||1);var f=c/e||0,g=wo(a,yo);zo(a,g);var h=Pe(a);return{yb:function(){var k=jo(h,yo,"RepresentationIndex"),l=h.K.Aa;k&&(k=k.getAttribute("sourceURL"))&&(l=rc(h.K.Aa,[k]));k=Ao(h);return Bo(h,b,g,l,k.start,k.end,f)}}}
558
- function Bo(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,v,y,x,w,C,D,B,F;return K(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.fb||!a.X.he,l=a.X.start,m=a.X.duration,n=a.K.mimeType.split("/")[1],p=b,r=null,v=[p(d,e,f),"webm"==n?p(c.na(),c.ka,c.fa):null],p=null,u(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;C=null;D=l-g;B=l;F=m?l+m:Infinity;if("mp4"==n)var H=mo(x,e,d,c,D,B,F);else{H=new oo(w);if(440786851!=po(H).id)throw new N(2,3,3008);var L=po(H);if(408125543!=L.id)throw new N(2,3,3009);H=L.g.byteOffset;
559
- L=new oo(L.g);for(var I=null;L.oa();){var J=po(L);if(357149030==J.id){I=J;break}}if(!I)throw new N(2,3,3010);I=new oo(I.g);J=1E6;for(L=null;I.oa();){var P=po(I);if(2807729==P.id)J=to(P);else if(17545==P.id)if(4==P.g.byteLength)L=P.g.getFloat32(0);else if(8==P.g.byteLength)L=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==L)throw new N(2,3,3011);I=J/1E9;L*=I;J=po(new oo(x));if(475249515!=J.id)throw new N(2,3,3007);H=uo(J,H,I,L,d,c,D,B,F)}C=H;h.Db(C);r=new U(C);k&&r.$a(B,F,!0);return G["return"](r)})}
560
- function yo(a){return a.fc}function Ao(a){var b=jo(a,yo,"RepresentationIndex");a=io(a,yo,"indexRange");a=On(a||"");b&&(a=Ln(b,"range",On,a));return a}function zo(a,b){Co(a,b);if(!Ao(a))throw new N(2,4,4002);}function Co(a,b){var c=a.K.mimeType.split("/")[1];if(a.K.contentType!=wc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);};function Do(a,b){var c=wo(a,Eo),d=Fo(a);if(!d.ja&&!d.timeline&&1<d.Bb.length)throw new N(2,4,4002);if(!d.ja&&!a.X.duration&&!d.timeline&&1==d.Bb.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.ha.id&&a.K.id&&(f=a.ha.id+","+a.K.id,e=b[f]);c=Go(a.X.start,a.X.duration,a.K.Aa,d,c);d=!e;e?e.Cb(c,a.presentationTimeline.ab()):(e=new U(c),f&&a.fb&&(b[f]=e));a.presentationTimeline.Db(c);a.fb&&a.X.he||e.$a(a.X.start,a.X.duration?a.X.start+a.X.duration:
561
- Infinity,d);return{yb:function(){return Promise.resolve(e)}}}function Eo(a){return a.cb}function Fo(a){var b=Ho(a);a=ho(a,Eo);var c=a.Ib;0==c&&(c=1);var d=0;a.ja?d=a.ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ja:a.ja,startTime:d,Ib:c,Va:a.Va,timeline:a.timeline,Bb:b}}
562
- function Go(a,b,c,d,e){var f=d.Bb.length;d.timeline&&d.timeline.length!=d.Bb.length&&(f=Math.min(d.timeline.length,d.Bb.length));var g=a-d.Va,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=t(jb(f));for(var n=f.next();!n.done;m={Xc:m.Xc},n=f.next()){n=n.value;var p=d.Bb[n];m.Xc=rc(c,[p.zf]);var r=void 0;r=null!=d.ja?l+d.ja:d.timeline?d.timeline[n].end:l+b;k.push(new oi(a+l,a+r,function(v){return function(){return v.Xc}}(m),p.start,p.end,e,g,a,h));l=r}return k}
563
- function Ho(a){return[a.K.cb,a.la.cb,a.ha.cb].filter(Zb).map(function(b){return Dn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.fe&&(a.fe=!0);var c=b.getAttribute("media");b=Ln(b,"mediaRange",On,{start:0,end:null});return{zf:c,start:b.start,end:b.end}})};function Io(a,b,c,d,e,f){var g=Jo(a),h=Ko(a);Lo(h);var k=Pe(a);if(h.$b)return Co(a,g),{yb:function(){var v=go(h.$b,k.K.id,null,k.bandwidth||null,null);v=rc(k.K.Aa,[v]);return Bo(k,b,g,v,0,null,h.Va)}};if(h.ja)return d||(a.presentationTimeline.zd(h.ja),a.presentationTimeline.Bd(a.X.start)),{yb:function(){return Mo(k,h,e,g,f)}};var l=null;d=null;a.ha.id&&a.K.id&&(d=a.ha.id+","+a.K.id,l=c[d]);var m=No(k,h,g),n=a.X.start,p=a.X.duration?a.X.start+a.X.duration:Infinity,r=Infinity!=p;l?(r&&(new U(m)).$a(n,
564
- p,!0),l.Cb(m,a.presentationTimeline.ab())):(l=new U(m),d&&a.fb&&(c[d]=l));a.presentationTimeline.Db(m);r&&l.$a(n,p);return{yb:function(){return Promise.resolve(l)}}}function Oo(a){return a.hc}function Ko(a){var b=ho(a,Oo),c=io(a,Oo,"media");a=io(a,Oo,"index");return{ja:b.ja,timescale:b.timescale,Ib:b.Ib,Va:b.Va,Ud:b.Ud,timeline:b.timeline,yd:c,$b:a}}
565
- function Lo(a){var b=a.$b?1:0;b+=a.timeline?1:0;b+=a.ja?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.$b&&(a.timeline=null),a.ja=null);if(!a.$b&&!a.yd)throw new N(2,4,4002);}
566
- function Mo(a,b,c,d,e){function f(I){var J=(I-r)*p,P=J+b.Va,Q=J+l;J=Q+p;var ba=Math.min(J,h());Q=new oi(Q,ba,function(){var aa=go(y,w,I,x,P*v);return rc(C,[aa])},0,null,d,D,l,h());Q.l=J;return Q}function g(){var I=[Math.max(k.ab(),l),Math.min(k.ib(),h())].map(function(J){return J-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(J){return J+r})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.X.start,m=a.ha.id,n=a.X.duration,p=b.ja,r=b.Ib,v=b.timescale,
567
- y=b.yd,x=a.bandwidth||null,w=a.K.id,C=a.K.Aa,D=l-b.Va,B=g();a=a.fb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var F=a;F<=B;++F){var G=f(F);c.push(G)}var H=new U(c);c=k.ib()<h();F=k.Y();if(c||F){var L=Math.max(a,B+1);H.Oc(p,function(){var I=k.ab();H.gb(I);var J=t(g());J.next();J=J.next().value;for(var P=[];L<=J;){var Q=f(L);P.push(Q);L++}return I>h()&&!P.length?null:P})}return Promise.resolve(H)}
568
- function No(a,b,c){var d=a.X.start,e=a.X.duration,f=d-b.Va;e=e?d+e:Infinity;for(var g=[],h={},k=t(lb(b.timeline)),l=k.next();!l.done;h={Wc:h.Wc,$c:h.$c,cd:h.cd,Tc:h.Tc,ed:h.ed,Uc:h.Uc},l=k.next()){l=l.value;var m=l.item,n=m.start,p=m.Zf;m=m.end;h.cd=l.ga+b.Ib;h.ed=p+b.Ud;h.$c=a.K.id;h.Tc=a.bandwidth||null;h.Wc=b.yd;h.Uc=a.K.Aa;g.push(new oi(d+n,d+m,function(r){return function(){var v=go(r.Wc,r.$c,r.cd,r.Tc||null,r.ed);return rc(r.Uc,[v]).map(function(y){return y.toString()})}}(h),0,null,c,f,d,e))}return g}
569
- function Jo(a){var b=io(a,Oo,"initialization");if(!b)return null;var c=a.K.id,d=a.bandwidth||null,e=a.K.Aa;return new mi(function(){var f=go(b,c,null,d,null);return rc(e,[f])},0,null)};function Po(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Po.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=[]};
570
- function Qo(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P,Q,ba,aa,T,ya,pa,Ca,Ga,Bb;return K(function(Sa){switch(Sa.g){case 1:d=xc;Ro(b);So(b);To(b);Uo(b);if(!c&&1==b.length){e=b[0];a.g=e.vc;a.h=e.Qc;a.j=e.textStreams;a.i=e.imageStreams;Sa.v(2);break}f=-1;g=t(lb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.ga,n=l.item,a.m.has(n.id)||(a.m.add(n.id),-1==f&&(f=m));if(-1==f)return Sa["return"]();p=b.map(function(za){return za.vc});r=b.map(function(za){return za.Qc});v=b.map(function(za){return za.textStreams});
571
- y=b.map(function(za){return za.imageStreams});x=t(v);for(w=x.next();!w.done;w=x.next())C=w.value,C.push(Vo(d.ba));D=t(y);for(B=D.next();!B.done;B=D.next())F=B.value,F.push(Vo(d.Ob));return u(Sa,Wo(a.g,p,f,Xo,Yo),3);case 3:return u(Sa,Wo(a.h,r,f,Xo,Yo),4);case 4:return u(Sa,Wo(a.j,v,f,Xo,Yo),5);case 5:return u(Sa,Wo(a.i,y,f,Xo,Yo),2);case 2:G=0;H=[];if(a.h.length&&a.g.length)for(ba=t(a.g),aa=ba.next();!aa.done;aa=ba.next())for(T=aa.value,ya=t(a.h),pa=ya.next();!pa.done;pa=ya.next())Ca=pa.value,Ga=
572
- ag(T.drmInfos,Ca.drmInfos),T.drmInfos.length&&Ca.drmInfos.length&&!Ga.length||(Bb=G++,H.push({id:Bb,language:T.language,primary:T.primary,audio:T,video:Ca,bandwidth:(T.bandwidth||0)+(Ca.bandwidth||0),drmInfos:Ga,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(L=a.h.concat(a.g),I=t(L),J=I.next();!J.done;J=I.next())P=J.value,Q=G++,H.push({id:Q,language:P.language,primary:P.primary,audio:P.type==d.eb?P:null,video:P.type==d.Qa?P:null,bandwidth:P.bandwidth||0,drmInfos:P.drmInfos,
573
- allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});a.l=H;z(Sa)}})}
574
- function Ro(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&&ob(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.vc=c}}
575
- function To(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&&ob(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
576
- function So(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Qc),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&&ob(e.roles,h.roles)&&pf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Qc=c}}
577
- function Uo(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}}
578
- function Zo(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P;return K(function(Q){switch(Q.g){case 1:b=xc;if(1==a.length)return Q["return"](a[0]);c=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.eb})});d=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Qa})});e=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.ba})});f=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Ob})});g=t(e);for(h=g.next();!h.done;h=g.next())k=
579
- h.value,k.push($o(b.ba));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push($o(b.Ob));return u(Q,Wo([],c,0,ap,bp),2);case 2:return p=Q.h,u(Q,Wo([],d,0,ap,bp),3);case 3:return r=Q.h,u(Q,Wo([],e,0,ap,bp),4);case 4:return v=Q.h,u(Q,Wo([],f,0,ap,bp),5);case 5:y=Q.h;x=0;if(r.length&&p.length)for(F=t(p),G=F.next();!G.done;G=F.next())for(H=G.value,L=t(r),I=L.next();!I.done;I=L.next())J=I.value,P=x++,J.variantIds.push(P),H.variantIds.push(P);else for(w=r.concat(p),C=t(w),D=C.next();!D.done;D=C.next())B=
580
- D.value,B.variantIds=[x++];return Q["return"](r.concat(p).concat(v).concat(y))}})}
581
- function Wo(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P,Q,ba,aa;return K(function(T){switch(T.g){case 1:f=xc;g=[];h=t(lb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.ga,p=m.item,n>=c?g.push(new Set(p)):g.push(new Set);r=t(a);v=r.next();case 2:if(v.done){T.v(4);break}y=v.value;return u(T,cp(y,b,c,e,g),5);case 5:x=T.h;if(!x)throw new N(2,4,4037);v=r.next();T.v(2);break;case 4:w=t(g),C=w.next();case 6:if(C.done){T.v(8);break}D=C.value;B=t(D);F=B.next();case 9:if(F.done){C=w.next();
582
- T.v(6);break}G=F.value;return u(T,dp(G,b,d,e,g),12);case 12:(H=T.h)&&a.push(H);F=B.next();T.v(9);break;case 8:L=t(g);for(C=L.next();!C.done;C=L.next())for(I=C.value,J={},P=t(I),F=P.next();!F.done;J={Xa:J.Xa},F=P.next())if(J.Xa=F.value,Q=J.Xa.type==f.ba&&!J.Xa.language,ba=J.Xa.type==f.Ob&&!J.Xa.tilesLayout,!Q&&!ba&&(aa=a.some(function(ya){return function(pa){return pa.mimeType==ya.Xa.mimeType&&Vc(pa.codecs)==Vc(ya.Xa.codecs)}}(J))))throw new N(2,4,4037);return T["return"](a)}})}
583
- function cp(a,b,c,d,e){var f;return K(function(g){if(1==g.g)return(f=ep(b,a))?u(g,fp(f),2):g["return"](!1);gp(a,f,c,d,e);return g["return"](!0)})}function fp(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
584
- function dp(a,b,c,d,e){var f,g;return K(function(h){if(1==h.g)return f=c(a),(g=ep(b,f))?f.createSegmentIndex?u(h,fp(g),2):h.v(2):h["return"](null);gp(f,g,0,d,e);return h["return"](f)})}function gp(a,b,c,d,e){b=t(lb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.ga;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==kd(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}
585
- function Xo(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Ni;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function ap(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
586
- function Yo(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));var c=b.keyIds;c=new Set([].concat(ja(a.keyIds),ja(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=ag(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new N(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
587
- (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Xo(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),Yo(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Yo(a.trickModeVideo,b)}
588
- function bp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ja(a.keyIds),ja(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ja(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
589
- function ep(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:hp,video:hp,text:ip,image:jp}[f.type],h={audio:kp,video:lp,text:mp,image:np}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function hp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Vc(b.codecs)!=Vc(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<ag(c,d).length:1)}return c?!1:!0}
590
- function ip(a,b){return a.language?b.language?0==kd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function jp(a){return a.tilesLayout?!0:!1}
591
- function kp(a,b,c){if(a.id==c.id)return!0;var d=kd(a.language,b.language),e=kd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
592
- d=op(a.channelsCount,b.channelsCount,c.channelsCount);if(d==pp)return!0;if(d==qp)return!1;d=op(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==pp?!0:d==qp?!1:a.bandwidth&&rp(a.bandwidth,b.bandwidth,c.bandwidth)==pp?!0:!1}
593
- function lp(a,b,c){if(a.id==c.id)return!0;var d=op(a.width*a.height,b.width*b.height,c.width*c.height);if(d==pp)return!0;if(d==qp)return!1;if(a.frameRate){d=op(a.frameRate,b.frameRate,c.frameRate);if(d==pp)return!0;if(d==qp)return!1}return a.bandwidth&&rp(a.bandwidth,b.bandwidth,c.bandwidth)==pp?!0:!1}
594
- function mp(a,b,c){if(a.id==c.id)return!0;var d=kd(a.language,b.language),e=kd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
595
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function np(a,b,c){return a.id==c.id?!0:op(a.width*a.height,b.width*b.height,c.width*c.height)==pp?!0:!1}function $o(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
596
- function Vo(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
597
- function op(a,b,c){if(b==a&&a!=c)return qp;if(c==a&&a!=b)return pp;if(b>a){if(c<=a||c-a<b-a)return pp;if(c-a>b-a)return qp}else{if(c>a)return qp;if(a-c<a-b)return pp;if(a-c>a-b)return qp}return sp}function rp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?pp:b<a?qp:sp}var pp=1,sp=0,qp=-1;function tp(){var a=this;this.C=this.o=null;this.h=[];this.B=null;this.F=1;this.m={};this.L={};this.g=new Po;this.D=0;this.H=new Qa(5);this.u=new O(function(){a.bc()});this.i=new Qe;this.j=null;this.I=[];this.l=Infinity;this.s=!1}q=tp.prototype;q.configure=function(a){this.o=a};q.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.s=b.isLowLatencyMode(),c.h=[a],c.C=b,u(e,up(c),2);d=e.h;c.C&&vp(c,d);if(!c.C)throw new N(2,7,7001);return e["return"](c.B)})};
598
- q.stop=function(){for(var a=t(Object.values(this.m)),b=a.next();!b.done;b=a.next())b.value.release();this.g&&this.g.release();this.o=this.C=null;this.h=[];this.B=null;this.m={};this.g=null;null!=this.u&&(this.u.stop(),this.u=null);return this.i.destroy()};q.update=function(){var a=this,b;return K(function(c){if(1==c.g)return A(c,2),u(c,up(a),4);if(2!=c.g)return wa(c,0);b=E(c);if(!a.C||!b)return c["return"]();a.C.onError(b);z(c)})};q.onExpirationUpdated=function(){};
599
- function up(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=We(a.h,a.o.retryParameters),c=a.C.networkingEngine,d=Date.now(),e=c.request(0,b),Re(a.i,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.C)return k["return"](0);f.uri&&!a.h.includes(f.uri)&&a.h.unshift(f.uri);return u(k,wp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;Ra(a.H,1,h);return k["return"](h)})}
600
- function wp(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=Vn(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.o.dash.disableXlinkProcessing)return k["return"](xp(a,d,c));f=a.o.dash.xlinkFailGracefully;g=lo(d,a.o.retryParameters,f,c,a.C.networkingEngine);Re(a.i,g);return u(k,g.promise,2)}h=k.h;return k["return"](xp(a,h,c))})}
601
- function xp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P,Q,ba,aa,T,ya,pa,Ca;return K(function(Ga){switch(Ga.g){case 1:(d=a.o.dash.manifestPreprocessor)&&d(b);e=[c];f=Dn(b,"Location").map(Jn).filter(Zb);0<f.length&&(g=rc(e,f),e=a.h=g);h=Dn(b,"BaseURL");k=h.map(Jn);l=rc(e,k);m=0;h&&h.length&&(m=Ln(h[0],"availabilityTimeOffset",Sn)||0);n=a.o.dash.ignoreMinBufferTime;p=0;n||(p=Ln(b,"minBufferTime",Nn)||0);a.D=Ln(b,"minimumUpdatePeriod",Nn,-1);r=Ln(b,"availabilityStartTime",Mn);v=Ln(b,
602
- "timeShiftBufferDepth",Nn);y=a.o.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Ln(b,"suggestedPresentationDelay",Nn));w=a.o.dash.ignoreMaxSegmentDuration;C=null;w||(C=Ln(b,"maxSegmentDuration",Nn));D=b.getAttribute("type")||"static";if(a.B)for(B=a.B.presentationTimeline,F=t(Object.values(a.m)),G=F.next();!G.done;G=F.next())H=G.value,H.gb(B.ab());else L=a.o.defaultPresentationDelay||1.5*p,I=null!=x?x:L,B=new S(r,I,a.o.dash.autoCorrectDrift);J=b.getAttribute("profiles")||"";P={fb:"static"!=D,presentationTimeline:B,
603
- ha:null,X:null,la:null,K:null,bandwidth:0,fe:!1,wb:m,profiles:J.split(",")};Q=yp(a,P,l,b);ba=Q.duration;aa=Q.periods;B.ic("static"==D);"static"!=D&&Q.$d||B.Ma(ba||Infinity);a.l&&!a.s&&(T=a.C.isAutoLowLatencyMode())&&(a.C.enableLowLatencyMode(),a.s=a.C.isLowLatencyMode());a.s?B.ue(a.l):a.l&&Xa("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.");(ya=B.Y())&&
604
- !isNaN(a.o.availabilityWindowOverride)&&(v=a.o.availabilityWindowOverride);null==v&&(v=Infinity);B.Qd(v);B.zd(C||1);return u(Ga,Qo(a.g,aa,P.fb),2);case 2:if(a.B){a.B.variants=a.g.l;a.B.textStreams=a.g.j.slice();a.B.imageStreams=a.g.i;a.C.filter(a.B);Ga.v(3);break}a.B={presentationTimeline:B,variants:a.g.l,textStreams:a.g.j.slice(),imageStreams:a.g.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.ze()){Ga.v(3);break}pa=Dn(b,"UTCTiming");return u(Ga,zp(a,l,pa),5);case 5:Ca=Ga.h;if(!a.C)return Ga["return"]();
605
- B.ve(Ca);case 3:a.C.makeTextStreamsForClosedCaptions(a.B),z(Ga)}})}
606
- function yp(a,b,c,d){var e=Ln(d,"mediaPresentationDuration",Nn),f=[],g=0;d=Dn(d,"Period");for(var h=t(lb(d)),k=h.next();!k.done;k=h.next()){var l=k.value;k=l.ga;var m=l.item,n=l.next;l=Ln(m,"start",Nn,g);var p=m.id,r=Ln(m,"duration",Nn),v=null;if(n){var y=Ln(n,"start",Nn);null!=y&&(v=y-l)}else null!=e&&(v=e-l);null==v&&(v=r);if(!(null!==a.j&&null!==p&&null!==l&&l<a.j)||a.I.includes(p)||k+1==d.length){null!==l&&(null===a.j||l>a.j)&&(a.j=l);g=Ap(a,b,c,{start:l,duration:v,node:m,he:null==v||!n});f.push(g);
548
+ function go(a,b){var c=ho(a,b,"timescale"),d=1;c&&(d=Pn(c)||1);var e=ho(a,b,"duration");c=Pn(e||"");"image"==a.K.contentType&&(c=Rn(e||""));c&&(c/=d);var f=ho(a,b,"startNumber");e=Number(ho(a,b,"presentationTimeOffset"))||0;var g=Qn(f||"");if(null==f||null==g)g=1;var h=io(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.X.duration||Infinity,l=Cn(h,"S");h=[];var m=-e;l=t(lb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=n.item,r=n.next,v=Kn(p,"t",Qn);n=Kn(p,"d",Qn);var y=Kn(p,"r",On);null!=
549
+ v&&(v-=e);if(!n)break;p=null!=v?v:m;v=y||0;if(0>v)if(r){r=Kn(r,"t",Qn);if(null==r)break;else if(p>=r)break;v=Math.ceil((r-p)/n)-1}else{if(Infinity==k)break;else if(p/f>=k)break;v=Math.ceil((k*f-p)/n)-1}0<h.length&&p!=m&&(h[h.length-1].end=p/f);r=t(jb(v+1));for(v=r.next();!v.done;v=r.next())m=p+n,h.push({start:p/f,end:m/f,Zf:p}),p=m}f=h}return{timescale:d,ja:c,Ib:g,Xa:e/d||0,Ud:e,timeline:f}}
550
+ function ho(a,b,c){return[b(a.K),b(a.ma),b(a.ha)].filter(Zb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}function io(a,b,c){return[b(a.K),b(a.ma),b(a.ha)].filter(Zb).map(function(d){return Bn(d,c)}).reduce(function(d,e){return d||e})}
551
+ function jo(a,b,c,d,e,f){for(var g=Gn(a,"http://www.w3.org/1999/xlink","href"),h=Gn(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 Ge(new N(2,4,4028));if("onLoad"!=h)return Ge(new N(2,4,4027));var m=rc([d],[g]);return e.request(0,We(m,b)).ca(function(n){n=Un(n.data,a.tagName);if(!n)return Ge(new N(2,4,4001,g));
552
+ 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 ko(a,b,c,m[0],e,f+1)})}
553
+ function ko(a,b,c,d,e,f){f=void 0===f?0:f;if(Gn(a,"http://www.w3.org/1999/xlink","href")){var g=jo(a,b,c,d,e,f);c&&(g=g.ca(void 0,function(){return ko(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Gn(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(ko(k,b,c,d,e,f)));return Ke(g).ca(function(){return a})};function lo(a,b,c,d,e,f,g){var h,k=(new lg).T("sidx",function(l){h=mo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
554
+ function mo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Hb(),m=g.reader.Hb();g.reader.skip(2);var n=g.reader.Gb();a=a+g.size+m;n=t(jb(n));for(m=n.next();!m.done;m=n.next()){var p=g.reader.N();m=(p&2147483648)>>>31;p&=2147483647;var r=g.reader.N();g.reader.skip(4);if(1==m)throw new N(2,3,3006);h.push(new oi(l/k+c,(l+r)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=r;a+=p}g.parser.stop();
555
+ return h};function no(a){this.h=Rb(a);this.g=new ig(this.h,0)}no.prototype.pa=function(){return this.g.pa()};
556
+ function oo(a){var b=po(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=po(a);a:{d=t(qo);for(var e=d.next();!e.done;e=d.next())if(Mb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.$();else{if(8==b.length&&b[1]&224)throw new N(2,3,3001);d=0;e=t(lb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.ga?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.g.$()+b<=a.h.byteLength?b:a.h.byteLength-a.g.$();d=Rb(a.h,
557
+ a.g.$(),b);a.g.skip(b);return new ro(c,d)}function po(a){var b=a.g.$(),c=a.g.aa();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ob(a.h,b,c)}var qo=[[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 ro(a,b){this.id=a;this.g=b}
558
+ function so(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=t(jb(a.g.byteLength)),d=c.next();!d.done;d=c.next())d=a.g.getUint8(d.value),b=256*b+d;return b};function to(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new no(a.g);for(var n=null,p=null;a.pa();){var r=oo(a);if(187==r.id){var v=uo(r);v&&(r=c*v.$f,v=b+v.If,null!=n&&m.push(new oi(n+g,r+g,l,p,v-1,f,g,h,k)),n=r,p=v)}}null!=n&&m.push(new oi(n+g,d+g,l,p,null,f,g,h,k));return m}
559
+ function uo(a){var b=new no(a.g);a=oo(b);if(179!=a.id)throw new N(2,3,3013);a=so(a);b=oo(b);if(183!=b.id)throw new N(2,3,3012);b=new no(b.g);for(var c=0;b.pa();){var d=oo(b);if(241==d.id){c=so(d);break}}return{$f:a,If:c}};function vo(a,b){var c=io(a,b,"Initialization");if(!c)return null;var d=a.K.Aa,e=c.getAttribute("sourceURL");e&&(d=rc(a.K.Aa,[e]));e=0;var f=null;if(c=Kn(c,"range",Nn))e=c.start,f=c.end;return new mi(function(){return d},e,f)}
560
+ function wo(a,b){var c=Number(ho(a,xo,"presentationTimeOffset"))||0,d=ho(a,xo,"timescale"),e=1;d&&(e=Pn(d)||1);var f=c/e||0,g=vo(a,xo);yo(a,g);var h=Pe(a);return{yb:function(){var k=io(h,xo,"RepresentationIndex"),l=h.K.Aa;k&&(k=k.getAttribute("sourceURL"))&&(l=rc(h.K.Aa,[k]));k=zo(h);return Ao(h,b,g,l,k.start,k.end,f)}}}
561
+ function Ao(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,v,y,x,w,C,D,B,F;return K(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.fb||!a.X.he,l=a.X.start,m=a.X.duration,n=a.K.mimeType.split("/")[1],p=b,r=null,v=[p(d,e,f),"webm"==n?p(c.oa(),c.ka,c.fa):null],p=null,u(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;C=null;D=l-g;B=l;F=m?l+m:Infinity;if("mp4"==n)var H=lo(x,e,d,c,D,B,F);else{H=new no(w);if(440786851!=oo(H).id)throw new N(2,3,3008);var L=oo(H);if(408125543!=L.id)throw new N(2,3,3009);H=L.g.byteOffset;
562
+ L=new no(L.g);for(var I=null;L.pa();){var J=oo(L);if(357149030==J.id){I=J;break}}if(!I)throw new N(2,3,3010);I=new no(I.g);J=1E6;for(L=null;I.pa();){var P=oo(I);if(2807729==P.id)J=so(P);else if(17545==P.id)if(4==P.g.byteLength)L=P.g.getFloat32(0);else if(8==P.g.byteLength)L=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==L)throw new N(2,3,3011);I=J/1E9;L*=I;J=oo(new no(x));if(475249515!=J.id)throw new N(2,3,3007);H=to(J,H,I,L,d,c,D,B,F)}C=H;h.Db(C);r=new U(C);k&&r.ab(B,F,!0);return G["return"](r)})}
563
+ function xo(a){return a.hc}function zo(a){var b=io(a,xo,"RepresentationIndex");a=ho(a,xo,"indexRange");a=Nn(a||"");b&&(a=Kn(b,"range",Nn,a));return a}function yo(a,b){Bo(a,b);if(!zo(a))throw new N(2,4,4002);}function Bo(a,b){var c=a.K.mimeType.split("/")[1];if(a.K.contentType!=wc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);};function Co(a,b){var c=vo(a,Do),d=Eo(a);if(!d.ja&&!d.timeline&&1<d.Bb.length)throw new N(2,4,4002);if(!d.ja&&!a.X.duration&&!d.timeline&&1==d.Bb.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.ha.id&&a.K.id&&(f=a.ha.id+","+a.K.id,e=b[f]);c=Fo(a.X.start,a.X.duration,a.K.Aa,d,c);d=!e;e?e.Cb(c,a.presentationTimeline.Va()):(e=new U(c),f&&a.fb&&(b[f]=e));a.presentationTimeline.Db(c);a.fb&&a.X.he||e.ab(a.X.start,a.X.duration?a.X.start+a.X.duration:
564
+ Infinity,d);return{yb:function(){return Promise.resolve(e)}}}function Do(a){return a.cb}function Eo(a){var b=Go(a);a=go(a,Do);var c=a.Ib;0==c&&(c=1);var d=0;a.ja?d=a.ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ja:a.ja,startTime:d,Ib:c,Xa:a.Xa,timeline:a.timeline,Bb:b}}
565
+ function Fo(a,b,c,d,e){var f=d.Bb.length;d.timeline&&d.timeline.length!=d.Bb.length&&(f=Math.min(d.timeline.length,d.Bb.length));var g=a-d.Xa,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=t(jb(f));for(var n=f.next();!n.done;m={Xc:m.Xc},n=f.next()){n=n.value;var p=d.Bb[n];m.Xc=rc(c,[p.zf]);var r=void 0;r=null!=d.ja?l+d.ja:d.timeline?d.timeline[n].end:l+b;k.push(new oi(a+l,a+r,function(v){return function(){return v.Xc}}(m),p.start,p.end,e,g,a,h));l=r}return k}
566
+ function Go(a){return[a.K.cb,a.ma.cb,a.ha.cb].filter(Zb).map(function(b){return Cn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.fe&&(a.fe=!0);var c=b.getAttribute("media");b=Kn(b,"mediaRange",Nn,{start:0,end:null});return{zf:c,start:b.start,end:b.end}})};function Ho(a,b,c,d,e,f){var g=Io(a),h=Jo(a);Ko(h);var k=Pe(a);if(h.ac)return Bo(a,g),{yb:function(){var v=fo(h.ac,k.K.id,null,k.bandwidth||null,null);v=rc(k.K.Aa,[v]);return Ao(k,b,g,v,0,null,h.Xa)}};if(h.ja)return d||(a.presentationTimeline.zd(h.ja),a.presentationTimeline.Bd(a.X.start)),{yb:function(){return Lo(k,h,e,g,f)}};var l=null;d=null;a.ha.id&&a.K.id&&(d=a.ha.id+","+a.K.id,l=c[d]);var m=Mo(k,h,g),n=a.X.start,p=a.X.duration?a.X.start+a.X.duration:Infinity,r=Infinity!=p;l?(r&&(new U(m)).ab(n,
567
+ p,!0),l.Cb(m,a.presentationTimeline.Va())):(l=new U(m),d&&a.fb&&(c[d]=l));a.presentationTimeline.Db(m);r&&l.ab(n,p);return{yb:function(){return Promise.resolve(l)}}}function No(a){return a.ic}function Jo(a){var b=go(a,No),c=ho(a,No,"media");a=ho(a,No,"index");return{ja:b.ja,timescale:b.timescale,Ib:b.Ib,Xa:b.Xa,Ud:b.Ud,timeline:b.timeline,yd:c,ac:a}}
568
+ function Ko(a){var b=a.ac?1:0;b+=a.timeline?1:0;b+=a.ja?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.ac&&(a.timeline=null),a.ja=null);if(!a.ac&&!a.yd)throw new N(2,4,4002);}
569
+ function Lo(a,b,c,d,e){function f(I){var J=(I-r)*p,P=J+b.Xa,S=J+l;J=S+p;var aa=Math.min(J,h());S=new oi(S,aa,function(){var ba=fo(y,w,I,x,P*v);return rc(C,[ba])},0,null,d,D,l,h());S.l=J;return S}function g(){var I=[Math.max(k.Va(),l),Math.min(k.ib(),h())].map(function(J){return J-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(J){return J+r})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.X.start,m=a.ha.id,n=a.X.duration,p=b.ja,r=b.Ib,v=b.timescale,
570
+ y=b.yd,x=a.bandwidth||null,w=a.K.id,C=a.K.Aa,D=l-b.Xa,B=g();a=a.fb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var F=a;F<=B;++F){var G=f(F);c.push(G)}var H=new U(c);c=k.ib()<h();F=k.Z();if(c||F){var L=Math.max(a,B+1);H.Oc(p,function(){var I=k.Va();H.gb(I);var J=t(g());J.next();J=J.next().value;for(var P=[];L<=J;){var S=f(L);P.push(S);L++}return I>h()&&!P.length?null:P})}return Promise.resolve(H)}
571
+ function Mo(a,b,c){var d=a.X.start,e=a.X.duration,f=d-b.Xa;e=e?d+e:Infinity;for(var g=[],h={},k=t(lb(b.timeline)),l=k.next();!l.done;h={Wc:h.Wc,$c:h.$c,cd:h.cd,Tc:h.Tc,ed:h.ed,Uc:h.Uc},l=k.next()){l=l.value;var m=l.item,n=m.start,p=m.Zf;m=m.end;h.cd=l.ga+b.Ib;h.ed=p+b.Ud;h.$c=a.K.id;h.Tc=a.bandwidth||null;h.Wc=b.yd;h.Uc=a.K.Aa;g.push(new oi(d+n,d+m,function(r){return function(){var v=fo(r.Wc,r.$c,r.cd,r.Tc||null,r.ed);return rc(r.Uc,[v]).map(function(y){return y.toString()})}}(h),0,null,c,f,d,e))}return g}
572
+ function Io(a){var b=ho(a,No,"initialization");if(!b)return null;var c=a.K.id,d=a.bandwidth||null,e=a.K.Aa;return new mi(function(){var f=fo(b,c,null,d,null);return rc(e,[f])},0,null)};function Oo(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Oo.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=[]};
573
+ function Po(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P,S,aa,ba,R,za,qa,Ca,Ga,Bb;return K(function(Ta){switch(Ta.g){case 1:d=xc;Qo(b);Ro(b);So(b);To(b);if(!c&&1==b.length){e=b[0];a.g=e.vc;a.h=e.Qc;a.j=e.textStreams;a.i=e.imageStreams;Ta.v(2);break}f=-1;g=t(lb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.ga,n=l.item,a.m.has(n.id)||(a.m.add(n.id),-1==f&&(f=m));if(-1==f)return Ta["return"]();p=b.map(function(Aa){return Aa.vc});r=b.map(function(Aa){return Aa.Qc});v=b.map(function(Aa){return Aa.textStreams});
574
+ y=b.map(function(Aa){return Aa.imageStreams});x=t(v);for(w=x.next();!w.done;w=x.next())C=w.value,C.push(Uo(d.ba));D=t(y);for(B=D.next();!B.done;B=D.next())F=B.value,F.push(Uo(d.Ob));return u(Ta,Vo(a.g,p,f,Wo,Xo),3);case 3:return u(Ta,Vo(a.h,r,f,Wo,Xo),4);case 4:return u(Ta,Vo(a.j,v,f,Wo,Xo),5);case 5:return u(Ta,Vo(a.i,y,f,Wo,Xo),2);case 2:G=0;H=[];if(a.h.length&&a.g.length)for(aa=t(a.g),ba=aa.next();!ba.done;ba=aa.next())for(R=ba.value,za=t(a.h),qa=za.next();!qa.done;qa=za.next())Ca=qa.value,Ga=
575
+ ag(R.drmInfos,Ca.drmInfos),R.drmInfos.length&&Ca.drmInfos.length&&!Ga.length||(Bb=G++,H.push({id:Bb,language:R.language,primary:R.primary,audio:R,video:Ca,bandwidth:(R.bandwidth||0)+(Ca.bandwidth||0),drmInfos:Ga,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(L=a.h.concat(a.g),I=t(L),J=I.next();!J.done;J=I.next())P=J.value,S=G++,H.push({id:S,language:P.language,primary:P.primary,audio:P.type==d.eb?P:null,video:P.type==d.Ra?P:null,bandwidth:P.bandwidth||0,drmInfos:P.drmInfos,
576
+ allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});a.l=H;z(Ta)}})}
577
+ function Qo(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&&ob(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.vc=c}}
578
+ function So(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&&ob(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
579
+ function Ro(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Qc),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&&ob(e.roles,h.roles)&&pf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Qc=c}}
580
+ function To(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}}
581
+ function Yo(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P;return K(function(S){switch(S.g){case 1:b=xc;if(1==a.length)return S["return"](a[0]);c=a.map(function(aa){return aa.filter(function(ba){return ba.type==b.eb})});d=a.map(function(aa){return aa.filter(function(ba){return ba.type==b.Ra})});e=a.map(function(aa){return aa.filter(function(ba){return ba.type==b.ba})});f=a.map(function(aa){return aa.filter(function(ba){return ba.type==b.Ob})});g=t(e);for(h=g.next();!h.done;h=g.next())k=
582
+ h.value,k.push(Zo(b.ba));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Zo(b.Ob));return u(S,Vo([],c,0,$o,ap),2);case 2:return p=S.h,u(S,Vo([],d,0,$o,ap),3);case 3:return r=S.h,u(S,Vo([],e,0,$o,ap),4);case 4:return v=S.h,u(S,Vo([],f,0,$o,ap),5);case 5:y=S.h;x=0;if(r.length&&p.length)for(F=t(p),G=F.next();!G.done;G=F.next())for(H=G.value,L=t(r),I=L.next();!I.done;I=L.next())J=I.value,P=x++,J.variantIds.push(P),H.variantIds.push(P);else for(w=r.concat(p),C=t(w),D=C.next();!D.done;D=C.next())B=
583
+ D.value,B.variantIds=[x++];return S["return"](r.concat(p).concat(v).concat(y))}})}
584
+ function Vo(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P,S,aa,ba;return K(function(R){switch(R.g){case 1:f=xc;g=[];h=t(lb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.ga,p=m.item,n>=c?g.push(new Set(p)):g.push(new Set);r=t(a);v=r.next();case 2:if(v.done){R.v(4);break}y=v.value;return u(R,bp(y,b,c,e,g),5);case 5:x=R.h;if(!x)throw new N(2,4,4037);v=r.next();R.v(2);break;case 4:w=t(g),C=w.next();case 6:if(C.done){R.v(8);break}D=C.value;B=t(D);F=B.next();case 9:if(F.done){C=w.next();
585
+ R.v(6);break}G=F.value;return u(R,cp(G,b,d,e,g),12);case 12:(H=R.h)&&a.push(H);F=B.next();R.v(9);break;case 8:L=t(g);for(C=L.next();!C.done;C=L.next())for(I=C.value,J={},P=t(I),F=P.next();!F.done;J={Za:J.Za},F=P.next())if(J.Za=F.value,S=J.Za.type==f.ba&&!J.Za.language,aa=J.Za.type==f.Ob&&!J.Za.tilesLayout,!S&&!aa&&(ba=a.some(function(za){return function(qa){return qa.mimeType==za.Za.mimeType&&Vc(qa.codecs)==Vc(za.Za.codecs)}}(J))))throw new N(2,4,4037);return R["return"](a)}})}
586
+ function bp(a,b,c,d,e){var f;return K(function(g){if(1==g.g)return(f=dp(b,a))?u(g,ep(f),2):g["return"](!1);fp(a,f,c,d,e);return g["return"](!0)})}function ep(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
587
+ function cp(a,b,c,d,e){var f,g;return K(function(h){if(1==h.g)return f=c(a),(g=dp(b,f))?f.createSegmentIndex?u(h,ep(g),2):h.v(2):h["return"](null);fp(f,g,0,d,e);return h["return"](f)})}function fp(a,b,c,d,e){b=t(lb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.ga;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==kd(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}
588
+ function Wo(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Ni;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function $o(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
589
+ function Xo(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));var c=b.keyIds;c=new Set([].concat(ja(a.keyIds),ja(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=ag(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new N(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
590
+ (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Wo(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),Xo(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Xo(a.trickModeVideo,b)}
591
+ function ap(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ja(a.keyIds),ja(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ja(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
592
+ function dp(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:gp,video:gp,text:hp,image:ip}[f.type],h={audio:jp,video:kp,text:lp,image:mp}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function gp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Vc(b.codecs)!=Vc(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<ag(c,d).length:1)}return c?!1:!0}
593
+ function hp(a,b){return a.language?b.language?0==kd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function ip(a){return a.tilesLayout?!0:!1}
594
+ function jp(a,b,c){if(a.id==c.id)return!0;var d=kd(a.language,b.language),e=kd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
595
+ d=np(a.channelsCount,b.channelsCount,c.channelsCount);if(d==op)return!0;if(d==pp)return!1;d=np(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==op?!0:d==pp?!1:a.bandwidth&&qp(a.bandwidth,b.bandwidth,c.bandwidth)==op?!0:!1}
596
+ function kp(a,b,c){if(a.id==c.id)return!0;var d=np(a.width*a.height,b.width*b.height,c.width*c.height);if(d==op)return!0;if(d==pp)return!1;if(a.frameRate){d=np(a.frameRate,b.frameRate,c.frameRate);if(d==op)return!0;if(d==pp)return!1}return a.bandwidth&&qp(a.bandwidth,b.bandwidth,c.bandwidth)==op?!0:!1}
597
+ function lp(a,b,c){if(a.id==c.id)return!0;var d=kd(a.language,b.language),e=kd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
598
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function mp(a,b,c){return a.id==c.id?!0:np(a.width*a.height,b.width*b.height,c.width*c.height)==op?!0:!1}function Zo(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
599
+ function Uo(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
600
+ function np(a,b,c){if(b==a&&a!=c)return pp;if(c==a&&a!=b)return op;if(b>a){if(c<=a||c-a<b-a)return op;if(c-a>b-a)return pp}else{if(c>a)return pp;if(a-c<a-b)return op;if(a-c>a-b)return pp}return rp}function qp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?op:b<a?pp:rp}var op=1,rp=0,pp=-1;function sp(){var a=this;this.C=this.o=null;this.h=[];this.B=null;this.F=1;this.m={};this.L={};this.g=new Oo;this.D=0;this.H=new Qa(5);this.u=new O(function(){a.cc()});this.i=new Qe;this.j=null;this.I=[];this.l=Infinity;this.s=!1}q=sp.prototype;q.configure=function(a){this.o=a};q.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.s=b.isLowLatencyMode(),c.h=[a],c.C=b,u(e,tp(c),2);d=e.h;c.C&&up(c,d);if(!c.C)throw new N(2,7,7001);return e["return"](c.B)})};
601
+ q.stop=function(){for(var a=t(Object.values(this.m)),b=a.next();!b.done;b=a.next())b.value.release();this.g&&this.g.release();this.o=this.C=null;this.h=[];this.B=null;this.m={};this.g=null;null!=this.u&&(this.u.stop(),this.u=null);return this.i.destroy()};q.update=function(){var a=this,b;return K(function(c){if(1==c.g)return A(c,2),u(c,tp(a),4);if(2!=c.g)return wa(c,0);b=E(c);if(!a.C||!b)return c["return"]();a.C.onError(b);z(c)})};q.onExpirationUpdated=function(){};
602
+ function tp(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=We(a.h,a.o.retryParameters),c=a.C.networkingEngine,d=Date.now(),e=c.request(0,b),Re(a.i,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.C)return k["return"](0);f.uri&&!a.h.includes(f.uri)&&a.h.unshift(f.uri);return u(k,vp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;Ra(a.H,1,h);return k["return"](h)})}
603
+ function vp(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=Un(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.o.dash.disableXlinkProcessing)return k["return"](wp(a,d,c));f=a.o.dash.xlinkFailGracefully;g=ko(d,a.o.retryParameters,f,c,a.C.networkingEngine);Re(a.i,g);return u(k,g.promise,2)}h=k.h;return k["return"](wp(a,h,c))})}
604
+ function wp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P,S,aa,ba,R,za,qa,Ca;return K(function(Ga){switch(Ga.g){case 1:(d=a.o.dash.manifestPreprocessor)&&d(b);e=[c];f=Cn(b,"Location").map(In).filter(Zb);0<f.length&&(g=rc(e,f),e=a.h=g);h=Cn(b,"BaseURL");k=h.map(In);l=rc(e,k);m=0;h&&h.length&&(m=Kn(h[0],"availabilityTimeOffset",Rn)||0);n=a.o.dash.ignoreMinBufferTime;p=0;n||(p=Kn(b,"minBufferTime",Mn)||0);a.D=Kn(b,"minimumUpdatePeriod",Mn,-1);r=Kn(b,"availabilityStartTime",Ln);v=Kn(b,
605
+ "timeShiftBufferDepth",Mn);y=a.o.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Kn(b,"suggestedPresentationDelay",Mn));w=a.o.dash.ignoreMaxSegmentDuration;C=null;w||(C=Kn(b,"maxSegmentDuration",Mn));D=b.getAttribute("type")||"static";if(a.B)for(B=a.B.presentationTimeline,F=t(Object.values(a.m)),G=F.next();!G.done;G=F.next())H=G.value,H.gb(B.Va());else L=a.o.defaultPresentationDelay||1.5*p,I=null!=x?x:L,B=new T(r,I,a.o.dash.autoCorrectDrift);B.jc("static"==D);(J=B.Z())&&!isNaN(a.o.availabilityWindowOverride)&&
606
+ (v=a.o.availabilityWindowOverride);null==v&&(v=Infinity);B.Qd(v);P=b.getAttribute("profiles")||"";S={fb:"static"!=D,presentationTimeline:B,ha:null,X:null,ma:null,K:null,bandwidth:0,fe:!1,wb:m,profiles:P.split(",")};aa=xp(a,S,l,b);ba=aa.duration;R=aa.periods;"static"!=D&&aa.$d||B.Ma(ba||Infinity);a.l&&!a.s&&(za=a.C.isAutoLowLatencyMode())&&(a.C.enableLowLatencyMode(),a.s=a.C.isLowLatencyMode());a.s?B.ue(a.l):a.l&&Xa("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.");
607
+ B.zd(C||1);return u(Ga,Po(a.g,R,S.fb),2);case 2:if(a.B){a.B.variants=a.g.l;a.B.textStreams=a.g.j.slice();a.B.imageStreams=a.g.i;a.C.filter(a.B);Ga.v(3);break}a.B={presentationTimeline:B,variants:a.g.l,textStreams:a.g.j.slice(),imageStreams:a.g.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.ze()){Ga.v(3);break}qa=Cn(b,"UTCTiming");return u(Ga,yp(a,l,qa),5);case 5:Ca=Ga.h;if(!a.C)return Ga["return"]();B.ve(Ca);case 3:a.C.makeTextStreamsForClosedCaptions(a.B),z(Ga)}})}
608
+ function xp(a,b,c,d){var e=Kn(d,"mediaPresentationDuration",Mn),f=[],g=0;d=Cn(d,"Period");for(var h=t(lb(d)),k=h.next();!k.done;k=h.next()){var l=k.value;k=l.ga;var m=l.item,n=l.next;l=Kn(m,"start",Mn,g);var p=m.id,r=Kn(m,"duration",Mn),v=null;if(n){var y=Kn(n,"start",Mn);null!=y&&(v=y-l)}else null!=e&&(v=e-l);null==v&&(v=r);if(!(null!==a.j&&null!==p&&null!==l&&l<a.j)||a.I.includes(p)||k+1==d.length){null!==l&&(null===a.j||l>a.j)&&(a.j=l);g=zp(a,b,c,{start:l,duration:v,node:m,he:null==v||!n});f.push(g);
607
609
  b.ha.id&&v&&(a.L[b.ha.id]=v);if(null==v){g=null;break}g=l+v}}a.I=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,$d:!1}:{periods:f,duration:g,$d:!0}}
608
- function Ap(a,b,c,d){b.ha=Bp(d.node,null,c);b.X=d;b.ha.wb=b.wb;b.ha.id||(b.ha.id="__shaka_period_"+d.start);c=Dn(d.node,"EventStream");c=t(c);for(var e=c.next();!e.done;e=c.next())Cp(a,d.start,d.duration,e.value);c=Dn(d.node,"AdaptationSet").map(function(m){return Dp(a,b,m)}).filter(Zb);if(b.fb){d=[];e=t(c);for(var f=e.next();!f.done;f=e.next()){f=t(f.value.Lf);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);}d=c.filter(function(m){return!m.Sd});
609
- c=c.filter(function(m){return m.Sd});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Sd.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={pc:h.pc},l=k.next())h.pc=l.value,h.pc.trickModeVideo=e.streams.find(function(m){return function(n){return Vc(m.pc.codecs)==Vc(n.codecs)}}(h))}}}e=a.o.disableAudio?[]:Ep(d,"audio");g=a.o.disableVideo?[]:Ep(d,"video");f=a.o.disableText?[]:Ep(d,wc);c=a.o.disableThumbnails?
610
- []:Ep(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.ha.id,vc:d,Qc:e,textStreams:g,imageStreams:f}}
611
- function Ep(a,b){return a.filter(function(c){return c.contentType==b})}
612
- function Dp(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.la=Bp(c,b.ha,null);var e=!1,f=Dn(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Zb),h=void 0,k=b.la.contentType==wc;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=
613
- l}}var n;m=Dn(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var r=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==r?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==r?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Dn(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"),
614
- 10)));m=Dn(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(r=p.value,p=r.getAttribute("schemeIdUri"),r=r.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=r){r=r.split(";");for(var y=t(r),x=y.next();!x.done;x=y.next()){var w=x.value,C=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],C=w[1]||"und"):(x="CC"+p,2==r.length?p+=2:p++,C=w);v.set(x,gd(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
615
- 1,null!=r)for(r=t(r.split(";")),x=r.next();!x.done;x=r.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,w=x),v.set(y,gd(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=r&&(g.push(r),"captions"==r&&(h="caption"));if(l)return null;l=Dn(c,"ContentProtection");var D=Wn(l,a.o.dash.ignoreDrmInfo,a.o.dash.keySystemsByURI),B=gd(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=Dn(c,"Label"))&&l.length&&
616
- (l=l[0],l.textContent&&(F=l.textContent));l=Dn(c,"Representation");c=l.map(function(G){if(G=Fp(a,b,D,h,B,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.la.contentType;if(a.o.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.la.contentType||"application"==b.la.contentType)for(b.la.contentType=Gp(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.la.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
617
- m.value,p=t(D.drmInfos),r=p.next();!r.done;r=p.next())r=r.value,r.keyIds=r.keyIds&&m.keyIds?new Set([].concat(ja(r.keyIds),ja(m.keyIds))):r.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Zb);return{id:b.la.id||"__fake__"+a.F++,contentType:b.la.contentType,language:B,Ag:e,streams:c,drmInfos:D.drmInfos,Sd:f,Lf:k}}
618
- function Fp(a,b,c,d,e,f,g,h,k,l){b.K=Bp(l,b.la,null);a.l=Math.min(a.l,b.K.wb);if(!Hp(b.K))return null;var m=b.X.start;b.bandwidth=Ln(l,"bandwidth",Qn)||0;var n=b.K.contentType,p=n==wc||"application"==n;n="image"==n;try{var r=function(G,H,L){return Ip(a,G,H,L)};if(b.K.fc)var v=xo(b,r);else if(b.K.cb)v=Do(b,a.m);else if(b.K.hc)v=Io(b,r,a.m,!!a.B,a.o.dash.initialSegmentLimit,a.L);else{var y=b.K.Aa,x=b.X.duration||0;v={yb:function(){return Promise.resolve(Mi(m,x,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
619
- throw G;}r=Dn(l,"ContentProtection");r=Zn(r,c,a.o.dash.ignoreDrmInfo,a.o.dash.keySystemsByURI);r=new Set(r?[r]:[]);var w=!1;Dn(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(b.K.mimeType="audio/eac3-joc",w=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var D;if(n&&((l=Dn(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile",
610
+ function zp(a,b,c,d){b.ha=Ap(d.node,null,c);b.X=d;b.ha.wb=b.wb;b.ha.id||(b.ha.id="__shaka_period_"+d.start);var e=Cn(d.node,"EventStream");c=b.presentationTimeline.Va();e=t(e);for(var f=e.next();!f.done;f=e.next())Bp(a,d.start,d.duration,f.value,c);c=Cn(d.node,"AdaptationSet").map(function(m){return Cp(a,b,m)}).filter(Zb);if(b.fb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Lf);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);
611
+ }d=c.filter(function(m){return!m.Sd});c=c.filter(function(m){return m.Sd});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Sd.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={qc:h.qc},l=k.next())h.qc=l.value,h.qc.trickModeVideo=e.streams.find(function(m){return function(n){return Vc(m.qc.codecs)==Vc(n.codecs)}}(h))}}}e=a.o.disableAudio?[]:Dp(d,"audio");g=a.o.disableVideo?[]:Dp(d,"video");f=a.o.disableText?
612
+ []:Dp(d,wc);c=a.o.disableThumbnails?[]:Dp(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.ha.id,vc:d,Qc:e,textStreams:g,imageStreams:f}}
613
+ function Dp(a,b){return a.filter(function(c){return c.contentType==b})}
614
+ function Cp(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.ma=Ap(c,b.ha,null);var e=!1,f=Cn(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Zb),h=void 0,k=b.ma.contentType==wc;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=
615
+ l}}var n;m=Cn(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var r=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==r?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==r?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Cn(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"),
616
+ 10)));m=Cn(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(r=p.value,p=r.getAttribute("schemeIdUri"),r=r.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=r){r=r.split(";");for(var y=t(r),x=y.next();!x.done;x=y.next()){var w=x.value,C=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],C=w[1]||"und"):(x="CC"+p,2==r.length?p+=2:p++,C=w);v.set(x,gd(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
617
+ 1,null!=r)for(r=t(r.split(";")),x=r.next();!x.done;x=r.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,w=x),v.set(y,gd(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=r&&(g.push(r),"captions"==r&&(h="caption"));if(l)return null;l=Cn(c,"ContentProtection");var D=Vn(l,a.o.dash.ignoreDrmInfo,a.o.dash.keySystemsByURI),B=gd(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=Cn(c,"Label"))&&l.length&&
618
+ (l=l[0],l.textContent&&(F=l.textContent));l=Cn(c,"Representation");c=l.map(function(G){if(G=Ep(a,b,D,h,B,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.ma.contentType;if(a.o.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ma.contentType||"application"==b.ma.contentType)for(b.ma.contentType=Fp(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ma.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
619
+ m.value,p=t(D.drmInfos),r=p.next();!r.done;r=p.next())r=r.value,r.keyIds=r.keyIds&&m.keyIds?new Set([].concat(ja(r.keyIds),ja(m.keyIds))):r.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Zb);return{id:b.ma.id||"__fake__"+a.F++,contentType:b.ma.contentType,language:B,Ag:e,streams:c,drmInfos:D.drmInfos,Sd:f,Lf:k}}
620
+ function Ep(a,b,c,d,e,f,g,h,k,l){b.K=Ap(l,b.ma,null);a.l=Math.min(a.l,b.K.wb);if(!Gp(b.K))return null;var m=b.X.start;b.bandwidth=Kn(l,"bandwidth",Pn)||0;var n=b.K.contentType,p=n==wc||"application"==n;n="image"==n;try{var r=function(G,H,L){return Hp(a,G,H,L)};if(b.K.hc)var v=wo(b,r);else if(b.K.cb)v=Co(b,a.m);else if(b.K.ic)v=Ho(b,r,a.m,!!a.B,a.o.dash.initialSegmentLimit,a.L);else{var y=b.K.Aa,x=b.X.duration||0;v={yb:function(){return Promise.resolve(Mi(m,x,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
621
+ throw G;}r=Cn(l,"ContentProtection");r=Yn(r,c,a.o.dash.ignoreDrmInfo,a.o.dash.keySystemsByURI);r=new Set(r?[r]:[]);var w=!1;Cn(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(b.K.mimeType="audio/eac3-joc",w=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var D;if(n&&((l=Cn(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile",
620
622
  "http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&(D=l.getAttribute("value")),!D))return null;var B;l=b.K.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"))&&(B="PQ");var F={id:a.F++,originalId:b.K.id,createSegmentIndex:function(){var G;return K(function(H){if(1==H.g){if(F.segmentIndex)return H.v(0);G=F;return u(H,v.yb(),3)}G.segmentIndex=H.h;z(H)})},segmentIndex:null,
621
- mimeType:b.K.mimeType,codecs:b.K.codecs,frameRate:b.K.frameRate,pixelAspectRatio:b.K.pixelAspectRatio,bandwidth:b.bandwidth,width:b.K.width,height:b.K.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:r,language:e,label:f,type:b.la.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.K.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.K.Cd,audioSamplingRate:b.K.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:B,tilesLayout:D};return F}
622
- q.bc=function(){var a=this,b,c;return K(function(d){switch(d.g){case 1:return b=0,A(d,2),u(d,up(a),4);case 4:b=d.h;wa(d,3);break;case 2:c=E(d),a.C&&(c.severity=1,a.C.onError(c));case 3:if(!a.C)return d["return"]();vp(a,b);z(d)}})};function vp(a,b){0>a.D||a.u.V(Math.max(3,a.D-b,Ta(a.H)))}
623
- function Bp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Cd:null,audioSamplingRate:null,wb:0};c=c||b.Aa;var d=Dn(a,"BaseURL"),e=d.map(Jn),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Ln(a,"frameRate",Tn)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Dn(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
624
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Dn(a,"AudioChannelConfiguration");m=Jp(m)||b.Cd;p=Ln(a,"audioSamplingRate",Rn)||b.audioSamplingRate;f||(f=Gp(g,h));var r=Cn(a,"SegmentBase"),v=Cn(a,"SegmentTemplate"),y=r?Ln(r,"availabilityTimeOffset",Sn)||0:0,x=v?Ln(v,"availabilityTimeOffset",Sn)||0:0;d=d&&d.length?Ln(d[0],"availabilityTimeOffset",Sn)||0:0;d=b.wb+d+y+x;return{Aa:rc(c,e),fc:r||b.fc,cb:Cn(a,"SegmentList")||b.cb,hc:v||b.hc,width:Ln(a,"width",Rn)||b.width,height:Ln(a,
625
- "height",Rn)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Cd:m,audioSamplingRate:p,wb:d}}
626
- function Jp(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=
627
- 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 Hp(a){var b=a.fc?1:0;b+=a.cb?1:0;b+=a.hc?1:0;if(0==b)return a.contentType==wc||"application"==a.contentType?!0:!1;1!=b&&(a.fc&&(a.cb=null),a.hc=null);return!0}
628
- function Kp(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=rc(b,[c]),f=We(e,a.o.retryParameters),f.method=d,g=a.C.networkingEngine.request(4,f),Re(a.i,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=Bc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
629
- function zp(a,b,c){var d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.o.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.v(4);break}h=g.value;A(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.v(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.v(8);
630
- 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":Xa("NTP UTCTiming scheme is not supported");break;default:Xa("Unrecognized scheme in UTCTiming element",k)}n.v(9);break;case 7:return u(n,Kp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,Kp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
623
+ mimeType:b.K.mimeType,codecs:b.K.codecs,frameRate:b.K.frameRate,pixelAspectRatio:b.K.pixelAspectRatio,bandwidth:b.bandwidth,width:b.K.width,height:b.K.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:r,language:e,label:f,type:b.ma.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.K.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.K.Cd,audioSamplingRate:b.K.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:B,tilesLayout:D};return F}
624
+ q.cc=function(){var a=this,b,c;return K(function(d){switch(d.g){case 1:return b=0,A(d,2),u(d,tp(a),4);case 4:b=d.h;wa(d,3);break;case 2:c=E(d),a.C&&(c.severity=1,a.C.onError(c));case 3:if(!a.C)return d["return"]();up(a,b);z(d)}})};function up(a,b){0>a.D||a.u.U(Math.max(3,a.D-b,Sa(a.H)))}
625
+ function Ap(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Cd:null,audioSamplingRate:null,wb:0};c=c||b.Aa;var d=Cn(a,"BaseURL"),e=d.map(In),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Kn(a,"frameRate",Sn)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Cn(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
626
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Cn(a,"AudioChannelConfiguration");m=Ip(m)||b.Cd;p=Kn(a,"audioSamplingRate",Qn)||b.audioSamplingRate;f||(f=Fp(g,h));var r=Bn(a,"SegmentBase"),v=Bn(a,"SegmentTemplate"),y=r?Kn(r,"availabilityTimeOffset",Rn)||0:0,x=v?Kn(v,"availabilityTimeOffset",Rn)||0:0;d=d&&d.length?Kn(d[0],"availabilityTimeOffset",Rn)||0:0;d=b.wb+d+y+x;return{Aa:rc(c,e),hc:r||b.hc,cb:Bn(a,"SegmentList")||b.cb,ic:v||b.ic,width:Kn(a,"width",Qn)||b.width,height:Kn(a,
627
+ "height",Qn)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Cd:m,audioSamplingRate:p,wb:d}}
628
+ function Ip(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=
629
+ 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 Gp(a){var b=a.hc?1:0;b+=a.cb?1:0;b+=a.ic?1:0;if(0==b)return a.contentType==wc||"application"==a.contentType?!0:!1;1!=b&&(a.hc&&(a.cb=null),a.ic=null);return!0}
630
+ function Jp(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=rc(b,[c]),f=We(e,a.o.retryParameters),f.method=d,g=a.C.networkingEngine.request(4,f),Re(a.i,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=Bc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
631
+ function yp(a,b,c){var d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.o.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.v(4);break}h=g.value;A(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.v(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.v(8);
632
+ 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":Xa("NTP UTCTiming scheme is not supported");break;default:Xa("Unrecognized scheme in UTCTiming element",k)}n.v(9);break;case 7:return u(n,Jp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,Jp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
631
633
  case 9:wa(n,3);break;case 5:E(n);case 3:g=f.next();n.v(2);break;case 4:return Xa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
632
- function Cp(a,b,c,d){var e=d.getAttribute("schemeIdUri")||"",f=d.getAttribute("value")||"",g=Ln(d,"timescale",Rn)||1;d=t(Dn(d,"Event"));for(var h=d.next();!h.done;h=d.next()){h=h.value;var k=Ln(h,"presentationTime",Rn)||0,l=Ln(h,"duration",Rn)||0;k=k/g+b;l=k+l/g;null!=c&&(k=Math.min(k,b+c),l=Math.min(l,b+c));h={schemeIdUri:e,value:f,startTime:k,endTime:l,id:h.getAttribute("id")||"",eventElement:h};a.C.onTimelineRegionAdded(h)}}
633
- function Ip(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=bf,f=Zi(b,c,d,a.o.retryParameters),g=a.C.networkingEngine,h=g.request(e,f),Re(a.i,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Gp(a,b){return Yc(Tc(a,b))?wc:a.split("/")[0]}M("shaka.dash.DashParser",tp);gg.mpd=function(){return new tp};eg["application/dash+xml"]=function(){return new tp};eg["video/vnd.mpeg.dash.mpd"]=function(){return new tp};function Lp(a,b,c,d){this.g=a;this.type=b;this.W=c;this.segments=d||null}function Mp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Mp.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};
634
- Mp.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 Np(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function Op(a,b,c){c=void 0===c?[]:c;this.W=b;this.g=a;this.h=c}function Pp(a,b){this.name=a;this.value=b};function Qp(a,b){return a.filter(function(c){return c.name==b})}function Rp(a,b){return a.filter(function(c){return Np(c,"TYPE")==b})}function Sp(a,b){var c=Qp(a,b);return c.length?c[0]:null}function Tp(a,b,c){c=void 0===c?0:c;return(a=Sp(a,b))?Number(a.value):c};function Up(a){this.h=a;this.g=0}function Vp(a){Wp(a,/[ \t]+/gm)}function Wp(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 Xp(a){return a.g==a.h.length?null:(a=Wp(a,/[^ \t\n]*/gm))?a[0]:null};function Yp(){this.g=0}
635
- function Zp(a,b,c){b=Bc(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=$p(a.g++,g),--a.g,aq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=t(lb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.ga;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=$p(a.g++,
636
- l);if(bq.includes(l.name)){if(1!=b)throw new N(2,4,4017);k=d.splice(h,d.length-h);d=c;e=[];g=[];h=[];l=null;k=t(k);for(var m=k.next();!m.done;m=k.next())m=m.value,/^(#EXT)/.test(m)?(m=$p(a.g++,m),aq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?l=m:"EXT-X-PART"==m.name?h.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?h.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",l=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=rc([d],[m.trim()])[0],l&&g.push(l),e.push(new Op(m,g,h)),g=[],h=[]);h.length&&(l&&
637
- g.push(l),e.push(new Op("",g,h)));return new Lp(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.g.push(new Pp("URI",k)),e=!0)}}return new Lp(c,b,f)}function $p(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new N(2,4,4016,b);var d=c[1],e=c[2];c=[];var f;if(e){e=new Up(e);var g;(g=Wp(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=Wp(e,h);)c.push(new Pp(g[1],g[2]||g[3]))}return new Mp(a,d,c,f)}
638
- var aq="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(" "),bq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function cq(){}function dq(a){try{var b=eq(a);return Ie({uri:a,me:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ge(c)}}function eq(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=Kc(a):e=Fc(a);return{data:e,contentType:c}}
639
- M("shaka.net.DataUriPlugin",cq);cq.parse=dq;Te("data",dq);function fq(){var a=this;this.o=this.C=null;this.Pa=1;this.l=new Map;this.s=new Map;this.Ha=new Set;this.g=new Map;this.h=null;this.L="";this.ea=new Yp;this.sa=0;this.u=new O(function(){a.bc()});this.j=gq;this.B=null;this.ra=0;this.F=Infinity;this.Z=this.Za=0;this.D=new Qe;this.T=[];this.I=new Map;this.Ya=!1;this.m=new Map;this.O=null;this.qa=new Map;this.H=new Map;this.i=!1}q=fq.prototype;q.configure=function(a){this.o=a};
640
- q.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.C=b,c.i=b.isLowLatencyMode(),u(f,hq(c,We([a],c.o.retryParameters),0),2);if(3!=f.g)return d=f.h,c.L=d.uri,u(f,iq(c,d.data),3);e=c.sa;0<e&&c.u.V(e);return f["return"](c.B)})};q.stop=function(){this.u&&(this.u.stop(),this.u=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.o=this.C=null;this.Ha.clear();this.B=null;this.g.clear();this.s.clear();this.m.clear();this.l.clear();return Promise.all(a)};
641
- q.update=function(){var a=this,b,c,d;return K(function(e){if(1==e.g){if(a.j==gq)return e["return"]();b=[];a.O=null;c=Array.from(a.g.values());return c.length?u(e,jq(a,c[0]),2):e.v(2)}for(d=1;d<c.length;d++)b.push(jq(a,c[d]));return u(e,Promise.all(b),0)})};
642
- function jq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v;return K(function(y){if(1==y.g)return c=kq,d=b.Ee,e=new ec(d),a.i&&b.Je&&hc(e,new jc("_HLS_skip=YES")),u(y,hq(a,We([e.toString()],a.o.retryParameters),0),2);if(3!=y.g){f=y.h;g=Zp(a.ea,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=Qp(g.W,"EXT-X-DEFINE");k=lq(a,h);l=b.stream;return u(y,mq(a,b.Pc,g,l.type,l.mimeType,b.xd,k,b.Qe),3)}m=y.h;l.segmentIndex.Cb(m,a.h.ab());m.length&&(n=Tp(g.W,"EXT-X-MEDIA-SEQUENCE",0),p=b.xd.get(n),l.segmentIndex.gb(p));
643
- r=m[m.length-1];if(v=Sp(g.W,"EXT-X-ENDLIST"))nq(a,c.De),a.h.Ma(r.endTime);z(y)})}q.onExpirationUpdated=function(){};
644
- function iq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P,Q,ba,aa,T,ya,pa,Ca,Ga,Bb,Sa;return K(function(za){switch(za.g){case 1:c=Zp(a.ea,b,a.L);if(0!=c.type)throw new N(2,4,4022);d=Qp(c.W,"EXT-X-DEFINE");oq(a,d);e=Qp(c.W,"EXT-X-MEDIA");f=Qp(c.W,"EXT-X-STREAM-INF");g=Qp(c.W,"EXT-X-IMAGE-STREAM-INF");pq(a,f);h=Qp(c.W,"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"),r=Z(m,"LANGUAGE"),v=Z(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
645
- rc([a.L],[p])[0]),r&&y.set("language",r),v&&y.set("value",v),x=new R("sessiondata",y),a.C)a.C.onEvent(x);return u(za,qq(a,e),2);case 2:return rq(a,e),u(za,sq(a,f),3);case 3:return w=za.h,u(za,tq(a,e),4);case 4:return C=za.h,u(za,uq(a,g),5);case 5:D=za.h;if(!a.C)throw new N(2,7,7001);if(a.Ya&&0==w.length)throw new N(2,4,4034);F=B=Infinity;G=t(a.g.values());for(H=G.next();!H.done;H=G.next())L=H.value,B=Math.min(B,L.ke),"text"!=L.stream.type&&(F=Math.min(F,L.yf-L.ke));a.j!=gq?(a.h=new S(0,a.o.defaultPresentationDelay?
646
- a.o.defaultPresentationDelay:a.Z?a.Z:3*a.ra),a.h.ic(!1)):(a.h=new S(null,0),a.h.ic(!0));vq(a);if(a.j!=gq)a.sa=a.F,I=kq,a.j==I.Ce&&(J=a.h.Lc,isNaN(a.o.availabilityWindowOverride)||(J=a.o.availabilityWindowOverride),a.h.Qd(J));else for(a.h.Ma(F),a.h.offset(-B),P=t(a.g.values()),H=P.next();!H.done;H=P.next())Q=H.value,Q.stream.segmentIndex.offset(-B),Q.stream.segmentIndex.$a(0,F);a.T=[];ba=[];aa=t(w);for(T=aa.next();!T.done;T=aa.next())for(ya=T.value,pa=t([ya.video,ya.audio]),Ca=pa.next();!Ca.done;Ca=
647
- pa.next())(Ga=Ca.value)&&ba.push(Ga);return u(za,Promise.all(ba.map(function(ee){return K(function(rf){return u(rf,ee.createSegmentIndex(),0)})})),6);case 6:Bb=t(ba);for(Ca=Bb.next();!Ca.done;Ca=Bb.next())Sa=Ca.value,a.T.push(Sa.segmentIndex.M);vq(a);a.B={presentationTimeline:a.h,variants:w,textStreams:C,imageStreams:D,offlineSessionIds:[],minBufferTime:0};a.C.makeTextStreamsForClosedCaptions(a.B);z(za)}})}
648
- function oq(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.l.has(d)||a.l.set(d,e))}}function lq(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.l.get(f))&&c.set(f,e)}return c}
649
- function pq(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=wq(a,e);if(g){var h=uc(wc,e);a.m.set(g,h);nb(e,h)}f&&(g=tc("audio",e),a.m.set(f,g));d&&(f=tc("video",e),a.m.set(d,f))}}
650
- function tq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r;return K(function(v){if(1==v.g)return c=Rp(b,"SUBTITLES"),d=c.map(function(y){var x,w,C;return K(function(D){if(1==D.g){if(x=a.o.disableText)return D["return"](null);A(D,2);return u(D,xq(a,y),4)}if(2!=D.g)return w=D.h,D["return"](w.stream);C=E(D);if(a.o.hls.ignoreTextStreamFailures)return D["return"](null);throw C;})}),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=Np(h,"GROUP-ID"),l=a.m.get(k))if(m=a.s.get(k))for(n=
634
+ function Bp(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Kn(d,"timescale",Qn)||1;d=t(Cn(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Kn(k,"presentationTime",Qn)||0,m=Kn(k,"duration",Qn)||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.C.onTimelineRegionAdded(k))}}
635
+ function Hp(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=bf,f=Yi(b,c,d,a.o.retryParameters),g=a.C.networkingEngine,h=g.request(e,f),Re(a.i,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Fp(a,b){return Yc(Tc(a,b))?wc:a.split("/")[0]}M("shaka.dash.DashParser",sp);gg.mpd=function(){return new sp};eg["application/dash+xml"]=function(){return new sp};eg["video/vnd.mpeg.dash.mpd"]=function(){return new sp};function Kp(a,b,c,d){this.g=a;this.type=b;this.W=c;this.segments=d||null}function Lp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Lp.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};
636
+ Lp.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 Mp(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function Np(a,b,c){c=void 0===c?[]:c;this.W=b;this.g=a;this.h=c}function Op(a,b){this.name=a;this.value=b};function Pp(a,b){return a.filter(function(c){return c.name==b})}function Qp(a,b){return a.filter(function(c){return Mp(c,"TYPE")==b})}function Rp(a,b){var c=Pp(a,b);return c.length?c[0]:null}function Sp(a,b,c){c=void 0===c?0:c;return(a=Rp(a,b))?Number(a.value):c};function Tp(a){this.h=a;this.g=0}function Up(a){Vp(a,/[ \t]+/gm)}function Vp(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 Wp(a){return a.g==a.h.length?null:(a=Vp(a,/[^ \t\n]*/gm))?a[0]:null};function Xp(){this.g=0}
637
+ function Yp(a,b,c){b=Bc(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=Zp(a.g++,g),--a.g,$p.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=t(lb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.ga;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=Zp(a.g++,
638
+ l);if(aq.includes(l.name)){if(1!=b)throw new N(2,4,4017);k=d.splice(h,d.length-h);d=c;e=[];g=[];h=[];l=null;k=t(k);for(var m=k.next();!m.done;m=k.next())m=m.value,/^(#EXT)/.test(m)?(m=Zp(a.g++,m),$p.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?l=m:"EXT-X-PART"==m.name?h.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?h.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",l=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=rc([d],[m.trim()])[0],l&&g.push(l),e.push(new Np(m,g,h)),g=[],h=[]);h.length&&(l&&
639
+ g.push(l),e.push(new Np("",g,h)));return new Kp(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.g.push(new Op("URI",k)),e=!0)}}return new Kp(c,b,f)}function Zp(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new N(2,4,4016,b);var d=c[1],e=c[2];c=[];var f;if(e){e=new Tp(e);var g;(g=Vp(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=Vp(e,h);)c.push(new Op(g[1],g[2]||g[3])),Up(e)}return new Lp(a,d,c,f)}
640
+ var $p="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(" "),aq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function bq(){}function cq(a){try{var b=dq(a);return Ie({uri:a,me:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ge(c)}}function dq(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=Kc(a):e=Fc(a);return{data:e,contentType:c}}
641
+ M("shaka.net.DataUriPlugin",bq);bq.parse=cq;Te("data",cq);function eq(){var a=this;this.o=this.C=null;this.Pa=1;this.l=new Map;this.s=new Map;this.Ha=new Set;this.g=new Map;this.h=null;this.L="";this.ea=new Xp;this.sa=0;this.u=new O(function(){a.cc()});this.j=fq;this.B=null;this.ra=0;this.F=Infinity;this.Y=this.$a=0;this.D=new Qe;this.V=[];this.I=new Map;this.Qa=!1;this.m=new Map;this.O=null;this.la=new Map;this.H=new Map;this.i=!1}q=eq.prototype;q.configure=function(a){this.o=a};
642
+ q.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.C=b,c.i=b.isLowLatencyMode(),u(f,gq(c,We([a],c.o.retryParameters),0),2);if(3!=f.g)return d=f.h,c.L=d.uri,u(f,hq(c,d.data),3);e=c.sa;0<e&&c.u.U(e);return f["return"](c.B)})};q.stop=function(){this.u&&(this.u.stop(),this.u=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.o=this.C=null;this.Ha.clear();this.B=null;this.g.clear();this.s.clear();this.m.clear();this.l.clear();return Promise.all(a)};
643
+ q.update=function(){var a=this,b,c,d;return K(function(e){if(1==e.g){if(a.j==fq)return e["return"]();b=[];a.O=null;c=Array.from(a.g.values());return c.length?u(e,iq(a,c[0]),2):e.v(2)}for(d=1;d<c.length;d++)b.push(iq(a,c[d]));return u(e,Promise.all(b),0)})};
644
+ function iq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v;return K(function(y){if(1==y.g)return c=jq,d=b.Ee,e=new ec(d),a.i&&b.Je&&hc(e,new jc("_HLS_skip=YES")),u(y,gq(a,We([e.toString()],a.o.retryParameters),0),2);if(3!=y.g){f=y.h;g=Yp(a.ea,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=Pp(g.W,"EXT-X-DEFINE");k=kq(a,h);l=b.stream;return u(y,lq(a,b.Pc,g,l.type,l.mimeType,b.xd,k,b.Qe),3)}m=y.h;l.segmentIndex.Cb(m,a.h.Va());m.length&&(n=Sp(g.W,"EXT-X-MEDIA-SEQUENCE",0),p=b.xd.get(n),l.segmentIndex.gb(p));
645
+ r=m[m.length-1];if(v=Rp(g.W,"EXT-X-ENDLIST"))mq(a,c.De),a.h.Ma(r.endTime);z(y)})}q.onExpirationUpdated=function(){};
646
+ function hq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P,S,aa,ba,R,za,qa,Ca,Ga,Bb,Ta;return K(function(Aa){switch(Aa.g){case 1:c=Yp(a.ea,b,a.L);if(0!=c.type)throw new N(2,4,4022);d=Pp(c.W,"EXT-X-DEFINE");nq(a,d);e=Pp(c.W,"EXT-X-MEDIA");f=Pp(c.W,"EXT-X-STREAM-INF");g=Pp(c.W,"EXT-X-IMAGE-STREAM-INF");oq(a,f);h=Pp(c.W,"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"),r=Z(m,"LANGUAGE"),v=Z(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
647
+ rc([a.L],[p])[0]),r&&y.set("language",r),v&&y.set("value",v),x=new Q("sessiondata",y),a.C)a.C.onEvent(x);return u(Aa,pq(a,e),2);case 2:return qq(a,e),u(Aa,rq(a,f),3);case 3:return w=Aa.h,u(Aa,sq(a,e),4);case 4:return C=Aa.h,u(Aa,tq(a,g),5);case 5:D=Aa.h;if(!a.C)throw new N(2,7,7001);if(a.Qa&&0==w.length)throw new N(2,4,4034);F=B=Infinity;G=t(a.g.values());for(H=G.next();!H.done;H=G.next())L=H.value,B=Math.min(B,L.ke),"text"!=L.stream.type&&(F=Math.min(F,L.yf-L.ke));a.j!=fq?(a.h=new T(0,a.o.defaultPresentationDelay?
648
+ a.o.defaultPresentationDelay:a.Y?a.Y:3*a.ra),a.h.jc(!1)):(a.h=new T(null,0),a.h.jc(!0));uq(a);if(a.j!=fq)a.sa=a.F,I=jq,a.j==I.Ce&&(J=a.h.Lc,isNaN(a.o.availabilityWindowOverride)||(J=a.o.availabilityWindowOverride),a.h.Qd(J));else for(a.h.Ma(F),a.h.offset(-B),P=t(a.g.values()),H=P.next();!H.done;H=P.next())S=H.value,S.stream.segmentIndex.offset(-B),S.stream.segmentIndex.ab(0,F);a.V=[];aa=[];ba=t(w);for(R=ba.next();!R.done;R=ba.next())for(za=R.value,qa=t([za.video,za.audio]),Ca=qa.next();!Ca.done;Ca=
649
+ qa.next())(Ga=Ca.value)&&aa.push(Ga);return u(Aa,Promise.all(aa.map(function(fe){return K(function(sf){return u(sf,fe.createSegmentIndex(),0)})})),6);case 6:Bb=t(aa);for(Ca=Bb.next();!Ca.done;Ca=Bb.next())Ta=Ca.value,a.V.push(Ta.segmentIndex.M);uq(a);a.B={presentationTimeline:a.h,variants:w,textStreams:C,imageStreams:D,offlineSessionIds:[],minBufferTime:0};a.C.makeTextStreamsForClosedCaptions(a.B);z(Aa)}})}
650
+ function nq(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.l.has(d)||a.l.set(d,e))}}function kq(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.l.get(f))&&c.set(f,e)}return c}
651
+ function oq(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=vq(a,e);if(g){var h=uc(wc,e);a.m.set(g,h);nb(e,h)}f&&(g=tc("audio",e),a.m.set(f,g));d&&(f=tc("video",e),a.m.set(d,f))}}
652
+ function sq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r;return K(function(v){if(1==v.g)return c=Qp(b,"SUBTITLES"),d=c.map(function(y){var x,w,C;return K(function(D){if(1==D.g){if(x=a.o.disableText)return D["return"](null);A(D,2);return u(D,wq(a,y),4)}if(2!=D.g)return w=D.h,D["return"](w.stream);C=E(D);if(a.o.hls.ignoreTextStreamFailures)return D["return"](null);throw C;})}),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=Mp(h,"GROUP-ID"),l=a.m.get(k))if(m=a.s.get(k))for(n=
651
653
  t(m),p=n.next();!p.done;p=n.next())r=p.value,r.stream.codecs=l;return v["return"](e.filter(function(y){return y}))})}
652
- function uq(a,b){var c,d;return K(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return K(function(l){if(1==l.g){if(g=a.o.disableThumbnails)return l["return"](null);A(l,2);return u(l,yq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=E(l);if(a.o.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}))})}
653
- function qq(a,b){var c;return K(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,xq(a,b[0]),2):d.v(2);c=b.slice(1).map(function(e){return xq(a,e)});return u(d,Promise.all(c),0)})}
654
- function sq(a,b){var c,d,e;return K(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,r,v;return K(function(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(Np(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,r=Z(g,"VIDEO-RANGE"),u(y,zq(a,g),2);if(v=y.h){for(var x=y["return"],w=v.audio,C=v.video,D=t(C),B=D.next();!B.done;B=D.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
654
+ function tq(a,b){var c,d;return K(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return K(function(l){if(1==l.g){if(g=a.o.disableThumbnails)return l["return"](null);A(l,2);return u(l,xq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=E(l);if(a.o.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}))})}
655
+ function pq(a,b){var c;return K(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,wq(a,b[0]),2):d.v(2);c=b.slice(1).map(function(e){return wq(a,e)});return u(d,Promise.all(c),0)})}
656
+ function rq(a,b){var c,d,e;return K(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,r,v;return K(function(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(Mp(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,r=Z(g,"VIDEO-RANGE"),u(y,yq(a,g),2);if(v=y.h){for(var x=y["return"],w=v.audio,C=v.video,D=t(C),B=D.next();!B.done;B=D.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
655
657
  void 0,B.frameRate=Number(h)||void 0,B.hdr=r||void 0;D=a.o.disableAudio;if(!w.length||D)w=[null];D=a.o.disableVideo;if(!C.length||D)C=[null];D=[];w=t(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var F=t(C),G=F.next();!G.done;G=F.next()){var H=G.value;G=B?B.stream:null;var L=H?H.stream:null,I=B?B.stream.drmInfos:null,J=H?H.stream.drmInfos:null;H=(H?H.Pc:"")+" - "+(B?B.Pc:"");G&&L&&I.length&&J.length&&!(0<ag(I,J).length)||a.Ha.has(H)||(G={id:a.Pa++,language:G?G.language:"und",primary:!!G&&G.primary||
656
658
  !!L&&L.primary,audio:G,video:L,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},D.push(G),a.Ha.add(H))}}y=x.call(y,D)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Xb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
657
- function zq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return K(function(x){if(1==x.g)return c=xc,d=wq(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.s.has(g)?a.s.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Np(b,"URI"),p=k.audio.find(function(w){return w&&w.Pc==n}),r=uc(c.Qa,d),(v=uc(c.eb,d))&&!r?l=c.eb:!h.length&&v&&r?(l=c.Qa,d=[[r,v].join()]):k.audio.length&&p?(l=c.eb,m=!0):l=k.video.length?c.eb:c.Qa,m?x.v(2):u(x,Aq(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===y)return x["return"](null);
658
- Bq(k);return x["return"](k)})}function wq(a,b){var c=[];a.o.disableVideo||c.push("avc1.42E01E");a.o.disableAudio||c.push("mp4a.40.2");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=Vc(f);c.has(g)||(e.push(f),c.add(g))}return e}function Cq(a){a=Z(a,"LANGUAGE")||"und";return gd(a)}
659
- function Bq(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 rq(a,b){var c=Rp(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Cq(e);var f=Np(e,"GROUP-ID");e=Np(e,"INSTREAM-ID");a.I.get(f)||a.I.set(f,new Map);a.I.get(f).set(e,d)}}
660
- function xq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return K(function(x){if(1==x.g){c=Np(b,"GROUP-ID");d="";var w=Np(b,"TYPE").toLowerCase();"subtitles"==w&&(w=wc);e=w;e!=wc&&c&&a.m.has(c)&&(d=a.m.get(c));f=Dq(Np(b,"URI"),a.l);if(a.g.has(f))return x["return"](a.g.get(f));g=Cq(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Z(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Z(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=Z(b,"CHARACTERISTICS");r=Z(b,"FORCED");
661
- v="YES"==r;return u(x,Eq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.s.has(c)?a.s.get(c).push(y):a.s.set(c,[y]);if(null==y)return x["return"](null);if(a.g.has(f))return x["return"](a.g.get(f));a.g.set(f,y);return x["return"](y)})}
662
- function yq(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(p){if(1==p.g){c=Dq(Np(b,"URI"),a.l);d=Z(b,"CODECS","jpeg")||"";if(a.g.has(c))return p["return"](a.g.get(c));e=Cq(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,Eq(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.g.has(c))return p["return"](a.g.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=
659
+ function yq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return K(function(x){if(1==x.g)return c=xc,d=vq(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.s.has(g)?a.s.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Mp(b,"URI"),p=k.audio.find(function(w){return w&&w.Pc==n}),r=uc(c.Ra,d),(v=uc(c.eb,d))&&!r?l=c.eb:!h.length&&v&&r?(l=c.Ra,d=[[r,v].join()]):k.audio.length&&p?(l=c.eb,m=!0):l=k.video.length?c.eb:c.Ra,m?x.v(2):u(x,zq(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===y)return x["return"](null);
660
+ Aq(k);return x["return"](k)})}function vq(a,b){var c=[];a.o.disableVideo||c.push("avc1.42E01E");a.o.disableAudio||c.push("mp4a.40.2");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=Vc(f);c.has(g)||(e.push(f),c.add(g))}return e}function Bq(a){a=Z(a,"LANGUAGE")||"und";return gd(a)}
661
+ function Aq(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 qq(a,b){var c=Qp(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Bq(e);var f=Mp(e,"GROUP-ID");e=Mp(e,"INSTREAM-ID");a.I.get(f)||a.I.set(f,new Map);a.I.get(f).set(e,d)}}
662
+ function wq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return K(function(x){if(1==x.g){c=Mp(b,"GROUP-ID");d="";var w=Mp(b,"TYPE").toLowerCase();"subtitles"==w&&(w=wc);e=w;e!=wc&&c&&a.m.has(c)&&(d=a.m.get(c));f=Cq(Mp(b,"URI"),a.l);if(a.g.has(f))return x["return"](a.g.get(f));g=Bq(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Z(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Z(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=Z(b,"CHARACTERISTICS");r=Z(b,"FORCED");
663
+ v="YES"==r;return u(x,Dq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.s.has(c)?a.s.get(c).push(y):a.s.set(c,[y]);if(null==y)return x["return"](null);if(a.g.has(f))return x["return"](a.g.get(f));a.g.set(f,y);return x["return"](y)})}
664
+ function xq(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(p){if(1==p.g){c=Cq(Mp(b,"URI"),a.l);d=Z(b,"CODECS","jpeg")||"";if(a.g.has(c))return p["return"](a.g.get(c));e=Bq(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,Dq(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.g.has(c))return p["return"](a.g.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=
663
665
  Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.g.set(c,h);return p["return"](h)})}
664
- function Aq(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=Dq(Np(b,"URI"),a.l);if(a.g.has(e))return k["return"](a.g.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.I.get(l):null;g=tc(d,c);return u(k,Eq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.g.has(e))return k["return"](a.g.get(e));a.g.set(e,h);return k["return"](h)})}
665
- function Eq(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P,Q,ba,aa,T,ya,pa,Ca,Ga,Bb,Sa,za,ee,rf,bn,cn,dn,Mh,Nh,sf,en,fn,gn,hn;return K(function(db){switch(db.g){case 1:return p=rc([a.L],[b])[0],u(db,hq(a,We([p],a.o.retryParameters),0),2);case 2:r=db.h;p=r.uri;v=Zp(a.ea,r.data,p);if(1!=v.type)throw new N(2,4,4017);y=[];if(v.segments)for(x=t(v.segments),w=x.next();!w.done;w=x.next())C=w.value,D=Qp(C.W,"EXT-X-KEY"),y.push.apply(y,ja(D));B=!1;F=[];G=new Set;H=t(y);for(L=H.next();!L.done;L=
666
- H.next())if(I=L.value,J=Np(I,"METHOD"),"NONE"!=J){B=!0;if("AES-128"==J)return a.Ya=!0,db["return"](null);P=Np(I,"KEYFORMAT");if(ba=(Q=Fq[P])?Q(I):null){if(ba.keyIds)for(aa=t(ba.keyIds),T=aa.next();!T.done;T=aa.next())ya=T.value,G.add(ya);F.push(ba)}}if(B&&!F.length)throw new N(2,4,4026);pa=Qp(v.W,"EXT-X-DEFINE");Ca=lq(a,pa);Gq(a,v);return u(db,Hq(a,d,c,v,Ca),3);case 3:return Ga=db.h,Iq.includes(Ga)&&(c=""),Bb=new Map,Sa=new Map,A(db,4),u(db,mq(a,b,v,d,Ga,Bb,Ca,Sa),6);case 6:za=db.h;wa(db,5);break;
667
- case 4:ee=E(db);if(4035==ee.code)return Xa("Skipping unsupported HLS stream",Ga,b),db["return"](null);throw ee;case 5:rf=za[0].startTime;bn=za[za.length-1].endTime;cn=new U(za);dn=d==wc?"subtitle":void 0;Mh=[];if(l)for(Nh=t(l.split(",")),sf=Nh.next();!sf.done;sf=Nh.next())en=sf.value,Mh.push(en);gn=(fn=Sp(v.W,"EXT-X-SERVER-CONTROL"))?null!=fn.getAttribute("CAN-SKIP-UNTIL"):!1;hn={id:a.Pa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:cn,mimeType:Ga,codecs:c,kind:dn,
668
- encrypted:B,drmInfos:F,keyIds:G,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:Mh,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return db["return"]({stream:hn,Pc:b,Ee:p,ke:rf,yf:bn,xd:Bb,Qe:Sa,Je:gn})}})}
669
- function Gq(a,b){var c=Sp(b.W,"EXT-X-PLAYLIST-TYPE"),d=Sp(b.W,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)nq(a,gq);else{c?nq(a,Jq):nq(a,Kq);d=Sp(b.W,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Sp(b.W,"EXT-X-PART-INF");a.i&&c?(a.Za=Number(Np(c,"PART-TARGET")),a.F=Math.min(a.Za,a.F),c=Sp(b.W,"EXT-X-SERVER-CONTROL"),a.Z=c?Number(Np(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ra=Math.max(d,a.ra)}}
670
- function Lq(a,b,c,d){c=Sp(c,"EXT-X-MAP");if(!c)return null;var e=Np(c,"URI");d=Dq(rc([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.qa.has(b)||(c=Mq(d,c),a.qa.set(b,c));return a.qa.get(b)}function Mq(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 mi(function(){return[a]},c,d)}
671
- function Nq(a,b,c,d,e,f,g,h,k){var l=d.W,m=Dq(d.g,g),n=Sp(l,"EXTINF"),p=g=0,r=null,v=[];if(a.i&&d.h.length){a={};d=t(lb(d.h));for(var y=d.next();!y.done;a={Yc:a.Yc},y=d.next()){y=y.value;var x=y.ga;y=y.item;var w=0==x?c:v[v.length-1];x=0==x?e:w.endTime;var C=Number(Z(y,"DURATION"));C=x+C;var D=0,B=null;"EXT-X-PRELOAD-HINT"==y.name?D=(w=Z(y,"BYTERANGE-START"))?Number(w):0:(D=Z(y,"BYTERANGE"),w=t(Oq(w,D)),D=w.next().value,B=w.next().value);y=Z(y,"URI");a.Yc=rc([h],[y])[0];v.push(new oi(x,C,function(F){return function(){return[F.Yc]}}(a),
672
- D,B,b,f,0,Infinity))}}else if(!n)throw new N(2,4,4024,"EXTINF");n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(h=Sp(l,"EXT-X-BYTERANGE"))?(r=t(Oq(c,h.value)),p=r.next().value,r=r.next().value):v.length&&(p=v[0].ka,r=v[v.length-1].fa);c="";h=null;"image"==k&&(c="1x1",k=Sp(l,"EXT-X-TILES"))&&(c=Np(k,"LAYOUT"),(k=Z(k,"DURATION"))&&(h=Number(k)));return new oi(e,g,function(){return m.length?[m]:[]},p,r,b,f,0,Infinity,v,c,h)}
673
- function Oq(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.fa+1,d=c+d-1);return[c,d]}function vq(a){if(a.h){for(var b=t(a.T),c=b.next();!c.done;c=b.next())a.h.Db(c.value);a.T=[]}}
674
- function mq(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P,Q,ba,aa,T,ya;return K(function(pa){switch(pa.g){case 1:k=c.segments;m=Tp(c.W,"EXT-X-MEDIA-SEQUENCE",0);p=(n=Sp(c.W,"EXT-X-SKIP"))?Number(Z(n,"SKIPPED-SEGMENTS")):0;r=m+p;if(a.j!=gq&&f.has(r)){v=f.get(r);pa.v(2);break}if(null!=a.O){pa.v(3);break}l=Lq(a,c.g,k[0].W,g);y=a;return u(pa,Pq(a,b,l,e,r,!1,k[0],g,d),4);case 4:y.O=pa.h;case 3:v=a.O;case 2:x=k[0].g;ab(x.split("/").pop());w=Tp(c.W,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.i&&
675
- (h.has(w)||h.set(w,r),p))for(;h.has(w+1)&&h.get(w+1)<r;)w++;C=a.H.get(w)||0;D=[];B=function(Ca){return lb(Ca)};F=t(B(k));G=F.next();case 5:if(G.done){pa.v(7);break}L=H=G.value;I=L.ga;J=L.item;P=D[D.length-1];Q=0==I?v:P.endTime;r=m+p+I;f.set(r,Q);l=Lq(a,c.g,J.W,g);ba=Sp(J.W,"EXT-X-DISCONTINUITY");if(!ba){pa.v(8);break}w++;h.set(w,r);return u(pa,Qq(a,w,b,l,e,r,J,g,Q,d),9);case 9:C=pa.h;case 8:!a.i&&(aa=a.C.isAutoLowLatencyMode())&&(a.C.enableLowLatencyMode(),a.i=a.C.isLowLatencyMode());T=Sp(J.W,"EXTINF");
676
- a.i||T?(ya=Nq(a,l,P,J,Q,C,g,c.g,d),D.push(ya)):a.i||Xa("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.");G=F.next();pa.v(5);break;case 7:return pa["return"](D)}})}
677
- function Qq(a,b,c,d,e,f,g,h,k,l){var m,n;return K(function(p){if(1==p.g)return m=0,a.H.has(b)?(m=a.H.get(b),p.v(2)):u(p,Pq(a,c,d,e,f,!0,g,h,l),3);2!=p.g&&(n=p.h,m=k-n,a.H.set(b,m));return p["return"](m)})}
678
- function Rq(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:c=bf;d=Zi(b.na(),b.ka,b.fa,a.o.retryParameters);if(a.o.hls.useFullSegmentsForStartTime)return k["return"](hq(a,d,c));e=Zi(b.na(),b.ka,b.ka+2048-1,a.o.retryParameters);A(k,2);return u(k,hq(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=E(k);if(7001==g.code)throw g;Xa("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.",
679
- e.uris[0]);return u(k,hq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
680
- function Pq(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,v,y,x;return K(function(w){switch(w.g){case 1:l=Nq(a,c,null,g,0,0,h,"",k);if(a.B&&!f&&(m=a.g.get(b),n=m.xd.get(e),void 0!=n))return w["return"](n);d=d.toLowerCase();if(Iq.includes(d))throw Xa("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Xa("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.v(2);break}p=[Rq(a,l)];c&&p.push(Rq(a,c));return u(w,Promise.all(p),
681
- 3);case 3:return r=w.h,v=r[0],y=r[1]||r[0],w["return"](Sq(b,v.uri,v.data,y.data));case 2:if("video/mp2t"!=d){w.v(4);break}return u(w,Rq(a,l),5);case 5:return x=w.h,w["return"](Tq(b,x.uri,x.data));case 4:throw new N(2,4,4030,b);}})}
682
- function Sq(a,b,c,d){var e=0;(new lg).box("moov",pg).box("trak",pg).box("mdia",pg).U("mdhd",function(h){e=Gh(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 lg).box("moof",pg).box("traf",pg).U("tfdt",function(h){f=Fh(h.reader,h.version).jd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
683
- function Tq(a,b,c){function d(){f.seek(g+188);h=f.aa();71!=h&&(f.seek(g+192),h=f.aa());71!=h&&(f.seek(g+204),h=f.aa());71!=h&&e();f.pe(1)}function e(){throw new N(2,4,4030,a,b);}var f=new ig(c,0),g=0,h=0;for(c=Math.min(f.R.byteLength-188,940);;){g=f.$();h=f.aa();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Gb();if(8191==(k&8191))d();else if(k&16384)if(k=(f.aa()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.aa(),f.skip(k)),1!=f.N()>>8)d();else{f.skip(3);c=f.aa()>>6;0!=c&&1!=c||e();0==f.aa()&&e();c=f.aa();k=
684
- f.Gb();var l=f.Gb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Dq(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}
685
- function Hq(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y;return K(function(x){if(1==x.g){f=xc;g=bf;h=Dq(d.segments[0].g,e);k=new ec(h);l=k.za.split(".").pop();m=Uq[b];if(n=m[l])return x["return"](n);if(b==f.ba)return c&&"vtt"!=c&&"wvtt"!=c?x["return"]("application/mp4"):x["return"]("text/vtt");if(b==f.Ob&&(!c||"jpeg"==c))return x["return"]("image/jpeg");p=We([h],a.o.retryParameters);p.method="HEAD";return u(x,hq(a,p,g),2)}r=x.h;v=r.headers["content-type"];return v?x["return"](v.split(";")[0]):(y=m.mp4,x["return"](y))})}
686
- q.bc=function(){var a=this,b,c;return K(function(d){if(1==d.g){if(!a.C)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.sa,a.u.V(b),wa(d,0);c=E(d);if(!a.C)return d["return"]();c.severity=1;a.C.onError(c);a.u.V(.1);z(d)})};function nq(a,b){a.j=b;a.h&&a.h.ic(a.j==gq);a.j!=gq||a.u.stop()}function hq(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.C.networkingEngine.request(c,b);Re(a.D,b);return b.promise}M("shaka.hls.HlsParser",fq);
687
- var Iq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Uq={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",
688
- vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Fq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Np(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Np(a,"URI");b=eq(b);b=Ob(b.data);b=sc("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=
689
- Np(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Np(a,"URI");a=eq(a);a=Ob(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=An(a,b);return sc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},gq="VOD",Kq="EVENT",Jq="LIVE",kq={De:gq,fg:Kq,Ce:Jq};gg.m3u8=function(){return new fq};eg["application/x-mpegurl"]=function(){return new fq};eg["application/vnd.apple.mpegurl"]=function(){return new fq};function Vq(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,me:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ec(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Wq(){}function Xq(a,b,c,d){var e=new Yq;nf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new Zq,g={Vd:!1,ye:!1};a=$q(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Fe(a,function(){g.Vd=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new O(function(){g.ye=!0;f.abort()});h.V(b/1E3);a["finally"](function(){h.stop()})}return a}
690
- function $q(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,y,x,w,C,D;return K(function(B){switch(B.g){case 1:return g=ar,h=br,n=m=0,p=Date.now(),A(B,2),u(B,g(a,c),4);case 4:return k=B.h,r=k.clone().body.getReader(),y=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,x=function(F){function G(){var H,L;return K(function(I){switch(I.g){case 1:return A(I,2),u(I,r.read(),4);case 4:H=I.h;wa(I,3);break;case 2:return E(I),I["return"]();case 3:if(H.done){I.v(5);break}m+=H.value.byteLength;if(!f){I.v(5);break}return u(I,
691
- f(H.value),5);case 5:L=Date.now();if(100<L-p||H.done)e(L-p,m-n,y-m),n=m,p=L;H.done?F.close():(F.enqueue(H.value),G());z(I)}})}G()},new h({start:x}),u(B,k.arrayBuffer(),5);case 5:l=B.h;wa(B,3);break;case 2:w=E(B);if(d.Vd)throw new N(1,1,7001,a,b);if(d.ye)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,w,b);case 3:return C={},D=k.headers,D.forEach(function(F,G){C[G.trim()]=F}),B["return"](Vq(C,l,k.status,a,k.url,b))}})}
692
- function cr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Wq);Wq.isSupported=cr;Wq.parse=Xq;var ar=window.fetch,Zq=window.AbortController,br=window.ReadableStream,Yq=window.Headers;cr()&&(Te("http",Xq,2,!0),Te("https",Xq,2,!0));function dr(){}
693
- function er(a,b,c,d){var e=new fr,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new N(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),r={};p=t(p);for(var v=p.next();!v.done;v=p.next())v=v.value.split(": "),r[v[0].toLowerCase()]=v.slice(1).join(": ");try{var y=Vq(r,n.response,n.status,a,n.responseURL,
694
- c);k(y)}catch(x){l(x)}};e.onerror=function(n){l(new N(1,1,1002,a,n,c))};e.ontimeout=function(){l(new N(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new Fe(h,function(){e.abort();return Promise.resolve()})}M("shaka.net.HttpXHRPlugin",dr);dr.parse=er;var fr=window.XMLHttpRequest;
695
- Te("http",er,1,!0);Te("https",er,1,!0);function gr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function hr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}gr.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 ir(a){var b=this;this.P=a;this.g=new Map;this.J=new cf(function(){return jr(b)["catch"](function(){})});this.h=[];this.je=function(){};this.ie=function(){};this.Qb=new gr}ir.prototype.destroy=function(){return this.J.destroy()};function kr(a,b,c){a.je=b;a.ie=c}function jr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
696
- function lr(a,b,c,d,e,f){df(a.J);var g=hr(a.Qb,d);d=(a.g.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return K(function(v){if(1==v.g)return u(v,mr(a,c),2);h=v.h;if(a.J.g)throw new N(2,9,7001);if(e)for(m in k=Ob(h),l=new zn(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.ie(p,r);a.Qb.close(g,h.byteLength);var y=a.Qb;a.je(0==y.i?0:y.j/y.i,a.Qb.h);return v["return"](f(h))})});a.g.set(b,d);return d}
697
- function nr(a,b,c){df(a.J);var d=(a.g.get(b)||Promise.resolve()).then(function(){return K(function(e){return u(e,c(),0)})});a.g.set(b,d)}function or(a){return K(function(b){return 1==b.g?u(b,Promise.all(a.g.values()),2):b["return"](a.Qb.h)})}function mr(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=bf,d=a.P.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;nb(a.h,e);return g["return"](f.data)})};function pr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new yc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}pr.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}A(b,2);return u(b,a.g,4)}if(2!=b.g)return wa(b,0);E(b);z(b)})};
698
- function qr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(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)})}})}pr.prototype.store=function(){return this.h};pr.prototype.promise=function(){return this.g};function rr(a){this.h=a;this.g=[]}rr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function sr(a,b){return tr(a,b,"readwrite")}function tr(a,b,c){c=a.h.transaction([b],c);var d=new pr(c,b);a.g.push(d);d.promise().then(function(){nb(a.g,d)},function(){nb(a.g,d)});return d};function ur(a,b,c){this.g=new rr(a);this.i=b;this.h=c}q=ur.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return vr(this.i)};q.removeSegments=function(a,b){return wr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,xr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Wd(e)}))})};q.addManifests=function(){return vr(this.h)};
699
- q.updateManifestExpiration=function(a,b){var c=sr(this.g,this.h),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return wr(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,xr(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Tb(e)})))})};
700
- q.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=tr(a.g,a.h,"readonly"),c=new Map,u(d,qr(b,function(e,f){var g;return K(function(h){if(1==h.g)return u(h,a.Tb(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};q.Wd=function(a){return a};q.Tb=function(a){return Promise.resolve(a)};function vr(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}
701
- q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=sr(c.g,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={oc:g.oc},k=h.next())l=k.value,g.oc=e.add(l),g.oc.onsuccess=function(n){return function(){f.push(n.oc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
702
- function wr(a,b,c,d){a=sr(a.g,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={nc:e.nc},f=c.next())e.nc=f.value,b["delete"](e.nc).onsuccess=function(g){return function(){return d(g.nc)}}(e);return a.promise()}
703
- function xr(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=tr(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Nb:h.Nb,Lb:h.Lb},l=k.next())h.Lb=l.value,h.Nb=e.get(h.Lb),h.Nb.onsuccess=function(n){return function(){void 0==n.Nb.result&&g.push(n.Lb);f[n.Lb]=n.Nb.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 yr(a){this.g=new rr(a)}yr.prototype.destroy=function(){return this.g.destroy()};yr.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=tr(a.g,"session-ids","readonly"),c=[],u(d,qr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};yr.prototype.add=function(a){var b=sr(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()};
704
- yr.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=sr(b.g,"session-ids"),u(d,qr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function zr(){this.g=new Map}zr.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)};zr.prototype.init=function(){var a=this;Ar.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)};
705
- function Br(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ka:d,ma:f},ma:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function Cr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ka:d,ma:f},e)})})}
706
- function Dr(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function Er(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Fr(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
707
- function Gr(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Ar,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.v(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Hr(a,b){Ar.set(a,b)}M("shaka.offline.StorageMuxer",zr);zr.unregister=function(a){Ar["delete"](a)};zr.register=Hr;zr.prototype.destroy=zr.prototype.destroy;var Ar=new Map;function Ir(){ur.apply(this,arguments)}ra(Ir,ur);Ir.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=sr(c.g,c.h);e=d.store();f=new yc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
708
- Ir.prototype.Tb=function(a){var b,c,d,e,f,g;return K(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=Jr(a.periods[c],e),b.push(f);return u(h,Zo(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})})};
709
- function Jr(a,b){Kr(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Lr(e,a.startTime,b)})}
710
- function Lr(a,b,c){var d=a.initSegmentUri?Mr(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=Mr(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
711
- 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}}Ir.prototype.Wd=function(a){return{data:a.data}};function Mr(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);}
712
- function Kr(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++,
713
- 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 Nr(){ur.apply(this,arguments)}ra(Nr,ur);
714
- Nr.prototype.Tb=function(a){var b,c,d,e,f,g;return K(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(Or(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Zo(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
666
+ function zq(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=Cq(Mp(b,"URI"),a.l);if(a.g.has(e))return k["return"](a.g.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.I.get(l):null;g=tc(d,c);return u(k,Dq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.g.has(e))return k["return"](a.g.get(e));a.g.set(e,h);return k["return"](h)})}
667
+ function Dq(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P,S,aa,ba,R,za,qa,Ca,Ga,Bb,Ta,Aa,fe,sf,cn,dn,en,Ph,Qh,tf,fn,gn,hn,jn;return K(function(db){switch(db.g){case 1:return p=rc([a.L],[b])[0],u(db,gq(a,We([p],a.o.retryParameters),0),2);case 2:r=db.h;p=r.uri;v=Yp(a.ea,r.data,p);if(1!=v.type)throw new N(2,4,4017);y=[];if(v.segments)for(x=t(v.segments),w=x.next();!w.done;w=x.next())C=w.value,D=Pp(C.W,"EXT-X-KEY"),y.push.apply(y,ja(D));B=!1;F=[];G=new Set;H=t(y);for(L=H.next();!L.done;L=
668
+ H.next())if(I=L.value,J=Mp(I,"METHOD"),"NONE"!=J){B=!0;if("AES-128"==J)return a.Qa=!0,db["return"](null);P=Mp(I,"KEYFORMAT");if(aa=(S=Eq[P])?S(I):null){if(aa.keyIds)for(ba=t(aa.keyIds),R=ba.next();!R.done;R=ba.next())za=R.value,G.add(za);F.push(aa)}}if(B&&!F.length)throw new N(2,4,4026);qa=Pp(v.W,"EXT-X-DEFINE");Ca=kq(a,qa);Fq(a,v);return u(db,Gq(a,d,c,v,Ca),3);case 3:return Ga=db.h,Hq.includes(Ga)&&(c=""),Bb=new Map,Ta=new Map,A(db,4),u(db,lq(a,b,v,d,Ga,Bb,Ca,Ta),6);case 6:Aa=db.h;wa(db,5);break;
669
+ case 4:fe=E(db);if(4035==fe.code)return Xa("Skipping unsupported HLS stream",Ga,b),db["return"](null);throw fe;case 5:sf=Aa[0].startTime;cn=Aa[Aa.length-1].endTime;dn=new U(Aa);en=d==wc?"subtitle":void 0;Ph=[];if(l)for(Qh=t(l.split(",")),tf=Qh.next();!tf.done;tf=Qh.next())fn=tf.value,Ph.push(fn);hn=(gn=Rp(v.W,"EXT-X-SERVER-CONTROL"))?null!=gn.getAttribute("CAN-SKIP-UNTIL"):!1;jn={id:a.Pa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:dn,mimeType:Ga,codecs:c,kind:en,
670
+ encrypted:B,drmInfos:F,keyIds:G,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:Ph,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return db["return"]({stream:jn,Pc:b,Ee:p,ke:sf,yf:cn,xd:Bb,Qe:Ta,Je:hn})}})}
671
+ function Fq(a,b){var c=Rp(b.W,"EXT-X-PLAYLIST-TYPE"),d=Rp(b.W,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)mq(a,fq);else{c?mq(a,Iq):mq(a,Jq);d=Rp(b.W,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Rp(b.W,"EXT-X-PART-INF");a.i&&c?(a.$a=Number(Mp(c,"PART-TARGET")),a.F=Math.min(a.$a,a.F),c=Rp(b.W,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(Mp(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ra=Math.max(d,a.ra)}}
672
+ function Kq(a,b,c,d){c=Rp(c,"EXT-X-MAP");if(!c)return null;var e=Mp(c,"URI");d=Cq(rc([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.la.has(b)||(c=Lq(d,c),a.la.set(b,c));return a.la.get(b)}function Lq(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 mi(function(){return[a]},c,d)}
673
+ function Mq(a,b,c,d,e,f,g,h,k){var l=d.W,m=Cq(d.g,g),n=Rp(l,"EXTINF"),p=g=0,r=null,v=[];if(a.i&&d.h.length){a={};d=t(lb(d.h));for(var y=d.next();!y.done;a={Yc:a.Yc},y=d.next()){y=y.value;var x=y.ga;y=y.item;var w=0==x?c:v[v.length-1];x=0==x?e:w.endTime;var C=Number(Z(y,"DURATION"));C=x+C;var D=0,B=null;"EXT-X-PRELOAD-HINT"==y.name?D=(w=Z(y,"BYTERANGE-START"))?Number(w):0:(D=Z(y,"BYTERANGE"),w=t(Nq(w,D)),D=w.next().value,B=w.next().value);y=Z(y,"URI");a.Yc=rc([h],[y])[0];v.push(new oi(x,C,function(F){return function(){return[F.Yc]}}(a),
674
+ D,B,b,f,0,Infinity))}}else if(!n)throw new N(2,4,4024,"EXTINF");n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(h=Rp(l,"EXT-X-BYTERANGE"))?(r=t(Nq(c,h.value)),p=r.next().value,r=r.next().value):v.length&&(p=v[0].ka,r=v[v.length-1].fa);c="";h=null;"image"==k&&(c="1x1",k=Rp(l,"EXT-X-TILES"))&&(c=Mp(k,"LAYOUT"),(k=Z(k,"DURATION"))&&(h=Number(k)));return new oi(e,g,function(){return m.length?[m]:[]},p,r,b,f,0,Infinity,v,c,h)}
675
+ function Nq(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.fa+1,d=c+d-1);return[c,d]}function uq(a){if(a.h){for(var b=t(a.V),c=b.next();!c.done;c=b.next())a.h.Db(c.value);a.V=[]}}
676
+ function lq(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P,S,aa,ba,R,za;return K(function(qa){switch(qa.g){case 1:k=c.segments;m=Sp(c.W,"EXT-X-MEDIA-SEQUENCE",0);p=(n=Rp(c.W,"EXT-X-SKIP"))?Number(Z(n,"SKIPPED-SEGMENTS")):0;r=m+p;if(a.j!=fq&&f.has(r)){v=f.get(r);qa.v(2);break}if(null!=a.O){qa.v(3);break}l=Kq(a,c.g,k[0].W,g);y=a;return u(qa,Oq(a,b,l,e,r,!1,k[0],g,d),4);case 4:y.O=qa.h;case 3:v=a.O;case 2:x=k[0].g;ab(x.split("/").pop());w=Sp(c.W,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.i&&
677
+ (h.has(w)||h.set(w,r),p))for(;h.has(w+1)&&h.get(w+1)<r;)w++;C=a.H.get(w)||0;D=[];B=function(Ca){return lb(Ca)};F=t(B(k));G=F.next();case 5:if(G.done){qa.v(7);break}L=H=G.value;I=L.ga;J=L.item;P=D[D.length-1];S=0==I?v:P.endTime;r=m+p+I;f.set(r,S);l=Kq(a,c.g,J.W,g);aa=Rp(J.W,"EXT-X-DISCONTINUITY");if(!aa){qa.v(8);break}w++;h.set(w,r);return u(qa,Pq(a,w,b,l,e,r,J,g,S,d),9);case 9:C=qa.h;case 8:!a.i&&(ba=a.C.isAutoLowLatencyMode())&&(a.C.enableLowLatencyMode(),a.i=a.C.isLowLatencyMode());R=Rp(J.W,"EXTINF");
678
+ a.i||R?(za=Mq(a,l,P,J,S,C,g,c.g,d),D.push(za)):a.i||Xa("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.");G=F.next();qa.v(5);break;case 7:return qa["return"](D)}})}
679
+ function Pq(a,b,c,d,e,f,g,h,k,l){var m,n;return K(function(p){if(1==p.g)return m=0,a.H.has(b)?(m=a.H.get(b),p.v(2)):u(p,Oq(a,c,d,e,f,!0,g,h,l),3);2!=p.g&&(n=p.h,m=k-n,a.H.set(b,m));return p["return"](m)})}
680
+ function Qq(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:c=bf;d=Yi(b.oa(),b.ka,b.fa,a.o.retryParameters);if(a.o.hls.useFullSegmentsForStartTime)return k["return"](gq(a,d,c));e=Yi(b.oa(),b.ka,b.ka+2048-1,a.o.retryParameters);A(k,2);return u(k,gq(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=E(k);if(7001==g.code)throw g;Xa("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.",
681
+ e.uris[0]);return u(k,gq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
682
+ function Oq(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,v,y,x;return K(function(w){switch(w.g){case 1:l=Mq(a,c,null,g,0,0,h,"",k);if(a.B&&!f&&(m=a.g.get(b),n=m.xd.get(e),void 0!=n))return w["return"](n);d=d.toLowerCase();if(Hq.includes(d))throw Xa("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Xa("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.v(2);break}p=[Qq(a,l)];c&&p.push(Qq(a,c));return u(w,Promise.all(p),
683
+ 3);case 3:return r=w.h,v=r[0],y=r[1]||r[0],w["return"](Rq(b,v.uri,v.data,y.data));case 2:if("video/mp2t"!=d){w.v(4);break}return u(w,Qq(a,l),5);case 5:return x=w.h,w["return"](Sq(b,x.uri,x.data));case 4:throw new N(2,4,4030,b);}})}
684
+ function Rq(a,b,c,d){var e=0;(new lg).box("moov",pg).box("trak",pg).box("mdia",pg).T("mdhd",function(h){e=Gh(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 lg).box("moof",pg).box("traf",pg).T("tfdt",function(h){f=Fh(h.reader,h.version).jd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
685
+ function Sq(a,b,c){function d(){f.seek(g+188);h=f.aa();71!=h&&(f.seek(g+192),h=f.aa());71!=h&&(f.seek(g+204),h=f.aa());71!=h&&e();f.pe(1)}function e(){throw new N(2,4,4030,a,b);}var f=new ig(c,0),g=0,h=0;for(c=Math.min(f.R.byteLength-188,940);;){g=f.$();h=f.aa();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Gb();if(8191==(k&8191))d();else if(k&16384)if(k=(f.aa()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.aa(),f.skip(k)),1!=f.N()>>8)d();else{f.skip(3);c=f.aa()>>6;0!=c&&1!=c||e();0==f.aa()&&e();c=f.aa();k=
686
+ f.Gb();var l=f.Gb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Cq(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}
687
+ function Gq(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y;return K(function(x){if(1==x.g){f=xc;g=bf;h=Cq(d.segments[0].g,e);k=new ec(h);l=k.za.split(".").pop();m=Tq[b];if(n=m[l])return x["return"](n);if(b==f.ba)return c&&"vtt"!=c&&"wvtt"!=c?x["return"]("application/mp4"):x["return"]("text/vtt");if(b==f.Ob&&(!c||"jpeg"==c))return x["return"]("image/jpeg");p=We([h],a.o.retryParameters);p.method="HEAD";return u(x,gq(a,p,g),2)}r=x.h;v=r.headers["content-type"];return v?x["return"](v.split(";")[0]):(y=m.mp4,x["return"](y))})}
688
+ q.cc=function(){var a=this,b,c;return K(function(d){if(1==d.g){if(!a.C)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.sa,a.u.U(b),wa(d,0);c=E(d);if(!a.C)return d["return"]();c.severity=1;a.C.onError(c);a.u.U(.1);z(d)})};function mq(a,b){a.j=b;a.h&&a.h.jc(a.j==fq);a.j!=fq||a.u.stop()}function gq(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.C.networkingEngine.request(c,b);Re(a.D,b);return b.promise}M("shaka.hls.HlsParser",eq);
689
+ var Hq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Tq={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",
690
+ vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Eq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Mp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Mp(a,"URI");b=dq(b);b=Ob(b.data);b=sc("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=
691
+ Mp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Mp(a,"URI");a=dq(a);a=Ob(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=zn(a,b);return sc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},fq="VOD",Jq="EVENT",Iq="LIVE",jq={De:fq,fg:Jq,Ce:Iq};gg.m3u8=function(){return new eq};eg["application/x-mpegurl"]=function(){return new eq};eg["application/vnd.apple.mpegurl"]=function(){return new eq};function Uq(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,me:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ec(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Vq(){}function Wq(a,b,c,d){var e=new Xq;nf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new Yq,g={Vd:!1,ye:!1};a=Zq(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Fe(a,function(){g.Vd=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new O(function(){g.ye=!0;f.abort()});h.U(b/1E3);a["finally"](function(){h.stop()})}return a}
692
+ function Zq(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,y,x,w,C,D;return K(function(B){switch(B.g){case 1:return g=$q,h=ar,n=m=0,p=Date.now(),A(B,2),u(B,g(a,c),4);case 4:return k=B.h,r=k.clone().body.getReader(),y=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,x=function(F){function G(){var H,L;return K(function(I){switch(I.g){case 1:return A(I,2),u(I,r.read(),4);case 4:H=I.h;wa(I,3);break;case 2:return E(I),I["return"]();case 3:if(H.done){I.v(5);break}m+=H.value.byteLength;if(!f){I.v(5);break}return u(I,
693
+ f(H.value),5);case 5:L=Date.now();if(100<L-p||H.done)e(L-p,m-n,y-m),n=m,p=L;H.done?F.close():(F.enqueue(H.value),G());z(I)}})}G()},new h({start:x}),u(B,k.arrayBuffer(),5);case 5:l=B.h;wa(B,3);break;case 2:w=E(B);if(d.Vd)throw new N(1,1,7001,a,b);if(d.ye)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,w,b);case 3:return C={},D=k.headers,D.forEach(function(F,G){C[G.trim()]=F}),B["return"](Uq(C,l,k.status,a,k.url,b))}})}
694
+ function br(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Vq);Vq.isSupported=br;Vq.parse=Wq;var $q=window.fetch,Yq=window.AbortController,ar=window.ReadableStream,Xq=window.Headers;br()&&(Te("http",Wq,2,!0),Te("https",Wq,2,!0));function cr(){}
695
+ function dr(a,b,c,d){var e=new er,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new N(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),r={};p=t(p);for(var v=p.next();!v.done;v=p.next())v=v.value.split(": "),r[v[0].toLowerCase()]=v.slice(1).join(": ");try{var y=Uq(r,n.response,n.status,a,n.responseURL,
696
+ c);k(y)}catch(x){l(x)}};e.onerror=function(n){l(new N(1,1,1002,a,n,c))};e.ontimeout=function(){l(new N(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new Fe(h,function(){e.abort();return Promise.resolve()})}M("shaka.net.HttpXHRPlugin",cr);cr.parse=dr;var er=window.XMLHttpRequest;
697
+ Te("http",dr,1,!0);Te("https",dr,1,!0);function fr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function gr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}fr.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 hr(a){var b=this;this.P=a;this.g=new Map;this.J=new cf(function(){return ir(b)["catch"](function(){})});this.h=[];this.je=function(){};this.ie=function(){};this.Rb=new fr}hr.prototype.destroy=function(){return this.J.destroy()};function jr(a,b,c){a.je=b;a.ie=c}function ir(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
698
+ function kr(a,b,c,d,e,f){df(a.J);var g=gr(a.Rb,d);d=(a.g.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return K(function(v){if(1==v.g)return u(v,lr(a,c),2);h=v.h;if(a.J.g)throw new N(2,9,7001);if(e)for(m in k=Ob(h),l=new yn(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.ie(p,r);a.Rb.close(g,h.byteLength);var y=a.Rb;a.je(0==y.i?0:y.j/y.i,a.Rb.h);return v["return"](f(h))})});a.g.set(b,d);return d}
699
+ function mr(a,b,c){df(a.J);var d=(a.g.get(b)||Promise.resolve()).then(function(){return K(function(e){return u(e,c(),0)})});a.g.set(b,d)}function nr(a){return K(function(b){return 1==b.g?u(b,Promise.all(a.g.values()),2):b["return"](a.Rb.h)})}function lr(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=bf,d=a.P.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;nb(a.h,e);return g["return"](f.data)})};function or(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new yc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}or.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}A(b,2);return u(b,a.g,4)}if(2!=b.g)return wa(b,0);E(b);z(b)})};
700
+ function pr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(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)})}})}or.prototype.store=function(){return this.h};or.prototype.promise=function(){return this.g};function qr(a){this.h=a;this.g=[]}qr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function rr(a,b){return sr(a,b,"readwrite")}function sr(a,b,c){c=a.h.transaction([b],c);var d=new or(c,b);a.g.push(d);d.promise().then(function(){nb(a.g,d)},function(){nb(a.g,d)});return d};function tr(a,b,c){this.g=new qr(a);this.i=b;this.h=c}q=tr.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return ur(this.i)};q.removeSegments=function(a,b){return vr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,wr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Wd(e)}))})};q.addManifests=function(){return ur(this.h)};
701
+ q.updateManifestExpiration=function(a,b){var c=rr(this.g,this.h),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return vr(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,wr(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Ub(e)})))})};
702
+ q.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=sr(a.g,a.h,"readonly"),c=new Map,u(d,pr(b,function(e,f){var g;return K(function(h){if(1==h.g)return u(h,a.Ub(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};q.Wd=function(a){return a};q.Ub=function(a){return Promise.resolve(a)};function ur(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}
703
+ q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=rr(c.g,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={pc:g.pc},k=h.next())l=k.value,g.pc=e.add(l),g.pc.onsuccess=function(n){return function(){f.push(n.pc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
704
+ function vr(a,b,c,d){a=rr(a.g,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={oc:e.oc},f=c.next())e.oc=f.value,b["delete"](e.oc).onsuccess=function(g){return function(){return d(g.oc)}}(e);return a.promise()}
705
+ function wr(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=sr(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Nb:h.Nb,Lb:h.Lb},l=k.next())h.Lb=l.value,h.Nb=e.get(h.Lb),h.Nb.onsuccess=function(n){return function(){void 0==n.Nb.result&&g.push(n.Lb);f[n.Lb]=n.Nb.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 xr(a){this.g=new qr(a)}xr.prototype.destroy=function(){return this.g.destroy()};xr.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=sr(a.g,"session-ids","readonly"),c=[],u(d,pr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};xr.prototype.add=function(a){var b=rr(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()};
706
+ xr.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=rr(b.g,"session-ids"),u(d,pr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function yr(){this.g=new Map}yr.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)};yr.prototype.init=function(){var a=this;zr.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)};
707
+ function Ar(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ka:d,na:f},na:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function Br(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ka:d,na:f},e)})})}
708
+ function Cr(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function Dr(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Er(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
709
+ function Fr(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=zr,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.v(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Gr(a,b){zr.set(a,b)}M("shaka.offline.StorageMuxer",yr);yr.unregister=function(a){zr["delete"](a)};yr.register=Gr;yr.prototype.destroy=yr.prototype.destroy;var zr=new Map;function Hr(){tr.apply(this,arguments)}ra(Hr,tr);Hr.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=rr(c.g,c.h);e=d.store();f=new yc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
710
+ Hr.prototype.Ub=function(a){var b,c,d,e,f,g;return K(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=Ir(a.periods[c],e),b.push(f);return u(h,Yo(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})})};
711
+ function Ir(a,b){Jr(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Kr(e,a.startTime,b)})}
712
+ function Kr(a,b,c){var d=a.initSegmentUri?Lr(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=Lr(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
713
+ 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}}Hr.prototype.Wd=function(a){return{data:a.data}};function Lr(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);}
714
+ function Jr(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++,
715
+ 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 Mr(){tr.apply(this,arguments)}ra(Mr,tr);
716
+ Mr.prototype.Ub=function(a){var b,c,d,e,f,g;return K(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(Nr(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Yo(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
715
717
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
716
- function Or(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
717
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Pr(){ur.apply(this,arguments)}ra(Pr,ur);Pr.prototype.hasFixedKeySpace=function(){return!1};Pr.prototype.addSegments=function(a){return this.add(this.i,a)};Pr.prototype.addManifests=function(a){return this.add(this.h,a)};Pr.prototype.Tb=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Qr(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Qr.prototype;
718
- q.init=function(){var a=this,b=new yc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Ir(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Nr(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Nr(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
719
- e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Pr(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new yr(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new N(2,9,9001,c.error));d.preventDefault()};return b};
718
+ function Nr(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
719
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Or(){tr.apply(this,arguments)}ra(Or,tr);Or.prototype.hasFixedKeySpace=function(){return!1};Or.prototype.addSegments=function(a){return this.add(this.i,a)};Or.prototype.addManifests=function(a){return this.add(this.h,a)};Or.prototype.Ub=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Pr(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Pr.prototype;
720
+ q.init=function(){var a=this,b=new yc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Hr(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Mr(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Mr(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
721
+ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Or(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new xr(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new N(2,9,9001,c.error));d.preventDefault()};return b};
720
722
  q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.v(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.v(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.v(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.v(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.v(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
721
723
  q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
722
- q.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.v(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.v(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.v(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.v(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,Rr(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
723
- function Rr(){var a=new yc,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}Hr("idb",function(){return vd()||!window.indexedDB?null:new Qr});function Sr(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Sr.prototype.Ka=function(){return this.i};Sr.prototype.ma=function(){return this.h};Sr.prototype.key=function(){return this.l};Sr.prototype.toString=function(){return this.j};
724
- function Tr(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 Sr(b,c,d,Number(a[4])):null};function Ur(a,b){this.h=a;this.g=b}
725
- function Vr(a,b){var c=new S(null,0);c.Ma(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Wr(a,d,e,c);e=b.streams.filter(function(l){return l.type==wc}).map(function(l){return Xr(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Xr(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=
724
+ q.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.v(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.v(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.v(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.v(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,Qr(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
725
+ function Qr(){var a=new yc,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}Gr("idb",function(){return vd()||!window.indexedDB?null:new Pr});function Rr(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Rr.prototype.Ka=function(){return this.i};Rr.prototype.na=function(){return this.h};Rr.prototype.key=function(){return this.l};Rr.prototype.toString=function(){return this.j};
726
+ function Sr(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 Rr(b,c,d,Number(a[4])):null};function Tr(a,b){this.h=a;this.g=b}
727
+ function Ur(a,b){var c=new T(null,0);c.Ma(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Vr(a,d,e,c);e=b.streams.filter(function(l){return l.type==wc}).map(function(l){return Wr(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Wr(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=
726
728
  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}}
727
- function Wr(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=b.next())for(e=
728
- e.value,g=Xr(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Xr(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
729
- function Xr(a,b,c){var d=b.segments.map(function(e){return Yr(a,e)});c.Db(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U(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,
730
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Yr(a,b){var c=new Sr("segment",a.h,a.g,b.dataKey);return new oi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Zr(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
731
- function Zr(a,b){var c=new Sr("segment",a.h,a.g,b);return new mi(function(){return[c.toString()]},0,null)};function $r(){this.g=null}q=$r.prototype;q.configure=function(){};
732
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=Tr(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new zr;va(m);return u(m,e.init(),4);case 4:return u(m,Dr(e,d.Ka(),d.ma()),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 Ur(d.Ka(),d.ma()),l=Vr(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return xa(m),u(m,e.destroy(),7);case 7:Aa(m,0)}})};q.stop=function(){return Promise.resolve()};
733
- q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new zr,A(m,2,3),u(m,e.init(),5);case 5:return u(m,Dr(e,d.Ka(),d.ma()),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.v(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),u(m,e.destroy(),10);case 10:Aa(m,0);break;case 2:E(m),m.v(3)}})};
734
- eg["application/x-offline-manifest"]=function(){return new $r};function as(){}function bs(a){var b=Tr(a);b&&"manifest"==b.g?(a={uri:a,me:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ie(a)):a=b&&"segment"==b.g?cs(b.key(),b):Ge(new N(2,1,9004,a));return a}
735
- function cs(a,b){var c=new zr;return Ie(void 0).ca(function(){return c.init()}).ca(function(){return Dr(c,b.Ka(),b.ma())}).ca(function(d){return d.getSegments([b.key()])}).ca(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",as);as.plugin=bs;Te("offline",bs);function ds(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,es(y.info,p)){y.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.v(4);break}g=f.value;h=fs(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.v(2);break;case 4:return l["return"](d)}})}
736
- function fs(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new qf({nb:b,onError:function(){},Ic:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(f,2),d.configure(a),u(f,Af(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return E(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return A(f,6),u(f,Jf(d),8);case 8:wa(f,7);break;case 6:return E(f),u(f,d.destroy(),
729
+ function Vr(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=b.next())for(e=
730
+ e.value,g=Wr(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Wr(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
731
+ function Wr(a,b,c){var d=b.segments.map(function(e){return Xr(a,e)});c.Db(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U(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,
732
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Xr(a,b){var c=new Rr("segment",a.h,a.g,b.dataKey);return new oi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Yr(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
733
+ function Yr(a,b){var c=new Rr("segment",a.h,a.g,b);return new mi(function(){return[c.toString()]},0,null)};function Zr(){this.g=null}q=Zr.prototype;q.configure=function(){};
734
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=Sr(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new yr;va(m);return u(m,e.init(),4);case 4:return u(m,Cr(e,d.Ka(),d.na()),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 Tr(d.Ka(),d.na()),l=Ur(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return xa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
735
+ q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new yr,A(m,2,3),u(m,e.init(),5);case 5:return u(m,Cr(e,d.Ka(),d.na()),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.v(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:E(m),m.v(3)}})};
736
+ eg["application/x-offline-manifest"]=function(){return new Zr};function $r(){}function as(a){var b=Sr(a);b&&"manifest"==b.g?(a={uri:a,me:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ie(a)):a=b&&"segment"==b.g?bs(b.key(),b):Ge(new N(2,1,9004,a));return a}
737
+ function bs(a,b){var c=new yr;return Ie(void 0).ca(function(){return c.init()}).ca(function(){return Cr(c,b.Ka(),b.na())}).ca(function(d){return d.getSegments([b.key()])}).ca(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",$r);$r.plugin=as;Te("offline",as);function cs(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,ds(y.info,p)){y.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.v(4);break}g=f.value;h=es(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.v(2);break;case 4:return l["return"](d)}})}
738
+ function es(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new qf({nb:b,onError:function(){},Ic:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(f,2),d.configure(a),u(f,Af(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return E(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return A(f,6),u(f,Jf(d),8);case 8:wa(f,7);break;case 6:return E(f),u(f,d.destroy(),
737
739
  9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return A(h,2),u(h,Kf(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);E(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
738
- function es(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&ob(a.audioCapabilities,b.audioCapabilities,c)&&ob(a.videoCapabilities,b.videoCapabilities,c)};function gs(a,b,c){var d=b.presentationTimeline.getDuration();b=hs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function is(a,b){var c=Vr(new Ur(a.Ka(),a.ma()),b),d=b.appMetadata||{};c=hs(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
739
- function hs(a){var b=[],c=ie(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Zd(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push($d(c.value));return b};function js(){this.g={}}function ks(a,b,c){c=c.endTime-c.startTime;return ls(a,b)*c}function ls(a,b){var c=a.g[b];null==c&&(c=0);return c};function ms(a){var b=this;if(a&&a.constructor!=V)throw new N(2,9,9008);this.P=this.o=null;a?(this.o=a.o,this.P=a.Wb()):(this.o=Zj(),this.P=new Se);this.Nc=[];this.cc=[];this.Fd=[];var c=!a;this.J=new cf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return u(k,Promise.all(b.Fd.map(function(l){return jr(l)})),2);case 2:d=function(){};e=[];f=t(b.cc);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.v(4);break}return u(k,b.P.destroy(),
740
- 4);case 4:b.o=null,b.P=null,z(k)}})})}function ns(){if(qd())a:{var a=t(Ar.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=ms.prototype;q.destroy=function(){return this.J.destroy()};
741
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Xj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Tb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return bk(this.o,a)};q.getConfiguration=function(){var a=Zj();bk(a,this.o,Zj());return a};q.Wb=function(){return this.P};
742
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new ir(this.P);this.Fd.push(f);b=os(this,a,b||{},function(){var h;return K(function(k){if(1==k.g)return u(k,dg(a,d.P,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"]($b(h))})},e,f);var g=new Fe(b,function(){return jr(f)});g["finally"](function(){nb(d.Fd,f)});g.then=function(h){Tb("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.");
743
- return g.promise.then(h)};return ps(this,g)};q.lf=function(){Tb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
744
- function os(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,y,x;return K(function(w){switch(w.g){case 1:return qs(),h=g=null,k=new zr,m=l=null,A(w,2,3),u(w,d(),5);case 5:return g=w.h,u(w,rs(a,b,g,e),6);case 6:n=w.h;ss(a);p=!n.presentationTimeline.Y()&&!n.presentationTimeline.mb();if(!p)throw new N(2,9,9005,b);return u(w,ts(a,n,function(C){m=m||C},e),7);case 7:h=w.h;ss(a);if(m)throw m;return u(w,us(n,e),8);case 8:return u(w,k.init(),9);case 9:return ss(a),u(w,Br(k),10);case 10:return l=w.h,ss(a),u(w,vs(a,l.ma,
745
- h,n,b,c,e,f),11);case 11:r=w.h;ss(a);if(m)throw m;return u(w,l.ma.addManifests([r]),12);case 12:return v=w.h,ss(a),y=new Sr("manifest",l.path.Ka,l.path.ma,v[0]),w["return"](is(y,r));case 3:return xa(w),a.Nc=[],u(w,k.destroy(),13);case 13:if(!g){w.v(14);break}return u(w,g.stop(),14);case 14:if(!h){w.v(16);break}return u(w,h.destroy(),16);case 16:Aa(w,0);break;case 2:x=E(w);if(!l){w.v(18);break}return u(w,l.ma.removeSegments(a.Nc,function(){}),18);case 18:throw m||x;}})}
746
- function us(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P,Q,ba,aa;return K(function(T){switch(T.g){case 1:c={width:Infinity,height:Infinity};Md(a,b.restrictions,c);Pd(a,b.offline.usePersistentLicense);d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Ad(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(Zd(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,d.push($d(r));v=
747
- t(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(ae(x));return u(T,b.offline.trackSelectionCallback(d),2);case 2:w=T.h;C=a.presentationTimeline.getDuration();D=0;B=t(w);for(F=B.next();!F.done;F=B.next())G=F.value,H=G.bandwidth*C/8,D+=H;A(T,3);return u(T,b.offline.downloadSizeCallback(D),5);case 5:L=T.h;if(!L)throw new N(2,9,9014);wa(T,4);break;case 3:I=E(T);if(I instanceof N)throw I;throw new N(2,9,9015);case 4:J=new Set;P=new Set;Q=new Set;ba=t(w);for(F=ba.next();!F.done;F=ba.next())aa=
748
- F.value,"variant"==aa.type&&J.add(aa.id),"text"==aa.type&&P.add(aa.id),"image"==aa.type&&Q.add(aa.id);a.variants=a.variants.filter(function(ya){return J.has(ya.id)});a.textStreams=a.textStreams.filter(function(ya){return P.has(ya.id)});a.imageStreams=a.imageStreams.filter(function(ya){return Q.has(ya.id)});ws(a);z(T)}})}
749
- function vs(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,v,y,x,w,C,D;return K(function(B){switch(B.g){case 1:return k=gs(e,d,f),l=g.offline.progressCallback,m=function(F,G){k.size=G;l(k,F)},n=function(F,G){v&&g.offline.usePersistentLicense&&y==G&&If(c,"cenc",F)},kr(h,m,n),p=d.variants.some(function(F){var G=F.audio&&F.audio.encrypted;return F.video&&F.video.encrypted||G}),r=d.variants.some(function(F){return(F.video?F.video.drmInfos:[]).concat(F.audio?F.audio.drmInfos:[]).some(function(G){return G.initData&&
750
- G.initData.length})}),v=p&&!r,y=null,v&&(x=c.i,y=xs.get(x.keySystem)),va(B),C=w=ys(a,h,b,c,d,e,f,g),u(B,or(h),4);case 4:C.size=B.h;w.expiration=c.Vb();D=Of(c);w.sessionIds=g.offline.usePersistentLicense?D:[];if(p&&g.offline.usePersistentLicense&&!D.length)throw new N(2,9,9007);return B["return"](w);case 2:return xa(B),u(B,h.destroy(),5);case 5:Aa(B,0)}})}q.remove=function(a){return zs(this,As(this,a))};
751
- function As(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:qs();c=Tr(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new zr;va(k);return u(k,e.init(),4);case 4:return u(k,Dr(e,d.Ka(),d.ma()),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([Bs(a,h,e),Cs(f,d,h)]),2);case 2:return xa(k),u(k,e.destroy(),8);case 8:Aa(k,0)}})}
752
- function Ds(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:Tc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Tc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Bs(a,b,c){return K(function(d){return u(d,Es(a.P,a.o.drm,c,b),0)})}
753
- function Cs(a,b,c){function d(){}var e=Fs(c);is(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Kf=function(){return zs(this,Gs(this))};
754
- function Gs(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return qs(),b=a.P,c=a.o.drm,d=new zr,e=!1,va(n),u(n,d.init(),4);case 4:f=[],Er(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.v(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,ds(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.v(5);break;case 2:return xa(n),u(n,d.destroy(),11);case 11:Aa(n,3);break;case 3:return n["return"](!e)}})}
755
- q.list=function(){return zs(this,Hs())};function Hs(){var a,b,c;return K(function(d){switch(d.g){case 1:return qs(),a=[],b=new zr,va(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Cr(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=is(new Sr("manifest",e.Ka,e.ma,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return xa(d),u(d,b.destroy(),6);case 6:Aa(d,3);break;case 3:return d["return"](a)}})}
756
- function rs(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.P,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),ss(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,ss(a),k=Is(h),u(l,Promise.all(gb(k,
757
- function(m){return m.createSegmentIndex()})),3);ss(a);if(e)throw e;return l["return"](h)})}function ts(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new qf({nb:a.P,onError:c,Ic:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,xf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Jf(e),3);case 3:return u(f,Hf(e),4);case 4:return f["return"](e)}})}
758
- function ys(a,b,c,d,e,f,g,h){for(var k=new js,l=t(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,r=m.video;p&&!r&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&r&&(n.g[r.id]=r.bandwidth||m.bandwidth);if(p&&r){var v=p.bandwidth||393216,y=r.bandwidth||m.bandwidth-v;0>=y&&(y=m.bandwidth);n.g[p.id]=v;n.g[r.id]=y}}l=t(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;l=t(e.imageStreams);for(n=l.next();!n.done;n=l.next())n=n.value,k.g[n.id]=n.bandwidth||2048;n=new Map;
759
- n.set(null,Promise.resolve(null));m=new Map;p=Is(e);l=new Map;p=t(p);for(r=p.next();!r.done;r=p.next())r=r.value,v=Js(a,b,c,k,e,r,h,n,m),l.set(r.id,v);a=t(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.i)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
760
- expiration:d.Vb(),streams:a,sessionIds:h?Of(d):[],drmInfo:b,appMetadata:g}}
761
- function Js(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
762
- tilesLayout:f.tilesLayout},m=f.id;Ks(f,e.presentationTimeline.ab(),function(n){var p=Ls(a,b,m,f.id,c,d,n.h,g,h),r=Ms(a,b,m,f.id,c,d,n,g,k);nr(b,m,function(){var v,y;return K(function(x){if(1==x.g)return u(x,p,2);if(3!=x.g)return v=x.h,u(x,r,3);y=x.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,dataKey:y});z(x)})})});return l}
763
- function Ls(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=Zi(g.na(),g.ka,g.fa,h.streaming.retryParameters);b=lr(b,c,h,.5*ls(f,d),!0,function(l){var m;return K(function(n){if(1==n.g)return u(n,e.addSegments([{data:l}]),2);m=n.h;a.Nc.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
764
- function Ms(a,b,c,d,e,f,g,h,k){var l=[g.na()[0],g.ka,g.fa].join("-");if(k.has(l))return k.get(l);h=Zi(g.na(),g.ka,g.fa,h.streaming.retryParameters);b=lr(b,c,h,ks(f,d,g),!1,function(m){var n;return K(function(p){if(1==p.g)return u(p,e.addSegments([{data:m}]),2);n=p.h;a.Nc.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Ks(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 ss(a){if(a.J.g)throw new N(2,9,7001);}
765
- function qs(){if(!ns())throw new N(2,9,9E3);}function zs(a,b){return K(function(c){if(1==c.g)return a.cc.push(b),va(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);xa(c);nb(a.cc,b);return Aa(c,0)})}function ps(a,b){var c=b.promise;a.cc.push(c);return b["finally"](function(){nb(a.cc,c)})}
766
- function Fs(a){var b=[];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.push(d.initSegmentKey),b.push(d.dataKey)}return b}
767
- function Es(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Fr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Ds(d,!1),videoCapabilities:Ds(d,!0)}});return u(h,ds(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)})}
768
- function Is(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}
769
- function ws(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",ms);ms.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new zr,va(b),u(b,Gr(a),2)):5!=b.g?(xa(b),u(b,a.destroy(),5)):Aa(b,0)})};ms.prototype.list=ms.prototype.list;
770
- ms.prototype.removeEmeSessions=ms.prototype.Kf;ms.prototype.remove=ms.prototype.remove;ms.prototype.getStoreInProgress=ms.prototype.lf;ms.prototype.store=ms.prototype.store;ms.prototype.getNetworkingEngine=ms.prototype.Wb;ms.prototype.getConfiguration=ms.prototype.getConfiguration;ms.prototype.configure=ms.prototype.configure;ms.prototype.destroy=ms.prototype.destroy;ms.support=ns;
771
- var xs=(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");
772
- am.offline=ns;function Ns(){}function Os(a,b){for(var c={priority:b||0,He:a},d=t(lb(Ps)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.ga;if(e.item.priority<c.priority){Ps.splice(f,0,c);return}}Ps.push(c)}M("shaka.polyfill",Ns);Ns.register=Os;Ns.installAll=function(){for(var a=t(Ps),b=a.next();!b.done;b=a.next()){b=b.value;try{b.He()}catch(c){Xa("Error installing polyfill!",c)}}};var Ps=[];function Qs(){}function Rs(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Ss(b.value)}function Ss(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)}})}Ns.Aria=Qs;Qs.install=Rs;Os(Rs);function Ts(){}function Us(){Vs()}Ns.EncryptionScheme=Ts;Ts.install=Us;Os(Us,-2);function Ws(){}
773
- function Xs(){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}}),
774
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Ys);document.addEventListener("webkitfullscreenerror",Ys);document.addEventListener("mozfullscreenchange",Ys);document.addEventListener("mozfullscreenerror",Ys);document.addEventListener("MSFullscreenChange",Ys);document.addEventListener("MSFullscreenError",Ys)}}
775
- function Ys(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)}Ns.Fullscreen=Ws;Ws.install=Xs;Os(Xs);function Zs(){}function $s(){}Ns.MathRound=Zs;Zs.install=$s;Os($s);function at(){}function bt(){if(vd()||wd()||ud("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),ct=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=dt}
776
- function dt(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x;return K(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!qd()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=rd(g),!h)||a.audio&&(k=a.audio.contentType,
740
+ function ds(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&ob(a.audioCapabilities,b.audioCapabilities,c)&&ob(a.videoCapabilities,b.videoCapabilities,c)};function fs(a,b,c){var d=b.presentationTimeline.getDuration();b=gs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function hs(a,b){var c=Ur(new Tr(a.Ka(),a.na()),b),d=b.appMetadata||{};c=gs(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
741
+ function gs(a){var b=[],c=ie(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Zd(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push($d(c.value));return b};function is(){this.g={}}function js(a,b,c){c=c.endTime-c.startTime;return ks(a,b)*c}function ks(a,b){var c=a.g[b];null==c&&(c=0);return c};function ls(a){var b=this;if(a&&a.constructor!=V)throw new N(2,9,9008);this.P=this.o=null;a?(this.o=a.o,this.P=a.Xb()):(this.o=Yj(),this.P=new Se);this.Nc=[];this.dc=[];this.Fd=[];var c=!a;this.J=new cf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return u(k,Promise.all(b.Fd.map(function(l){return ir(l)})),2);case 2:d=function(){};e=[];f=t(b.dc);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.v(4);break}return u(k,b.P.destroy(),
742
+ 4);case 4:b.o=null,b.P=null,z(k)}})})}function ms(){if(qd())a:{var a=t(zr.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=ls.prototype;q.destroy=function(){return this.J.destroy()};
743
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Wj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Tb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return ak(this.o,a)};q.getConfiguration=function(){var a=Yj();ak(a,this.o,Yj());return a};q.Xb=function(){return this.P};
744
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new hr(this.P);this.Fd.push(f);b=ns(this,a,b||{},function(){var h;return K(function(k){if(1==k.g)return u(k,dg(a,d.P,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"]($b(h))})},e,f);var g=new Fe(b,function(){return ir(f)});g["finally"](function(){nb(d.Fd,f)});g.then=function(h){Tb("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.");
745
+ return g.promise.then(h)};return os(this,g)};q.lf=function(){Tb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
746
+ function ns(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,y,x;return K(function(w){switch(w.g){case 1:return ps(),h=g=null,k=new yr,m=l=null,A(w,2,3),u(w,d(),5);case 5:return g=w.h,u(w,qs(a,b,g,e),6);case 6:n=w.h;rs(a);p=!n.presentationTimeline.Z()&&!n.presentationTimeline.mb();if(!p)throw new N(2,9,9005,b);return u(w,ss(a,n,function(C){m=m||C},e),7);case 7:h=w.h;rs(a);if(m)throw m;return u(w,ts(n,e),8);case 8:return u(w,k.init(),9);case 9:return rs(a),u(w,Ar(k),10);case 10:return l=w.h,rs(a),u(w,us(a,l.na,
747
+ h,n,b,c,e,f),11);case 11:r=w.h;rs(a);if(m)throw m;return u(w,l.na.addManifests([r]),12);case 12:return v=w.h,rs(a),y=new Rr("manifest",l.path.Ka,l.path.na,v[0]),w["return"](hs(y,r));case 3:return xa(w),a.Nc=[],u(w,k.destroy(),13);case 13:if(!g){w.v(14);break}return u(w,g.stop(),14);case 14:if(!h){w.v(16);break}return u(w,h.destroy(),16);case 16:ya(w,0);break;case 2:x=E(w);if(!l){w.v(18);break}return u(w,l.na.removeSegments(a.Nc,function(){}),18);case 18:throw m||x;}})}
748
+ function ts(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,F,G,H,L,I,J,P,S,aa,ba;return K(function(R){switch(R.g){case 1:return c={width:Infinity,height:Infinity},Md(a,b.restrictions,c),u(R,Pd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Ad(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(Zd(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,
749
+ d.push($d(r));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(ae(x));return u(R,b.offline.trackSelectionCallback(d),3);case 3:w=R.h;C=a.presentationTimeline.getDuration();D=0;B=t(w);for(F=B.next();!F.done;F=B.next())G=F.value,H=G.bandwidth*C/8,D+=H;A(R,4);return u(R,b.offline.downloadSizeCallback(D),6);case 6:L=R.h;if(!L)throw new N(2,9,9014);wa(R,5);break;case 4:I=E(R);if(I instanceof N)throw I;throw new N(2,9,9015);case 5:J=new Set;P=new Set;S=new Set;aa=t(w);for(F=aa.next();!F.done;F=
750
+ aa.next())ba=F.value,"variant"==ba.type&&J.add(ba.id),"text"==ba.type&&P.add(ba.id),"image"==ba.type&&S.add(ba.id);a.variants=a.variants.filter(function(za){return J.has(za.id)});a.textStreams=a.textStreams.filter(function(za){return P.has(za.id)});a.imageStreams=a.imageStreams.filter(function(za){return S.has(za.id)});vs(a);z(R)}})}
751
+ function us(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,v,y,x,w,C,D;return K(function(B){switch(B.g){case 1:return k=fs(e,d,f),l=g.offline.progressCallback,m=function(F,G){k.size=G;l(k,F)},n=function(F,G){v&&g.offline.usePersistentLicense&&y==G&&If(c,"cenc",F)},jr(h,m,n),p=d.variants.some(function(F){var G=F.audio&&F.audio.encrypted;return F.video&&F.video.encrypted||G}),r=d.variants.some(function(F){return(F.video?F.video.drmInfos:[]).concat(F.audio?F.audio.drmInfos:[]).some(function(G){return G.initData&&
752
+ G.initData.length})}),v=p&&!r,y=null,v&&(x=c.i,y=ws.get(x.keySystem)),va(B),C=w=xs(a,h,b,c,d,e,f,g),u(B,nr(h),4);case 4:C.size=B.h;w.expiration=c.Wb();D=Of(c);w.sessionIds=g.offline.usePersistentLicense?D:[];if(p&&g.offline.usePersistentLicense&&!D.length)throw new N(2,9,9007);return B["return"](w);case 2:return xa(B),u(B,h.destroy(),5);case 5:ya(B,0)}})}q.remove=function(a){return ys(this,zs(this,a))};
753
+ function zs(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:ps();c=Sr(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new yr;va(k);return u(k,e.init(),4);case 4:return u(k,Cr(e,d.Ka(),d.na()),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([As(a,h,e),Bs(f,d,h)]),2);case 2:return xa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
754
+ function Cs(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:Tc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Tc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function As(a,b,c){return K(function(d){return u(d,Ds(a.P,a.o.drm,c,b),0)})}
755
+ function Bs(a,b,c){function d(){}var e=Es(c);hs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Kf=function(){return ys(this,Fs(this))};
756
+ function Fs(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return ps(),b=a.P,c=a.o.drm,d=new yr,e=!1,va(n),u(n,d.init(),4);case 4:f=[],Dr(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.v(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,cs(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.v(5);break;case 2:return xa(n),u(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n["return"](!e)}})}
757
+ q.list=function(){return ys(this,Gs())};function Gs(){var a,b,c;return K(function(d){switch(d.g){case 1:return ps(),a=[],b=new yr,va(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Br(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=hs(new Rr("manifest",e.Ka,e.na,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return xa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d["return"](a)}})}
758
+ function qs(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.P,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),rs(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,rs(a),k=Hs(h),u(l,Promise.all(gb(k,
759
+ function(m){return m.createSegmentIndex()})),3);rs(a);if(e)throw e;return l["return"](h)})}function ss(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new qf({nb:a.P,onError:c,Ic:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,xf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Jf(e),3);case 3:return u(f,Hf(e),4);case 4:return f["return"](e)}})}
760
+ function xs(a,b,c,d,e,f,g,h){for(var k=new is,l=t(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,r=m.video;p&&!r&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&r&&(n.g[r.id]=r.bandwidth||m.bandwidth);if(p&&r){var v=p.bandwidth||393216,y=r.bandwidth||m.bandwidth-v;0>=y&&(y=m.bandwidth);n.g[p.id]=v;n.g[r.id]=y}}l=t(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;l=t(e.imageStreams);for(n=l.next();!n.done;n=l.next())n=n.value,k.g[n.id]=n.bandwidth||2048;n=new Map;
761
+ n.set(null,Promise.resolve(null));m=new Map;p=Hs(e);l=new Map;p=t(p);for(r=p.next();!r.done;r=p.next())r=r.value,v=Is(a,b,c,k,e,r,h,n,m),l.set(r.id,v);a=t(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.i)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
762
+ expiration:d.Wb(),streams:a,sessionIds:h?Of(d):[],drmInfo:b,appMetadata:g}}
763
+ function Is(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
764
+ tilesLayout:f.tilesLayout},m=f.id;Js(f,e.presentationTimeline.Va(),function(n){var p=Ks(a,b,m,f.id,c,d,n.h,g,h),r=Ls(a,b,m,f.id,c,d,n,g,k);mr(b,m,function(){var v,y;return K(function(x){if(1==x.g)return u(x,p,2);if(3!=x.g)return v=x.h,u(x,r,3);y=x.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,dataKey:y});z(x)})})});return l}
765
+ function Ks(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=Yi(g.oa(),g.ka,g.fa,h.streaming.retryParameters);b=kr(b,c,h,.5*ks(f,d),!0,function(l){var m;return K(function(n){if(1==n.g)return u(n,e.addSegments([{data:l}]),2);m=n.h;a.Nc.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
766
+ function Ls(a,b,c,d,e,f,g,h,k){var l=[g.oa()[0],g.ka,g.fa].join("-");if(k.has(l))return k.get(l);h=Yi(g.oa(),g.ka,g.fa,h.streaming.retryParameters);b=kr(b,c,h,js(f,d,g),!1,function(m){var n;return K(function(p){if(1==p.g)return u(p,e.addSegments([{data:m}]),2);n=p.h;a.Nc.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Js(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 rs(a){if(a.J.g)throw new N(2,9,7001);}
767
+ function ps(){if(!ms())throw new N(2,9,9E3);}function ys(a,b){return K(function(c){if(1==c.g)return a.dc.push(b),va(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);xa(c);nb(a.dc,b);return ya(c,0)})}function os(a,b){var c=b.promise;a.dc.push(c);return b["finally"](function(){nb(a.dc,c)})}
768
+ function Es(a){var b=[];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.push(d.initSegmentKey),b.push(d.dataKey)}return b}
769
+ function Ds(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Er(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Cs(d,!1),videoCapabilities:Cs(d,!0)}});return u(h,cs(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)})}
770
+ function Hs(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}
771
+ function vs(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",ls);ls.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new yr,va(b),u(b,Fr(a),2)):5!=b.g?(xa(b),u(b,a.destroy(),5)):ya(b,0)})};ls.prototype.list=ls.prototype.list;
772
+ ls.prototype.removeEmeSessions=ls.prototype.Kf;ls.prototype.remove=ls.prototype.remove;ls.prototype.getStoreInProgress=ls.prototype.lf;ls.prototype.store=ls.prototype.store;ls.prototype.getNetworkingEngine=ls.prototype.Xb;ls.prototype.getConfiguration=ls.prototype.getConfiguration;ls.prototype.configure=ls.prototype.configure;ls.prototype.destroy=ls.prototype.destroy;ls.support=ms;
773
+ var ws=(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");
774
+ $l.offline=ms;function Ms(){}function Ns(a,b){for(var c={priority:b||0,He:a},d=t(lb(Os)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.ga;if(e.item.priority<c.priority){Os.splice(f,0,c);return}}Os.push(c)}M("shaka.polyfill",Ms);Ms.register=Ns;Ms.installAll=function(){for(var a=t(Os),b=a.next();!b.done;b=a.next()){b=b.value;try{b.He()}catch(c){Xa("Error installing polyfill!",c)}}};var Os=[];function Ps(){}function Qs(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Rs(b.value)}function Rs(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)}})}Ms.Aria=Ps;Ps.install=Qs;Ns(Qs);function Ss(){}function Ts(){Us()}Ms.EncryptionScheme=Ss;Ss.install=Ts;Ns(Ts,-2);function Vs(){}
775
+ function Ws(){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}}),
776
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Xs);document.addEventListener("webkitfullscreenerror",Xs);document.addEventListener("mozfullscreenchange",Xs);document.addEventListener("mozfullscreenerror",Xs);document.addEventListener("MSFullscreenChange",Xs);document.addEventListener("MSFullscreenError",Xs)}}
777
+ function Xs(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)}Ms.Fullscreen=Vs;Vs.install=Ws;Ns(Ws);function Ys(){}function Zs(){}Ms.MathRound=Ys;Ys.install=Zs;Ns(Zs);function $s(){}function at(){if(vd()||wd()||ud("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),bt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=ct}
778
+ function ct(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x;return K(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!qd()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=rd(g),!h)||a.audio&&(k=a.audio.contentType,
777
779
  l=rd(k),!l))return w["return"](b)}else return w["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,w["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(r={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(r));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};
778
- n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);A(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;wa(w,4);break;case 3:E(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}Ns.MediaCapabilities=at;at.install=bt;var ct=null;at.originalMcap=ct;Os(bt,-1);function et(){}function ft(){var a=xd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?gt():a?(ht(),12>=a?(it(),jt()):it()):(ud("Tizen 2")||ud("Tizen 3")||ud("Tizen 4"))&&kt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&lt()}
779
- function it(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];c=a.apply(this,c);c.abort=function(){};return c}}function jt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function ht(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
780
- function kt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Vc(b)&&a(b)}}function gt(){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)}}
781
- function lt(){var a=MediaSource.isTypeSupported;ud("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)})}Ns.MediaSource=et;et.install=ft;Os(ft);function mt(){}function nt(){screen.orientation||void 0!=window.orientation&&ot()}function ot(){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 pt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new R("change");b.dispatchEvent(c)})}Ns.Orientation=mt;
782
- mt.install=nt;function pt(){Ne.call(this);this.type="";this.angle=0}ra(pt,Ne);
783
- pt.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)};
784
- pt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Os(nt);function qt(){}function rt(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=st,window.MediaKeys=tt,window.MediaKeySystemAccess=ut,navigator.requestMediaKeySystemAccess=vt)}function vt(a,b){try{var c=new ut(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
785
- function st(a){var b=this.mediaKeys;b&&b!=a&&wt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?wt(a,this):Promise.resolve()}function xt(a){a=Ob(a.initData);if(Rb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Cc(a.subarray(4),!0);a=Fc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Pb(a);this.dispatchEvent(b)}Ns.PatchedMediaKeysApple=qt;qt.install=rt;
786
- function ut(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,
780
+ n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);A(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;wa(w,4);break;case 3:E(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}Ms.MediaCapabilities=$s;$s.install=at;var bt=null;$s.originalMcap=bt;Ns(at,-1);function dt(){}function et(){var a=xd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?ft():a?(gt(),12>=a?(ht(),it()):ht()):(ud("Tizen 2")||ud("Tizen 3")||ud("Tizen 4"))&&jt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&kt()}
781
+ function ht(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];c=a.apply(this,c);c.abort=function(){};return c}}function it(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function gt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
782
+ function jt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Vc(b)&&a(b)}}function ft(){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)}}
783
+ function kt(){var a=MediaSource.isTypeSupported;ud("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)})}Ms.MediaSource=dt;dt.install=et;Ns(et);function lt(){}function mt(){screen.orientation||void 0!=window.orientation&&nt()}function nt(){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 ot;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}Ms.Orientation=lt;
784
+ lt.install=mt;function ot(){Ne.call(this);this.type="";this.angle=0}ra(ot,Ne);
785
+ ot.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)};
786
+ ot.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Ns(mt);function pt(){}function qt(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=rt,window.MediaKeys=st,window.MediaKeySystemAccess=tt,navigator.requestMediaKeySystemAccess=ut)}function ut(a,b){try{var c=new tt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
787
+ function rt(a){var b=this.mediaKeys;b&&b!=a&&vt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?vt(a,this):Promise.resolve()}function wt(a){a=Ob(a.initData);if(Rb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Cc(a.subarray(4),!0);a=Fc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Pb(a);this.dispatchEvent(b)}Ms.PatchedMediaKeysApple=pt;pt.install=qt;
788
+ function tt(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,
787
789
  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;}
788
- ut.prototype.createMediaKeys=function(){var a=new tt(this.keySystem);return Promise.resolve(a)};ut.prototype.getConfiguration=function(){return this.g};function tt(a){this.g=new WebKitMediaKeys(a);this.h=new ef}tt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new yt(this.g,a)};tt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
789
- function wt(a,b){a.h.pb();if(!b)return Promise.resolve();a.h.A(b,"webkitneedkey",xt);try{return vi(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function yt(a){Ne.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new ef;this.sessionId="";this.expiration=NaN;this.closed=new yc;this.keyStatuses=new zt}ra(yt,Ne);q=yt.prototype;
790
- q.generateRequest=function(a,b){var c=this;this.g=new yc;try{var d=this.l.createSession("video/mp4",Ob(b));this.j=d;this.sessionId=d.sessionId||"";this.h.A(this.j,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Pb(e.message));e=new R("message",e);c.dispatchEvent(e)});this.h.A(d,"webkitkeyadded",function(){c.i&&(At(c,"usable"),c.i.resolve(),c.i=null)});this.h.A(d,"webkitkeyerror",function(){var e=
791
- Error("EME PatchedMediaKeysApple key error");e.errorCode=c.j.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.i)c.i.reject(e),c.i=null;else switch(c.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:At(c,"output-not-allowed");break;default:At(c,"internal-error")}});At(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
792
- q.update=function(a){this.i=new yc;try{this.j.update(Ob(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.pb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function At(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}
793
- function zt(){this.size=0;this.g=void 0}q=zt.prototype;q.forEach=function(a){this.g&&a(this.g,bg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=bg.value();return this.g&&Mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Os(rt);function Bt(){}function Ct(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Dt,window.MediaKeySystemAccess=Et,navigator.requestMediaKeySystemAccess=Ft,HTMLMediaElement.prototype.setMediaKeys=Gt)}function Ft(a,b){try{var c=new Et(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
794
- function Ht(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Pb(Bn(a.initData));this.dispatchEvent(b)}}Ns.PatchedMediaKeysMs=Bt;Bt.install=Ct;
795
- function Et(a,b){this.keySystem=a;for(var c=!1,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
790
+ tt.prototype.createMediaKeys=function(){var a=new st(this.keySystem);return Promise.resolve(a)};tt.prototype.getConfiguration=function(){return this.g};function st(a){this.g=new WebKitMediaKeys(a);this.h=new ef}st.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new xt(this.g,a)};st.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
791
+ function vt(a,b){a.h.pb();if(!b)return Promise.resolve();a.h.A(b,"webkitneedkey",wt);try{return vi(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function xt(a){Ne.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new ef;this.sessionId="";this.expiration=NaN;this.closed=new yc;this.keyStatuses=new yt}ra(xt,Ne);q=xt.prototype;
792
+ q.generateRequest=function(a,b){var c=this;this.g=new yc;try{var d=this.l.createSession("video/mp4",Ob(b));this.j=d;this.sessionId=d.sessionId||"";this.h.A(this.j,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Pb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.h.A(d,"webkitkeyadded",function(){c.i&&(zt(c,"usable"),c.i.resolve(),c.i=null)});this.h.A(d,"webkitkeyerror",function(){var e=
793
+ Error("EME PatchedMediaKeysApple key error");e.errorCode=c.j.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.i)c.i.reject(e),c.i=null;else switch(c.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:zt(c,"output-not-allowed");break;default:zt(c,"internal-error")}});zt(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
794
+ q.update=function(a){this.i=new yc;try{this.j.update(Ob(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.pb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function zt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}
795
+ function yt(){this.size=0;this.g=void 0}q=yt.prototype;q.forEach=function(a){this.g&&a(this.g,bg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=bg.value();return this.g&&Mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Ns(qt);function At(){}function Bt(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Ct,window.MediaKeySystemAccess=Dt,navigator.requestMediaKeySystemAccess=Et,HTMLMediaElement.prototype.setMediaKeys=Ft)}function Et(a,b){try{var c=new Dt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
796
+ function Gt(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Pb(An(a.initData));this.dispatchEvent(b)}}Ms.PatchedMediaKeysMs=At;At.install=Bt;
797
+ function Dt(a,b){this.keySystem=a;for(var c=!1,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
796
798
  !0));if(e.videoCapabilities)for(h=t(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
797
- Et.prototype.createMediaKeys=function(){var a=new Dt(this.keySystem);return Promise.resolve(a)};Et.prototype.getConfiguration=function(){return this.g};function Gt(a){var b=this.mediaKeys;b&&b!=a&&It(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?It(a,this):Promise.resolve()}function Dt(a){this.g=new MSMediaKeys(a);this.h=new ef}
798
- Dt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Jt(this.g,a)};Dt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function It(a,b){a.h.pb();if(!b)return Promise.resolve();a.h.A(b,"msneedkey",Ht);try{return vi(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.msSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
799
- function Jt(a){Ne.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new ef;this.sessionId="";this.expiration=NaN;this.closed=new yc;this.keyStatuses=new Kt}ra(Jt,Ne);q=Jt.prototype;
800
- q.generateRequest=function(a,b){var c=this;this.g=new yc;try{this.j=this.l.createSession("video/mp4",Ob(b),null),this.h.A(this.j,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Pb(d.message));d=new R("message",d);c.dispatchEvent(d)}),this.h.A(this.j,"mskeyadded",function(){c.g?(Lt(c,"usable"),c.g.resolve(),c.g=null):c.i&&(Lt(c,"usable"),c.i.resolve(),c.i=null)}),this.h.A(this.j,"mskeyerror",
801
- function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.j.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.i)c.i.reject(d),c.i=null;else switch(c.j.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Lt(c,"output-not-allowed");break;default:Lt(c,"internal-error")}}),Lt(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
802
- q.update=function(a){this.i=new yc;try{this.j.update(Ob(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.pb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Lt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}
803
- function Kt(){this.size=0;this.g=void 0}q=Kt.prototype;q.forEach=function(a){this.g&&a(this.g,bg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=bg.value();return this.g&&Mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Os(Ct);function Mt(){}function Nt(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Ot,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Pt,window.MediaKeys=Qt,window.MediaKeySystemAccess=Rt)}function Ot(){return Promise.reject(Error("The key system specified is not supported."))}
804
- function Pt(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Ns.PatchedMediaKeysNop=Mt;Mt.install=Nt;function Qt(){throw new TypeError("Illegal constructor.");}Qt.prototype.createSession=function(){};Qt.prototype.setServerCertificate=function(){};function Rt(){this.keySystem="";throw new TypeError("Illegal constructor.");}Rt.prototype.getConfiguration=function(){};Rt.prototype.createMediaKeys=function(){};Os(Nt,-10);function St(){}function Tt(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Ut="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Vt;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Wt;window.MediaKeys=Xt;window.MediaKeySystemAccess=Yt}}
805
- function Zt(a){var b=Ut;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Vt(a,b){try{var c=new Yt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Wt(a){var b=this.mediaKeys;b&&b!=a&&$t(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&$t(a,this);return Promise.resolve()}Ns.PatchedMediaKeysWebkit=St;St.install=Tt;
806
- function Yt(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
799
+ Dt.prototype.createMediaKeys=function(){var a=new Ct(this.keySystem);return Promise.resolve(a)};Dt.prototype.getConfiguration=function(){return this.g};function Ft(a){var b=this.mediaKeys;b&&b!=a&&Ht(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Ht(a,this):Promise.resolve()}function Ct(a){this.g=new MSMediaKeys(a);this.h=new ef}
800
+ Ct.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new It(this.g,a)};Ct.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Ht(a,b){a.h.pb();if(!b)return Promise.resolve();a.h.A(b,"msneedkey",Gt);try{return vi(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.msSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
801
+ function It(a){Ne.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new ef;this.sessionId="";this.expiration=NaN;this.closed=new yc;this.keyStatuses=new Jt}ra(It,Ne);q=It.prototype;
802
+ q.generateRequest=function(a,b){var c=this;this.g=new yc;try{this.j=this.l.createSession("video/mp4",Ob(b),null),this.h.A(this.j,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Pb(d.message));d=new Q("message",d);c.dispatchEvent(d)}),this.h.A(this.j,"mskeyadded",function(){c.g?(Kt(c,"usable"),c.g.resolve(),c.g=null):c.i&&(Kt(c,"usable"),c.i.resolve(),c.i=null)}),this.h.A(this.j,"mskeyerror",
803
+ function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.j.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.i)c.i.reject(d),c.i=null;else switch(c.j.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Kt(c,"output-not-allowed");break;default:Kt(c,"internal-error")}}),Kt(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
804
+ q.update=function(a){this.i=new yc;try{this.j.update(Ob(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.pb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Kt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}
805
+ function Jt(){this.size=0;this.g=void 0}q=Jt.prototype;q.forEach=function(a){this.g&&a(this.g,bg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=bg.value();return this.g&&Mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Ns(Bt);function Lt(){}function Mt(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Nt,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Ot,window.MediaKeys=Pt,window.MediaKeySystemAccess=Qt)}function Nt(){return Promise.reject(Error("The key system specified is not supported."))}
806
+ function Ot(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Ms.PatchedMediaKeysNop=Lt;Lt.install=Mt;function Pt(){throw new TypeError("Illegal constructor.");}Pt.prototype.createSession=function(){};Pt.prototype.setServerCertificate=function(){};function Qt(){this.keySystem="";throw new TypeError("Illegal constructor.");}Qt.prototype.getConfiguration=function(){};Qt.prototype.createMediaKeys=function(){};Ns(Mt,-10);function Rt(){}function St(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Tt="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Ut;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Vt;window.MediaKeys=Wt;window.MediaKeySystemAccess=Xt}}
807
+ function Yt(a){var b=Tt;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Ut(a,b){try{var c=new Xt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Vt(a){var b=this.mediaKeys;b&&b!=a&&Zt(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Zt(a,this);return Promise.resolve()}Ms.PatchedMediaKeysWebkit=Rt;Rt.install=St;
808
+ function Xt(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
807
809
  m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=t(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
808
- d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}Yt.prototype.createMediaKeys=function(){var a=new Xt(this.g);return Promise.resolve(a)};Yt.prototype.getConfiguration=function(){return this.h};function Xt(a){this.l=a;this.g=null;this.h=new ef;this.i=[];this.j=new Map}
809
- function $t(a,b){a.g=b;a.h.pb();var c=Ut;b&&(a.h.A(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Pb(d.initData);a.g.dispatchEvent(e)}),a.h.A(b,c+"keymessage",function(d){var e=au(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new R("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.h.A(b,c+"keyadded",function(d){if(d=au(a,d.sessionId))bu(d,"usable"),
810
- d.g&&d.g.resolve(),d.g=null}),a.h.A(b,c+"keyerror",function(d){var e=au(a,d.sessionId);e&&e.handleError(d)}))}Xt.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.g||document.createElement("video");b.src||(b.src="about:blank");a=new cu(b,this.l,a);this.i.push(a);return a};Xt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
811
- function au(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 cu(a,b,c){Ne.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 yc;this.keyStatuses=new du}ra(cu,Ne);q=cu.prototype;
812
- q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?bu(this,"output-restricted"):1==b?bu(this,"expired"):bu(this,"internal-error"))};
813
- function eu(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=Ob(Fc("LOAD_SESSION|"+c));else{var e=Fc("PERSISTENT|");d=Nc(e,b)}else d=Ob(b)}catch(g){return Promise.reject(g)}a.h=new yc;var f=Zt("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}})).V(.01)}return a.h}
814
- function fu(a,b,c){if(a.g)a.g.then(function(){return fu(a,b,c)})["catch"](function(){return fu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Bc(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=Kc(e.keys[0].k);e=Kc(e.keys[0].kid)}else d=Ob(c),e=null;var f=Zt("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
815
- function bu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return eu(this,b,null)};q.load=function(a){return"persistent-license"==this.l?eu(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new yc;fu(this,b,a);return b};
816
- q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Zt("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function du(){this.size=0;this.g=void 0}q=du.prototype;q.forEach=function(a){this.g&&a(this.g,bg.value())};q.get=function(a){if(this.has(a))return this.g};
817
- q.has=function(a){var b=bg.value();return this.g&&Mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Ut="";Os(Tt);function gu(){}function hu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=iu,Object.defineProperty(a,"disablePictureInPicture",{get:ju,set:ku,enumerable:!0,configurable:!0}),document.exitPictureInPicture=lu,document.addEventListener("webkitpresentationmodechanged",mu,!0))}}
818
- function mu(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)}
819
- function iu(){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 lu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
820
- function ju(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function ku(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Ns.PiPWebkit=gu;gu.install=hu;Os(hu);function nu(){}function ou(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=pu)}function pu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Ns.StorageEstimate=nu;nu.install=ou;Os(ou);function qu(){}function ru(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Ns.VideoPlayPromise=qu;qu.install=ru;Os(ru);function su(){}function tu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=uu)}}function uu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ns.VideoPlaybackQuality=su;su.install=tu;Os(tu);function vu(){}function wu(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=xu;else if(6==b)a=yu;else{try{var c=!!xu(1,2,"")}catch(d){c=!1}c&&(a=xu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function xu(a,b,c){return new window.TextTrackCue(a,b,c)}function yu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Ns.VTTCue=vu;vu.install=wu;Os(wu);function zu(){}zu.prototype.parseInit=function(){};zu.prototype.parseMedia=function(a,b){var c=null,d=[],e=Bc(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=Au.exec(f))){var g=Bu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new qb(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",zu);zu.prototype.parseMedia=zu.prototype.parseMedia;
821
- zu.prototype.parseInit=zu.prototype.parseInit;var Au=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Bu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Zc["application/x-subtitle-lrc"]=function(){return new zu};function Cu(){}Cu.prototype.parseInit=function(){};
822
- Cu.prototype.parseMedia=function(a,b){var c=Bc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(D){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=In(g,Du,"frameRate"),k=In(g,Du,"subFrameRate"),l=In(g,Du,"frameRateMultiplier"),
823
- m=In(g,Du,"tickRate"),n=In(g,Du,"cellResolution");c=g.getAttribute("xml:space")||"default";e=In(g,Eu,"extent");if("default"!=c&&"preserve"!=c)throw new N(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Fu(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])?Gn(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=t(g),r=p.next();!r.done;r=
824
- p.next()){var v=r.value;r=new sb;var y=v.getAttribute("xml:id");if(y){r.id=y;var x=null;e&&(x=Gu.exec(e)||Hu.exec(e));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,C;if(w=Iu(v,l,"extent"))w=(C=Gu.exec(w))||Hu.exec(w),null!=w&&(r.width=Number(w[1]),r.height=Number(w[2]),C||(null!=y&&(r.width=100*r.width/y),null!=x&&(r.height=100*r.height/x)),r.widthUnits=C||null!=y?Jb:0,r.heightUnits=C||null!=x?Jb:0);if(v=Iu(v,l,"origin"))w=(C=Gu.exec(v))||Hu.exec(v),null!=w&&(r.viewportAnchorX=Number(w[1]),r.viewportAnchorY=
825
- Number(w[2]),C||(null!=x&&(r.viewportAnchorY=100*r.viewportAnchorY/x),null!=y&&(r.viewportAnchorX=100*r.viewportAnchorX/y)),r.viewportAnchorUnits=C||null!=y?Jb:0)}else r=null;r&&m.push(r)}if(Dn(f,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=t(Dn(f,"div"));for(p=e.next();!p.done;p=e.next())if(Dn(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");(f=Ju(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
826
- function Ju(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var r=null,v=t(Ku),y=v.next();!y.done&&!(r=Lu(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||r)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
827
- a=[];if(!y)for(var x=t(p.childNodes),w=x.next();!w.done;w=x.next())(w=Ju(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;x=/\S/.test(p.textContent);var C=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(C||x||"br"==p.tagName||0!=a.length||d&&!h))return null;w=Mu(p,c);x=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=Nu(n,c,x,w),x=w.start,w=w.end,n=n.parentNode;null==x&&(x=0);x+=b;w=null==w?Infinity:w+b;if(!C&&0<a.length)for(x=Infinity,w=0,b=t(a),
828
- c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new qb(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new qb(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Lu(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var D=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==D})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
829
- (g=Lu(l,"region",f,"")[0]);Ou(b,p,g,r,e,v,0==a.length);return b}
830
- function Ou(a,b,c,d,e,f,g){f=f||g;"rtl"==Pu(b,c,e,"direction",f)&&(a.direction="rtl");g=Pu(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=rb);(g=Pu(b,c,e,"textAlign",!0))?(a.positionAlign=Qu[g],a.lineAlign=Ru[g],a.textAlign=Db[g.toUpperCase()]):a.textAlign="start";if(g=Pu(b,c,e,"displayAlign",!0))a.displayAlign=Eb[g.toUpperCase()];if(g=Pu(b,c,e,"color",f))a.color=g;if(g=Pu(b,c,e,"backgroundColor",
831
- f))a.backgroundColor=g;if(g=Pu(b,c,e,"border",f))a.border=g;if(g=Pu(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Pu(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Pu(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Pu(b,c,e,"lineHeight",f))&&g.match(Su)&&(a.lineHeight=g);(g=Pu(b,c,e,"fontSize",f))&&(g.match(Su)||g.match(Tu))&&(a.fontSize=g);if(g=Pu(b,c,e,"fontStyle",f))a.fontStyle=Ib[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
832
- d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=Pu(b,c,e,"letterSpacing",f))&&d.match(Su)&&(a.letterSpacing=d);(d=Pu(b,c,e,"linePadding",f))&&d.match(Su)&&(a.linePadding=d);if(f=Pu(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Iu(c,e,"textDecoration"))&&Uu(a,c);(b=Vu(b,e,"textDecoration"))&&Uu(a,b)}
833
- function Uu(a,b){for(var c=t(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&nb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&nb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
834
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&nb(a.textDecoration,"overline")}}function Pu(a,b,c,d,e){e=void 0===e?!0:e;return(a=Vu(a,c,d))?a:e?Iu(b,c,d):null}function Iu(a,b,c){if(!a)return null;var d=In(a,Eu,c);return d?d:Wu(a,b,c)}function Vu(a,b,c){var d=In(a,Eu,c);return d?d:Wu(a,b,c)}
835
- function Wu(a,b,c){a=Lu(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Hn(a[e],"urn:ebu:tt:style",c);f||(f=In(a[e],Eu,c));f||(f=Vu(a[e],b,c));f&&(d=f)}return d}
836
- function Lu(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Hn(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Nu(a,b,c,d){a=Mu(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
837
- function Mu(a,b){var c=Xu(a.getAttribute("begin"),b),d=Xu(a.getAttribute("end"),b),e=Xu(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
838
- function Xu(a,b){var c=null;if(Yu.test(a)){c=Yu.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(Zu.test(a))c=$u(Zu,a);else if(av.test(a))c=$u(av,a);else if(bv.test(a))c=bv.exec(a),c=Number(c[1])/b.frameRate;else if(cv.test(a))c=cv.exec(a),c=Number(c[1])/b.g;else if(dv.test(a))c=$u(dv,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
839
- function $u(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}M("shaka.text.TtmlTextParser",Cu);Cu.prototype.parseMedia=Cu.prototype.parseMedia;Cu.prototype.parseInit=Cu.prototype.parseInit;function Fu(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
840
- var Gu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Tu=/^(\d{1,2}(?:\.\d+)?|100)%$/,Su=/^(\d+px|\d+em|\d*\.?\d+c)$/,Hu=/^(\d+)px (\d+)px$/,Yu=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Zu=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,av=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,bv=/^(\d*(?:\.\d*)?)f$/,cv=/^(\d*(?:\.\d*)?)t$/,dv=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Ru={left:xb,center:"center",right:"end",start:xb,end:"end"},Qu=
841
- {left:"line-left",center:"center",right:"line-right"},Du=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Eu=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Ku=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Zc["application/ttml+xml"]=function(){return new Cu};function ev(){this.s=new Cu}ev.prototype.parseInit=function(a){var b=!1;(new lg).box("moov",pg).box("trak",pg).box("mdia",pg).box("minf",pg).box("stbl",pg).U("stsd",rg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};ev.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new lg).box("mdat",sg(function(f){d=!0;e=e.concat(c.s.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};M("shaka.text.Mp4TtmlParser",ev);ev.prototype.parseMedia=ev.prototype.parseMedia;
842
- ev.prototype.parseInit=ev.prototype.parseInit;Zc['application/mp4; codecs="stpp"']=function(){return new ev};Zc['application/mp4; codecs="stpp.ttml"']=function(){return new ev};Zc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new ev};Zc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new ev};function fv(){}fv.prototype.parseInit=function(){};
843
- fv.prototype.parseMedia=function(a,b){var c=Bc(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=gv(new Up(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=
844
- [];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 Up(g);var h=new sb;Xp(g);Vp(g);for(var k=Xp(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))?
845
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Vp(g);k=Xp(g)}f.push(h)}e=new Map;hv(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 qb(0,0,"");for(var n=!1,p=0;p<k.length;p++){var r=
810
+ d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}Xt.prototype.createMediaKeys=function(){var a=new Wt(this.g);return Promise.resolve(a)};Xt.prototype.getConfiguration=function(){return this.h};function Wt(a){this.l=a;this.g=null;this.h=new ef;this.i=[];this.j=new Map}
811
+ function Zt(a,b){a.g=b;a.h.pb();var c=Tt;b&&(a.h.A(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Pb(d.initData);a.g.dispatchEvent(e)}),a.h.A(b,c+"keymessage",function(d){var e=$t(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.h.A(b,c+"keyadded",function(d){if(d=$t(a,d.sessionId))au(d,"usable"),
812
+ d.g&&d.g.resolve(),d.g=null}),a.h.A(b,c+"keyerror",function(d){var e=$t(a,d.sessionId);e&&e.handleError(d)}))}Wt.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.g||document.createElement("video");b.src||(b.src="about:blank");a=new bu(b,this.l,a);this.i.push(a);return a};Wt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
813
+ function $t(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 bu(a,b,c){Ne.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 yc;this.keyStatuses=new cu}ra(bu,Ne);q=bu.prototype;
814
+ q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?au(this,"output-restricted"):1==b?au(this,"expired"):au(this,"internal-error"))};
815
+ function du(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=Ob(Fc("LOAD_SESSION|"+c));else{var e=Fc("PERSISTENT|");d=Nc(e,b)}else d=Ob(b)}catch(g){return Promise.reject(g)}a.h=new yc;var f=Yt("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}})).U(.01)}return a.h}
816
+ function eu(a,b,c){if(a.g)a.g.then(function(){return eu(a,b,c)})["catch"](function(){return eu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Bc(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=Kc(e.keys[0].k);e=Kc(e.keys[0].kid)}else d=Ob(c),e=null;var f=Yt("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
817
+ function au(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new Q("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return du(this,b,null)};q.load=function(a){return"persistent-license"==this.l?du(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new yc;eu(this,b,a);return b};
818
+ q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Yt("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function cu(){this.size=0;this.g=void 0}q=cu.prototype;q.forEach=function(a){this.g&&a(this.g,bg.value())};q.get=function(a){if(this.has(a))return this.g};
819
+ q.has=function(a){var b=bg.value();return this.g&&Mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Tt="";Ns(St);function fu(){}function gu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=hu,Object.defineProperty(a,"disablePictureInPicture",{get:iu,set:ju,enumerable:!0,configurable:!0}),document.exitPictureInPicture=ku,document.addEventListener("webkitpresentationmodechanged",lu,!0))}}
820
+ function lu(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)}
821
+ function hu(){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 ku(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
822
+ function iu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function ju(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Ms.PiPWebkit=fu;fu.install=gu;Ns(gu);function mu(){}function nu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=ou)}function ou(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Ms.StorageEstimate=mu;mu.install=nu;Ns(nu);function pu(){}function qu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Ms.VideoPlayPromise=pu;pu.install=qu;Ns(qu);function ru(){}function su(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=tu)}}function tu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ms.VideoPlaybackQuality=ru;ru.install=su;Ns(su);function uu(){}function vu(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=wu;else if(6==b)a=xu;else{try{var c=!!wu(1,2,"")}catch(d){c=!1}c&&(a=wu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function wu(a,b,c){return new window.TextTrackCue(a,b,c)}function xu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Ms.VTTCue=uu;uu.install=vu;Ns(vu);function yu(){}yu.prototype.parseInit=function(){};yu.prototype.parseMedia=function(a,b){var c=null,d=[],e=Bc(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=zu.exec(f))){var g=Au.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new qb(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",yu);yu.prototype.parseMedia=yu.prototype.parseMedia;
823
+ yu.prototype.parseInit=yu.prototype.parseInit;var zu=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Au=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Zc["application/x-subtitle-lrc"]=function(){return new yu};function Bu(){}Bu.prototype.parseInit=function(){};
824
+ Bu.prototype.parseMedia=function(a,b){var c=Bc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(D){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=Hn(g,Cu,"frameRate"),k=Hn(g,Cu,"subFrameRate"),l=Hn(g,Cu,"frameRateMultiplier"),
825
+ m=Hn(g,Cu,"tickRate"),n=Hn(g,Cu,"cellResolution");c=g.getAttribute("xml:space")||"default";e=Hn(g,Du,"extent");if("default"!=c&&"preserve"!=c)throw new N(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Eu(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])?Fn(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=t(g),r=p.next();!r.done;r=
826
+ p.next()){var v=r.value;r=new sb;var y=v.getAttribute("xml:id");if(y){r.id=y;var x=null;e&&(x=Fu.exec(e)||Gu.exec(e));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,C;if(w=Hu(v,l,"extent"))w=(C=Fu.exec(w))||Gu.exec(w),null!=w&&(r.width=Number(w[1]),r.height=Number(w[2]),C||(null!=y&&(r.width=100*r.width/y),null!=x&&(r.height=100*r.height/x)),r.widthUnits=C||null!=y?Jb:0,r.heightUnits=C||null!=x?Jb:0);if(v=Hu(v,l,"origin"))w=(C=Fu.exec(v))||Gu.exec(v),null!=w&&(r.viewportAnchorX=Number(w[1]),r.viewportAnchorY=
827
+ Number(w[2]),C||(null!=x&&(r.viewportAnchorY=100*r.viewportAnchorY/x),null!=y&&(r.viewportAnchorX=100*r.viewportAnchorX/y)),r.viewportAnchorUnits=C||null!=y?Jb:0)}else r=null;r&&m.push(r)}if(Cn(f,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=t(Cn(f,"div"));for(p=e.next();!p.done;p=e.next())if(Cn(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");(f=Iu(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
828
+ function Iu(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var r=null,v=t(Ju),y=v.next();!y.done&&!(r=Ku(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||r)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
829
+ a=[];if(!y)for(var x=t(p.childNodes),w=x.next();!w.done;w=x.next())(w=Iu(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;x=/\S/.test(p.textContent);var C=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(C||x||"br"==p.tagName||0!=a.length||d&&!h))return null;w=Lu(p,c);x=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=Mu(n,c,x,w),x=w.start,w=w.end,n=n.parentNode;null==x&&(x=0);x+=b;w=null==w?Infinity:w+b;if(!C&&0<a.length)for(x=Infinity,w=0,b=t(a),
830
+ c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new qb(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new qb(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Ku(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var D=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==D})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
831
+ (g=Ku(l,"region",f,"")[0]);Nu(b,p,g,r,e,v,0==a.length);return b}
832
+ function Nu(a,b,c,d,e,f,g){f=f||g;"rtl"==Ou(b,c,e,"direction",f)&&(a.direction="rtl");g=Ou(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=rb);(g=Ou(b,c,e,"textAlign",!0))?(a.positionAlign=Pu[g],a.lineAlign=Qu[g],a.textAlign=Db[g.toUpperCase()]):a.textAlign="start";if(g=Ou(b,c,e,"displayAlign",!0))a.displayAlign=Eb[g.toUpperCase()];if(g=Ou(b,c,e,"color",f))a.color=g;if(g=Ou(b,c,e,"backgroundColor",
833
+ f))a.backgroundColor=g;if(g=Ou(b,c,e,"border",f))a.border=g;if(g=Ou(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Ou(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Ou(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Ou(b,c,e,"lineHeight",f))&&g.match(Ru)&&(a.lineHeight=g);(g=Ou(b,c,e,"fontSize",f))&&(g.match(Ru)||g.match(Su))&&(a.fontSize=g);if(g=Ou(b,c,e,"fontStyle",f))a.fontStyle=Ib[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
834
+ d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=Ou(b,c,e,"letterSpacing",f))&&d.match(Ru)&&(a.letterSpacing=d);(d=Ou(b,c,e,"linePadding",f))&&d.match(Ru)&&(a.linePadding=d);if(f=Ou(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Hu(c,e,"textDecoration"))&&Tu(a,c);(b=Uu(b,e,"textDecoration"))&&Tu(a,b)}
835
+ function Tu(a,b){for(var c=t(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&nb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&nb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
836
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&nb(a.textDecoration,"overline")}}function Ou(a,b,c,d,e){e=void 0===e?!0:e;return(a=Uu(a,c,d))?a:e?Hu(b,c,d):null}function Hu(a,b,c){if(!a)return null;var d=Hn(a,Du,c);return d?d:Vu(a,b,c)}function Uu(a,b,c){var d=Hn(a,Du,c);return d?d:Vu(a,b,c)}
837
+ function Vu(a,b,c){a=Ku(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Gn(a[e],"urn:ebu:tt:style",c);f||(f=Hn(a[e],Du,c));f||(f=Uu(a[e],b,c));f&&(d=f)}return d}
838
+ function Ku(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Gn(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Mu(a,b,c,d){a=Lu(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
839
+ function Lu(a,b){var c=Wu(a.getAttribute("begin"),b),d=Wu(a.getAttribute("end"),b),e=Wu(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
840
+ function Wu(a,b){var c=null;if(Xu.test(a)){c=Xu.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(Yu.test(a))c=Zu(Yu,a);else if($u.test(a))c=Zu($u,a);else if(av.test(a))c=av.exec(a),c=Number(c[1])/b.frameRate;else if(bv.test(a))c=bv.exec(a),c=Number(c[1])/b.g;else if(cv.test(a))c=Zu(cv,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
841
+ function Zu(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}M("shaka.text.TtmlTextParser",Bu);Bu.prototype.parseMedia=Bu.prototype.parseMedia;Bu.prototype.parseInit=Bu.prototype.parseInit;function Eu(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
842
+ var Fu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Su=/^(\d{1,2}(?:\.\d+)?|100)%$/,Ru=/^(\d+px|\d+em|\d*\.?\d+c)$/,Gu=/^(\d+)px (\d+)px$/,Xu=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Yu=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,$u=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,av=/^(\d*(?:\.\d*)?)f$/,bv=/^(\d*(?:\.\d*)?)t$/,cv=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Qu={left:xb,center:"center",right:"end",start:xb,end:"end"},Pu=
843
+ {left:"line-left",center:"center",right:"line-right"},Cu=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Du=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Ju=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Zc["application/ttml+xml"]=function(){return new Bu};function dv(){this.s=new Bu}dv.prototype.parseInit=function(a){var b=!1;(new lg).box("moov",pg).box("trak",pg).box("mdia",pg).box("minf",pg).box("stbl",pg).T("stsd",rg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};dv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new lg).box("mdat",sg(function(f){d=!0;e=e.concat(c.s.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};M("shaka.text.Mp4TtmlParser",dv);dv.prototype.parseMedia=dv.prototype.parseMedia;
844
+ dv.prototype.parseInit=dv.prototype.parseInit;Zc['application/mp4; codecs="stpp"']=function(){return new dv};Zc['application/mp4; codecs="stpp.ttml"']=function(){return new dv};Zc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new dv};Zc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new dv};function ev(){}ev.prototype.parseInit=function(){};
845
+ ev.prototype.parseMedia=function(a,b){var c=Bc(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=fv(new Tp(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=
846
+ [];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 Tp(g);var h=new sb;Wp(g);Up(g);for(var k=Wp(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))?
847
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Up(g);k=Wp(g)}f.push(h)}e=new Map;gv(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 qb(0,0,"");for(var n=!1,p=0;p<k.length;p++){var r=
846
848
  /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(r){var v=r[2].trim().replace(";","");switch(r[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=Ab;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
847
- !0;m.opacity=parseFloat(v);break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new Up(h[0]);m=gv(k);r=Wp(k,/[ \t]+--\x3e[ \t]+/g);n=gv(k);if(null==m||null==r||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
848
- ""):h=new qb(m,n,"");iv(p,h,e);Vp(k);for(m=Xp(k);m;)jv(h,m,f),Vp(k),m=Xp(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function hv(a){for(var b=t(Object.entries(Gb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new qb(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(Hb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new qb(0,0,""),e.backgroundColor=d,a.set(c,e)}
849
- function iv(a,b,c){0===c.size&&hv(c);a=kv(a);var d=Un("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=t(d);for(d=a.next();!d.done;d=a.next())lv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
850
- function kv(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function mv(a,b){return a&&0<a.length?a:b}
851
- function lv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=mv(h.backgroundColor,e.backgroundColor),e.color=mv(h.color,e.color),e.fontFamily=mv(h.fontFamily,e.fontFamily),e.fontSize=mv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
852
- "italic";break;case "u":e.textDecoration.push("underline")}}if(Kn(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())lv(a.value,e,c,d)}
853
- function jv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=ub:a.textAlign=Db[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"==
854
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=nv(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=Fb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=wb,a.line=Number(c[1]),c[2]&&(a.lineAlign=Fb[c[2].toUpperCase()])}function nv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
855
- function gv(a){a=Wp(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",fv);fv.prototype.parseMedia=fv.prototype.parseMedia;fv.prototype.parseInit=fv.prototype.parseInit;Zc["text/vtt"]=function(){return new fv};Zc['text/vtt; codecs="vtt"']=function(){return new fv};Zc['text/vtt; codecs="wvtt"']=function(){return new fv};function ov(){this.g=null}ov.prototype.parseInit=function(a){var b=this,c=!1;(new lg).box("moov",pg).box("trak",pg).box("mdia",pg).U("mdhd",function(d){d=Gh(d.reader,d.version);b.g=d.timescale}).box("minf",pg).box("stbl",pg).U("stsd",rg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
856
- ov.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 lg).box("moof",pg).box("traf",pg).U("tfdt",function(B){g=!0;c=Fh(B.reader,B.version).jd}).U("tfhd",function(B){l=Eh(B.reader,B.flags).Zd}).U("trun",function(B){h=!0;d=Hh(B.reader,B.version,B.flags).qe}).box("mdat",sg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new ig(e,0),p=t(d),r=p.next();!r.done;r=p.next()){r=r.value;var v=r.Jd||l,y=r.Mc?
857
- c+r.Mc:m;m=y+(v||0);var x=0;do{var w=n.N();x+=w;var C=n.N(),D=null;"vttc"==tg(C)?8<w&&(D=n.bb(w-8)):n.skip(w-8);v&&D&&(w=pv(D,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(r.sampleSize&&x<r.sampleSize)}return f.filter(Zb)};function pv(a,b,c){var d,e,f;(new lg).box("payl",sg(function(g){d=Bc(g)})).box("iden",sg(function(g){e=Bc(g)})).box("sttg",sg(function(g){f=Bc(g)})).parse(a);return d?qv(d,e,f,b,c):null}
858
- function qv(a,b,c,d,e){d=new qb(d,e,"");iv(a,d,new Map);b&&(d.id=b);if(c)for(a=new Up(c),b=Xp(a);b;)jv(d,b,[]),Vp(a),b=Xp(a);return d}M("shaka.text.Mp4VttParser",ov);ov.prototype.parseMedia=ov.prototype.parseMedia;ov.prototype.parseInit=ov.prototype.parseInit;Zc['application/mp4; codecs="wvtt"']=function(){return new ov};function rv(){}rv.prototype.parseInit=function(){};rv.prototype.parseMedia=function(a){var b=Bc(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 Up(c[0]),e=sv(d),f=Wp(d,/,/g);d=sv(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 qb(e,d,c.slice(1).join("\n").trim()))}return a};
859
- function sv(a){a=Wp(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",rv);rv.prototype.parseMedia=rv.prototype.parseMedia;rv.prototype.parseInit=rv.prototype.parseInit;Zc["text/x-subviewer"]=function(){return new rv};function tv(){this.s=new fv}tv.prototype.parseInit=function(){};tv.prototype.parseMedia=function(a,b){var c=Bc(a);c=uv(c);c=Ob(Fc(c));return this.s.parseMedia(c,b)};function uv(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",tv);tv.srt2webvtt=uv;tv.prototype.parseMedia=tv.prototype.parseMedia;
860
- tv.prototype.parseInit=tv.prototype.parseInit;Zc["text/srt"]=function(){return new tv};function vv(){}vv.prototype.parseInit=function(){};
861
- vv.prototype.parseMedia=function(a){var b="",c="";a=Bc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=wv.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=xv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(yv);else if("Style"==e){e=f.split(yv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
862
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={dd:e.dd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=xv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(yv);else if("Dialogue"==f){g=g.split(yv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=zv(f.Start);var k=zv(f.End);g=new qb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.dd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.dd}}(e)))&&Av(g,f);d.push(g)}return d};
863
- function Av(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Bv(c))a.color=c;if(c=b.BackColour)if(c=Bv(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=yb;a.textAlign="start";break;case 2:a.displayAlign=yb;a.textAlign=ub;break;case 3:a.displayAlign=yb;a.textAlign="end";
849
+ !0;m.opacity=parseFloat(v);break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new Tp(h[0]);m=fv(k);r=Vp(k,/[ \t]+--\x3e[ \t]+/g);n=fv(k);if(null==m||null==r||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
850
+ ""):h=new qb(m,n,"");hv(p,h,e);Up(k);for(m=Wp(k);m;)iv(h,m,f),Up(k),m=Wp(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function gv(a){for(var b=t(Object.entries(Gb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new qb(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(Hb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new qb(0,0,""),e.backgroundColor=d,a.set(c,e)}
851
+ function hv(a,b,c){0===c.size&&gv(c);a=jv(a);var d=Tn("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=t(d);for(d=a.next();!d.done;d=a.next())kv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
852
+ function jv(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function lv(a,b){return a&&0<a.length?a:b}
853
+ function kv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=lv(h.backgroundColor,e.backgroundColor),e.color=lv(h.color,e.color),e.fontFamily=lv(h.fontFamily,e.fontFamily),e.fontSize=lv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
854
+ "italic";break;case "u":e.textDecoration.push("underline")}}if(Jn(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())kv(a.value,e,c,d)}
855
+ function iv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=ub:a.textAlign=Db[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"==
856
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=mv(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=Fb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=wb,a.line=Number(c[1]),c[2]&&(a.lineAlign=Fb[c[2].toUpperCase()])}function mv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
857
+ function fv(a){a=Vp(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",ev);ev.prototype.parseMedia=ev.prototype.parseMedia;ev.prototype.parseInit=ev.prototype.parseInit;Zc["text/vtt"]=function(){return new ev};Zc['text/vtt; codecs="vtt"']=function(){return new ev};Zc['text/vtt; codecs="wvtt"']=function(){return new ev};function nv(){this.g=null}nv.prototype.parseInit=function(a){var b=this,c=!1;(new lg).box("moov",pg).box("trak",pg).box("mdia",pg).T("mdhd",function(d){d=Gh(d.reader,d.version);b.g=d.timescale}).box("minf",pg).box("stbl",pg).T("stsd",rg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
858
+ nv.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 lg).box("moof",pg).box("traf",pg).T("tfdt",function(B){g=!0;c=Fh(B.reader,B.version).jd}).T("tfhd",function(B){l=Eh(B.reader,B.flags).Zd}).T("trun",function(B){h=!0;d=Hh(B.reader,B.version,B.flags).qe}).box("mdat",sg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new ig(e,0),p=t(d),r=p.next();!r.done;r=p.next()){r=r.value;var v=r.Jd||l,y=r.Mc?
859
+ c+r.Mc:m;m=y+(v||0);var x=0;do{var w=n.N();x+=w;var C=n.N(),D=null;"vttc"==tg(C)?8<w&&(D=n.bb(w-8)):n.skip(w-8);v&&D&&(w=ov(D,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(r.sampleSize&&x<r.sampleSize)}return f.filter(Zb)};function ov(a,b,c){var d,e,f;(new lg).box("payl",sg(function(g){d=Bc(g)})).box("iden",sg(function(g){e=Bc(g)})).box("sttg",sg(function(g){f=Bc(g)})).parse(a);return d?pv(d,e,f,b,c):null}
860
+ function pv(a,b,c,d,e){d=new qb(d,e,"");hv(a,d,new Map);b&&(d.id=b);if(c)for(a=new Tp(c),b=Wp(a);b;)iv(d,b,[]),Up(a),b=Wp(a);return d}M("shaka.text.Mp4VttParser",nv);nv.prototype.parseMedia=nv.prototype.parseMedia;nv.prototype.parseInit=nv.prototype.parseInit;Zc['application/mp4; codecs="wvtt"']=function(){return new nv};function qv(){}qv.prototype.parseInit=function(){};qv.prototype.parseMedia=function(a){var b=Bc(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 Tp(c[0]),e=rv(d),f=Vp(d,/,/g);d=rv(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 qb(e,d,c.slice(1).join("\n").trim()))}return a};
861
+ function rv(a){a=Vp(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",qv);qv.prototype.parseMedia=qv.prototype.parseMedia;qv.prototype.parseInit=qv.prototype.parseInit;Zc["text/x-subviewer"]=function(){return new qv};function sv(){this.s=new ev}sv.prototype.parseInit=function(){};sv.prototype.parseMedia=function(a,b){var c=Bc(a);c=tv(c);c=Ob(Fc(c));return this.s.parseMedia(c,b)};function tv(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",sv);sv.srt2webvtt=tv;sv.prototype.parseMedia=sv.prototype.parseMedia;
862
+ sv.prototype.parseInit=sv.prototype.parseInit;Zc["text/srt"]=function(){return new sv};function uv(){}uv.prototype.parseInit=function(){};
863
+ uv.prototype.parseMedia=function(a){var b="",c="";a=Bc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=vv.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=wv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(xv);else if("Style"==e){e=f.split(xv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
864
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={dd:e.dd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=wv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(xv);else if("Dialogue"==f){g=g.split(xv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=yv(f.Start);var k=yv(f.End);g=new qb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.dd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.dd}}(e)))&&zv(g,f);d.push(g)}return d};
865
+ function zv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Av(c))a.color=c;if(c=b.BackColour)if(c=Av(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=yb;a.textAlign="start";break;case 2:a.displayAlign=yb;a.textAlign=ub;break;case 3:a.displayAlign=yb;a.textAlign="end";
864
866
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=ub;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=ub;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
865
- function Bv(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 zv(a){a=Cv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",vv);vv.prototype.parseMedia=vv.prototype.parseMedia;vv.prototype.parseInit=vv.prototype.parseInit;var wv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,xv=/^\s*([^:]+):\s*(.*)/,yv=/\s*,\s*/,Cv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
866
- Zc["text/x-ssa"]=function(){return new vv};/*
867
+ function Av(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 yv(a){a=Bv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",uv);uv.prototype.parseMedia=uv.prototype.parseMedia;uv.prototype.parseInit=uv.prototype.parseInit;var vv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,wv=/^\s*([^:]+):\s*(.*)/,xv=/\s*,\s*/,Bv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
868
+ Zc["text/x-ssa"]=function(){return new uv};/*
867
869
  @license
868
870
  EME Encryption Scheme Polyfill
869
871
  Copyright 2019 Google LLC
870
872
  SPDX-License-Identifier: Apache-2.0
871
873
  */
872
- function Dv(){}var Ev;function Fv(){Ev?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Ev=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Gv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
873
- function Gv(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Ev.call(c,a,b),2);d=e.h;if(Hv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Ev,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Iv;return e["return"](Iv.call(c,
874
+ function Cv(){}var Dv;function Ev(){Dv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Dv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Fv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
875
+ function Fv(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Dv.call(c,a,b),2);d=e.h;if(Gv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Dv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Hv;return e["return"](Hv.call(c,
874
876
  a,b))})}
875
- function Iv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return K(function(r){if(1==r.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Jv(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Kv(h.videoCapabilities,d),l=Kv(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."),
876
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(r,Ev.call(c,a,e),2)}p=r.h;return r["return"](new Lv(p,d))})}function Kv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",Dv);Dv.install=Fv;function Mv(){}var Nv;
877
- function Ov(){Nv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Nv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Pv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
878
- function Pv(a){var b=this,c,d;return K(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(e,Nv.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Hv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Nv,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
879
- navigator.mediaCapabilities.decodingInfo=Qv;return e["return"](Qv.call(b,a))})}
880
- function Qv(a){var b=this,c,d,e,f,g,h,k,l,m;return K(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=Jv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):u(n,Nv.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
881
- new Lv(k.keySystemAccess,c);n.v(3);break}if(!a.keySystemConfiguration){n.v(3);break}var p=a.keySystemConfiguration,r=[],v=[];p.audio&&r.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};r.length&&(p.audioCapabilities=r);v.length&&(p.videoCapabilities=
882
- 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",Mv);Mv.install=Ov;function Lv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
883
- Lv.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};Lv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
884
- function Jv(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 Hv(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 Rv(){}
885
- function Vs(){Fv();Ov()}M("EncryptionSchemePolyfills",Rv);Rv.install=Vs;"undefined"!==typeof module&&module.exports&&(module.exports=Rv);}).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})();
877
+ function Hv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return K(function(r){if(1==r.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Iv(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Jv(h.videoCapabilities,d),l=Jv(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."),
878
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(r,Dv.call(c,a,e),2)}p=r.h;return r["return"](new Kv(p,d))})}function Jv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",Cv);Cv.install=Ev;function Lv(){}var Mv;
879
+ function Nv(){Mv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Mv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Ov):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
880
+ function Ov(a){var b=this,c,d;return K(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(e,Mv.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Gv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Mv,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
881
+ navigator.mediaCapabilities.decodingInfo=Pv;return e["return"](Pv.call(b,a))})}
882
+ function Pv(a){var b=this,c,d,e,f,g,h,k,l,m;return K(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=Iv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):u(n,Mv.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
883
+ new Kv(k.keySystemAccess,c);n.v(3);break}if(!a.keySystemConfiguration){n.v(3);break}var p=a.keySystemConfiguration,r=[],v=[];p.audio&&r.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};r.length&&(p.audioCapabilities=r);v.length&&(p.videoCapabilities=
884
+ 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",Lv);Lv.install=Nv;function Kv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
885
+ Kv.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};Kv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
886
+ function Iv(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 Gv(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 Qv(){}
887
+ function Us(){Ev();Nv()}M("EncryptionSchemePolyfills",Qv);Qv.install=Us;"undefined"!==typeof module&&module.exports&&(module.exports=Qv);}).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})();
886
888
 
887
889
  //# sourceMappingURL=shaka-player.compiled.map