shaka-player 3.3.11 → 3.3.13

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 (58) hide show
  1. package/.github/workflows/build-and-test.yaml +11 -6
  2. package/.github/workflows/compute-incremental-coverage.py +14 -3
  3. package/.github/workflows/demo-version-index.yaml +9 -1
  4. package/.github/workflows/nightly-demo.yaml +1 -1
  5. package/.github/workflows/release-please.yaml +4 -4
  6. package/.github/workflows/report-incremental-coverage.yaml +1 -1
  7. package/.github/workflows/selenium-lab-tests.yaml +8 -6
  8. package/CHANGELOG.md +26 -0
  9. package/dist/deps.js +5 -5
  10. package/dist/locales.js +31 -31
  11. package/dist/shaka-player.compiled.d.ts +2 -1
  12. package/dist/shaka-player.compiled.debug.d.ts +2 -1
  13. package/dist/shaka-player.compiled.debug.externs.js +3 -1
  14. package/dist/shaka-player.compiled.debug.js +104 -101
  15. package/dist/shaka-player.compiled.debug.map +4 -4
  16. package/dist/shaka-player.compiled.externs.js +3 -1
  17. package/dist/shaka-player.compiled.js +725 -722
  18. package/dist/shaka-player.compiled.map +4 -4
  19. package/dist/shaka-player.ui.d.ts +2 -1
  20. package/dist/shaka-player.ui.debug.d.ts +2 -1
  21. package/dist/shaka-player.ui.debug.externs.js +3 -1
  22. package/dist/shaka-player.ui.debug.js +122 -119
  23. package/dist/shaka-player.ui.debug.map +4 -4
  24. package/dist/shaka-player.ui.externs.js +3 -1
  25. package/dist/shaka-player.ui.js +843 -840
  26. package/dist/shaka-player.ui.map +4 -4
  27. package/docs/tutorials/welcome.md +2 -2
  28. package/lib/ads/client_side_ad_manager.js +5 -2
  29. package/lib/cast/cast_proxy.js +2 -1
  30. package/lib/cast/cast_receiver.js +19 -5
  31. package/lib/cast/cast_sender.js +2 -1
  32. package/lib/cast/cast_utils.js +16 -6
  33. package/lib/hls/hls_parser.js +9 -2
  34. package/lib/media/drm_engine.js +4 -2
  35. package/lib/media/playhead.js +23 -1
  36. package/lib/media/streaming_engine.js +3 -12
  37. package/lib/offline/indexeddb/storage_mechanism.js +24 -0
  38. package/lib/player.js +24 -11
  39. package/lib/polyfill/media_capabilities.js +1 -0
  40. package/lib/text/ttml_text_parser.js +69 -93
  41. package/lib/util/error.js +7 -0
  42. package/lib/util/manifest_parser_utils.js +4 -0
  43. package/lib/util/periods.js +9 -9
  44. package/lib/util/xml_utils.js +45 -6
  45. package/package.json +1 -1
  46. package/test/cast/cast_receiver_integration.js +97 -16
  47. package/test/cast/cast_receiver_unit.js +17 -12
  48. package/test/cast/cast_utils_unit.js +1 -0
  49. package/test/media/playhead_unit.js +41 -0
  50. package/test/media/streaming_engine_integration.js +13 -0
  51. package/test/media/streaming_engine_unit.js +23 -8
  52. package/test/offline/storage_integration.js +30 -0
  53. package/test/player_unit.js +87 -0
  54. package/test/test/util/simple_fakes.js +3 -0
  55. package/test/util/periods_unit.js +149 -11
  56. package/test/util/xml_utils_unit.js +64 -0
  57. package/ui/controls.js +4 -1
  58. package/ui/settings_menu.js +11 -2
@@ -15,32 +15,32 @@ fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
15
15
  fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
16
  function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var la="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ma;
17
17
  if("function"==typeof Object.setPrototypeOf)ma=Object.setPrototypeOf;else{var na;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;na=pa.a;break a}catch(a){}na=!1}ma=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=ma;
18
- function u(a,b){a.prototype=la(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.Li=b.prototype}function ra(){this.A=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function sa(a){if(a.A)throw new TypeError("Generator is already running");a.A=!0}ra.prototype.B=function(a){this.h=a};
19
- function ta(a,b){a.i={Ye:b,kf:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function A(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function C(a){a.g=0}function E(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b,c){a.g=b;a.m=c||0}function I(a,b){a.m=b||0;var c=a.i.Ye;a.i=null;return c}function wa(a){a.C=[a.i];a.m=0;a.j=0}
20
- function xa(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.kf?a.g=a.m||a.j:void 0!=c.D&&a.j<c.D?(a.g=c.D,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new ra;this.h=a}function za(a,b){sa(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ba(a)}
18
+ function u(a,b){a.prototype=la(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.Pi=b.prototype}function ra(){this.A=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function sa(a){if(a.A)throw new TypeError("Generator is already running");a.A=!0}ra.prototype.B=function(a){this.h=a};
19
+ function ta(a,b){a.i={bf:b,nf:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function A(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function C(a){a.g=0}function E(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b,c){a.g=b;a.m=c||0}function I(a,b){a.m=b||0;var c=a.i.bf;a.i=null;return c}function wa(a){a.C=[a.i];a.m=0;a.j=0}
20
+ function xa(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.nf?a.g=a.m||a.j:void 0!=c.D&&a.j<c.D?(a.g=c.D,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new ra;this.h=a}function za(a,b){sa(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ba(a)}
21
21
  function Aa(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.A=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}
22
- function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.A=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.A=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.kf)throw b.Ye;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
22
+ function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.A=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.A=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.nf)throw b.bf;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
23
  function Ca(a){this.next=function(b){sa(a.g);a.g.l?b=Aa(a,a.g.l.next,b,a.g.B):(a.g.B(b),b=Ba(a));return b};this["throw"]=function(b){sa(a.g);a.g.l?b=Aa(a,a.g.l["throw"],b,a.g.B):(ta(a.g,b),b=Ba(a));return b};this["return"]=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}
24
24
  function Ea(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 M(a){return Ea(new Ca(new ya(a)))}function Fa(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
25
25
  fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.A=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
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.H),reject:g(this.l)}};b.prototype.H=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.G(g):this.m(g)}};
27
27
  b.prototype.G=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.B(2,g)};b.prototype.m=function(g){this.B(1,g)};b.prototype.B=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.I();this.C()};b.prototype.I=function(){var g=this;e(function(){if(g.F()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
28
28
  function(){if(this.A)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.C=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
29
- b.prototype.J=function(g){var h=this.j();g.Yc(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,t){return"function"==typeof p?function(v){try{l(p(v))}catch(x){m(x)}}:t}var l,m,n=new b(function(p,t){l=p;m=t});this.Yc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Yc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
- break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.A=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).Yc(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(x){p[v]=x;t--;0==t&&l(p)}}var p=[],t=0;do p.push(void 0),t++,d(k.value).Yc(n(p.length-1),m),k=h.next();
29
+ b.prototype.J=function(g){var h=this.j();g.Zc(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,t){return"function"==typeof p?function(v){try{l(p(v))}catch(x){m(x)}}:t}var l,m,n=new b(function(p,t){l=p;m=t});this.Zc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Zc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
+ break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.A=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).Zc(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(x){p[v]=x;t--;0==t&&l(p)}}var p=[],t=0;do p.push(void 0),t++,d(k.value).Zc(n(p.length-1),m),k=h.next();
31
31
  while(!k.done)})};return b});function Ga(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
32
  fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ga(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
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(!Ga(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ga(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
34
  Ga(k,g)&&Ga(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ga(k,g)&&Ga(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
- fa("Map",function(a){function b(){var h={};return h.qb=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.qb;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&&Ga(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,xa:p}}return{id:l,
35
+ fa("Map",function(a){function b(){var h={};return h.pb=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.pb;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&&Ga(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,xa:p}}return{id:l,
36
36
  list:m,index:-1,xa:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(r([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
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.xa?l.xa.value=k:(l.xa={next:this.g,qb:this.g.qb,head:this.g,key:h,value:k},l.list.push(l.xa),this.g.qb.next=l.xa,this.g.qb=l.xa,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.xa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.xa.qb.next=h.xa.next,h.xa.next.qb=h.xa.qb,
38
- h.xa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.qb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).xa};e.prototype.get=function(h){return(h=d(this,h).xa)&&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.xa?l.xa.value=k:(l.xa={next:this.g,pb:this.g.pb,head:this.g,key:h,value:k},l.list.push(l.xa),this.g.pb.next=l.xa,this.g.pb=l.xa,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.xa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.xa.pb.next=h.xa.next,h.xa.next.pb=h.xa.pb,
38
+ h.xa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.pb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).xa};e.prototype.get=function(h){return(h=d(this,h).xa)&&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});function Ha(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.keys",function(a){return a?a:function(){return Ha(this,function(b){return b})}});
40
40
  fa("Set",function(a){function b(c){this.g=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
41
41
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
42
42
  b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});fa("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});
43
- function Ja(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{gf:e,v:f}}return{gf:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ja(this,b,c).gf}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
43
+ function Ja(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{kf:e,v:f}}return{kf:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ja(this,b,c).kf}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
44
44
  fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});function Ka(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
45
45
  fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ka(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ja(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ka(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});
46
46
  var La="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ga(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||La});fa("Array.prototype.values",function(a){return a?a:function(){return Ha(this,function(b,c){return c})}});
@@ -53,7 +53,7 @@ fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(
53
53
  SPDX-License-Identifier: Apache-2.0
54
54
  */
55
55
  function O(a,b){if(b)if(b instanceof Map)for(var c=r(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
56
- function Oa(a){var b=new O(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}O.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};O.prototype.stopImmediatePropagation=function(){this.g=!0};O.prototype.stopPropagation=function(){};N("shaka.util.FakeEvent",O);function Pa(){}function Ra(){}function Sa(){}function Ta(a){var b=Fa.apply(1,arguments);Ua.has(a)||(Ua.add(a),Sa.apply(Pa,ia(b)))}function Va(){}function Wa(){}function Xa(){}function Ya(){}var Ua=new Set;if(window.console&&window.console.log.bind){var Za={},$a=(Za[1]=console.error.bind(console),Za[2]=console.warn.bind(console),Za[3]=console.info.bind(console),Za[4]=console.log.bind(console),Za[5]=console.debug.bind(console),Za[6]=console.debug.bind(console),Za);Sa=$a[2];Ra=$a[1]};function ab(){this.g={}}q=ab.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 bb(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 cb(){this.va=new ab;this.jd=this}cb.prototype.addEventListener=function(a,b){this.va&&this.va.push(a,b)};cb.prototype.removeEventListener=function(a,b){this.va&&this.va.remove(a,b)};cb.prototype.dispatchEvent=function(a){if(!this.va)return!0;var b=this.va.get(a.type)||[],c=this.va.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.jd;a.currentTarget=this.jd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
56
+ function Oa(a){var b=new O(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}O.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};O.prototype.stopImmediatePropagation=function(){this.g=!0};O.prototype.stopPropagation=function(){};N("shaka.util.FakeEvent",O);function Pa(){}function Ra(){}function Sa(){}function Ta(a){var b=Fa.apply(1,arguments);Ua.has(a)||(Ua.add(a),Sa.apply(Pa,ia(b)))}function Va(){}function Wa(){}function Xa(){}function Ya(){}var Ua=new Set;if(window.console&&window.console.log.bind){var Za={},$a=(Za[1]=console.error.bind(console),Za[2]=console.warn.bind(console),Za[3]=console.info.bind(console),Za[4]=console.log.bind(console),Za[5]=console.debug.bind(console),Za[6]=console.debug.bind(console),Za);Sa=$a[2];Ra=$a[1]};function ab(){this.g={}}q=ab.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 bb(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 cb(){this.va=new ab;this.kd=this}cb.prototype.addEventListener=function(a,b){this.va&&this.va.push(a,b)};cb.prototype.removeEventListener=function(a,b){this.va&&this.va.remove(a,b)};cb.prototype.dispatchEvent=function(a){if(!this.va)return!0;var b=this.va.get(a.type)||[],c=this.va.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.kd;a.currentTarget=this.kd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
57
57
  cb.prototype.release=function(){this.va=null};function db(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function eb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function fb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function hb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())e=e.value,b(e)&&c.push(e);return c};/*
58
58
  @license
59
59
  Copyright 2008 The Closure Library Authors
@@ -64,13 +64,13 @@ var ib=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
64
64
  Copyright 2006 The Closure Library Authors
65
65
  SPDX-License-Identifier: Apache-2.0
66
66
  */
67
- function jb(a){var b;a instanceof jb?(kb(this,a.Wa),this.Tb=a.Tb,this.Za=a.Za,lb(this,a.jc),this.Na=a.Na,mb(this,a.g.clone()),this.Ib=a.Ib):a&&(b=String(a).match(ib))?(kb(this,b[1]||"",!0),this.Tb=ob(b[2]||""),this.Za=ob(b[3]||"",!0),lb(this,b[4]),this.Na=ob(b[5]||"",!0),mb(this,b[6]||"",!0),this.Ib=ob(b[7]||"")):this.g=new pb(null)}q=jb.prototype;q.Wa="";q.Tb="";q.Za="";q.jc=null;q.Na="";q.Ib="";
68
- q.toString=function(){var a=[],b=this.Wa;b&&a.push(qb(b,rb,!0),":");if(b=this.Za){a.push("//");var c=this.Tb;c&&a.push(qb(c,rb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.jc;null!=b&&a.push(":",String(b))}if(b=this.Na)this.Za&&"/"!=b.charAt(0)&&a.push("/"),a.push(qb(b,"/"==b.charAt(0)?sb:tb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Ib)&&a.push("#",qb(b,ub));return a.join("")};
69
- q.resolve=function(a){var b=this.clone();"data"===b.Wa&&(b=new jb);var c=!!a.Wa;c?kb(b,a.Wa):c=!!a.Tb;c?b.Tb=a.Tb:c=!!a.Za;c?b.Za=a.Za:c=null!=a.jc;var d=a.Na;if(c)lb(b,a.jc);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.Za&&!this.Na)d="/"+d;else{var e=b.Na.lastIndexOf("/");-1!=e&&(d=b.Na.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
70
- h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Na=d:c=""!==a.g.toString();c?mb(b,a.g.clone()):c=!!a.Ib;c&&(b.Ib=a.Ib);return b};q.clone=function(){return new jb(this)};function kb(a,b,c){a.Wa=c?ob(b,!0):b;a.Wa&&(a.Wa=a.Wa.replace(/:$/,""))}function lb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.jc=b}else a.jc=null}function mb(a,b,c){b instanceof pb?a.g=b:(c||(b=qb(b,vb)),a.g=new pb(b))}
67
+ function jb(a){var b;a instanceof jb?(kb(this,a.Va),this.Tb=a.Tb,this.Ya=a.Ya,lb(this,a.jc),this.Na=a.Na,nb(this,a.g.clone()),this.Ib=a.Ib):a&&(b=String(a).match(ib))?(kb(this,b[1]||"",!0),this.Tb=ob(b[2]||""),this.Ya=ob(b[3]||"",!0),lb(this,b[4]),this.Na=ob(b[5]||"",!0),nb(this,b[6]||"",!0),this.Ib=ob(b[7]||"")):this.g=new pb(null)}q=jb.prototype;q.Va="";q.Tb="";q.Ya="";q.jc=null;q.Na="";q.Ib="";
68
+ q.toString=function(){var a=[],b=this.Va;b&&a.push(qb(b,rb,!0),":");if(b=this.Ya){a.push("//");var c=this.Tb;c&&a.push(qb(c,rb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.jc;null!=b&&a.push(":",String(b))}if(b=this.Na)this.Ya&&"/"!=b.charAt(0)&&a.push("/"),a.push(qb(b,"/"==b.charAt(0)?sb:tb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Ib)&&a.push("#",qb(b,ub));return a.join("")};
69
+ q.resolve=function(a){var b=this.clone();"data"===b.Va&&(b=new jb);var c=!!a.Va;c?kb(b,a.Va):c=!!a.Tb;c?b.Tb=a.Tb:c=!!a.Ya;c?b.Ya=a.Ya:c=null!=a.jc;var d=a.Na;if(c)lb(b,a.jc);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.Ya&&!this.Na)d="/"+d;else{var e=b.Na.lastIndexOf("/");-1!=e&&(d=b.Na.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
70
+ h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Na=d:c=""!==a.g.toString();c?nb(b,a.g.clone()):c=!!a.Ib;c&&(b.Ib=a.Ib);return b};q.clone=function(){return new jb(this)};function kb(a,b,c){a.Va=c?ob(b,!0):b;a.Va&&(a.Va=a.Va.replace(/:$/,""))}function lb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.jc=b}else a.jc=null}function nb(a,b,c){b instanceof pb?a.g=b:(c||(b=qb(b,vb)),a.g=new pb(b))}
71
71
  function ob(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function qb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,wb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function wb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var rb=/[#\/\?@]/g,tb=/[#\?:]/g,sb=/[#\?]/g,vb=/[#\?@]/g,ub=/#/g;function pb(a){this.g=a||null}
72
- function xb(a){if(!a.Fa&&(a.Fa={},a.$c=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=pb.prototype;q.Fa=null;q.$c=null;q.add=function(a,b){xb(this);this.g=null;var c=this.Fa.hasOwnProperty(a)&&this.Fa[a];c||(this.Fa[a]=c=[]);c.push(b);this.$c++;return this};
73
- q.set=function(a,b){xb(this);this.g=null;this.Fa.hasOwnProperty(a)?this.Fa[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Fa)return"";var a=[],b;for(b in this.Fa)for(var c=encodeURIComponent(b),d=this.Fa[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 pb;a.g=this.g;if(this.Fa){var b={},c;for(c in this.Fa)b[c]=this.Fa[c].concat();a.Fa=b;a.$c=this.$c}return a};function P(a,b,c){var d=Fa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}P.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};N("shaka.util.Error",P);P.Severity={RECOVERABLE:1,CRITICAL:2};P.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
72
+ function xb(a){if(!a.Fa&&(a.Fa={},a.bd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=pb.prototype;q.Fa=null;q.bd=null;q.add=function(a,b){xb(this);this.g=null;var c=this.Fa.hasOwnProperty(a)&&this.Fa[a];c||(this.Fa[a]=c=[]);c.push(b);this.bd++;return this};
73
+ q.set=function(a,b){xb(this);this.g=null;this.Fa.hasOwnProperty(a)?this.Fa[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Fa)return"";var a=[],b;for(b in this.Fa)for(var c=encodeURIComponent(b),d=this.Fa[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 pb;a.g=this.g;if(this.Fa){var b={},c;for(c in this.Fa)b[c]=this.Fa[c].concat();a.Fa=b;a.bd=this.bd}return a};function P(a,b,c){var d=Fa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}P.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};N("shaka.util.Error",P);P.Severity={RECOVERABLE:1,CRITICAL:2};P.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
74
74
  P.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
75
75
  TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,
76
76
  WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,
@@ -78,8 +78,9 @@ DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADE
78
78
  CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,
79
79
  FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,
80
80
  CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,
81
- CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function yb(a,b){this.g=a;this.h=b}yb.prototype.toString=function(){return"v"+this.g+"."+this.h};function zb(a,b){var c=new yb(4,0),d=Ab,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Bb(a,b,c,d){Sa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Cb(a,b,c,d){Ra([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ab=null;function Db(a,b){return a.concat(b)}function Eb(){}function Fb(a){return null!=a}function Gb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(zb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){zb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Hb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new jb(d)});return a.map(function(d){return new jb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Db,[]).map(function(d){return d.toString()})}function Ib(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
82
- function Jb(a,b){if(1==b.length)return b[0];var c=Kb(a,b);if(null!=c)return c;throw new P(2,4,4025,b);}function Kb(a,b){for(var c=r(Lb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Mb?"":null}var Mb="text",Nb={gb:"video",Gb:"audio",oa:Mb,wc:"image",nh:"application"},Lb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ob(){}function Pb(a,b){a=Qb(a);b=Qb(b);return a.split("-")[0]==b.split("-")[0]}function Rb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Sb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Qb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Tb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ub(a,b){var c=Vb(a),d=Vb(b);return a!=c&&b!=d&&c==d}
81
+ INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function yb(a,b){this.g=a;this.h=b}yb.prototype.toString=function(){return"v"+this.g+"."+this.h};function zb(a,b){var c=new yb(4,0),d=Ab,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Bb(a,b,c,d){Sa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Cb(a,b,c,d){Ra([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ab=null;function Db(a,b){return a.concat(b)}function Eb(){}function Fb(a){return null!=a}function Gb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(zb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){zb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Hb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new jb(d)});return a.map(function(d){return new jb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Db,[]).map(function(d){return d.toString()})}function Ib(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
82
+ function Jb(a,b){if(1==b.length)return b[0];var c=Kb(a,b);if(null!=c)return c;throw new P(2,4,4025,b);}function Kb(a,b){for(var c=r(Lb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Mb?"":null}
83
+ var Mb="text",Nb={fb:"video",Gb:"audio",oa:Mb,wc:"image",rh:"application"},Lb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ob(){}function Pb(a,b){a=Qb(a);b=Qb(b);return a.split("-")[0]==b.split("-")[0]}function Rb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Sb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Qb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Tb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ub(a,b){var c=Vb(a),d=Vb(b);return a!=c&&b!=d&&c==d}
83
84
  function Wb(a,b){a=Qb(a);b=Qb(b);return b==a?4:Rb(b,a)?3:Sb(b,a)?2:Rb(a,b)?1:0}function Vb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Tb.get(a)||a}function Xb(a){return a.language?Qb(a.language):a.audio&&a.audio.language?Qb(a.audio.language):a.video&&a.video.language?Qb(a.video.language):"und"}
84
85
  function Yb(a,b){for(var c=Qb(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(Qb(f.value));e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Rb(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Sb(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Rb(c,f))return f;return null}N("shaka.util.LanguageUtils",Ob);Ob.findClosestLocale=Yb;Ob.getLocaleForVariant=Xb;
85
86
  Ob.getLocaleForText=function(a){return Qb(a.language||"und")};Ob.getBase=Vb;Ob.relatedness=Wb;Ob.areSiblings=Ub;Ob.normalize=Qb;Ob.isSiblingOf=Sb;Ob.isParentOf=Rb;Ob.areLanguageCompatible=Pb;Ob.areLocaleCompatible=function(a,b){a=Qb(a);b=Qb(b);return a==b};
@@ -89,21 +90,21 @@ var Tb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
89
90
  "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",
90
91
  "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",
91
92
  "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Zb(a){cb.call(this);this.j=Qb(a);this.i=new Map;this.g=new Set;this.h=new Map}u(Zb,cb);q=Zb.prototype;q.release=function(){cb.prototype.release.call(this)};
92
- q.Re=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Qb(c.value));$b(this);a=hb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new O("unknown-locales",(new Map).set("locales",a)));a=hb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new O("locale-changed",a))};
93
- q.ea=function(a,b,c){a=Qb(a);void 0===c&&(c=bc);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=bc||d.set(f,e)});this.h.set(a,d);$b(this);this.dispatchEvent(new O("locale-updated"));return this};q.Xg=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new O("unknown-localization",a));return""};
93
+ q.Ue=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Qb(c.value));$b(this);a=hb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new O("unknown-locales",(new Map).set("locales",a)));a=hb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new O("locale-changed",a))};
94
+ q.ea=function(a,b,c){a=Qb(a);void 0===c&&(c=ac);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=ac||d.set(f,e)});this.h.set(a,d);$b(this);this.dispatchEvent(new O("locale-updated"));return this};q.ah=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new O("unknown-localization",a));return""};
94
95
  function $b(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Xb:f.Xb},h=g.next()){f.Xb=h.value;e.add(f.Xb);e.add(Vb(f.Xb));h=hb(b.keys(),function(l){return function(m){return Ub(m,l.Xb)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=hb(b.keys(),function(l){return function(m){return Vb(m)==l.Xb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
95
96
  c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,cc(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new O("missing-localizations",d)))}function cc(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}N("shaka.ui.Localization",Zb);Zb.prototype.resolve=Zb.prototype.resolve;
96
- Zb.prototype.resolveDictionary=Zb.prototype.Xg;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Re;Zb.prototype.release=Zb.prototype.release;var bc=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:bc};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={Lh:"LANGUAGE",Rh:"MULTIPLE_LANGUAGES",di:"PLAYBACK_RATE",Ih:"FAST_FORWARD",oh:"AUTO_QUALITY",Bi:"UNDETERMINED_LANGUAGE",oi:"STATISTICS",Ne:"LIVE",ci:"PLAY",Mh:"LOOP",Ah:"ENTER_LOOP_MODE",Wh:"OFF",ii:"REWIND",AD_PROGRESS:"AD_PROGRESS",Di:"UNRECOGNIZED_LANGUAGE",Qh:"MORE_SETTINGS",ai:"PAUSE",mi:"SKIP_TO_LIVE",gi:"RESOLUTION",Jh:"FULL_SCREEN",Fi:"VOLUME",Vh:"NOT_APPLICABLE",Xh:"ON",ki:"SEEK",mh:"AIRPLAY",Bh:"ENTER_PICTURE_IN_PICTURE",Sh:"MUTE",Fh:"EXIT_PICTURE_IN_PICTURE",sh:"CAPTIONS",bi:"PICTURE_IN_PICTURE",
97
- Dh:"EXIT_FULL_SCREEN",uh:"CAST",Ci:"UNMUTE",li:"SKIP_AD",kh:"AD_DURATION",Gf:"SUBTITLE_FORCED",ei:"REPLAY",Eh:"EXIT_LOOP_MODE",lh:"AD_TIME",BACK:"BACK"};function ec(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ec.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function fc(a){return a.h/(1-Math.pow(a.g,a.i))};function gc(){this.h=new ec(2);this.j=new ec(5);this.g=0;this.i=128E3;this.l=16E3}gc.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};gc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};gc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(fc(this.h),fc(this.j))};function hc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ic(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Fd:d.Fd},e=a.next()){d.Fd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Fd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
97
+ Zb.prototype.resolveDictionary=Zb.prototype.ah;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Ue;Zb.prototype.release=Zb.prototype.release;var ac=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:ac};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={AD_PROGRESS:"AD_PROGRESS",Hi:"UNRECOGNIZED_LANGUAGE",ti:"STATISTICS",BACK:"BACK",Eh:"ENTER_LOOP_MODE",Fh:"ENTER_PICTURE_IN_PICTURE",Vh:"MULTIPLE_LANGUAGES",gi:"PICTURE_IN_PICTURE",Qh:"LOOP",ji:"PLAYBACK_RATE",ki:"REPLAY",Jh:"EXIT_PICTURE_IN_PICTURE",mi:"REWIND",Gi:"UNMUTE",pi:"SKIP_AD",Qe:"LIVE",Mh:"FAST_FORWARD",Zh:"NOT_APPLICABLE",Ih:"EXIT_LOOP_MODE",Uh:"MORE_SETTINGS",ii:"PLAY",Hh:"EXIT_FULL_SCREEN",li:"RESOLUTION",qh:"AIRPLAY",Wh:"MUTE",Fi:"UNDETERMINED_LANGUAGE",ph:"AD_TIME",Kf:"SUBTITLE_FORCED",
98
+ Ji:"VOLUME",Nh:"FULL_SCREEN",sh:"AUTO_QUALITY",oi:"SEEK",Ph:"LANGUAGE",yh:"CAST",oh:"AD_DURATION",ai:"ON",$h:"OFF",ri:"SKIP_TO_LIVE",xh:"CAPTIONS",ei:"PAUSE"};function ec(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ec.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function fc(a){return a.h/(1-Math.pow(a.g,a.i))};function gc(){this.h=new ec(2);this.j=new ec(5);this.g=0;this.i=128E3;this.l=16E3}gc.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};gc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};gc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(fc(this.h),fc(this.j))};function hc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ic(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Gd:d.Gd},e=a.next()){d.Gd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Gd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
98
99
  function kc(a,b,c){c||(c=hc);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 lc(a,b,c){this.startTime=a;this.direction=mc;this.endTime=b;this.payload=c;this.region=new nc;this.position=null;this.positionAlign=oc;this.size=0;this.textAlign=pc;this.writingMode=qc;this.lineInterpretation=rc;this.line=null;this.lineHeight="";this.lineAlign=sc;this.displayAlign=tc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=uc;this.fontStyle=vc;this.linePadding=this.letterSpacing=this.fontFamily=
99
100
  "";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}lc.prototype.clone=function(){var a=new lc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
100
101
  function wc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!kc(a.nestedCues,b.nestedCues,wc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!kc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",lc);var oc="auto";
101
102
  lc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:oc};var pc="center",xc={LEFT:"left",RIGHT:"right",CENTER:pc,START:"start",END:"end"};lc.textAlign=xc;var tc="after",yc={BEFORE:"before",CENTER:"center",AFTER:tc};lc.displayAlign=yc;var mc="ltr";lc.direction={HORIZONTAL_LEFT_TO_RIGHT:mc,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var qc="horizontal-tb";lc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:qc,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var rc=0;
102
103
  lc.lineInterpretation={LINE_NUMBER:rc,PERCENTAGE:1};var sc="start",zc={CENTER:"center",START:sc,END:"end"};lc.lineAlign=zc;var Ac={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};lc.defaultTextColor=Ac;var Bc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};lc.defaultTextBackgroundColor=Bc;var uc=400;lc.fontWeight={NORMAL:uc,BOLD:700};
103
104
  var vc="normal",Cc={NORMAL:vc,ITALIC:"italic",OBLIQUE:"oblique"};lc.fontStyle=Cc;lc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function nc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Dc;this.scroll=Ec}N("shaka.text.CueRegion",nc);var Dc=1;nc.units={PX:0,PERCENTAGE:Dc,LINES:2};var Ec="";nc.scrollMode={NONE:Ec,UP:"up"};function Fc(){}function Gc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Hc(a)==Hc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Ic(a),d=Ic(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Hc(a){return a instanceof ArrayBuffer?a:a.buffer}function Jc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
104
- function Ic(a,b,c){c=void 0===c?Infinity:c;return Kc(a,void 0===b?0:b,c,Uint8Array)}function Lc(a,b,c){c=void 0===c?Infinity:c;return Kc(a,void 0===b?0:b,c,DataView)}function Kc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Hc(a),b,Math.min(b+Math.max(c,0),e)-b)}N("shaka.util.BufferUtils",Fc);Fc.toDataView=Lc;Fc.toUint8=Ic;Fc.toArrayBuffer=Jc;Fc.equal=Gc;function Mc(){}N("shaka.dependencies",Mc);Mc.has=function(a){return Nc.has(a)};Mc.add=function(a,b){if(!Oc[a])throw Error(a+" is not supported");Nc.set(a,function(){return b})};var Oc={muxjs:"muxjs"};Mc.Allowed=Oc;var Nc=new Map([["muxjs",function(){return window.muxjs}]]);function Pc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Pc.prototype.resolve=function(){};Pc.prototype.reject=function(){};function Qc(a){this.h=a;this.g=void 0}Qc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Rc(a){this.h=a;this.g=null}Rc.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Rc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Q(a){this.h=a;this.g=null}Q.prototype.za=function(){this.stop();this.h();return this};Q.prototype.S=function(a){var b=this;this.stop();this.g=(new Rc(function(){b.h()})).S(a);return this};Q.prototype.ha=function(a){var b=this;this.stop();this.g=(new Rc(function(){b.g.S(a);b.h()})).S(a);return this};Q.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};N("shaka.util.Timer",Q);Q.prototype.stop=Q.prototype.stop;Q.prototype.tickEvery=Q.prototype.ha;Q.prototype.tickAfter=Q.prototype.S;
105
- Q.prototype.tickNow=Q.prototype.za;function Sc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Uc(a){return""!=Vc().canPlayType(a)}function Wc(){return Xc("Xbox One")}function Yc(){return Xc("Tizen")}function Zc(){return Xc("Web0S")}function $c(){return Xc("CrKey")}function ad(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Yc()&&!Xc("PC=EOS")&&!bd()}function bd(){return Xc("PlayStation 4")}
106
- function cd(){if(!ad())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Xc(a){return(navigator.userAgent||"").includes(a)}function Vc(){if(dd)return dd;ed||(ed=new Q(function(){dd=null}));(dd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(dd=document.createElement("video"));ed.S(1);return dd}var ed=null,dd=null;function fd(){}
105
+ function Ic(a,b,c){c=void 0===c?Infinity:c;return Kc(a,void 0===b?0:b,c,Uint8Array)}function Lc(a,b,c){c=void 0===c?Infinity:c;return Kc(a,void 0===b?0:b,c,DataView)}function Kc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Hc(a),b,Math.min(b+Math.max(c,0),e)-b)}N("shaka.util.BufferUtils",Fc);Fc.toDataView=Lc;Fc.toUint8=Ic;Fc.toArrayBuffer=Jc;Fc.equal=Gc;function Mc(){}N("shaka.dependencies",Mc);Mc.has=function(a){return Nc.has(a)};Mc.add=function(a,b){if(!Oc[a])throw Error(a+" is not supported");Nc.set(a,function(){return b})};var Oc={muxjs:"muxjs"};Mc.Allowed=Oc;var Nc=new Map([["muxjs",function(){return window.muxjs}]]);function Pc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Pc.prototype.resolve=function(){};Pc.prototype.reject=function(){};function Qc(a){this.h=a;this.g=void 0}Qc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Rc(a){this.h=a;this.g=null}Rc.prototype.R=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};Rc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Q(a){this.h=a;this.g=null}Q.prototype.za=function(){this.stop();this.h();return this};Q.prototype.R=function(a){var b=this;this.stop();this.g=(new Rc(function(){b.h()})).R(a);return this};Q.prototype.ha=function(a){var b=this;this.stop();this.g=(new Rc(function(){b.g.R(a);b.h()})).R(a);return this};Q.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};N("shaka.util.Timer",Q);Q.prototype.stop=Q.prototype.stop;Q.prototype.tickEvery=Q.prototype.ha;Q.prototype.tickAfter=Q.prototype.R;
106
+ Q.prototype.tickNow=Q.prototype.za;function Tc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Uc(a){return""!=Vc().canPlayType(a)}function Wc(){return Xc("Xbox One")}function Yc(){return Xc("Tizen")}function Zc(){return Xc("Web0S")}function $c(){return Xc("CrKey")}function ad(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Yc()&&!Xc("PC=EOS")&&!bd()}function bd(){return Xc("PlayStation 4")}
107
+ function cd(){if(!ad())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Xc(a){return(navigator.userAgent||"").includes(a)}function Vc(){if(dd)return dd;ed||(ed=new Q(function(){dd=null}));(dd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(dd=document.createElement("video"));ed.R(1);return dd}var ed=null,dd=null;function fd(){}
107
108
  function gd(a){if(!a)return"";a=Ic(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!bd())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ra('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
108
109
  (a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
109
110
  function hd(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new P(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Lc(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return id.value()(d)}
@@ -116,14 +117,14 @@ function ud(a,b){if(!Nc.get("muxjs")()||!vd(a))return!1;if(b)return MediaSource.
116
117
  function wd(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function xd(a,b){a.l=!0;a.h=new Pc;a.m=[];a.j=[];a.i=[];var c=Ic(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new P(2,3,3018));return a.h};function yd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function zd(a,b,c){a=yd(a,b);if(vd(a)){if(Nc.get("muxjs")())return wd(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
117
118
  function Ad(a){var b=Bd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
118
119
  case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Cd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Bd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
119
- (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Ed(a){this.l=null;this.i=a;this.j=this.C=0;this.m=Infinity;this.h=this.g=null;this.B="";this.A=new Map}function Fd(a){return Gd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Ed.prototype.destroy=function(){this.i=this.l=null;this.A.clear();return Promise.resolve()};
120
+ (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Dd(a){this.l=null;this.i=a;this.j=this.C=0;this.m=Infinity;this.h=this.g=null;this.B="";this.A=new Map}function Ed(a){return Gd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Dd.prototype.destroy=function(){this.i=this.l=null;this.A.clear();return Promise.resolve()};
120
121
  function Hd(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g)return A(h,Promise.resolve(),2);if(!a.l||!a.i)return h["return"]();if(null==c||null==d)return a.l.parseInit(Ic(b)),h["return"]();e={periodStart:a.C,segmentStart:c,segmentEnd:d};f=a.l.parseMedia(Ic(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.m});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.m);C(h)})}
121
- Ed.prototype.remove=function(a,b){var c=this;return M(function(d){if(1==d.g)return A(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));C(d)})};function Id(a,b,c){a.j=b;a.m=c}function Jd(a,b,c){a.B=b;if(b=a.A.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
122
+ Dd.prototype.remove=function(a,b){var c=this;return M(function(d){if(1==d.g)return A(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));C(d)})};function Id(a,b,c){a.j=b;a.m=c}function Jd(a,b,c){a.B=b;if(b=a.A.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
122
123
  function Kd(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new lc(c.startTime,c.endTime,c.text)});return b}function Ld(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Ld(a,d.value,c)}
123
124
  function Md(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Ld(a,k,e);k.startTime>=a.j&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.B&&a.i.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.A.has(f)||a.A.set(f,new Map),b=r(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.A.get(f).set(h,k);a.g=null==a.g?Math.max(c,
124
- a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.m))}N("shaka.text.TextEngine",Ed);Ed.prototype.destroy=Ed.prototype.destroy;Ed.findParser=function(a){return Gd[a]};Ed.unregisterParser=function(a){delete Gd[a]};Ed.registerParser=function(a,b){Gd[a]=b};var Gd={};function Nd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Od(f,b,c);f=Pd(f,d);b=Qd(f);b=Rd(b);var g=Sd(b,e);a.variants=a.variants.filter(function(h){return Td(h)==g?!0:!1})}function Qd(a){var b=new ab;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Td(c);b.push(d,c)}return b}
125
+ a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.m))}N("shaka.text.TextEngine",Dd);Dd.prototype.destroy=Dd.prototype.destroy;Dd.findParser=function(a){return Gd[a]};Dd.unregisterParser=function(a){delete Gd[a]};Dd.registerParser=function(a,b){Gd[a]=b};var Gd={};function Nd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Od(f,b,c);f=Pd(f,d);b=Qd(f);b=Rd(b);var g=Sd(b,e);a.variants=a.variants.filter(function(h){return Td(h)==g?!0:!1})}function Qd(a){var b=new ab;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Td(c);b.push(d,c)}return b}
125
126
  function Rd(a){var b=0,c=new Map,d=a.size();bb(a,function(e,f){for(var g=r(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 ab);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
126
- function Od(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={Qd:d.Qd},e=b.next())if(d.Qd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Qd)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={Cd:d.Cd},b=c.next())if(d.Cd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Cd)}}(d)),b.length){a=b;break}return a}
127
+ function Od(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={Rd:d.Rd},e=b.next())if(d.Rd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Rd)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={Dd:d.Dd},b=c.next())if(d.Dd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Dd)}}(d)),b.length){a=b;break}return a}
127
128
  function Sd(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Ud||d==Vd){if(a=Wd(a,d),1==a.size())return a.keys()[0]}else if(d==Xd)break;return Yd(a)}function Wd(a,b){var c=0,d=new ab;bb(a,function(e,f){for(var g=0,h=0,k=r(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}
128
129
  function Yd(a){var b="",c=Infinity;bb(a,function(d,e){for(var f=0,g=0,h=r(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Td(a){var b="";a.video&&(b=Ad(a.video.codecs));var c="";a.audio&&(c=Ad(a.audio.codecs));return b+"-"+c}function Zd(a,b,c){a.variants=a.variants.filter(function(d){return $d(d,b,c)})}
129
130
  function $d(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
@@ -136,7 +137,7 @@ function je(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e
136
137
  break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=he(d.codecs),f=zd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
137
138
  f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=r(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,t=r(h.initData),v=t.next();!v.done;v=t.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
138
139
  (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function he(a){return Yc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
139
- function ge(a){return"vp9"==a?"vp09.00.41.08":a}function ce(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ke(d,a.audio)||c&&a&&a.video&&!ke(c,a.video)?!1:!0})}function de(a){a.textStreams=a.textStreams.filter(function(b){return Fd(yd(b.mimeType,b.codecs))})}function ee(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Zc()||Yc()||$c())&&c.push("image/webp");return c.includes(b.mimeType)})}
140
+ function ge(a){return"vp9"==a?"vp09.00.41.08":a}function ce(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ke(d,a.audio)||c&&a&&a.video&&!ke(c,a.video)?!1:!0})}function de(a){a.textStreams=a.textStreams.filter(function(b){return Ed(yd(b.mimeType,b.codecs))})}function ee(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Zc()||Yc()||$c())&&c.push("image/webp");return c.includes(b.mimeType)})}
140
141
  function ke(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
141
142
  function le(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=r(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=r(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
142
143
  frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
@@ -160,761 +161,763 @@ function Ce(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.lang
160
161
  function De(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return Bd(f)[0]}),d=b.codecs.split(",").map(function(f){return Bd(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function Ee(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=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function Fe(a){this.g=a;this.h=new Ge(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Fe.prototype.create=function(a){var b=this,c=a.filter(function(d){return Ce(b.g,d)});return c.length?new Be(c[0],c):this.h.create(a)};function Ge(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
161
162
  Ge.prototype.create=function(a){var b=[];b=Ie(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Je(b,this.j);a.length&&(b=a);this.g&&(a=Pd(b,this.g),a.length&&(b=a));this.h&&(a=Ke(b,this.h),a.length&&(b=a));a=new Be(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,Ce(a.h,c)&&a.add(c);return a};function Ie(a,b){var c=Qb(b),d=Yb(c,a.map(function(e){return Xb(e)}));return d?a.filter(function(e){return d==Xb(e)}):[]}
162
163
  function Je(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ke(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Le(){this.g=Me;this.h=(new Map).set(Me,2).set(Ne,1)}function Oe(a,b,c){a.h.set(Me,c).set(Ne,b)}var Ne=0,Me=1;function Pe(a,b){var c=Qe();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.A=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}
163
- function Re(a){var b,c;return M(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.A);return A(d,new Promise(function(e){(new Q(e)).S(c/1E3)}),2)}a.h*=a.m;C(d)})}function Qe(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Se(a,b){this.promise=a;this.i=b;this.g=!1}function Te(a){return new Se(Promise.reject(a),function(){return Promise.resolve()})}function Ue(){var a=Promise.reject(new P(2,7,7001));a["catch"](function(){});return new Se(a,function(){return Promise.resolve()})}function Ve(a){return new Se(Promise.resolve(a),function(){return Promise.resolve()})}function We(a){return new Se(a,function(){return a["catch"](function(){})})}Se.prototype.abort=function(){this.g=!0;return this.i()};
164
+ function Re(a){var b,c;return M(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.A);return A(d,new Promise(function(e){(new Q(e)).R(c/1E3)}),2)}a.h*=a.m;C(d)})}function Qe(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Se(a,b){this.promise=a;this.i=b;this.g=!1}function Te(a){return new Se(Promise.reject(a),function(){return Promise.resolve()})}function Ue(){var a=Promise.reject(new P(2,7,7001));a["catch"](function(){});return new Se(a,function(){return Promise.resolve()})}function Ve(a){return new Se(Promise.resolve(a),function(){return Promise.resolve()})}function We(a){return new Se(a,function(){return a["catch"](function(){})})}Se.prototype.abort=function(){this.g=!0;return this.i()};
164
165
  function Xe(a){return new Se(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Se.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
165
166
  Se.prototype.qa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ye(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Pc,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new Se(f,function(){return d()})};
166
- function Ye(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()}}}N("shaka.util.AbortableOperation",Se);Se.prototype.chain=Se.prototype.qa;Se.prototype["finally"]=Se.prototype["finally"];Se.all=Xe;Se.prototype.abort=Se.prototype.abort;Se.notAbortable=We;Se.completed=Ve;Se.aborted=Ue;Se.failed=Te;function Ze(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 $e(a){var b={},c;for(c in a)b[c]=a[c];return b};function af(){this.g=[]}function bf(a,b){a.g.push(b["finally"](function(){ic(a.g,b)}))}af.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function cf(a,b,c){cb.call(this);this.i=!1;this.m=new af;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}u(cf,cb);q=cf.prototype;q.ue=function(a){this.A=a};function df(a,b,c,d){c=c||ef;var e=ff[a];if(!e||c>=e.priority)ff[a]={priority:c,Og:b,Pg:void 0===d?!1:d}}q.Qg=function(a){this.g.add(a)};q.fh=function(a){this.g["delete"](a)};q.Of=function(){this.g.clear()};q.Rg=function(a){this.h.add(a)};q.gh=function(a){this.h["delete"](a)};q.Pf=function(){this.h.clear()};
167
+ function Ye(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()}}}N("shaka.util.AbortableOperation",Se);Se.prototype.chain=Se.prototype.qa;Se.prototype["finally"]=Se.prototype["finally"];Se.all=Xe;Se.prototype.abort=Se.prototype.abort;Se.notAbortable=We;Se.completed=Ve;Se.aborted=Ue;Se.failed=Te;function Ze(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 $e(a){var b={},c;for(c in a)b[c]=a[c];return b};function af(){this.g=[]}function bf(a,b){a.g.push(b["finally"](function(){ic(a.g,b)}))}af.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function cf(a,b,c){cb.call(this);this.i=!1;this.m=new af;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}u(cf,cb);q=cf.prototype;q.xe=function(a){this.A=a};function df(a,b,c,d){c=c||ef;var e=ff[a];if(!e||c>=e.priority)ff[a]={priority:c,Sg:b,Tg:void 0===d?!1:d}}q.Ug=function(a){this.g.add(a)};q.jh=function(a){this.g["delete"](a)};q.Sf=function(){this.g.clear()};q.Vg=function(a){this.h.add(a)};q.kh=function(a){this.h["delete"](a)};q.Tf=function(){this.h.clear()};
167
168
  function gf(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();cb.prototype.release.call(this);return this.m.destroy()};
168
169
  q.request=function(a,b){var c=this,d=new hf;if(this.i){var e=Promise.reject(new P(2,7,7001));e["catch"](function(){});return new jf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ze(b.retryParameters):Qe();b.uris=Ze(b.uris);e=kf(this,a,b);var f=e.qa(function(){return lf(c,a,b,new Pe(b.retryParameters,!1),0,null,d)}),g=f.qa(function(n){return mf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
169
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.qa(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.Bg||!c.l||t.fromCache||a!=nf||c.l(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new jf(m.promise,function(){return m.abort()},d);bf(this.m,e);return e};
170
- function kf(a,b,c){var d=Ve(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Ld:e.Ld},f=a.next())e.Ld=f.value,d=d.qa(function(g){return function(){c.body&&(c.body=Jc(c.body));return g.Ld(b,c)}}(e));return d.qa(void 0,function(g){if(g instanceof P&&7001==g.code)throw g;throw new P(2,1,1006,g);})}
171
- function lf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Wa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=ff[k])?k.Og:null;if(!m)return Te(new P(2,1,1E3,h));var n=k.Pg,p=null,t=null,v=!1,x=!1,y;return We(Re(d)).qa(function(){if(a.i)return Ue();y=Date.now();var w=m(c.uris[e],c,b,function(B,F,G){p&&p.stop();t&&t.S(z/1E3);a.l&&b==nf&&(a.l(B,F),l=!0,g.g=G)},function(B){a.j&&a.j(B,c,b);x=!0});
172
- if(!n)return w;var D=c.retryParameters.connectionTimeout;D&&(p=new Q(function(){v=!0;w.abort()}),p.S(D/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new Q(function(){v=!0;w.abort()}));return w}).qa(function(w){p&&p.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-y);var D={response:w,Bg:l};!x&&a.j&&a.j(w.headers,c,b);return D},function(w){p&&p.stop();t&&t.stop();if(a.B){var D=null,z=0;w instanceof P&&(D=w,1001==w.code&&(z=w.data[1]));a.B(c,D,z,v)}if(a.i)return Ue();v&&(w=new P(1,1,1003,
170
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.qa(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.Fg||!c.l||t.fromCache||a!=nf||c.l(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new jf(m.promise,function(){return m.abort()},d);bf(this.m,e);return e};
171
+ function kf(a,b,c){var d=Ve(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Md:e.Md},f=a.next())e.Md=f.value,d=d.qa(function(g){return function(){c.body&&(c.body=Jc(c.body));return g.Md(b,c)}}(e));return d.qa(void 0,function(g){if(g instanceof P&&7001==g.code)throw g;throw new P(2,1,1006,g);})}
172
+ function lf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Va,l=!1;k||(k=location.protocol,k=k.slice(0,-1),kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=ff[k])?k.Sg:null;if(!m)return Te(new P(2,1,1E3,h));var n=k.Tg,p=null,t=null,v=!1,x=!1,y;return We(Re(d)).qa(function(){if(a.i)return Ue();y=Date.now();var w=m(c.uris[e],c,b,function(B,F,G){p&&p.stop();t&&t.R(z/1E3);a.l&&b==nf&&(a.l(B,F),l=!0,g.g=G)},function(B){a.j&&a.j(B,c,b);x=!0});
173
+ if(!n)return w;var D=c.retryParameters.connectionTimeout;D&&(p=new Q(function(){v=!0;w.abort()}),p.R(D/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new Q(function(){v=!0;w.abort()}));return w}).qa(function(w){p&&p.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-y);var D={response:w,Fg:l};!x&&a.j&&a.j(w.headers,c,b);return D},function(w){p&&p.stop();t&&t.stop();if(a.B){var D=null,z=0;w instanceof P&&(D=w,1001==w.code&&(z=w.data[1]));a.B(c,D,z,v)}if(a.i)return Ue();v&&(w=new P(1,1,1003,
173
174
  c.uris[e],b));if(w instanceof P){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return D=(new Map).set("error",w),D=new O("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,lf(a,b,c,d,e,w,g)}throw w;})}
174
- function mf(a,b,c){var d=Ve(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Md:e.Md},f=a.next())e.Md=f.value,d=d.qa(function(g){return function(){var h=c.response;h.data&&(h.data=Jc(h.data));return g.Md(b,h)}}(e));return d.qa(function(){return c},function(g){var h=2;if(g instanceof P){if(7001==g.code)throw g;h=g.severity}throw new P(h,1,1007,g);})}N("shaka.net.NetworkingEngine",cf);cf.prototype.request=cf.prototype.request;cf.prototype.destroy=cf.prototype.destroy;cf.makeRequest=gf;
175
- cf.defaultRetryParameters=function(){return Qe()};cf.prototype.clearAllResponseFilters=cf.prototype.Pf;cf.prototype.unregisterResponseFilter=cf.prototype.gh;cf.prototype.registerResponseFilter=cf.prototype.Rg;cf.prototype.clearAllRequestFilters=cf.prototype.Of;cf.prototype.unregisterRequestFilter=cf.prototype.fh;cf.prototype.registerRequestFilter=cf.prototype.Qg;cf.unregisterScheme=function(a){delete ff[a]};cf.registerScheme=df;cf.prototype.setForceHTTPS=cf.prototype.ue;function hf(){this.g=0}
176
- cf.NumBytesRemainingClass=hf;function jf(a,b,c){Se.call(this,a,b);this.h=c}u(jf,Se);cf.PendingRequest=jf;var nf=1;cf.RequestType={MANIFEST:0,SEGMENT:nf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var ef=3;cf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ef};var ff={};function of(a){this.g=!1;this.h=new Pc;this.i=a}of.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 pf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function qf(){this.g=new ab}q=qf.prototype;q.release=function(){this.rb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new rf(a,b,c,d),this.g.push(b,a))};q.Ga=function(a,b,c,d){function e(g){f.nc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.nc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.nc(),this.g.remove(b,e))}};
177
- q.rb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.nc();this.g.g={}}};N("shaka.util.EventManager",qf);qf.prototype.removeAll=qf.prototype.rb;qf.prototype.unlisten=qf.prototype.nc;qf.prototype.listenOnce=qf.prototype.Ga;qf.prototype.listen=qf.prototype.o;qf.prototype.release=qf.prototype.release;function rf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=sf(a,d);this.target.addEventListener(b,c,this.g)}
175
+ function mf(a,b,c){var d=Ve(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Nd:e.Nd},f=a.next())e.Nd=f.value,d=d.qa(function(g){return function(){var h=c.response;h.data&&(h.data=Jc(h.data));return g.Nd(b,h)}}(e));return d.qa(function(){return c},function(g){var h=2;if(g instanceof P){if(7001==g.code)throw g;h=g.severity}throw new P(h,1,1007,g);})}N("shaka.net.NetworkingEngine",cf);cf.prototype.request=cf.prototype.request;cf.prototype.destroy=cf.prototype.destroy;cf.makeRequest=gf;
176
+ cf.defaultRetryParameters=function(){return Qe()};cf.prototype.clearAllResponseFilters=cf.prototype.Tf;cf.prototype.unregisterResponseFilter=cf.prototype.kh;cf.prototype.registerResponseFilter=cf.prototype.Vg;cf.prototype.clearAllRequestFilters=cf.prototype.Sf;cf.prototype.unregisterRequestFilter=cf.prototype.jh;cf.prototype.registerRequestFilter=cf.prototype.Ug;cf.unregisterScheme=function(a){delete ff[a]};cf.registerScheme=df;cf.prototype.setForceHTTPS=cf.prototype.xe;function hf(){this.g=0}
177
+ cf.NumBytesRemainingClass=hf;function jf(a,b,c){Se.call(this,a,b);this.h=c}u(jf,Se);cf.PendingRequest=jf;var nf=1;cf.RequestType={MANIFEST:0,SEGMENT:nf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var ef=3;cf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ef};var ff={};function of(a){this.g=!1;this.h=new Pc;this.i=a}of.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 pf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function qf(){this.g=new ab}q=qf.prototype;q.release=function(){this.qb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new rf(a,b,c,d),this.g.push(b,a))};q.Ga=function(a,b,c,d){function e(g){f.nc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.nc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.nc(),this.g.remove(b,e))}};
178
+ q.qb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.nc();this.g.g={}}};N("shaka.util.EventManager",qf);qf.prototype.removeAll=qf.prototype.qb;qf.prototype.unlisten=qf.prototype.nc;qf.prototype.listenOnce=qf.prototype.Ga;qf.prototype.listen=qf.prototype.o;qf.prototype.release=qf.prototype.release;function rf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=sf(a,d);this.target.addEventListener(b,c,this.g)}
178
179
  rf.prototype.nc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function sf(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 tf(a)?b:b.capture||!1}
179
- function tf(a){var b=uf;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}uf=b}return b||!1}var uf=void 0;function vf(){}function wf(a){a=jd(a);return(new jb(a)).Za}function xf(a,b,c){function d(h){Lc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ic(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=ld(b,!0):e=b;a=jd(a);a=ld(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}N("shaka.util.FairPlayUtils",vf);vf.initDataTransform=xf;vf.defaultGetContentId=wf;function yf(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function zf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Af(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=r(a),d=c.next();!d.done;d=c.next()){var e=r(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 Bf(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.H=new Set;this.l=this.B=null;this.aa=this.Z=!1;this.I=0;this.g=null;this.A=new qf;this.i=new Map;this.F=[];this.C=new Pc;this.h=null;this.m=function(d){c.C.reject(d);a.onError(d)};this.ba=new Map;this.$=new Map;this.R=new Q(function(){return Cf(c)});this.K=!1;this.J=[];this.N=!1;this.va=(new Q(function(){Df(c)})).ha(b);this.C["catch"](function(){});this.j=new of(function(){return Ef(c)});this.W=!1}q=Bf.prototype;q.destroy=function(){return this.j.destroy()};
180
- function Ef(a){return M(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.C.reject(),a.va.stop(),a.va=null,a.R.stop(),a.R=null,A(b,Ff(a),2);case 2:if(!a.l){b.D(3);break}E(b,4);return A(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:I(b);case 5:a.l=null;case 3:a.g=null,a.H.clear(),a.B=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.W=!1,C(b)}})}q.configure=function(a){this.h=a};function Gf(a,b,c){a.aa=!0;a.F=[];a.K=c;return Hf(a,b)}
181
- function If(a,b,c){a.F=c;a.K=0<c.length;return Hf(a,b)}function Jf(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 Kf(a,g,[])}
182
- function Hf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;return M(function(y){if(1==y.g){if(c=Lf(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=yf(a.h.servers),Mf(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Nf(l),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,Of(t,yf(a.h.servers),yf(a.h.advanced||{}));return A(y,
183
- fe(b,a.K,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Z=!0,y["return"](Promise.resolve());x=Kf(a,void 0,b);return y["return"](g?x:x["catch"](function(){}))})}
184
- q.xc=function(a){var b=this,c,d;return M(function(e){if(1==e.g){if(!b.B)return b.A.Ga(a,"encrypted",function(){b.m(new P(2,6,6010))}),e["return"]();b.l=a;b.A.Ga(b.l,"play",function(){for(var f=r(b.J),g=f.next();!g.done;g=f.next())Pf(b,g.value);b.N=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.A.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ff(b)});c=b.l.setMediaKeys(b.B);c=c["catch"](function(f){return Promise.reject(new P(2,6,6003,f.message))});return A(e,
185
- c,2)}pf(b.j);Qf(b);b.g.initData.length||b.F.length||(d=function(f){return Rf(b,f.initDataType,Ic(f.initData))},b.A.o(b.l,"encrypted",d));C(e)})};
186
- function Sf(a){var b,c,d,e,f;return M(function(g){switch(g.g){case 1:if(!a.B||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=gf([a.g.serverCertificateUri],a.h.retryParameters);E(g,3);c=a.G.Qb.request(5,b);return A(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ic(d.data);va(g,4);break;case 3:throw e=I(g),new P(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
187
- E(g,6);return A(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=I(g),new P(2,6,6004,f.message);}})}function Tf(a,b){var c,d,e;return M(function(f){if(1==f.g)return A(f,Uf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.cb=new Pc,d.push(e.cb);d.push(c.remove());return A(f,Promise.all(d),3)}a.i["delete"](c);C(f)})}
188
- function Qf(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Rf(a,d.initDataType,d.initData);c=r(a.F);for(d=c.next();!d.done;d=c.next())Uf(a,d.value);b.length||a.F.length||a.C.resolve();return a.C}function Rf(a,b,c){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Gc(c,e.value.initData)&&!Xc("Tizen 2"))return;Vf(a,b,c,a.g.sessionType)}function Wf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
189
- function Xf(a){a=a.i.keys();a=db(a,function(b){return b.sessionId});return Array.from(a)}q.Cc=function(){var a=Infinity,b=this.i.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.dd=function(){return zf(this.$)};
190
- function Kf(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x;return M(function(y){switch(y.g){case 1:d=new Map;if(c.length){e=Yf(a,c,d);y.D(2);break}return A(y,Zf(a,b),3);case 3:e=y.h;case 2:f=e;if(!f)throw new P(2,6,6001);pf(a.j);E(y,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());p=r(k);for(m=p.next();!m.done;m=p.next())t=m.value,a.H.add(t.contentType.toLowerCase());if(c.length){var w=
191
- f.keySystem;var D=d.get(f.keySystem);var z=[],B=[],F=[],G=[],H=new Set;$f(D,z,F,B,G,H);var J=a.K?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:z[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||J,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};D=r(D);for(z=D.next();!z.done;z=
192
- D.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),z=[],B=[],F=[],G=[],H=new Set,$f(w.drmInfos,z,F,B,G,H),D={keySystem:D,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
193
- w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new P(2,6,6012,a.g.keySystem);return A(y,f.createMediaKeys(),6);case 6:return v=y.h,pf(a.j),a.B=v,a.Z=!0,A(y,Sf(a),7);case 7:pf(a.j);va(y,0);break;case 4:x=I(y);pf(a.j,x);a.g=null;a.H.clear();if(x instanceof P)throw x;throw new P(2,6,6002,x.message);}})}
194
- function Yf(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Nf(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 P(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Jd:d.Jd},e=a.next())for(d.Jd=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
195
- l.Jd}}(d)))return e.keySystemAccess;a=r([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=r(b),e=f.next();!e.done;e=f.next()){var g=r(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=r(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
196
- function Zf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x,y;return M(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new P(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.D(4);break}k=h.value;if(!b.has(k)){w.D(3);break}l=b.get(k);E(w,6);return A(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
180
+ function tf(a){var b=uf;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}uf=b}return b||!1}var uf=void 0;function vf(){}function wf(a){a=jd(a);return(new jb(a)).Ya}function xf(a,b,c){function d(h){Lc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ic(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=ld(b,!0):e=b;a=jd(a);a=ld(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}N("shaka.util.FairPlayUtils",vf);vf.initDataTransform=xf;vf.defaultGetContentId=wf;function yf(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function zf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Af(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=r(a),d=c.next();!d.done;d=c.next()){var e=r(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 Bf(a,b){var c=Cf(a,b);return 1!=c.length?null:c[0]}function Df(a,b,c){a=Ef(a,b,c);return 1!=a.length?null:a[0]}function Cf(a,b){for(var c=[],d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function Ff(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
181
+ function Ef(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function Gf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Hf(a,b,c){b=r(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 If(a){return Array.from(a.childNodes).every(Jf)?a.textContent.trim():null}
182
+ function Jf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Kf(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function Lf(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)}
183
+ function Mf(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
184
+ function Nf(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 Of(a){a=Number(a);return 0===a%1?a:null}function Pf(a){a=Number(a);return 0===a%1&&0<a?a:null}function Qf(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Rf(a){a=Number(a);return isNaN(a)?null:a}function Sf(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
185
+ function Tf(a,b){var c=new DOMParser,d=Uf.value()(a),e=null;try{e=c.parseFromString(d,"text/xml")}catch(f){return null}c=e.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(e=document.createNodeIterator(e,NodeFilter.SHOW_ALL);d=e.nextNode();)if(d instanceof HTMLElement||d instanceof SVGElement)return null;return c}function Vf(a,b){try{var c=gd(a);return Tf(c,b)}catch(d){return null}}
186
+ var Uf=new Qc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Wf(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.H=new Set;this.l=this.B=null;this.aa=this.Z=!1;this.I=0;this.g=null;this.A=new qf;this.i=new Map;this.F=[];this.C=new Pc;this.h=null;this.m=function(d){c.C.reject(d);a.onError(d)};this.ba=new Map;this.$=new Map;this.S=new Q(function(){return Xf(c)});this.K=!1;this.J=[];this.N=!1;this.va=(new Q(function(){Yf(c)})).ha(b);this.C["catch"](function(){});this.j=new of(function(){return Zf(c)});this.W=!1}q=Wf.prototype;q.destroy=function(){return this.j.destroy()};
187
+ function Zf(a){return M(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.C.reject(),a.va.stop(),a.va=null,a.S.stop(),a.S=null,A(b,$f(a),2);case 2:if(!a.l){b.D(3);break}E(b,4);return A(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:I(b);case 5:a.l=null;case 3:a.g=null,a.H.clear(),a.B=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.W=!1,C(b)}})}q.configure=function(a){this.h=a};function ag(a,b,c){a.aa=!0;a.F=[];a.K=c;return bg(a,b)}
188
+ function cg(a,b,c){a.F=c;a.K=0<c.length;return bg(a,b)}function dg(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 eg(a,g,[])}
189
+ function bg(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;return M(function(y){if(1==y.g){if(c=fg(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=yf(a.h.servers),gg(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=hg(l),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,ig(t,yf(a.h.servers),yf(a.h.advanced||{}));return A(y,
190
+ fe(b,a.K,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Z=!0,y["return"](Promise.resolve());x=eg(a,void 0,b);return y["return"](g?x:x["catch"](function(){}))})}
191
+ q.xc=function(a){var b=this,c,d;return M(function(e){if(1==e.g){if(!b.B)return b.A.Ga(a,"encrypted",function(){b.m(new P(2,6,6010))}),e["return"]();b.l=a;b.A.Ga(b.l,"play",function(){for(var f=r(b.J),g=f.next();!g.done;g=f.next())jg(b,g.value);b.N=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.A.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return $f(b)});c=b.l.setMediaKeys(b.B);c=c["catch"](function(f){return Promise.reject(new P(2,6,6003,f.message))});return A(e,
192
+ c,2)}pf(b.j);lg(b);b.g.initData.length||b.F.length||(d=function(f){return mg(b,f.initDataType,Ic(f.initData))},b.A.o(b.l,"encrypted",d));C(e)})};
193
+ function ng(a){var b,c,d,e,f;return M(function(g){switch(g.g){case 1:if(!a.B||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=gf([a.g.serverCertificateUri],a.h.retryParameters);E(g,3);c=a.G.Qb.request(5,b);return A(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ic(d.data);va(g,4);break;case 3:throw e=I(g),new P(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
194
+ E(g,6);return A(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=I(g),new P(2,6,6004,f.message);}})}function og(a,b){var c,d,e;return M(function(f){if(1==f.g)return A(f,pg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.cb=new Pc,d.push(e.cb);d.push(c.remove());return A(f,Promise.all(d),3)}a.i["delete"](c);C(f)})}
195
+ function lg(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,mg(a,d.initDataType,d.initData);c=r(a.F);for(d=c.next();!d.done;d=c.next())pg(a,d.value);b.length||a.F.length||a.C.resolve();return a.C}function mg(a,b,c){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Gc(c,e.value.initData)&&!Xc("Tizen 2"))return;qg(a,b,c,a.g.sessionType)}function rg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
196
+ function sg(a){a=a.i.keys();a=db(a,function(b){return b.sessionId});return Array.from(a)}q.Cc=function(){var a=Infinity,b=this.i.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.ed=function(){return zf(this.$)};
197
+ function eg(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x;return M(function(y){switch(y.g){case 1:d=new Map;if(c.length){e=tg(a,c,d);y.D(2);break}return A(y,ug(a,b),3);case 3:e=y.h;case 2:f=e;if(!f)throw new P(2,6,6001);pf(a.j);E(y,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());p=r(k);for(m=p.next();!m.done;m=p.next())t=m.value,a.H.add(t.contentType.toLowerCase());if(c.length){var w=
198
+ f.keySystem;var D=d.get(f.keySystem);var z=[],B=[],F=[],G=[],H=new Set;vg(D,z,F,B,G,H);var J=a.K?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:z[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||J,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};D=r(D);for(z=D.next();!z.done;z=
199
+ D.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),z=[],B=[],F=[],G=[],H=new Set,vg(w.drmInfos,z,F,B,G,H),D={keySystem:D,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
200
+ w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new P(2,6,6012,a.g.keySystem);return A(y,f.createMediaKeys(),6);case 6:return v=y.h,pf(a.j),a.B=v,a.Z=!0,A(y,ng(a),7);case 7:pf(a.j);va(y,0);break;case 4:x=I(y);pf(a.j,x);a.g=null;a.H.clear();if(x instanceof P)throw x;throw new P(2,6,6002,x.message);}})}
201
+ function tg(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(hg(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 P(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Kd:d.Kd},e=a.next())for(d.Kd=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
202
+ l.Kd}}(d)))return e.keySystemAccess;a=r([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=r(b),e=f.next();!e.done;e=f.next()){var g=r(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=r(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
203
+ function ug(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x,y;return M(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new P(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.D(4);break}k=h.value;if(!b.has(k)){w.D(3);break}l=b.get(k);E(w,6);return A(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
197
204
  w.h,w["return"](c);case 6:I(w);case 7:pf(a.j);case 3:h=g.next();w.D(2);break;case 4:m=r([!0,!1]),n=m.next();case 9:if(n.done){w.D(11);break}p=n.value;t=r(b.keys());h=t.next();case 12:if(h.done){n=m.next();w.D(9);break}v=h.value;x=b.get(v);y=x.drmInfos.some(function(D){return!!D.licenseServerUri});if(y!=p){w.D(13);break}E(w,15);return A(w,navigator.requestMediaKeySystemAccess(v,[x]),17);case 17:return c=w.h,w["return"](c);case 15:I(w);case 16:pf(a.j);case 13:h=t.next();w.D(12);break;case 11:return w["return"](c)}})}
198
- function Lf(a){a=yf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=qd(f),h=qd(e);g={kty:"oct",kid:od(g,!1),k:od(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Ic(kd(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
205
+ function fg(a){a=yf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=qd(f),h=qd(e);g={kty:"oct",kid:od(g,!1),k:od(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Ic(kd(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
199
206
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
200
- function Uf(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:try{c=a.B.createSession("persistent-license")}catch(k){return d=new P(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.A.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(k):Pf(a,k)});a.A.o(c,"keystatuseschange",function(k){return ag(a,k)});e={initData:null,loaded:!1,ee:Infinity,cb:null,type:"persistent-license"};a.i.set(c,e);E(h,2);return A(h,c.load(b),4);case 4:f=h.h;pf(a.j);
201
- if(!f)return a.i["delete"](c),a.m(new P(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;bg(a)&&a.C.resolve();return h["return"](c);case 2:g=I(h),pf(a.j,g),a.i["delete"](c),a.m(new P(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
202
- function Vf(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.m(new P(2,6,6005,f.message));return}a.A.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(f):Pf(a,f)});a.A.o(e,"keystatuseschange",function(f){return ag(a,f)});a.i.set(e,{initData:c,loaded:!1,ee:Infinity,cb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof P||(b=new P(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&od(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
203
- var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new P(2,6,6006,f.message,f,h))}})}function cg(a,b,c){"skd"==b&&(b=c.serverCertificate,c=wf(a),a=xf(a,c,b));return a}
204
- function Pf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;M(function(y){switch(y.g){case 1:return c=b.target,a.h.logLicenseExchange&&od(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=gf([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Wf(a.g.keySystem)&&dg(g),h=Date.now(),E(y,2),l=a.G.Qb.request(2,g),A(y,
207
+ function pg(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:try{c=a.B.createSession("persistent-license")}catch(k){return d=new P(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.A.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(k):jg(a,k)});a.A.o(c,"keystatuseschange",function(k){return wg(a,k)});e={initData:null,loaded:!1,ie:Infinity,cb:null,type:"persistent-license"};a.i.set(c,e);E(h,2);return A(h,c.load(b),4);case 4:f=h.h;pf(a.j);
208
+ if(!f)return a.i["delete"](c),a.m(new P(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;xg(a)&&a.C.resolve();return h["return"](c);case 2:g=I(h),pf(a.j,g),a.i["delete"](c),a.m(new P(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
209
+ function qg(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.m(new P(2,6,6005,f.message));return}a.A.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(f):jg(a,f)});a.A.o(e,"keystatuseschange",function(f){return wg(a,f)});a.i.set(e,{initData:c,loaded:!1,ie:Infinity,cb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof P||(b=new P(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&od(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
210
+ var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new P(2,6,6006,f.message,f,h))}})}function yg(a,b,c){"skd"==b&&(b=c.serverCertificate,c=wf(a),a=xf(a,c,b));return a}
211
+ function jg(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;M(function(y){switch(y.g){case 1:return c=b.target,a.h.logLicenseExchange&&od(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=gf([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,rg(a.g.keySystem)&&zg(g),h=Date.now(),E(y,2),l=a.G.Qb.request(2,g),A(y,
205
212
  l.promise,4);case 4:k=y.h;va(y,3);break;case 2:return m=I(y),n=new P(2,6,6007,m),a.m(n),d&&d.cb&&d.cb.reject(n),y["return"]();case 3:if(a.j.g)return y["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&od(k.data);E(y,5);return A(y,c.update(k.data),7);case 7:va(y,6);break;case 5:return p=I(y),t=new P(2,6,6008,p.message),a.m(t),d&&d.cb&&d.cb.reject(t),y["return"]();case 6:if(a.j.g)return y["return"]();v=new O("drmsessionupdate");a.G.onEvent(v);d&&(d.cb&&d.cb.resolve(),x=new Q(function(){d.loaded=
206
- !0;bg(a)&&a.C.resolve()}),x.S(eg));C(y)}})}function dg(a){var b=hd(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=pd(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
207
- function ag(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Wf(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||bd())){k=Lc(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=rd(h);a.ba.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.cb&&(a.i["delete"](c),c.close()["catch"](function(){}));
208
- bg(a)&&(a.C.resolve(),a.R.S(fg))}function Cf(a){var b=a.ba,c=a.$;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new P(2,6,6014));a.G.qd(zf(c))}
209
- function gg(){var a,b,c,d,e,f,g,h;return M(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,
213
+ !0;xg(a)&&a.C.resolve()}),x.R(Ag));C(y)}})}function zg(a){var b=hd(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=Tf(b,"PlayReadyKeyMessage");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=pd(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
214
+ function wg(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(rg(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||bd())){k=Lc(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=rd(h).slice(0,32);a.ba.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.cb&&(a.i["delete"](c),
215
+ c.close()["catch"](function(){}));xg(a)&&(a.C.resolve(),a.S.R(Bg))}function Xf(a){var b=a.ba,c=a.$;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new P(2,6,6014));a.G.rd(zf(c))}
216
+ function Cg(){var a,b,c,d,e,f,g,h;return M(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,
210
217
  c],f=new Map,g=function(l){var m,n,p;return M(function(t){switch(t.g){case 1:return E(t,2),A(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Xc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),A(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:I(t),f.set(l,null),C(t)}})},h=a.map(function(l){return g(l)}),A(k,Promise.all(h),2)):k["return"](zf(f))})}
211
- function hg(a){var b;return M(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).S(ig)}),E(c,2),A(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);I(c);C(c)})}
212
- function Ff(a){var b;return M(function(c){b=Array.from(a.i.entries());a.i.clear();return A(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return M(function(g){if(1==g.g)return E(g,2),a.aa||a.F.includes(e.sessionId)||"persistent-license"!==f.type?A(g,hg(e),5):A(g,e.remove(),5);if(2!=g.g)return va(g,0);I(g);C(g)})})),0)})}
213
- function jg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Ua:f.Ua},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ua=[];f.Ua=f.Ua.concat(e.initData||[]);f.Ua=f.Ua.concat(h.initData||[]);f.Ua=f.Ua.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ua.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
218
+ function Dg(a){var b;return M(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).R(Eg)}),E(c,2),A(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);I(c);C(c)})}
219
+ function $f(a){var b;return M(function(c){b=Array.from(a.i.entries());a.i.clear();return A(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return M(function(g){if(1==g.g)return E(g,2),a.aa||a.F.includes(e.sessionId)||"persistent-license"!==f.type?A(g,Dg(e),5):A(g,e.remove(),5);if(2!=g.g)return va(g,0);I(g);C(g)})})),0)})}
220
+ function Fg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Ta:f.Ta},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ta=[];f.Ta=f.Ta.concat(e.initData||[]);f.Ta=f.Ta.concat(h.initData||[]);f.Ta=f.Ta.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ta.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
214
221
  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,
215
- initData:f.Ua,keyIds:g});break}}return c}function Nf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Df(a){a.i.forEach(function(b,c){var d=b.ee,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ee=e)})}function bg(a){a=a.i.values();return eb(a,function(b){return b.loaded})}
216
- function Mf(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=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
217
- function $f(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ja:g.Ja},h=a.next()){g.Ja=h.value;b.includes(g.Ja.licenseServerUri)||b.push(g.Ja.licenseServerUri);d.includes(g.Ja.serverCertificateUri)||d.push(g.Ja.serverCertificateUri);g.Ja.serverCertificate&&(c.some(function(m){return function(n){return Gc(n,m.Ja.serverCertificate)}}(g))||c.push(g.Ja.serverCertificate));if(g.Ja.initData){h={};for(var k=r(g.Ja.initData),l=k.next();!l.done;h={Sc:h.Sc},l=k.next())h.Sc=l.value,e.some(function(m){return function(n){var p=
222
+ initData:f.Ta,keyIds:g});break}}return c}function hg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Yf(a){a.i.forEach(function(b,c){var d=b.ie,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ie=e)})}function xg(a){a=a.i.values();return eb(a,function(b){return b.loaded})}
223
+ function gg(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=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
224
+ function vg(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ja:g.Ja},h=a.next()){g.Ja=h.value;b.includes(g.Ja.licenseServerUri)||b.push(g.Ja.licenseServerUri);d.includes(g.Ja.serverCertificateUri)||d.push(g.Ja.serverCertificateUri);g.Ja.serverCertificate&&(c.some(function(m){return function(n){return Gc(n,m.Ja.serverCertificate)}}(g))||c.push(g.Ja.serverCertificate));if(g.Ja.initData){h={};for(var k=r(g.Ja.initData),l=k.next();!l.done;h={Sc:h.Sc},l=k.next())h.Sc=l.value,e.some(function(m){return function(n){var p=
218
225
  m.Sc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Gc(n.initData,p.initData)}}(h))||e.push(h.Sc)}if(g.Ja.keyIds)for(h=r(g.Ja.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
219
- function Of(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||
220
- (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 ig=1,eg=5,fg=.5,lg=new Qc(function(){return Jc(new Uint8Array([0]))});function mg(){}function ng(a,b,c,d){var e,f,g,h;return M(function(k){if(1==k.g){if(d&&(e=og[d.toLowerCase()]))return k["return"](e);if(f=pg(a))if(g=qg[f])return k["return"](g);return d?k.D(2):A(k,rg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=og[d]))return k["return"](h);throw new P(2,4,4E3,a);})}
221
- function rg(a,b,c){var d,e,f;return M(function(g){if(1==g.g)return d=gf([a],c),d.method="HEAD",A(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function pg(a){a=(new jb(a)).Na.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}N("shaka.media.ManifestParser",mg);mg.unregisterParserByMime=function(a){delete og[a]};mg.registerParserByMime=function(a,b){og[a]=b};
222
- mg.registerParserByExtension=function(a,b){qg[a]=b};var og={},qg={};function sg(a,b){this.U=Lc(a);this.h=b==tg;this.g=0}q=sg.prototype;q.Ea=function(){return this.g<this.U.byteLength};q.ia=function(){return this.g};q.gg=function(){return this.U.byteLength};q.ka=function(){try{var a=this.U.getUint8(this.g);this.g+=1;return a}catch(b){throw ug();}};q.kc=function(){try{var a=this.U.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw ug();}};q.P=function(){try{var a=this.U.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw ug();}};
223
- q.qf=function(){try{var a=this.U.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw ug();}};q.lc=function(){try{if(this.h){var a=this.U.getUint32(this.g,!0);var b=this.U.getUint32(this.g+4,!0)}else b=this.U.getUint32(this.g,!1),a=this.U.getUint32(this.g+4,!1)}catch(c){throw ug();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Cb=function(a){if(this.g+a>this.U.byteLength)throw ug();var b=Ic(this.U,this.g,a);this.g+=a;return b};
224
- q.skip=function(a){if(this.g+a>this.U.byteLength)throw ug();this.g+=a};q.tf=function(a){if(this.g<a)throw ug();this.g-=a};q.seek=function(a){if(0>a||a>this.U.byteLength)throw ug();this.g=a};q.Lc=function(){for(var a=this.g;this.Ea()&&0!=this.U.getUint8(this.g);)this.g+=1;a=Ic(this.U,a,this.g-a);this.g+=1;return gd(a)};function ug(){return new P(2,3,3E3)}N("shaka.util.DataViewReader",sg);sg.prototype.readTerminatedString=sg.prototype.Lc;sg.prototype.seek=sg.prototype.seek;sg.prototype.rewind=sg.prototype.tf;
225
- sg.prototype.skip=sg.prototype.skip;sg.prototype.readBytes=sg.prototype.Cb;sg.prototype.readUint64=sg.prototype.lc;sg.prototype.readInt32=sg.prototype.qf;sg.prototype.readUint32=sg.prototype.P;sg.prototype.readUint16=sg.prototype.kc;sg.prototype.readUint8=sg.prototype.ka;sg.prototype.getLength=sg.prototype.gg;sg.prototype.getPosition=sg.prototype.ia;sg.prototype.hasMoreData=sg.prototype.Ea;var tg=1;sg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:tg};function vg(){this.i=[];this.h=[];this.g=!1}q=vg.prototype;q.box=function(a,b){var c=wg(a);this.i[c]=xg;this.h[c]=b;return this};q.X=function(a,b){var c=wg(a);this.i[c]=yg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new sg(a,0);for(this.g=!1;a.Ea()&&!this.g;)this.sd(0,a,b,c)};
226
- q.sd=function(a,b,c,d){var e=b.ia();if(d&&e+8>b.U.byteLength)this.g=!0;else{var f=b.P(),g=b.P(),h=!1;switch(f){case 0:f=b.U.byteLength-e;break;case 1:if(d&&b.ia()+8>b.U.byteLength){this.g=!0;return}f=b.lc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==yg){if(d&&b.ia()+4>b.U.byteLength){this.g=!0;return}m=b.P();l=m>>>24;m&=16777215}g=e+f;c&&g>b.U.byteLength&&(g=b.U.byteLength);d&&g>b.U.byteLength?this.g=!0:(d=g-b.ia(),b=0<d?b.Cb(d):new Uint8Array(0),b=new sg(b,0),k({parser:this,partialOkay:c||
227
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.ia(),b.U.byteLength-b.ia()))}};function zg(a){for(var b=Ag(a);a.reader.Ea()&&!a.parser.g;)a.parser.sd(a.start+b,a.reader,a.partialOkay)}function Bg(a){for(var b=Ag(a),c=a.reader.P(),d=0;d<c&&(a.parser.sd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Cg(a){return function(b){a(b.reader.Cb(b.reader.U.byteLength-b.reader.ia()))}}
228
- function wg(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Dg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Ag(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}N("shaka.util.Mp4Parser",vg);vg.headerSize=Ag;vg.typeToString=Dg;vg.allData=Cg;vg.sampleDescription=Bg;vg.children=zg;vg.prototype.parseNext=vg.prototype.sd;vg.prototype.parse=vg.prototype.parse;vg.prototype.stop=vg.prototype.stop;
229
- vg.prototype.fullBox=vg.prototype.X;vg.prototype.box=vg.prototype.box;var xg=0,yg=1;function Eg(a){function b(){d=!0}function c(l){f.push(l);zg(l)}a=Ic(a);var d=!1,e,f=[],g=[];(new vg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).X("stsd",function(l){e=l;f.push(l);Bg(l)}).X("encv",b).X("enca",b).X("avc1",function(l){g.push({box:l,Jc:1701733238})}).X("avc3",function(l){g.push({box:l,Jc:1701733238})}).X("ac-3",function(l){g.push({box:l,Jc:1701733217})}).X("ec-3",function(l){g.push({box:l,Jc:1701733217})}).X("mp4a",function(l){g.push({box:l,Jc:1701733217})}).parse(a);
230
- if(d)return a;if(0==g.length||!e)throw Ya(rd(a)),new P(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=Fg(a,e,k.box,f,k.Jc);return a}
231
- function Fg(a,b,c,d,e){var f=Gg.value(),g=a.subarray(c.start,c.start+c.size),h=Lc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Lc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Hg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Wc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,Hg(e,d.start,d.size+k.byteLength);k=Lc(e,b.start);b=Ag(b);a=k.getUint32(b);
232
- k.setUint32(b,a+1);return e}function Hg(a,b,c){a=Lc(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 Gg=new Qc(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 Ig(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=Jg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,v=-1,x=0;x<p.length;x++)if(null!=p[x]&&""!==p[x].g.trim()){t=x;break}for(x=p.length-1;0<=x;x--)if(null!=p[x]&&""!==p[x].g.trim()){v=x;break}if(-1===
233
- t||-1===v)p=Kg(d,e),a.nestedCues.push(p);else{for(;t<=v;t++)if(x=p[t]){var y=x.l,w=x.i,D=x.j,z=x.h;if(y!=h||w!=k||D!=l||z!=m)n.payload&&a.nestedCues.push(n),n=Jg(d,e,y,w,D,z),h=y,k=w,l=D,m=z;n.payload+=x.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Kg(d,e),a.nestedCues.push(n));n=Jg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
234
- function Jg(a,b,c,d,e,f){a=new lc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Kg(a,b){var c=new lc(a,b,"");c.lineBreak=!0;return c}function Lg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Mg(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.B=b;this.j=this.m=!1;this.l="white";this.A="black";Ng(this)}function Og(a,b,c){return Ig(new lc(b,c,""),"CC"+(a.C<<1|a.B+1),a.i,b,c)}function Ng(a){Pg(a,0,15);a.g=1}function Qg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Rg:d=Sg.has(c)?Sg.get(c):String.fromCharCode(c);break;case Tg:d=Ug.get(c);break;case Vg:a.i[a.g].pop();d=Wg.get(c);break;case Xg:a.i[a.g].pop(),d=Yg.get(c)}d&&a.i[a.g].push(new Lg(d,a.m,a.j,a.A,a.l))}}
235
- function Zg(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Pg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
236
- var Rg=0,Tg=1,Vg=2,Xg=3,Sg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Ug=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Wg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
237
- [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"]]),Yg=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
238
- [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 $g(a,b){this.h=ah;this.A=new Mg(a,b);this.i=new Mg(a,b);this.l=new Mg(a,b);this.g=this.i;this.j=0;this.m=null}function bh(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==ch&&a.h!==dh&&(e=Og(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Pg(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Pg(c,0,15),d.g=15);a.h=ch;d.h=b;return e}function eh(a){a.h=fh;a.g=a.l;a.g.h=0}function gh(a){Ta("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.A;a.h=dh}
239
- var ah=0,fh=1,ch=3,dh=4,hh="black green blue cyan red yellow magenta black".split(" "),ih="white green blue cyan red yellow magenta white_italics".split(" ");function jh(){this.l=!1;this.F=this.H=0;this.G=kh;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.m="black";lh(this)}function lh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(mh())}function mh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function nh(a,b){oh(a)&&(a.i[a.h][a.g]=new Lg(b,a.C,a.A,a.m,a.B),a.g++)}function oh(a){var b=a.g<a.F&&0<=a.g;return a.h<a.H&&0<=a.h&&b}jh.prototype.isVisible=function(){return this.l};
240
- function ph(a,b,c){var d=new lc(a.j,b,"");d.textAlign=a.G===qh?"left":a.G===rh?"right":pc;if(c=Ig(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var qh=0,rh=1,kh=2;function sh(){this.i=[];this.h=null;this.g=0}function th(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 uh(a.h)),a.h=null,a.g=0))}function uh(a){this.g=0;this.h=a}uh.prototype.Ea=function(){return this.g<this.h.length};uh.prototype.ia=function(){return this.g};function vh(a){if(!a.Ea())throw new P(2,2,3E3);return a.h[a.g++]}uh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new P(2,2,3E3);this.g+=a};function wh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
241
- function xh(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=vh(b).value;b=null;c=r(yh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=ph(e,d,a.i)),lh(e);return b}if(137===c)for(b=vh(b).value,b=r(yh(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=vh(b).value;b=null;c=r(yh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=ph(e,d,a.i)),e.l=!1;return b}if(139===c){c=vh(b).value;
242
- b=null;c=r(yh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=ph(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=vh(b).value,zh(a,b,d);if(143===c)return d=zh(a,255,d),Ah(a),d;if(144===c)b.skip(1),d=vh(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=vh(b).value,c=vh(b).value,b.skip(1),a.g&&(b=Bh((c&48)>>4,(c&12)>>2,c&3),a.g.B=Bh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=vh(b).value,b=vh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
243
- b.skip(1),d=vh(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new jh;f.j=d;a.h[c]=f}d=vh(b).value;vh(b);vh(b);f=vh(b).value;var g=vh(b).value;b=vh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.H=(f&15)+1;b.F=(g&63)+1;a.g=a.h[c]}}}return null}function yh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
244
- function zh(a,b,c){var d=null;b=r(yh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=ph(f,c,a.i));a.h[e]=null}return d}function Ah(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Bh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Ch[a<<2|b<<1|c]}
245
- var Dh=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"]]),Ch="black blue green cyan red magenta yellow white".split(" ");function Eh(){this.h=[];this.g=[];this.i=new sh;this.l=0;this.B=new Map([["CC1",new $g(0,0)],["CC2",new $g(0,1)],["CC3",new $g(1,0)],["CC4",new $g(1,1)]]);this.A=this.m=0;this.j=new Map;Fh(this)}function Fh(a){a.m=0;a.A=0;a=r(a.B.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Ng(b.i),Ng(b.l),Ng(b.A)}
246
- function Gh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=r(a.h),e=d.next();!e.done;e=d.next())(e=Hh(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())th(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=Ih(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
247
- function Hh(a,b){var c=b.type;if(16===(b.Qa&112)){var d=b.Qa>>3&1;0===c?a.m=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.m)+1));if(255===b.Qa&&255===b.kb||!b.Qa&&!b.kb||!Jh(b.Qa)||!Jh(b.kb))return 45<=++a.l&&Fh(a),null;a.l=0;b.Qa&=127;b.kb&=127;if(!b.Qa&&!b.kb)return null;d=null;if(16===(b.Qa&112))a:{var e=b.Qa;d=b.kb;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=ih[f]:7===f&&(h=!0);
248
- d=1===(d&1);if(c.h!==dh){f=c.g;if(c.h===ch&&e!==f.g){var k=1+e-f.h;Zg(f,k,1+f.g-f.h,f.h);Pg(f,0,k-1);Pg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.A="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Qg(c.g,Rg,32),g=!1,e=ih[(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=hh[(d&14)>>1]),c.g.A=g;else if(17===(e&247)&&48===(d&240))Qg(c.g,Tg,d);else if(18===
249
- (e&246)&&32===(d&224))Qg(c.g,e&1?Xg:Vg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.kb){case 32:eh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=bh(c,2,d);break;case 38:e=bh(c,3,d);break;case 39:e=bh(c,4,d);break;case 40:Qg(c.g,Rg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Ng(c.A);gh(c);break;case 43:gh(c);break;case 44:e=c.i;g=null;c.h!==dh&&(g=Og(e,c.j,d));Pg(e,0,15);e=g;break;case 45:e=c.g;c.h!==ch?e=null:(g=Og(e,c.j,d),h=e.g-e.h+1,Zg(e,h-1,h,e.h),Pg(e,
250
- 0,h-1),Pg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Pg(c.l,0,15);break;case 47:e=null,c.h!==dh&&(e=Og(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,eh(c),c.j=d}d=e;break a}d=null}else e=b.kb,Qg(c.g,Rg,b.Qa),Qg(c.g,Rg,e);return d}
251
- function Ih(a,b){var c=[];try{for(;b.Ea();){var d=vh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=vh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new wh(e));for(var g=a.j.get(e),h=b.ia();b.ia()-h<f;){e=b;var k=vh(e),l=k.value,m=k.pts;if(16===l){var n=vh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!oh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=ph(t,p,g.i));if(t.h+1>=t.H){p=t;for(var v=0,x=1;15>x;x++,
252
- v++)p.i[v]=p.i[x];for(x=0;1>x;x++,v++)p.i[v]=mh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=ph(t,p,g.i));t.i[t.h]=mh();t.g=0;break;case 12:t.isVisible()&&(e=ph(t,p,g.i)),lh(t),p=t,p.h=0,p.g=0}var y=e}else y=null}else if(128<=l&&159>=l)y=xh(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?nh(g.g,"\u266a"):nh(g.g,
253
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&nh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Dh.has(e)){var w=Dh.get(e);nh(g.g,w)}else nh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?nh(g.g,"_"):nh(g.g,"[CC]"));y=null}(e=y)&&c.push(e)}}}}catch(D){if(D instanceof P&&3E3===D.code)Ta("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Jh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Kh(a,b){var c=null,d=null,e=a.P();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.P());b&16&&(d=a.P());return{trackId:e,We:c,Rf:d}}function Lh(a,b){return{Rd:1==b?a.lc():a.P()}}function Mh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.P()}}
254
- function Nh(a,b,c){var d=a.P(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={me:null,sampleSize:null,vd:null};c&256&&(g.me=a.P());c&512&&(g.sampleSize=a.P());c&1024&&a.skip(4);c&2048&&(g.vd=0==b?a.P():a.qf());e.push(g)}return{Ki:d,uf:e}};function Oh(){this.i=new Map;this.h=this.g=0}
255
- Oh.prototype.init=function(a){var b=this,c=[],d=[];(new vg).box("moov",zg).box("mvex",zg).X("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.P();f=f.P();b.g=e;b.h=f}).box("trak",zg).X("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.P();c.push(e)}).box("mdia",zg).X("mdhd",function(e){e=Mh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new P(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
256
- Oh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new vg).box("moof",zg).box("traf",zg).X("trun",function(k){f=Nh(k.reader,k.version,k.flags).uf}).X("tfhd",function(k){k=Kh(k.reader,k.flags);d=k.We||b.g;e=k.Rf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).X("tfdt",function(k){g=Lh(k.reader,k.version).Rd}).box("mdat",function(k){if(null===g)throw new P(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,v=0,x=p;for(t.length&&(x=t[0].sampleSize||p);k.Ea();){var y=k.P();if(6==
257
- (k.ka()&31)){var w=0;t.length>v&&(w=t[v].vd||0);w=(l+w)/m;for(var D=[],z,B=k.Cb(y-1),F=z=0;F<B.length;)2==z&&3==B[F]?(z=0,B=[].concat(ia(B)),B.splice(F,1),B=new Uint8Array(B)):0==B[F]?z++:z=0,F++;z=B;for(F=0;F<z.length;){for(B=0;255==z[F];)B+=255,F++;B+=z[F++];for(var G=0;255==z[F];)G+=255,F++;G+=z[F++];4==B&&D.push(z.subarray(F,F+G));F+=G}D=r(D);for(z=D.next();!z.done;z=D.next())c.push({Ng:z.value,pts:w})}else try{k.skip(y-1)}catch(H){break}x-=y+4;0==x&&(l=t.length>v?l+(t[v].me||n):l+n,v++,x=t.length>
258
- v?t[v].sampleSize||p:p)}}).parse(a,!1);return c};function Ph(){this.h=new Oh;this.g=new Eh}Ph.prototype.init=function(a){this.h.init(a)};
259
- function Qh(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Ic(e.Ng);if(0<f.length&&(d=a.g,e=e.pts,f=new sg(f,0),181===f.ka()&&49===f.kc()&&1195456820===f.P()&&3===f.ka())){var g=f.ka();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.ka(),l=(k&4)>>2,m=f.ka(),n=f.ka();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Qa:m,kb: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 Gh(a.g)}
260
- ;function Rh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Sh(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 Th(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(Uh(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}
261
- function Vh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Uh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Uh(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Wh(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.J={};this.I={};this.g=null;this.K=d||function(){};this.i={};this.A=new qf;this.B={};this.C=b;this.G=new Pc;this.m=Xh(this,this.G);this.F=new of(function(){return Yh(e)});this.H=""}function Xh(a,b){var c=new MediaSource;a.A.Ga(c,"sourceopen",function(){URL.revokeObjectURL(a.H);b.resolve()});a.H=Zh(c);a.j.src=a.H;return c}q=Wh.prototype;q.destroy=function(){return this.F.destroy()};
262
- function Yh(a){var b,c,d,e,f,g,h,k;return M(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Eb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new P(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.B)b.push(a.B[k].destroy());return A(l,Promise.all(b),2)}a.A&&(a.A.release(),a.A=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.B={};a.C=null;a.i=
226
+ function ig(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||
227
+ (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 Eg=1,Ag=5,Bg=.5,Gg=new Qc(function(){return Jc(new Uint8Array([0]))});function Hg(){}function Ig(a,b,c,d){var e,f,g,h;return M(function(k){if(1==k.g){if(d&&(e=Jg[d.toLowerCase()]))return k["return"](e);if(f=Kg(a))if(g=Lg[f])return k["return"](g);return d?k.D(2):A(k,Mg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Jg[d]))return k["return"](h);throw new P(2,4,4E3,a);})}
228
+ function Mg(a,b,c){var d,e,f;return M(function(g){if(1==g.g)return d=gf([a],c),d.method="HEAD",A(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function Kg(a){a=(new jb(a)).Na.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}N("shaka.media.ManifestParser",Hg);Hg.unregisterParserByMime=function(a){delete Jg[a]};Hg.registerParserByMime=function(a,b){Jg[a]=b};
229
+ Hg.registerParserByExtension=function(a,b){Lg[a]=b};var Jg={},Lg={};function Ng(a,b){this.U=Lc(a);this.h=b==Og;this.g=0}q=Ng.prototype;q.Ea=function(){return this.g<this.U.byteLength};q.ia=function(){return this.g};q.kg=function(){return this.U.byteLength};q.ka=function(){try{var a=this.U.getUint8(this.g);this.g+=1;return a}catch(b){throw Pg();}};q.kc=function(){try{var a=this.U.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Pg();}};q.P=function(){try{var a=this.U.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Pg();}};
230
+ q.vf=function(){try{var a=this.U.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Pg();}};q.lc=function(){try{if(this.h){var a=this.U.getUint32(this.g,!0);var b=this.U.getUint32(this.g+4,!0)}else b=this.U.getUint32(this.g,!1),a=this.U.getUint32(this.g+4,!1)}catch(c){throw Pg();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Cb=function(a){if(this.g+a>this.U.byteLength)throw Pg();var b=Ic(this.U,this.g,a);this.g+=a;return b};
231
+ q.skip=function(a){if(this.g+a>this.U.byteLength)throw Pg();this.g+=a};q.xf=function(a){if(this.g<a)throw Pg();this.g-=a};q.seek=function(a){if(0>a||a>this.U.byteLength)throw Pg();this.g=a};q.Lc=function(){for(var a=this.g;this.Ea()&&0!=this.U.getUint8(this.g);)this.g+=1;a=Ic(this.U,a,this.g-a);this.g+=1;return gd(a)};function Pg(){return new P(2,3,3E3)}N("shaka.util.DataViewReader",Ng);Ng.prototype.readTerminatedString=Ng.prototype.Lc;Ng.prototype.seek=Ng.prototype.seek;Ng.prototype.rewind=Ng.prototype.xf;
232
+ Ng.prototype.skip=Ng.prototype.skip;Ng.prototype.readBytes=Ng.prototype.Cb;Ng.prototype.readUint64=Ng.prototype.lc;Ng.prototype.readInt32=Ng.prototype.vf;Ng.prototype.readUint32=Ng.prototype.P;Ng.prototype.readUint16=Ng.prototype.kc;Ng.prototype.readUint8=Ng.prototype.ka;Ng.prototype.getLength=Ng.prototype.kg;Ng.prototype.getPosition=Ng.prototype.ia;Ng.prototype.hasMoreData=Ng.prototype.Ea;var Og=1;Ng.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Og};function Qg(){this.i=[];this.h=[];this.g=!1}q=Qg.prototype;q.box=function(a,b){var c=Rg(a);this.i[c]=Sg;this.h[c]=b;return this};q.X=function(a,b){var c=Rg(a);this.i[c]=Tg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Ng(a,0);for(this.g=!1;a.Ea()&&!this.g;)this.td(0,a,b,c)};
233
+ q.td=function(a,b,c,d){var e=b.ia();if(d&&e+8>b.U.byteLength)this.g=!0;else{var f=b.P(),g=b.P(),h=!1;switch(f){case 0:f=b.U.byteLength-e;break;case 1:if(d&&b.ia()+8>b.U.byteLength){this.g=!0;return}f=b.lc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Tg){if(d&&b.ia()+4>b.U.byteLength){this.g=!0;return}m=b.P();l=m>>>24;m&=16777215}g=e+f;c&&g>b.U.byteLength&&(g=b.U.byteLength);d&&g>b.U.byteLength?this.g=!0:(d=g-b.ia(),b=0<d?b.Cb(d):new Uint8Array(0),b=new Ng(b,0),k({parser:this,partialOkay:c||
234
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.ia(),b.U.byteLength-b.ia()))}};function Ug(a){for(var b=Vg(a);a.reader.Ea()&&!a.parser.g;)a.parser.td(a.start+b,a.reader,a.partialOkay)}function Wg(a){for(var b=Vg(a),c=a.reader.P(),d=0;d<c&&(a.parser.td(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Xg(a){return function(b){a(b.reader.Cb(b.reader.U.byteLength-b.reader.ia()))}}
235
+ function Rg(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Yg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Vg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}N("shaka.util.Mp4Parser",Qg);Qg.headerSize=Vg;Qg.typeToString=Yg;Qg.allData=Xg;Qg.sampleDescription=Wg;Qg.children=Ug;Qg.prototype.parseNext=Qg.prototype.td;Qg.prototype.parse=Qg.prototype.parse;Qg.prototype.stop=Qg.prototype.stop;
236
+ Qg.prototype.fullBox=Qg.prototype.X;Qg.prototype.box=Qg.prototype.box;var Sg=0,Tg=1;function Zg(a){function b(){d=!0}function c(l){f.push(l);Ug(l)}a=Ic(a);var d=!1,e,f=[],g=[];(new Qg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).X("stsd",function(l){e=l;f.push(l);Wg(l)}).X("encv",b).X("enca",b).X("avc1",function(l){g.push({box:l,Jc:1701733238})}).X("avc3",function(l){g.push({box:l,Jc:1701733238})}).X("ac-3",function(l){g.push({box:l,Jc:1701733217})}).X("ec-3",function(l){g.push({box:l,Jc:1701733217})}).X("mp4a",function(l){g.push({box:l,Jc:1701733217})}).parse(a);
237
+ if(d)return a;if(0==g.length||!e)throw Ya(rd(a)),new P(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=$g(a,e,k.box,f,k.Jc);return a}
238
+ function $g(a,b,c,d,e){var f=ah.value(),g=a.subarray(c.start,c.start+c.size),h=Lc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Lc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);bh(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Wc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,bh(e,d.start,d.size+k.byteLength);k=Lc(e,b.start);b=Vg(b);a=k.getUint32(b);
239
+ k.setUint32(b,a+1);return e}function bh(a,b,c){a=Lc(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 ah=new Qc(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 ch(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=dh(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,v=-1,x=0;x<p.length;x++)if(null!=p[x]&&""!==p[x].g.trim()){t=x;break}for(x=p.length-1;0<=x;x--)if(null!=p[x]&&""!==p[x].g.trim()){v=x;break}if(-1===
240
+ t||-1===v)p=eh(d,e),a.nestedCues.push(p);else{for(;t<=v;t++)if(x=p[t]){var y=x.l,w=x.i,D=x.j,z=x.h;if(y!=h||w!=k||D!=l||z!=m)n.payload&&a.nestedCues.push(n),n=dh(d,e,y,w,D,z),h=y,k=w,l=D,m=z;n.payload+=x.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=eh(d,e),a.nestedCues.push(n));n=dh(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
241
+ function dh(a,b,c,d,e,f){a=new lc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function eh(a,b){var c=new lc(a,b,"");c.lineBreak=!0;return c}function fh(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function gh(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.B=b;this.j=this.m=!1;this.l="white";this.A="black";hh(this)}function ih(a,b,c){return ch(new lc(b,c,""),"CC"+(a.C<<1|a.B+1),a.i,b,c)}function hh(a){jh(a,0,15);a.g=1}function kh(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case lh:d=mh.has(c)?mh.get(c):String.fromCharCode(c);break;case nh:d=oh.get(c);break;case ph:a.i[a.g].pop();d=qh.get(c);break;case rh:a.i[a.g].pop(),d=sh.get(c)}d&&a.i[a.g].push(new fh(d,a.m,a.j,a.A,a.l))}}
242
+ function th(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function jh(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
243
+ var lh=0,nh=1,ph=2,rh=3,mh=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),oh=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),qh=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
244
+ [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"]]),sh=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
245
+ [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 uh(a,b){this.h=vh;this.A=new gh(a,b);this.i=new gh(a,b);this.l=new gh(a,b);this.g=this.i;this.j=0;this.m=null}function wh(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==xh&&a.h!==yh&&(e=ih(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,jh(c,0,15),c=a.l,c.g=0<c.h?c.h:0,jh(c,0,15),d.g=15);a.h=xh;d.h=b;return e}function zh(a){a.h=Ah;a.g=a.l;a.g.h=0}function Bh(a){Ta("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.A;a.h=yh}
246
+ var vh=0,Ah=1,xh=3,yh=4,Ch="black green blue cyan red yellow magenta black".split(" "),Dh="white green blue cyan red yellow magenta white_italics".split(" ");function Eh(){this.l=!1;this.F=this.H=0;this.G=Fh;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.m="black";Gh(this)}function Gh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(Hh())}function Hh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Ih(a,b){Jh(a)&&(a.i[a.h][a.g]=new fh(b,a.C,a.A,a.m,a.B),a.g++)}function Jh(a){var b=a.g<a.F&&0<=a.g;return a.h<a.H&&0<=a.h&&b}Eh.prototype.isVisible=function(){return this.l};
247
+ function Kh(a,b,c){var d=new lc(a.j,b,"");d.textAlign=a.G===Lh?"left":a.G===Mh?"right":pc;if(c=ch(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Lh=0,Mh=1,Fh=2;function Nh(){this.i=[];this.h=null;this.g=0}function Oh(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 Ph(a.h)),a.h=null,a.g=0))}function Ph(a){this.g=0;this.h=a}Ph.prototype.Ea=function(){return this.g<this.h.length};Ph.prototype.ia=function(){return this.g};function Qh(a){if(!a.Ea())throw new P(2,2,3E3);return a.h[a.g++]}Ph.prototype.skip=function(a){if(this.g+a>this.h.length)throw new P(2,2,3E3);this.g+=a};function Rh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
248
+ function Sh(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=Qh(b).value;b=null;c=r(Th(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Kh(e,d,a.i)),Gh(e);return b}if(137===c)for(b=Qh(b).value,b=r(Th(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=Qh(b).value;b=null;c=r(Th(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Kh(e,d,a.i)),e.l=!1;return b}if(139===c){c=Qh(b).value;
249
+ b=null;c=r(Th(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Kh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Qh(b).value,Uh(a,b,d);if(143===c)return d=Uh(a,255,d),Vh(a),d;if(144===c)b.skip(1),d=Qh(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Qh(b).value,c=Qh(b).value,b.skip(1),a.g&&(b=Wh((c&48)>>4,(c&12)>>2,c&3),a.g.B=Wh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Qh(b).value,b=Qh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
250
+ b.skip(1),d=Qh(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Eh;f.j=d;a.h[c]=f}d=Qh(b).value;Qh(b);Qh(b);f=Qh(b).value;var g=Qh(b).value;b=Qh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.H=(f&15)+1;b.F=(g&63)+1;a.g=a.h[c]}}}return null}function Th(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
251
+ function Uh(a,b,c){var d=null;b=r(Th(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Kh(f,c,a.i));a.h[e]=null}return d}function Vh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Wh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Xh[a<<2|b<<1|c]}
252
+ var Yh=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"]]),Xh="black blue green cyan red magenta yellow white".split(" ");function Zh(){this.h=[];this.g=[];this.i=new Nh;this.l=0;this.B=new Map([["CC1",new uh(0,0)],["CC2",new uh(0,1)],["CC3",new uh(1,0)],["CC4",new uh(1,1)]]);this.A=this.m=0;this.j=new Map;$h(this)}function $h(a){a.m=0;a.A=0;a=r(a.B.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,hh(b.i),hh(b.l),hh(b.A)}
253
+ function ai(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=r(a.h),e=d.next();!e.done;e=d.next())(e=bi(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())Oh(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=ci(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
254
+ function bi(a,b){var c=b.type;if(16===(b.Qa&112)){var d=b.Qa>>3&1;0===c?a.m=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.m)+1));if(255===b.Qa&&255===b.jb||!b.Qa&&!b.jb||!di(b.Qa)||!di(b.jb))return 45<=++a.l&&$h(a),null;a.l=0;b.Qa&=127;b.jb&=127;if(!b.Qa&&!b.jb)return null;d=null;if(16===(b.Qa&112))a:{var e=b.Qa;d=b.jb;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=Dh[f]:7===f&&(h=!0);
255
+ d=1===(d&1);if(c.h!==yh){f=c.g;if(c.h===xh&&e!==f.g){var k=1+e-f.h;th(f,k,1+f.g-f.h,f.h);jh(f,0,k-1);jh(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.A="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",kh(c.g,lh,32),g=!1,e=Dh[(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=Ch[(d&14)>>1]),c.g.A=g;else if(17===(e&247)&&48===(d&240))kh(c.g,nh,d);else if(18===
256
+ (e&246)&&32===(d&224))kh(c.g,e&1?rh:ph,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.jb){case 32:zh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=wh(c,2,d);break;case 38:e=wh(c,3,d);break;case 39:e=wh(c,4,d);break;case 40:kh(c.g,lh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:hh(c.A);Bh(c);break;case 43:Bh(c);break;case 44:e=c.i;g=null;c.h!==yh&&(g=ih(e,c.j,d));jh(e,0,15);e=g;break;case 45:e=c.g;c.h!==xh?e=null:(g=ih(e,c.j,d),h=e.g-e.h+1,th(e,h-1,h,e.h),jh(e,
257
+ 0,h-1),jh(e,e.g,15-e.g),c.j=d,e=g);break;case 46:jh(c.l,0,15);break;case 47:e=null,c.h!==yh&&(e=ih(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,zh(c),c.j=d}d=e;break a}d=null}else e=b.jb,kh(c.g,lh,b.Qa),kh(c.g,lh,e);return d}
258
+ function ci(a,b){var c=[];try{for(;b.Ea();){var d=Qh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Qh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Rh(e));for(var g=a.j.get(e),h=b.ia();b.ia()-h<f;){e=b;var k=Qh(e),l=k.value,m=k.pts;if(16===l){var n=Qh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Jh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Kh(t,p,g.i));if(t.h+1>=t.H){p=t;for(var v=0,x=1;15>x;x++,
259
+ v++)p.i[v]=p.i[x];for(x=0;1>x;x++,v++)p.i[v]=Hh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Kh(t,p,g.i));t.i[t.h]=Hh();t.g=0;break;case 12:t.isVisible()&&(e=Kh(t,p,g.i)),Gh(t),p=t,p.h=0,p.g=0}var y=e}else y=null}else if(128<=l&&159>=l)y=Sh(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?Ih(g.g,"\u266a"):Ih(g.g,
260
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Ih(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Yh.has(e)){var w=Yh.get(e);Ih(g.g,w)}else Ih(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Ih(g.g,"_"):Ih(g.g,"[CC]"));y=null}(e=y)&&c.push(e)}}}}catch(D){if(D instanceof P&&3E3===D.code)Ta("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function di(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function ei(a,b){var c=null,d=null,e=a.P();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.P());b&16&&(d=a.P());return{trackId:e,Ze:c,Vf:d}}function fi(a,b){return{Ud:1==b?a.lc():a.P()}}function gi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.P()}}
261
+ function hi(a,b,c){var d=a.P(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={qe:null,sampleSize:null,wd:null};c&256&&(g.qe=a.P());c&512&&(g.sampleSize=a.P());c&1024&&a.skip(4);c&2048&&(g.wd=0==b?a.P():a.vf());e.push(g)}return{Oi:d,yf:e}};function ii(){this.i=new Map;this.h=this.g=0}
262
+ ii.prototype.init=function(a){var b=this,c=[],d=[];(new Qg).box("moov",Ug).box("mvex",Ug).X("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.P();f=f.P();b.g=e;b.h=f}).box("trak",Ug).X("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.P();c.push(e)}).box("mdia",Ug).X("mdhd",function(e){e=gi(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new P(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
263
+ ii.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Qg).box("moof",Ug).box("traf",Ug).X("trun",function(k){f=hi(k.reader,k.version,k.flags).yf}).X("tfhd",function(k){k=ei(k.reader,k.flags);d=k.Ze||b.g;e=k.Vf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).X("tfdt",function(k){g=fi(k.reader,k.version).Ud}).box("mdat",function(k){if(null===g)throw new P(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,v=0,x=p;for(t.length&&(x=t[0].sampleSize||p);k.Ea();){var y=k.P();if(6==
264
+ (k.ka()&31)){var w=0;t.length>v&&(w=t[v].wd||0);w=(l+w)/m;for(var D=[],z,B=k.Cb(y-1),F=z=0;F<B.length;)2==z&&3==B[F]?(z=0,B=[].concat(ia(B)),B.splice(F,1),B=new Uint8Array(B)):0==B[F]?z++:z=0,F++;z=B;for(F=0;F<z.length;){for(B=0;255==z[F];)B+=255,F++;B+=z[F++];for(var G=0;255==z[F];)G+=255,F++;G+=z[F++];4==B&&D.push(z.subarray(F,F+G));F+=G}D=r(D);for(z=D.next();!z.done;z=D.next())c.push({Rg:z.value,pts:w})}else try{k.skip(y-1)}catch(H){break}x-=y+4;0==x&&(l=t.length>v?l+(t[v].qe||n):l+n,v++,x=t.length>
265
+ v?t[v].sampleSize||p:p)}}).parse(a,!1);return c};function ji(){this.h=new ii;this.g=new Zh}ji.prototype.init=function(a){this.h.init(a)};
266
+ function ki(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Ic(e.Rg);if(0<f.length&&(d=a.g,e=e.pts,f=new Ng(f,0),181===f.ka()&&49===f.kc()&&1195456820===f.P()&&3===f.ka())){var g=f.ka();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.ka(),l=(k&4)>>2,m=f.ka(),n=f.ka();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Qa:m,jb: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 ai(a.g)}
267
+ ;function li(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function mi(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 ni(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(oi(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}
268
+ function pi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=oi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function oi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function qi(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.J={};this.I={};this.g=null;this.K=d||function(){};this.i={};this.A=new qf;this.B={};this.C=b;this.G=new Pc;this.m=ri(this,this.G);this.F=new of(function(){return si(e)});this.H=""}function ri(a,b){var c=new MediaSource;a.A.Ga(c,"sourceopen",function(){URL.revokeObjectURL(a.H);b.resolve()});a.H=ti(c);a.j.src=a.H;return c}q=qi.prototype;q.destroy=function(){return this.F.destroy()};
269
+ function si(a){var b,c,d,e,f,g,h,k;return M(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Eb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new P(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.B)b.push(a.B[k].destroy());return A(l,Promise.all(b),2)}a.A&&(a.A.release(),a.A=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.B={};a.C=null;a.i=
263
270
  {};C(l)})}
264
- q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){if(1==m.g)return d=Nb,A(m,c.G,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ia:e.Ia},g=f.next())e.Ia=g.value,h=a.get(e.Ia),k=yd(h.mimeType,h.codecs),e.Ia==d.oa?$h(c,k):(!b&&MediaSource.isTypeSupported(k)||!ud(k,e.Ia)||(c.B[e.Ia]=new td,k=wd(e.Ia,k)),l=c.m.addSourceBuffer(k),c.A.o(l,"error",function(n){return function(){c.i[n.Ia][0].p.reject(new P(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.A.o(l,"updateend",function(n){return function(){return ai(c,n.Ia)}}(e)),
265
- c.h[e.Ia]=l,c.J[e.Ia]=k,c.i[e.Ia]=[],c.I[e.Ia]=!!h.drmInfos.length);C(m)})};function $h(a,b){a.g||(a.g=new Ed(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Gb(Gd[b]))}function bi(a){return a.m?"ended"==a.m.readyState:!0}function ci(a,b){if(b==Mb)var c=a.g.g;else c=di(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 ei(a,b){return b==Mb?a.g.h:Rh(di(a,b))}
266
- function fi(a,b,c){if(b==Mb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=di(a,b);return Th(a,c)}q.zb=function(){var a={total:Uh(this.j.buffered),audio:Uh(di(this,"audio")),video:Uh(di(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function di(a,b){try{return a.h[b].buffered}catch(c){return null}}
267
- function gi(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g){g=Nb;if(b==g.oa)return A(v,Hd(a.g,c,d,e),0);if(a.B[b])return A(v,xd(a.B[b],c),10);if(f)return a.g||$h(a,"text/vtt"),null==d&&null==e?a.C.init(c):(h=Qh(a.C,c),h.length&&(k=a.h[g.gb].timestampOffset,Md(a.g,h,d,e,k))),c=hi(a,c,d,b),A(v,ii(a,b,function(){a.h[b].appendBuffer(c)}),0);c=hi(a,c,d,b);return A(v,ii(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||$h(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.K(l.metadata,
268
- m,e));l.captions&&l.captions.length&&(n=a.h[g.gb].timestampOffset,p=Kd(l.captions),Md(a.g,p,d,e,n));t=l.data;t=hi(a,t,d,b);return A(v,ii(a,b,function(){a.h[b].appendBuffer(t)}),0)})}function ji(a,b){var c=ei(a,"video")||0;Jd(a.g,b,c)}function ki(a){a.g&&Jd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return M(function(f){e=Nb;return a==e.oa?A(f,d.g.remove(b,c),0):A(f,ii(d,a,function(){c<=b?ai(d,a):d.h[a].remove(b,c)}),0)})};
269
- function li(a,b){var c;return M(function(d){c=Nb;return b==c.oa?a.g?A(d,a.g.remove(0,Infinity),0):d["return"]():A(d,ii(a,b,function(){var e=a.m.duration;0>=e?ai(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return M(function(d){c=Nb;return a==c.oa?d["return"]():A(d,ii(b,a,function(){b.j.currentTime-=.001;ai(b,a)}),0)})};
270
- function mi(a,b,c,d,e){var f;return M(function(g){f=Nb;return b==f.oa?(a.g.C=c,Id(a.g,d,e),g["return"]()):A(g,Promise.all([ii(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;ai(a,b)}),ii(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;ai(a,b)}),ii(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;ai(a,b)})]),0)})}
271
- q.endOfStream=function(a){var b=this;return M(function(c){return A(c,ni(b,function(){bi(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.bb=function(a){var b=this;return M(function(c){return A(c,ni(b,function(){b.m.duration=a}),0)})};q.getDuration=function(){return this.m.duration};function ai(a,b){var c=a.i[b][0];c&&(c.p.resolve(),oi(a,b))}function ii(a,b,c){pf(a.F);c={start:c,p:new Pc};a.i[b].push(c);1==a.i[b].length&&pi(a,b);return c.p}
272
- function ni(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:pf(a.F);c=[];d={};for(e in a.h)d.tc=new Pc,f={start:function(l){return function(){return l.tc.resolve()}}(d),p:d.tc},a.i[e].push(f),c.push(d.tc),1==a.i[e].length&&f.start(),d={tc:d.tc};E(k,2);return A(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=I(k),g;case 3:try{b()}catch(l){throw new P(2,3,3015,l);}finally{for(h in a.h)oi(a,h)}C(k)}})}function oi(a,b){a.i[b].shift();pi(a,b)}
273
- function pi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d)),oi(a,b)}}function hi(a,b,c,d){var e=a.I[d];null==c&&e&&(Yc()||Wc())&&"mp4"==a.J[d].split(";")[0].split("/")[1]&&(b=Eg(b));return b}var Zh=window.URL.createObjectURL;function qi(a,b,c,d){this.Ka=a;this.Ha=b;this.wa=c;this.Zd=void 0===d?null:d}qi.prototype.Fc=function(){return this.Ha};qi.prototype.Bc=function(){return this.wa};function ri(a,b){return a&&b?a.Fc()==b.Fc()&&a.Bc()==b.Bc()&&kc(a.Ka(),b.Ka()):a==b}N("shaka.media.InitSegmentReference",qi);qi.prototype.getEndByte=qi.prototype.Bc;qi.prototype.getStartByte=qi.prototype.Fc;
274
- function si(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.Ha=d;this.wa=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=si.prototype;q.Ka=function(){return this.j()};q.getStartTime=function(){return this.startTime};q.eg=function(){return this.endTime};q.Fc=function(){return this.Ha};q.Bc=function(){return this.wa};q.yg=function(){return this.tilesLayout};
275
- q.xg=function(){return this.i};N("shaka.media.SegmentReference",si);si.prototype.getTileDuration=si.prototype.xg;si.prototype.getTilesLayout=si.prototype.yg;si.prototype.getEndByte=si.prototype.Bc;si.prototype.getStartByte=si.prototype.Fc;si.prototype.getEndTime=si.prototype.eg;si.prototype.getStartTime=si.prototype.getStartTime;si.prototype.getUris=si.prototype.Ka;function R(a,b,c){this.l=a;this.td=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.B=!0;this.C=0;this.F=void 0===c?!0:c;this.G=0;this.H=!1}q=R.prototype;q.getDuration=function(){return this.i};q.mg=function(){return this.g};q.bb=function(a){this.i=a};q.qg=function(){return this.l};q.xf=function(a){this.A=a};q.Pc=function(a){this.B=a};q.ye=function(a){this.m=a};q.dh=function(a){this.td=a};q.dg=function(){return this.td};
276
- q.hc=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.ce(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.F&&!this.H&&(this.l=(Date.now()+this.A)/1E3-this.h-this.g)}};q.Yd=function(){this.H=!0};q.ce=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.be=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
277
- q.T=function(){return Infinity==this.i&&!this.B};q.Nb=function(){return Infinity!=this.i&&!this.B};q.ob=function(){return Math.max(this.C,this.Kb()-this.m)};q.Af=function(a){this.C=a};q.Kb=function(){return this.T()||this.Nb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Ec=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Kb()-this.m+a,this.mb()))};q.bc=function(){return this.Ec(0)};
278
- q.mb=function(){return Math.max(0,this.Kb()-(this.T()||this.Nb()?this.td:0))};q.Ef=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.wf=function(a){this.G=a};N("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.wf;R.prototype.usingPresentationStartTime=R.prototype.Ef;R.prototype.getSeekRangeEnd=R.prototype.mb;R.prototype.getSeekRangeStart=R.prototype.bc;R.prototype.getSafeSeekRangeStart=R.prototype.Ec;R.prototype.getSegmentAvailabilityEnd=R.prototype.Kb;
279
- R.prototype.setUserSeekStart=R.prototype.Af;R.prototype.getSegmentAvailabilityStart=R.prototype.ob;R.prototype.isInProgress=R.prototype.Nb;R.prototype.isLive=R.prototype.T;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.be;R.prototype.notifyMinSegmentStartTime=R.prototype.ce;R.prototype.lockStartTime=R.prototype.Yd;R.prototype.notifySegments=R.prototype.hc;R.prototype.getDelay=R.prototype.dg;R.prototype.setDelay=R.prototype.dh;
280
- R.prototype.setSegmentAvailabilityDuration=R.prototype.ye;R.prototype.setStatic=R.prototype.Pc;R.prototype.setClockOffset=R.prototype.xf;R.prototype.getPresentationStartTime=R.prototype.qg;R.prototype.setDuration=R.prototype.bb;R.prototype.getMaxSegmentDuration=R.prototype.mg;R.prototype.getDuration=R.prototype.getDuration;function ti(a,b){this.j=a;this.m=ui(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}ti.prototype.release=function(){this.j=null;this.i=function(){}};function vi(a,b){a.i=b}function wi(a){this.g=a}function ui(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Uh(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 xi(a,b,c,d,e){var f=this;this.g=a;this.F=b;this.l=c;this.C=e;this.i=new qf;this.B=!1;this.G=a.readyState;this.j=!1;this.h=d;this.A=!1;this.i.o(a,"waiting",function(){return yi(f)});this.m=(new Q(function(){yi(f)})).ha(.25)}xi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.F=this.C=null};xi.prototype.fe=function(){this.A=!0;yi(this)};
281
- function yi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.B)return}else a.B=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.G&&(a.j=!1,a.G=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=ui(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.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Vh(b,g,a.l.gapDetectionThreshold);if(!(null==
282
- c||0==c&&!a.A||(d=b.start(c),d>=a.F.mb()))){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 O("largegap",g),g.cancelable=!0,a.C(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function zi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ai.value().get(b),c.Ga(a,b,d))}var Ai=new Qc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Bi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new qf;this.i=new Ci(a);zi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Di(d,d.j)})}Bi.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 Ei(a){return a.m?a.g.currentTime:a.j}function Fi(a,b){0<a.g.readyState?Gi(a.i,b):zi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Di(a,a.j)})}
283
- function Di(a,b){.001>Math.abs(a.g.currentTime-b)?Hi(a):(a.h.Ga(a.g,"seeking",function(){Hi(a)}),Gi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Hi(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Ci(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Q(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Ci.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
284
- function Gi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ha(.1)};function Ii(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.Ga(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new qf;zi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}Ii.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};Ii.prototype.A=function(a){this.h=this.j?this.h:a};Ii.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};Ii.prototype.G=function(){};
285
- function Ji(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.H=b.minBufferTime||0;this.l=c;this.F=e;this.C=null;this.j=new xi(a,b.presentationTimeline,c,Ki(a,c),f);this.h=new Bi(a,function(){a:{var h=g.j;h.B=!0;h.A=!1;h.j=!1;var k=Ei(g.h);h=Li(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.C||g.C<k-1)){g.C=k;Fi(g.h,h);h=void 0;break a}g.F();h=void 0}return h},Mi(this,d));this.B=(new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ei(g.h),k=g.g.bc(),l=g.g.mb();3>l-k&&(k=
286
- l-3);h<k&&(h=Li(g,h),g.i.currentTime=h)}})).ha(.25)}Ji.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.B&&(this.B.stop(),this.B=null);this.i=this.h=this.g=this.l=null;this.F=function(){}};Ji.prototype.A=function(a){Fi(this.h,a)};Ji.prototype.m=function(){var a=Ei(this.h);return 0<this.i.readyState&&!this.i.paused?Ni(this,a):a};
287
- function Mi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.bc():a.g.mb():0>b&&(b=a.g.mb()+b);return Oi(a,Ni(a,b))}Ji.prototype.G=function(){this.j.fe()};function Oi(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Li(a,b){var c=Math.max(a.H,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.bc(),f=a.g.mb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ec(c),k=a.g.Ec(d);c=a.g.Ec(c+d);return b>=g?Oi(a,b):b>f?f:b<e?Sh(a.i.buffered,k)?k:c:b>=h||Sh(a.i.buffered,b)?b:c}
288
- function Ni(a,b){var c=a.g.bc();if(b<c)return c;c=a.g.mb();return b>c?c:b}function Ki(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ti(new wi(a),b.stallThreshold);vi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Pi(a){this.O=a;this.g=null;this.h=0;this.i=!1}q=Pi.prototype;q.destroy=function(){zb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.O=[],this.g&&this.g.stop(),this.g=null)};q.Hg=function(){this.i=!0};
271
+ q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){if(1==m.g)return d=Nb,A(m,c.G,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ia:e.Ia},g=f.next())e.Ia=g.value,h=a.get(e.Ia),k=yd(h.mimeType,h.codecs),e.Ia==d.oa?ui(c,k):(!b&&MediaSource.isTypeSupported(k)||!ud(k,e.Ia)||(c.B[e.Ia]=new td,k=wd(e.Ia,k)),l=c.m.addSourceBuffer(k),c.A.o(l,"error",function(n){return function(){c.i[n.Ia][0].p.reject(new P(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.A.o(l,"updateend",function(n){return function(){return vi(c,n.Ia)}}(e)),
272
+ c.h[e.Ia]=l,c.J[e.Ia]=k,c.i[e.Ia]=[],c.I[e.Ia]=!!h.drmInfos.length);C(m)})};function ui(a,b){a.g||(a.g=new Dd(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Gb(Gd[b]))}function wi(a){return a.m?"ended"==a.m.readyState:!0}function xi(a,b){if(b==Mb)var c=a.g.g;else c=yi(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 zi(a,b){return b==Mb?a.g.h:li(yi(a,b))}
273
+ function Ai(a,b,c){if(b==Mb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=yi(a,b);return ni(a,c)}q.zb=function(){var a={total:oi(this.j.buffered),audio:oi(yi(this,"audio")),video:oi(yi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function yi(a,b){try{return a.h[b].buffered}catch(c){return null}}
274
+ function Bi(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g){g=Nb;if(b==g.oa)return A(v,Hd(a.g,c,d,e),0);if(a.B[b])return A(v,xd(a.B[b],c),10);if(f)return a.g||ui(a,"text/vtt"),null==d&&null==e?a.C.init(c):(h=ki(a.C,c),h.length&&(k=a.h[g.fb].timestampOffset,Md(a.g,h,d,e,k))),c=Ci(a,c,d,b),A(v,Di(a,b,function(){a.h[b].appendBuffer(c)}),0);c=Ci(a,c,d,b);return A(v,Di(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||ui(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.K(l.metadata,
275
+ m,e));l.captions&&l.captions.length&&(n=a.h[g.fb].timestampOffset,p=Kd(l.captions),Md(a.g,p,d,e,n));t=l.data;t=Ci(a,t,d,b);return A(v,Di(a,b,function(){a.h[b].appendBuffer(t)}),0)})}function Ei(a,b){var c=zi(a,"video")||0;Jd(a.g,b,c)}function Fi(a){a.g&&Jd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return M(function(f){e=Nb;return a==e.oa?A(f,d.g.remove(b,c),0):A(f,Di(d,a,function(){c<=b?vi(d,a):d.h[a].remove(b,c)}),0)})};
276
+ function Gi(a,b){var c;return M(function(d){c=Nb;return b==c.oa?a.g?A(d,a.g.remove(0,Infinity),0):d["return"]():A(d,Di(a,b,function(){var e=a.m.duration;0>=e?vi(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return M(function(d){c=Nb;return a==c.oa?d["return"]():A(d,Di(b,a,function(){b.j.currentTime-=.001;vi(b,a)}),0)})};
277
+ function Hi(a,b,c,d,e){var f;return M(function(g){f=Nb;return b==f.oa?(a.g.C=c,Id(a.g,d,e),g["return"]()):A(g,Promise.all([Di(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;vi(a,b)}),Di(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;vi(a,b)}),Di(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;vi(a,b)})]),0)})}
278
+ q.endOfStream=function(a){var b=this;return M(function(c){return A(c,Ii(b,function(){wi(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.bb=function(a){var b=this;return M(function(c){return A(c,Ii(b,function(){b.m.duration=a}),0)})};q.getDuration=function(){return this.m.duration};function vi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Ji(a,b))}function Di(a,b,c){pf(a.F);c={start:c,p:new Pc};a.i[b].push(c);1==a.i[b].length&&Ki(a,b);return c.p}
279
+ function Ii(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:pf(a.F);c=[];d={};for(e in a.h)d.tc=new Pc,f={start:function(l){return function(){return l.tc.resolve()}}(d),p:d.tc},a.i[e].push(f),c.push(d.tc),1==a.i[e].length&&f.start(),d={tc:d.tc};E(k,2);return A(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=I(k),g;case 3:try{b()}catch(l){throw new P(2,3,3015,l);}finally{for(h in a.h)Ji(a,h)}C(k)}})}function Ji(a,b){a.i[b].shift();Ki(a,b)}
280
+ function Ki(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d)),Ji(a,b)}}function Ci(a,b,c,d){var e=a.I[d];null==c&&e&&(Yc()||Wc())&&"mp4"==a.J[d].split(";")[0].split("/")[1]&&(b=Zg(b));return b}var ti=window.URL.createObjectURL;function Li(a,b,c,d){this.Ka=a;this.Ha=b;this.wa=c;this.be=void 0===d?null:d}Li.prototype.Fc=function(){return this.Ha};Li.prototype.Bc=function(){return this.wa};function Mi(a,b){return a&&b?a.Fc()==b.Fc()&&a.Bc()==b.Bc()&&kc(a.Ka(),b.Ka()):a==b}N("shaka.media.InitSegmentReference",Li);Li.prototype.getEndByte=Li.prototype.Bc;Li.prototype.getStartByte=Li.prototype.Fc;
281
+ function Ni(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.Ha=d;this.wa=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=Ni.prototype;q.Ka=function(){return this.j()};q.getStartTime=function(){return this.startTime};q.ig=function(){return this.endTime};q.Fc=function(){return this.Ha};q.Bc=function(){return this.wa};q.Cg=function(){return this.tilesLayout};
282
+ q.Bg=function(){return this.i};N("shaka.media.SegmentReference",Ni);Ni.prototype.getTileDuration=Ni.prototype.Bg;Ni.prototype.getTilesLayout=Ni.prototype.Cg;Ni.prototype.getEndByte=Ni.prototype.Bc;Ni.prototype.getStartByte=Ni.prototype.Fc;Ni.prototype.getEndTime=Ni.prototype.ig;Ni.prototype.getStartTime=Ni.prototype.getStartTime;Ni.prototype.getUris=Ni.prototype.Ka;function R(a,b,c){this.l=a;this.ud=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.B=!0;this.C=0;this.F=void 0===c?!0:c;this.G=0;this.H=!1}q=R.prototype;q.getDuration=function(){return this.i};q.qg=function(){return this.g};q.bb=function(a){this.i=a};q.vg=function(){return this.l};q.Bf=function(a){this.A=a};q.Pc=function(a){this.B=a};q.Be=function(a){this.m=a};q.hh=function(a){this.ud=a};q.hg=function(){return this.ud};
283
+ q.hc=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.ge(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.F&&!this.H&&(this.l=(Date.now()+this.A)/1E3-this.h-this.g)}};q.ae=function(){this.H=!0};q.ge=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.fe=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
284
+ q.T=function(){return Infinity==this.i&&!this.B};q.Nb=function(){return Infinity!=this.i&&!this.B};q.mb=function(){return Math.max(this.C,this.Kb()-this.m)};q.Ef=function(a){this.C=a};q.Kb=function(){return this.T()||this.Nb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Ec=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Kb()-this.m+a,this.kb()))};q.bc=function(){return this.Ec(0)};
285
+ q.kb=function(){return Math.max(0,this.Kb()-(this.T()||this.Nb()?this.ud:0))};q.If=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.Af=function(a){this.G=a};N("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.Af;R.prototype.usingPresentationStartTime=R.prototype.If;R.prototype.getSeekRangeEnd=R.prototype.kb;R.prototype.getSeekRangeStart=R.prototype.bc;R.prototype.getSafeSeekRangeStart=R.prototype.Ec;R.prototype.getSegmentAvailabilityEnd=R.prototype.Kb;
286
+ R.prototype.setUserSeekStart=R.prototype.Ef;R.prototype.getSegmentAvailabilityStart=R.prototype.mb;R.prototype.isInProgress=R.prototype.Nb;R.prototype.isLive=R.prototype.T;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.fe;R.prototype.notifyMinSegmentStartTime=R.prototype.ge;R.prototype.lockStartTime=R.prototype.ae;R.prototype.notifySegments=R.prototype.hc;R.prototype.getDelay=R.prototype.hg;R.prototype.setDelay=R.prototype.hh;
287
+ R.prototype.setSegmentAvailabilityDuration=R.prototype.Be;R.prototype.setStatic=R.prototype.Pc;R.prototype.setClockOffset=R.prototype.Bf;R.prototype.getPresentationStartTime=R.prototype.vg;R.prototype.setDuration=R.prototype.bb;R.prototype.getMaxSegmentDuration=R.prototype.qg;R.prototype.getDuration=R.prototype.getDuration;function Oi(a,b){this.j=a;this.m=Pi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}Oi.prototype.release=function(){this.j=null;this.i=function(){}};function Qi(a,b){a.i=b}function Ri(a){this.g=a}function Pi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(oi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Si(a,b,c,d,e){var f=this;this.g=a;this.F=b;this.l=c;this.C=e;this.i=new qf;this.B=!1;this.G=a.readyState;this.j=!1;this.h=d;this.A=!1;this.i.o(a,"waiting",function(){return Ti(f)});this.m=(new Q(function(){Ti(f)})).ha(.25)}Si.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.F=this.C=null};Si.prototype.je=function(){this.A=!0;Ti(this)};
288
+ function Ti(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.B)return}else a.B=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.G&&(a.j=!1,a.G=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Pi(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.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=pi(b,g,a.l.gapDetectionThreshold);if(!(null==
289
+ c||0==c&&!a.A||(d=b.start(c),d>=a.F.kb()))){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 O("largegap",g),g.cancelable=!0,a.C(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Ui(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Vi.value().get(b),c.Ga(a,b,d))}var Vi=new Qc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Wi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new qf;this.i=new Xi(a);Ui(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Yi(d,d.j)})}Wi.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 Zi(a){return a.m?a.g.currentTime:a.j}function bj(a,b){0<a.g.readyState?cj(a.i,b):Ui(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Yi(a,a.j)})}
290
+ function Yi(a,b){.001>Math.abs(a.g.currentTime-b)?dj(a):(a.h.Ga(a.g,"seeking",function(){dj(a)}),cj(a.i,0==a.g.currentTime?b:a.g.currentTime))}function dj(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Xi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Q(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Xi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
291
+ function cj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ha(.1)};function ej(a){this.g=a;this.j=!1;this.h=null;this.i=new qf}q=ej.prototype;q.Sd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.Ga(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Ui(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.Td=function(a){this.h=this.j?this.h:a};q.Wc=function(){return(this.j?this.g.currentTime:this.h)||0};q.tf=function(){};
292
+ function fj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.C=b.minBufferTime||0;this.l=c;this.B=e;this.A=null;this.j=new Si(a,b.presentationTimeline,c,gj(a,c),f);this.h=new Wi(a,function(){a:{var h=g.j;h.B=!0;h.A=!1;h.j=!1;var k=Zi(g.h);h=hj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.A||g.A<k-1)){g.A=k;bj(g.h,h);h=void 0;break a}g.B();h=void 0}return h},ij(this,d));this.m=new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Zi(g.h),k=g.g.bc(),l=g.g.kb();3>l-k&&(k=l-
293
+ 3);h<k&&(h=hj(g,h),g.i.currentTime=h)}})}q=fj.prototype;q.Sd=function(){this.m.ha(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.B=function(){}};q.Td=function(a){bj(this.h,a)};q.Wc=function(){var a=Zi(this.h);return 0<this.i.readyState&&!this.i.paused?jj(this,a):a};
294
+ function ij(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.bc():a.g.kb():0>b&&(b=a.g.kb()+b);return kj(a,jj(a,b))}q.tf=function(){this.j.je()};function kj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function hj(a,b){var c=Math.max(a.C,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.bc(),f=a.g.kb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ec(c),k=a.g.Ec(d);c=a.g.Ec(c+d);return b>=g?kj(a,b):b>f?f:b<e?mi(a.i.buffered,k)?k:c:b>=h||mi(a.i.buffered,b)?b:c}
295
+ function jj(a,b){var c=a.g.bc();if(b<c)return c;c=a.g.kb();return b>c?c:b}function gj(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new Oi(new Ri(a),b.stallThreshold);Qi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function lj(a){this.O=a;this.g=null;this.h=0;this.i=!1}q=lj.prototype;q.destroy=function(){zb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.O=[],this.g&&this.g.stop(),this.g=null)};q.Lg=function(){this.i=!0};
289
296
  q.find=function(a){for(var b=this.O.length-1,c=b;0<=c;--c){var d=this.O[c],e=c<b?this.O[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.O.length&&a<this.O[0].startTime?this.h:null};q.get=function(a){if(0==this.O.length)return null;a-=this.h;return 0>a||a>=this.O.length?null:this.O[a]};q.offset=function(a){if(!this.i)for(var b=r(this.O),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
290
297
  q.ec=function(a){!this.i&&a.length&&(this.O=this.O.filter(function(b){return b.startTime<a[0].startTime}),this.O.push.apply(this.O,ia(a)))};q.fc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.O.length||d.endTime>c.O[0].startTime)});this.ec(a);this.Hb(b)};q.Hb=function(a){if(!this.i){var b=this.O.length;this.O=this.O.filter(function(c){return c.endTime>a});this.h+=b-this.O.length}};
291
- q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.O.length;)if(this.O[this.O.length-1].startTime>=b)this.O.pop();else break;for(;this.O.length;)if(this.O[0].endTime<=a)this.O.shift(),c||this.h++;else break;0!=this.O.length&&(a=this.O[this.O.length-1],this.O[this.O.length-1]=new si(a.startTime,b,a.j,a.Ha,a.wa,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}};
292
- q.xd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new Q(function(){var d=b();d?c.O.push.apply(c.O,ia(d)):(c.g.stop(),c.g=null)}),this.g.ha(a))};Pi.prototype[Symbol.iterator]=function(){return this.Jb(0)};Pi.prototype.Jb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Qi(this,b,d)};
293
- function Ri(a,b,c){return new Pi([new si(a,a+b,function(){return c},0,null,null,a,a,a+b)])}N("shaka.media.SegmentIndex",Pi);Pi.forSingleSegment=Ri;Pi.prototype.getIteratorForTime=Pi.prototype.Jb;Pi.prototype.updateEvery=Pi.prototype.xd;Pi.prototype.fit=Pi.prototype.yb;Pi.prototype.evict=Pi.prototype.Hb;Pi.prototype.mergeAndEvict=Pi.prototype.fc;Pi.prototype.merge=Pi.prototype.ec;Pi.prototype.offset=Pi.prototype.offset;Pi.prototype.get=Pi.prototype.get;Pi.prototype.find=Pi.prototype.find;
294
- Pi.prototype.markImmutable=Pi.prototype.Hg;Pi.prototype.release=Pi.prototype.release;Pi.prototype.destroy=Pi.prototype.destroy;function Qi(a,b,c){this.i=a;this.h=b;this.g=c}Qi.prototype.seek=function(a){zb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.Jb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
295
- Qi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.Ka().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};Qi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.Ka().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};N("shaka.media.SegmentIterator",Qi);Qi.prototype.next=Qi.prototype.next;Qi.prototype.current=Qi.prototype.current;
296
- Qi.prototype.seek=Qi.prototype.seek;function Si(){Pi.call(this,[]);this.j=[]}u(Si,Pi);q=Si.prototype;q.clone=function(){var a=new Si;a.j=this.j.slice();return a};q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(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.O.length}return null};
297
- q.get=function(a){for(var b=0,c=r(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.O.length}return null};q.offset=function(){};q.ec=function(){};q.Hb=function(){};q.fc=function(){};q.yb=function(){};q.xd=function(){};N("shaka.media.MetaSegmentIndex",Si);Si.prototype.updateEvery=Si.prototype.xd;Si.prototype.fit=Si.prototype.yb;Si.prototype.mergeAndEvict=Si.prototype.fc;Si.prototype.evict=Si.prototype.Hb;Si.prototype.merge=Si.prototype.ec;
298
- Si.prototype.offset=Si.prototype.offset;Si.prototype.get=Si.prototype.get;Si.prototype.find=Si.prototype.find;Si.prototype.release=Si.prototype.release;function Ti(a){var b=this;this.g=a;this.j=!1;this.i=this.g.fd();this.h=new Q(function(){b.g.nf(.25*b.i)})}Ti.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ti.prototype.set=function(a){this.i=a;Ui(this)};Ti.prototype.cd=function(){return this.g.cd()};function Ui(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.fd()!=b&&a.g.we(b);return}catch(c){}a.h.ha(.25);0!=a.g.fd()&&a.g.we(0)};function Vi(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){Wi(b,!1)})).ha(.25)}Vi.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Wi(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Xi(a){cb.call(this);this.g=new Map;this.h=a}u(Xi,cb);Xi.prototype.release=function(){this.g.clear();cb.prototype.release.call(this)};function Yi(a,b){var c=a.g.get(b);c||(c={Kc:[],Ue:null,contentType:b},a.g.set(b,c));return c}function Zi(a,b,c){var d=Yi(a,b.contentType);$i(a,d);a={Zd:b,position:c};d=d.Kc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
299
- Xi.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Kc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Zd;break a}}d=null}if(e=d)e=c.Ue,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
300
- if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Ue=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function $i(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.Kc;b.Kc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.Kc=[]};function cj(a){cb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Q(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ha(2)}u(cj,cb);cj.prototype.release=function(){this.g.clear();this.h.stop();cb.prototype.release.call(this)};function dj(a){cb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Vb:null,Ub:ej,Mb:function(c,d){return fj(b,"enter",c,d)}},{Vb:gj,Ub:ej,Mb:function(c,d){return fj(b,"enter",c,d)}},{Vb:hj,Ub:ej,Mb:function(c,d){return fj(b,"enter",c,d)}},{Vb:ej,Ub:gj,Mb:function(c,d){return fj(b,"exit",c,d)}},{Vb:ej,Ub:hj,Mb:function(c,d){return fj(b,"exit",c,d)}},{Vb:gj,Ub:hj,Mb:function(c,d){return fj(b,"skip",c,d)}},{Vb:hj,Ub:gj,Mb:function(c,d){return fj(b,"skip",c,d)}}];this.h=new qf;this.h.o(this.i,"regionremove",
301
- function(c){b.g["delete"](c.region)})}u(dj,cb);dj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;cb.prototype.release.call(this)};dj.prototype.j=function(a,b){for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?gj:a>d.endTime?hj:ej;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Vb==e&&h.Ub==f&&h.Mb(d,b)}};
302
- function fj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var gj=1,ej=2,hj=3;function ij(a,b,c,d,e){a=gf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function jj(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.C=1;this.A=this.l=null;this.j=new Map;this.F=!1;this.G=null;this.B=!1;this.i=new of(function(){return kj(c)})}jj.prototype.destroy=function(){return this.i.destroy()};function kj(a){var b,c,d,e;return M(function(f){if(1==f.g){b=[];c=r(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,lj(e),b.push(mj(e));return A(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.h=null;C(f)})}
303
- jj.prototype.configure=function(a){this.h=a;this.G=new Pe({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)};jj.prototype.start=function(){var a=this;return M(function(b){if(1==b.g)return A(b,nj(a),2);pf(a.i);a.F=!0;C(b)})};
304
- function oj(a,b){var c,d,e,f,g,h;M(function(k){switch(k.g){case 1:return c=Nb,E(k,2),A(k,li(a.g.V,c.oa),4);case 4:va(k,3);break;case 2:if(d=I(k),a.g)a.g.onError(d);case 3:e=yd(b.mimeType,b.codecs);$h(a.g.V,e);f=a.g.V.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=pj(b),a.j.set(c.oa,h),qj(a,h,0);C(k)}})}function rj(a){var b=a.j.get(Mb);b&&(lj(b),mj(b)["catch"](function(){}),a.j["delete"](Mb));a.A=null}
305
- function sj(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Sb&&(tj(a,e,!1,0,!1),c.Sb=d)}else if(d=c.Sb)c.Sb=null,tj(a,d,!0,0,!1)}}function uj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.F&&(b.video&&tj(a,b.video,c,d,e),b.audio&&tj(a,b.audio,c,d,e))}function vj(a,b){a.A=b;a.F&&tj(a,b,!0,0,!1)}
306
- function tj(a,b,c,d,e){var f=a.j.get(b.type);f||b.type!=Mb?f&&(f.Sb&&(b.trickModeVideo?(f.Sb=b,b=b.trickModeVideo):f.Sb=null),f.stream!=b||e)&&(b.type==Mb&&$h(a.g.V,yd(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ua=null,c&&(f.yc?f.Bd=!0:f.Ta?(f.Eb=!0,f.Zc=d,f.Bd=!0):(lj(f),wj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),xj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):oj(a,b)}
307
- function xj(a,b){var c,d;return M(function(e){if(1==e.g){if(!b.Ma)return e["return"]();c=b.stream;d=b.Ma;return c.segmentIndex?e.D(2):A(e,c.createSegmentIndex(),2)}if(b.Ma!=d||b.stream!=c)return e["return"]();var f=a.g.ed();var g=ei(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.wa?k.wa-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.wa?k.wa-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
308
- f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Ma.h.g>h?!0:!1):f=!1;f&&b.Ma.abort();C(e)})}function yj(a,b){b.yc||b.Eb||(b.Ta?(b.Eb=!0,b.Zc=0):null==ci(a.g.V,b.type)?null==b.eb&&qj(a,b,0):(lj(b),wj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
309
- function nj(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){if(1==n.g){b=Nb;if(!a.l)throw new P(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Gb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.gb,a.l.video),d.add(a.l.video));a.A&&(c.set(b.oa,a.A),d.add(a.A));e=a.g.V;f=a.h.forceTransmuxTS;return A(n,e.init(c,f),2)}pf(a.i);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.V.bb(p):a.g.V.bb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||
310
- (m=pj(l),a.j.set(k,m),qj(a,m,0));C(n)})}function pj(a){return{stream:a,type:a.type,ua:null,Ra:null,kd:null,Xd:null,Wd:null,Vd:null,Sb:null,endOfStream:!1,Ta:!1,eb:null,Eb:!1,Zc:0,Bd:!1,yc:!1,je:!1,Gc:!1,Ma:null}}
311
- function zj(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:pf(a.i);if(b.Ta||null==b.eb||b.yc)return h["return"]();b.eb=null;if(!b.Eb){h.D(2);break}return A(h,wj(a,b,b.Bd,b.Zc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return A(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.eb&&qj(a,b,0),h["return"]();case 4:E(h,6);d=Aj(a,b);null!=d&&(qj(a,b,d),b.Gc=!1);va(h,7);break;case 6:return e=
312
- I(h),A(h,Bj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.j.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return A(h,a.g.V.endOfStream(),10);case 10:pf(a.i),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.bb(g),C(h)}})}
313
- function Aj(a,b){if(Cj(b))return ji(a.g.V,b.stream.originalId||""),null;b.type==Mb&&ki(a.g.V);var c=a.g.ed(),d=b.Ra?b.Ra.endTime:c,e=fi(a.g.V,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=ei(a.g.V,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.j.get(Mb))&&Cj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Dj(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;
314
- f=Infinity;g=Array.from(a.j.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,Cj(h)||h.ua&&!h.ua.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;Ej(a,b,c,e)["catch"](function(){});return null}
315
- function Dj(a,b,c,d){if(b.ua)return b.ua.current();if(b.Ra||d)return b.ua=b.stream.segmentIndex.Jb(b.Ra?b.Ra.endTime:d),b.ua&&b.ua.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ua=b.stream.segmentIndex.Jb(d),e=b.ua&&b.ua.next().value);e||(b.ua=b.stream.segmentIndex.Jb(c),e=b.ua&&b.ua.next().value);return e}
316
- function Ej(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,x,y,w,D;return M(function(z){switch(z.g){case 1:return e=Nb,f=b.stream,g=b.ua,b.Ta=!0,E(z,2),A(z,Fj(a,b,d),4);case 4:pf(a.i);if(a.B)return z["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),t=p=!1,v=function(B){var F,G,H;return M(function(J){if(p)return J["return"]();t=!0;pf(a.i);if(a.B)return J["return"]();n=Gj(n,B);F=!1;G=0;(new vg).box("mdat",function(K){G=
317
- K.size+K.start;F=!0}).parse(n,!1,!0);if(!F)return J.D(0);H=n.subarray(0,G);n=n.subarray(G);return A(J,Hj(a,b,c,f,d,H),0)})},A(z,Ij(a,b,d,v),9);l=Ij(a,b,d);return A(z,l,7);case 7:return m=z.h,pf(a.i),a.B?z["return"]():b.Eb?(b.Ta=!1,qj(a,b,0),z["return"]()):A(z,Hj(a,b,c,f,d,m),6);case 9:x=z.h;if(t){z.D(6);break}p=!0;pf(a.i);return a.B?z["return"]():b.Eb?(b.Ta=!1,qj(a,b,0),z["return"]()):A(z,Hj(a,b,c,f,d,x),6);case 6:pf(a.i);if(a.B)return z["return"]();b.Ra=d;g.next();b.Ta=!1;b.je=!1;y=a.g.V.zb();w=
318
- y[b.type];Xa(JSON.stringify(w));b.Eb||a.g.fe();qj(a,b,0);va(z,0);break;case 2:D=I(z);pf(a.i,D);if(a.B)return z["return"]();b.Ta=!1;if(7001==D.code)b.Ta=!1,b.eb=null,qj(a,b,0),z.D(0);else if(b.type==e.oa&&a.h.ignoreTextStreamFailures)a.j["delete"](e.oa),z.D(0);else if(3017==D.code)Jj(a,b,D),z.D(0);else if(1001==D.code&&D.data&&404==D.data[1])b.Ta=!1,b.eb=null,qj(a,b,1),z.D(0);else return b.Gc=!0,D.severity=2,A(z,Bj(a,D),0)}})}
319
- function Gj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Jj(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.je})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Gc=!0;a.B=!0;a.g.onError(c);return}b.je=!0}qj(a,b,4)}
320
- function Fj(a,b,c){var d,e,f,g,h,k,l;return M(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Xd||e!=b.Wd||f!=b.Vd)h=function(){var n;return M(function(p){if(1==p.g)return E(p,2),b.Wd=e,b.Vd=f,b.Xd=g,A(p,mi(a.g.V,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=I(p);b.Wd=null;b.Vd=null;b.Xd=null;throw n;})},d.push(h());!ri(c.g,b.kd)&&(b.kd=c.g)&&(k=Ij(a,b,c.g),l=function(){var n,p,t;return M(function(v){switch(v.g){case 1:return E(v,2),A(v,k,4);
321
- case 4:return n=v.h,pf(a.i),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,A(v,gi(a.g.V,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw t=I(v),b.kd=null,t;}})},a.g.Lg(c.startTime,c.g),d.push(l()));return A(m,Promise.all(d),0)})}
322
- function Hj(a,b,c,d,e,f){var g;return M(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new vg).X("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Lc();var n=k.reader.Lc();var p=k.reader.P();var t=k.reader.P();var v=k.reader.P();var x=k.reader.P();var y=e.startTime+t/p}else p=k.reader.P(),y=k.reader.lc()/p+e.timestampOffset,t=y-e.startTime,v=k.reader.P(),x=k.reader.P(),
323
- m=k.reader.Lc(),n=k.reader.Lc();k=k.reader.Cb(k.reader.U.byteLength-k.reader.ia());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Mg():(l=(new Map).set("detail",{startTime:y,endTime:y+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:x,messageData:k}),l=new O(Kj,l),a.g.onEvent(l))}).parse(f),A(h,Lj(a,b,c),2);if(3!=h.g)return pf(a.i),A(h,gi(a.g.V,b.type,f,e.startTime,e.endTime,g),3);pf(a.i);C(h)})}
324
- function Lj(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=ci(a.g.V,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():A(h,a.g.V.remove(b.type,e,e+g),2)}pf(a.i);C(h)})}function Cj(a){return a&&a.type==Mb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
325
- function Ij(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=nf,f=ij(c.Ka(),c.Ha,c.wa,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof qi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Qb.request(e,f),b.Ma=h,A(l,h.promise,2);k=l.h;b.Ma=null;return l["return"](k.data)})}
326
- function wj(a,b,c,d){var e,f;return M(function(g){if(1==g.g)return b.Eb=!1,b.Bd=!1,b.Zc=0,b.yc=!0,b.Ra=null,b.kd=null,b.ua=null,d?(e=a.g.ed(),f=a.g.V.getDuration(),A(g,a.g.V.remove(b.type,e+d,f),3)):A(g,li(a.g.V,b.type),4);if(3!=g.g)return pf(a.i),c?A(g,a.g.V.flush(b.type),3):g.D(3);pf(a.i);b.yc=!1;b.endOfStream=!1;qj(a,b,0);C(g)})}
327
- function qj(a,b,c){var d=b.type;if(d!=Mb||a.j.has(d))b.eb=(new Rc(function(){var e;return M(function(f){if(1==f.g)return E(f,2),A(f,zj(a,b),4);if(2!=f.g)return va(f,0);e=I(f);if(a.g)a.g.onError(e);C(f)})})).S(c)}function lj(a){null!=a.eb&&(a.eb.stop(),a.eb=null)}function mj(a){return M(function(b){return a.Ma?A(b,a.Ma.abort(),0):b.D(0)})}function Bj(a,b){return M(function(c){if(1==c.g)return A(c,Re(a.G),2);pf(a.i);a.g.onError(b);b.handled||a.h.failureCallback(b);C(c)})};function Mj(a,b){var c=Nj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Oj(d)});this.B=new of(function(){return Pj(d)})}Mj.prototype.destroy=function(){return this.B.destroy()};function Pj(a){var b,c,d;return M(function(e){if(1==e.g)return a.h&&a.h.abort(),Qj(a),A(e,a.C,2);a.g&&a.g.ab.Rb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.ab.Rb();a.g=null;a.m=[];a.j=null;C(e)})}
328
- function Rj(a,b){var c={ic:function(){},pd:function(){},Rb:function(){},onError:function(){},rd:function(){},Ji:function(){}};a.m.push({create:b,ab:c});a.h&&a.h.abort();Qj(a);return c}
329
- function Oj(a){return M(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Lb)var c=!1;else{a.g&&(a.g.ab.Rb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.ab.ic(),a.g={node:d.node,payload:d.payload,Lb:d.Lb,ab:c.ab}):c.ab.rd();c=!0}c?c=Promise.resolve():a.g?c=Sj(a):(a.j.Kg(a.i),a.A=new Pc,c=a.A);b=A(b,c,1)}return b})}
330
- function Sj(a){var b,c;return M(function(d){switch(d.g){case 1:return a.i=a.j.og(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.Tf(a.i,a.l,a.g.payload),A(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.ab.pd(),a.g=null);va(d,0);break;case 2:b=I(d);if(7001==b.code)a.g.ab.Rb();else a.g.ab.onError(b);a.g=null;a.h=null;c=a;return A(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,C(d)}})}function Qj(a){a.A&&(a.A.resolve(),a.A=null)};function Tj(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Tj.prototype;q.remove=function(a,b){if(!this.g)return!1;Uj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
298
+ q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.O.length;)if(this.O[this.O.length-1].startTime>=b)this.O.pop();else break;for(;this.O.length;)if(this.O[0].endTime<=a)this.O.shift(),c||this.h++;else break;0!=this.O.length&&(a=this.O[this.O.length-1],this.O[this.O.length-1]=new Ni(a.startTime,b,a.j,a.Ha,a.wa,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}};
299
+ q.yd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new Q(function(){var d=b();d?c.O.push.apply(c.O,ia(d)):(c.g.stop(),c.g=null)}),this.g.ha(a))};lj.prototype[Symbol.iterator]=function(){return this.Jb(0)};lj.prototype.Jb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new mj(this,b,d)};
300
+ function nj(a,b,c){return new lj([new Ni(a,a+b,function(){return c},0,null,null,a,a,a+b)])}N("shaka.media.SegmentIndex",lj);lj.forSingleSegment=nj;lj.prototype.getIteratorForTime=lj.prototype.Jb;lj.prototype.updateEvery=lj.prototype.yd;lj.prototype.fit=lj.prototype.yb;lj.prototype.evict=lj.prototype.Hb;lj.prototype.mergeAndEvict=lj.prototype.fc;lj.prototype.merge=lj.prototype.ec;lj.prototype.offset=lj.prototype.offset;lj.prototype.get=lj.prototype.get;lj.prototype.find=lj.prototype.find;
301
+ lj.prototype.markImmutable=lj.prototype.Lg;lj.prototype.release=lj.prototype.release;lj.prototype.destroy=lj.prototype.destroy;function mj(a,b,c){this.i=a;this.h=b;this.g=c}mj.prototype.seek=function(a){zb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.Jb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
302
+ mj.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.Ka().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};mj.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.Ka().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};N("shaka.media.SegmentIterator",mj);mj.prototype.next=mj.prototype.next;mj.prototype.current=mj.prototype.current;
303
+ mj.prototype.seek=mj.prototype.seek;function oj(){lj.call(this,[]);this.j=[]}u(oj,lj);q=oj.prototype;q.clone=function(){var a=new oj;a.j=this.j.slice();return a};q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(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.O.length}return null};
304
+ q.get=function(a){for(var b=0,c=r(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.O.length}return null};q.offset=function(){};q.ec=function(){};q.Hb=function(){};q.fc=function(){};q.yb=function(){};q.yd=function(){};N("shaka.media.MetaSegmentIndex",oj);oj.prototype.updateEvery=oj.prototype.yd;oj.prototype.fit=oj.prototype.yb;oj.prototype.mergeAndEvict=oj.prototype.fc;oj.prototype.evict=oj.prototype.Hb;oj.prototype.merge=oj.prototype.ec;
305
+ oj.prototype.offset=oj.prototype.offset;oj.prototype.get=oj.prototype.get;oj.prototype.find=oj.prototype.find;oj.prototype.release=oj.prototype.release;function pj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.gd();this.h=new Q(function(){b.g.rf(.25*b.i)})}pj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};pj.prototype.set=function(a){this.i=a;qj(this)};pj.prototype.dd=function(){return this.g.dd()};function qj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.gd()!=b&&a.g.ze(b);return}catch(c){}a.h.ha(.25);0!=a.g.gd()&&a.g.ze(0)};function rj(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){sj(b,!1)})).ha(.25)}rj.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function sj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function tj(a){cb.call(this);this.g=new Map;this.h=a}u(tj,cb);tj.prototype.release=function(){this.g.clear();cb.prototype.release.call(this)};function uj(a,b){var c=a.g.get(b);c||(c={Kc:[],Xe:null,contentType:b},a.g.set(b,c));return c}function vj(a,b,c){var d=uj(a,b.contentType);wj(a,d);a={be:b,position:c};d=d.Kc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
306
+ tj.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Kc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.be;break a}}d=null}if(e=d)e=c.Xe,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
307
+ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Xe=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function wj(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.Kc;b.Kc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.Kc=[]};function xj(a){cb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Q(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ha(2)}u(xj,cb);xj.prototype.release=function(){this.g.clear();this.h.stop();cb.prototype.release.call(this)};function yj(a){cb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Vb:null,Ub:zj,Mb:function(c,d){return Aj(b,"enter",c,d)}},{Vb:Bj,Ub:zj,Mb:function(c,d){return Aj(b,"enter",c,d)}},{Vb:Cj,Ub:zj,Mb:function(c,d){return Aj(b,"enter",c,d)}},{Vb:zj,Ub:Bj,Mb:function(c,d){return Aj(b,"exit",c,d)}},{Vb:zj,Ub:Cj,Mb:function(c,d){return Aj(b,"exit",c,d)}},{Vb:Bj,Ub:Cj,Mb:function(c,d){return Aj(b,"skip",c,d)}},{Vb:Cj,Ub:Bj,Mb:function(c,d){return Aj(b,"skip",c,d)}}];this.h=new qf;this.h.o(this.i,"regionremove",
308
+ function(c){b.g["delete"](c.region)})}u(yj,cb);yj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;cb.prototype.release.call(this)};yj.prototype.j=function(a,b){for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Bj:a>d.endTime?Cj:zj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Vb==e&&h.Ub==f&&h.Mb(d,b)}};
309
+ function Aj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Bj=1,zj=2,Cj=3;function Dj(a,b,c,d,e){a=gf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Ej(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.C=1;this.A=this.l=null;this.j=new Map;this.F=!1;this.G=null;this.B=!1;this.i=new of(function(){return Fj(c)})}Ej.prototype.destroy=function(){return this.i.destroy()};function Fj(a){var b,c,d,e;return M(function(f){if(1==f.g){b=[];c=r(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,Gj(e),b.push(Hj(e));return A(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.h=null;C(f)})}
310
+ Ej.prototype.configure=function(a){this.h=a;this.G=new Pe({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)};Ej.prototype.start=function(){var a=this;return M(function(b){if(1==b.g)return A(b,Ij(a),2);pf(a.i);a.F=!0;C(b)})};
311
+ function Jj(a,b){var c,d,e,f,g,h;M(function(k){switch(k.g){case 1:return c=Nb,E(k,2),A(k,Gi(a.g.V,c.oa),4);case 4:va(k,3);break;case 2:if(d=I(k),a.g)a.g.onError(d);case 3:e=yd(b.mimeType,b.codecs);ui(a.g.V,e);f=a.g.V.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=Kj(b),a.j.set(c.oa,h),Lj(a,h,0);C(k)}})}function Mj(a){var b=a.j.get(Mb);b&&(Gj(b),Hj(b)["catch"](function(){}),a.j["delete"](Mb));a.A=null}
312
+ function Nj(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Sb&&(Oj(a,e,!1,0,!1),c.Sb=d)}else if(d=c.Sb)c.Sb=null,Oj(a,d,!0,0,!1)}}function Pj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.F&&(b.video&&Oj(a,b.video,c,d,e),b.audio&&Oj(a,b.audio,c,d,e))}function Qj(a,b){a.A=b;a.F&&Oj(a,b,!0,0,!1)}
313
+ function Oj(a,b,c,d,e){var f=a.j.get(b.type);f||b.type!=Mb?f&&(f.Sb&&(b.trickModeVideo?(f.Sb=b,b=b.trickModeVideo):f.Sb=null),f.stream!=b||e)&&(b.type==Mb&&ui(a.g.V,yd(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ua=null,c&&(f.yc?f.Cd=!0:f.ab?(f.Eb=!0,f.$c=d,f.Cd=!0):(Gj(f),Rj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Sj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):Jj(a,b)}
314
+ function Sj(a,b){var c,d;return M(function(e){if(1==e.g){if(!b.Ma)return e["return"]();c=b.stream;d=b.Ma;return c.segmentIndex?e.D(2):A(e,c.createSegmentIndex(),2)}if(b.Ma!=d||b.stream!=c)return e["return"]();var f=a.g.fd();var g=zi(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.wa?k.wa-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.wa?k.wa-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
315
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Ma.h.g>h?!0:!1):f=!1;f&&b.Ma.abort();C(e)})}function Tj(a,b){b.yc||b.Eb||(b.ab?(b.Eb=!0,b.$c=0):null==xi(a.g.V,b.type)?null==b.sb&&Lj(a,b,0):(Gj(b),Rj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
316
+ function Ij(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){if(1==n.g){b=Nb;if(!a.l)throw new P(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Gb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.fb,a.l.video),d.add(a.l.video));a.A&&(c.set(b.oa,a.A),d.add(a.A));e=a.g.V;f=a.h.forceTransmuxTS;return A(n,e.init(c,f),2)}pf(a.i);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.V.bb(p):a.g.V.bb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||
317
+ (m=Kj(l),a.j.set(k,m),Lj(a,m,0));C(n)})}function Kj(a){return{stream:a,type:a.type,ua:null,Ra:null,ld:null,$d:null,Zd:null,Yd:null,Sb:null,endOfStream:!1,ab:!1,sb:null,Eb:!1,$c:0,Cd:!1,yc:!1,me:!1,Gc:!1,Ma:null}}
318
+ function Uj(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:pf(a.i);if(b.ab||null==b.sb||b.yc)return h["return"]();b.sb=null;if(!b.Eb){h.D(2);break}return A(h,Rj(a,b,b.Cd,b.$c),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return A(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.sb&&Lj(a,b,0),h["return"]();case 4:E(h,6);d=Vj(a,b);null!=d&&(Lj(a,b,d),b.Gc=!1);va(h,7);break;case 6:return e=
319
+ I(h),A(h,Wj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.j.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return A(h,a.g.V.endOfStream(),10);case 10:pf(a.i),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.bb(g),C(h)}})}
320
+ function Vj(a,b){if(Xj(b))return Ei(a.g.V,b.stream.originalId||""),null;b.type==Mb&&Fi(a.g.V);var c=a.g.fd(),d=b.Ra?b.Ra.endTime:c,e=Ai(a.g.V,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=zi(a.g.V,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.j.get(Mb))&&Xj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Yj(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;
321
+ f=Infinity;g=Array.from(a.j.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,Xj(h)||h.ua&&!h.ua.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;Zj(a,b,c,e)["catch"](function(){});return null}
322
+ function Yj(a,b,c,d){if(b.ua)return b.ua.current();if(b.Ra||d)return b.ua=b.stream.segmentIndex.Jb(b.Ra?b.Ra.endTime:d),b.ua&&b.ua.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ua=b.stream.segmentIndex.Jb(d),e=b.ua&&b.ua.next().value);e||(b.ua=b.stream.segmentIndex.Jb(c),e=b.ua&&b.ua.next().value);return e}
323
+ function Zj(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,x,y,w,D;return M(function(z){switch(z.g){case 1:return e=Nb,f=b.stream,g=b.ua,b.ab=!0,E(z,2),A(z,ak(a,b,d),4);case 4:pf(a.i);if(a.B)return z["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),t=p=!1,v=function(B){var F,G,H;return M(function(J){if(p)return J["return"]();t=!0;pf(a.i);if(a.B)return J["return"]();n=bk(n,B);F=!1;G=0;(new Qg).box("mdat",function(K){G=
324
+ K.size+K.start;F=!0}).parse(n,!1,!0);if(!F)return J.D(0);H=n.subarray(0,G);n=n.subarray(G);return A(J,ck(a,b,c,f,d,H),0)})},A(z,dk(a,b,d,v),9);l=dk(a,b,d);return A(z,l,7);case 7:return m=z.h,pf(a.i),a.B?z["return"]():b.Eb?(b.ab=!1,Lj(a,b,0),z["return"]()):A(z,ck(a,b,c,f,d,m),6);case 9:x=z.h;if(t){z.D(6);break}p=!0;pf(a.i);return a.B?z["return"]():b.Eb?(b.ab=!1,Lj(a,b,0),z["return"]()):A(z,ck(a,b,c,f,d,x),6);case 6:pf(a.i);if(a.B)return z["return"]();b.Ra=d;g.next();b.ab=!1;b.me=!1;y=a.g.V.zb();w=
325
+ y[b.type];Xa(JSON.stringify(w));b.Eb||a.g.je();Lj(a,b,0);va(z,0);break;case 2:D=I(z);pf(a.i,D);if(a.B)return z["return"]();b.ab=!1;if(7001==D.code)b.ab=!1,b.sb=null,Lj(a,b,0),z.D(0);else if(b.type==e.oa&&a.h.ignoreTextStreamFailures)a.j["delete"](e.oa),z.D(0);else if(3017==D.code)ek(a,b,D),z.D(0);else return b.Gc=!0,D.severity=2,A(z,Wj(a,D),0)}})}function bk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
326
+ function ek(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.me})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Gc=!0;a.B=!0;a.g.onError(c);return}b.me=!0}Lj(a,b,4)}
327
+ function ak(a,b,c){var d,e,f,g,h,k,l;return M(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.$d||e!=b.Zd||f!=b.Yd)h=function(){var n;return M(function(p){if(1==p.g)return E(p,2),b.Zd=e,b.Yd=f,b.$d=g,A(p,Hi(a.g.V,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=I(p);b.Zd=null;b.Yd=null;b.$d=null;throw n;})},d.push(h());!Mi(c.g,b.ld)&&(b.ld=c.g)&&(k=dk(a,b,c.g),l=function(){var n,p,t;return M(function(v){switch(v.g){case 1:return E(v,2),A(v,k,4);
328
+ case 4:return n=v.h,pf(a.i),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,A(v,Bi(a.g.V,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw t=I(v),b.ld=null,t;}})},a.g.Pg(c.startTime,c.g),d.push(l()));return A(m,Promise.all(d),0)})}
329
+ function ck(a,b,c,d,e,f){var g;return M(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new Qg).X("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Lc();var n=k.reader.Lc();var p=k.reader.P();var t=k.reader.P();var v=k.reader.P();var x=k.reader.P();var y=e.startTime+t/p}else p=k.reader.P(),y=k.reader.lc()/p+e.timestampOffset,t=y-e.startTime,v=k.reader.P(),x=k.reader.P(),
330
+ m=k.reader.Lc(),n=k.reader.Lc();k=k.reader.Cb(k.reader.U.byteLength-k.reader.ia());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Qg():(l=(new Map).set("detail",{startTime:y,endTime:y+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:x,messageData:k}),l=new O(fk,l),a.g.onEvent(l))}).parse(f),A(h,gk(a,b,c),2);if(3!=h.g)return pf(a.i),A(h,Bi(a.g.V,b.type,f,e.startTime,e.endTime,g),3);pf(a.i);C(h)})}
331
+ function gk(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=xi(a.g.V,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():A(h,a.g.V.remove(b.type,e,e+g),2)}pf(a.i);C(h)})}function Xj(a){return a&&a.type==Mb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
332
+ function dk(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=nf,f=Dj(c.Ka(),c.Ha,c.wa,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof Li,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Qb.request(e,f),b.Ma=h,A(l,h.promise,2);k=l.h;b.Ma=null;return l["return"](k.data)})}
333
+ function Rj(a,b,c,d){var e,f;return M(function(g){if(1==g.g)return b.Eb=!1,b.Cd=!1,b.$c=0,b.yc=!0,b.Ra=null,b.ld=null,b.ua=null,d?(e=a.g.fd(),f=a.g.V.getDuration(),A(g,a.g.V.remove(b.type,e+d,f),3)):A(g,Gi(a.g.V,b.type),4);if(3!=g.g)return pf(a.i),c?A(g,a.g.V.flush(b.type),3):g.D(3);pf(a.i);b.yc=!1;b.endOfStream=!1;Lj(a,b,0);C(g)})}
334
+ function Lj(a,b,c){var d=b.type;if(d!=Mb||a.j.has(d))b.sb=(new Rc(function(){var e;return M(function(f){if(1==f.g)return E(f,2),A(f,Uj(a,b),4);if(2!=f.g)return va(f,0);e=I(f);if(a.g)a.g.onError(e);C(f)})})).R(c)}function Gj(a){null!=a.sb&&(a.sb.stop(),a.sb=null)}function Hj(a){return M(function(b){return a.Ma?A(b,a.Ma.abort(),0):b.D(0)})}function Wj(a,b){return M(function(c){if(1==c.g)return A(c,Re(a.G),2);pf(a.i);a.g.onError(b);b.handled||a.h.failureCallback(b);C(c)})};function hk(a,b){var c=ik(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return jk(d)});this.B=new of(function(){return kk(d)})}hk.prototype.destroy=function(){return this.B.destroy()};function kk(a){var b,c,d;return M(function(e){if(1==e.g)return a.h&&a.h.abort(),lk(a),A(e,a.C,2);a.g&&a.g.$a.Rb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.$a.Rb();a.g=null;a.m=[];a.j=null;C(e)})}
335
+ function mk(a,b){var c={ic:function(){},qd:function(){},Rb:function(){},onError:function(){},sd:function(){},Ni:function(){}};a.m.push({create:b,$a:c});a.h&&a.h.abort();lk(a);return c}
336
+ function jk(a){return M(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Lb)var c=!1;else{a.g&&(a.g.$a.Rb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.$a.ic(),a.g={node:d.node,payload:d.payload,Lb:d.Lb,$a:c.$a}):c.$a.sd();c=!0}c?c=Promise.resolve():a.g?c=nk(a):(a.j.Og(a.i),a.A=new Pc,c=a.A);b=A(b,c,1)}return b})}
337
+ function nk(a){var b,c;return M(function(d){switch(d.g){case 1:return a.i=a.j.sg(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.Xf(a.i,a.l,a.g.payload),A(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.$a.qd(),a.g=null);va(d,0);break;case 2:b=I(d);if(7001==b.code)a.g.$a.Rb();else a.g.$a.onError(b);a.g=null;a.h=null;c=a;return A(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,C(d)}})}function lk(a){a.A&&(a.A.resolve(),a.A=null)};function ok(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=ok.prototype;q.remove=function(a,b){if(!this.g)return!1;pk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
331
338
  q.append=function(a){function b(h,k){for(var l=r(h),m=l.next();!m.done;m=l.next())if(m=m.value,m.isContainer)b(m.nestedCues,k);else{var n=m.clone();n.nestedCues=[];n.payload=c(m);k.push(n)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},"");k=k.reduceRight(function(p,t){return p+"</"+t+">"},"");return h.lineBreak||h.spacer?(h.spacer&&zb("shaka.extern.Cue",
332
- "Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(c).join(""):l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=r(d);for(var g=d.next();!g.done;f={Wb:f.Wb},g=d.next())f.Wb=g.value,a.some(function(h){return function(k){return k.startTime==h.Wb.startTime&&k.endTime==h.Wb.endTime&&k.text==h.Wb.payload?!0:!1}}(f))||(g=Vj(f.Wb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=
333
- k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-e.indexOf(k)});a=r(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};q.destroy=function(){this.g&&(Uj(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"};
334
- function Vj(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}
335
- function Uj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}N("shaka.text.SimpleTextDisplayer",Tj);Tj.prototype.setTextVisibility=Tj.prototype.setTextVisibility;Tj.prototype.isTextVisible=Tj.prototype.isTextVisible;Tj.prototype.destroy=Tj.prototype.destroy;Tj.prototype.append=Tj.prototype.append;Tj.prototype.remove=Tj.prototype.remove;function Wj(){}function S(a){return document.createElement(a)}function Xj(){return document.createElement("button")}function Yj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}N("shaka.util.Dom",Wj);Wj.removeAllChildren=Yj;function Zj(a,b){var c=this;this.j=!1;this.i=[];this.F=a;this.m=b;this.g=S("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.C=(new Q(function(){ak(c)})).ha(.25);this.h=new Map;this.B=new qf;this.B.o(document,"fullscreenchange",function(){ak(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){ak(c,
336
- !0)}),this.l.observe(this.g));this.A=new Map}q=Zj.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={Qc:c.Qc},d=a.next())c.Qc=d.value,b.some(function(e){return function(f){return wc(f,e.Qc)}}(c))||this.i.push(c.Qc);ak(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.C&&this.C.stop();this.h.clear();this.B&&(this.B.release(),this.B=null);this.l&&(this.l.disconnect(),this.l=null)};
337
- q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});ak(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
338
- function bk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Ff:null;l&&(g.push(l.Sd),l.Mc&&g.push(l.Mc),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(ck(a,k,e),l=a.h.get(k),n=l.Ff,f=!0));0<k.nestedCues.length&&n&&bk(a,k.nestedCues,n,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,t){return p.startTime!=t.startTime?
339
- p.startTime-t.startTime:p.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Mc?(c.appendChild(d.Mc),d.Mc.appendChild(d.Sd)):c.appendChild(d.Sd)}}function ak(a,b){if(a.g){var c=a.F.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=r(a.A.values()),e=d.next();!e.done;e=d.next())Yj(e.value);Yj(a.g);a.h.clear();a.A.clear()}if(a.j){d=new Map;e=r(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));bk(a,a.i,a.g,c,[])}}}
340
- function ck(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&zb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=S(e);"br"!=e&&dk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.A.has(c.id))c=a.A.get(c.id);else{e=S("span");var g=c.heightUnits==Dc?"%":"px",h=c.widthUnits==Dc?"%":"px",k=c.viewportAnchorUnits==Dc?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+
341
- g;e.style.width=c.width+h;e.style.position="absolute";e.style.top=c.viewportAnchorY+k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.A.set(c.id,e);c=e}e=f;d&&(e=S("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{Sd:f,Ff:e,Mc:c})}
342
- function dk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=ek(c.linePadding,c,a.m);f.paddingRight=ek(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
343
- "contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=S("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=fk(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"==
344
- c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=ek(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==qc?(f.width="100%",c.lineAlign==sc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==sc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=
339
+ "Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(c).join(""):l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=r(d);for(var g=d.next();!g.done;f={Wb:f.Wb},g=d.next())f.Wb=g.value,a.some(function(h){return function(k){return k.startTime==h.Wb.startTime&&k.endTime==h.Wb.endTime&&k.text==h.Wb.payload?!0:!1}}(f))||(g=qk(f.Wb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=
340
+ k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-e.indexOf(k)});a=r(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};q.destroy=function(){this.g&&(pk(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"};
341
+ function qk(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}
342
+ function pk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}N("shaka.text.SimpleTextDisplayer",ok);ok.prototype.setTextVisibility=ok.prototype.setTextVisibility;ok.prototype.isTextVisible=ok.prototype.isTextVisible;ok.prototype.destroy=ok.prototype.destroy;ok.prototype.append=ok.prototype.append;ok.prototype.remove=ok.prototype.remove;function rk(){}function S(a){return document.createElement(a)}function sk(){return document.createElement("button")}function tk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}N("shaka.util.Dom",rk);rk.removeAllChildren=tk;function uk(a,b){var c=this;this.j=!1;this.i=[];this.F=a;this.m=b;this.g=S("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.C=(new Q(function(){vk(c)})).ha(.25);this.h=new Map;this.B=new qf;this.B.o(document,"fullscreenchange",function(){vk(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){vk(c,
343
+ !0)}),this.l.observe(this.g));this.A=new Map}q=uk.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={Qc:c.Qc},d=a.next())c.Qc=d.value,b.some(function(e){return function(f){return wc(f,e.Qc)}}(c))||this.i.push(c.Qc);vk(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.C&&this.C.stop();this.h.clear();this.B&&(this.B.release(),this.B=null);this.l&&(this.l.disconnect(),this.l=null)};
344
+ q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});vk(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
345
+ function wk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Jf:null;l&&(g.push(l.Vd),l.Mc&&g.push(l.Mc),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(xk(a,k,e),l=a.h.get(k),n=l.Jf,f=!0));0<k.nestedCues.length&&n&&wk(a,k.nestedCues,n,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,t){return p.startTime!=t.startTime?
346
+ p.startTime-t.startTime:p.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Mc?(c.appendChild(d.Mc),d.Mc.appendChild(d.Vd)):c.appendChild(d.Vd)}}function vk(a,b){if(a.g){var c=a.F.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=r(a.A.values()),e=d.next();!e.done;e=d.next())tk(e.value);tk(a.g);a.h.clear();a.A.clear()}if(a.j){d=new Map;e=r(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));wk(a,a.i,a.g,c,[])}}}
347
+ function xk(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&zb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=S(e);"br"!=e&&yk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.A.has(c.id))c=a.A.get(c.id);else{e=S("span");var g=c.heightUnits==Dc?"%":"px",h=c.widthUnits==Dc?"%":"px",k=c.viewportAnchorUnits==Dc?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+
348
+ g;e.style.width=c.width+h;e.style.position="absolute";e.style.top=c.viewportAnchorY+k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.A.set(c.id,e);c=e}e=f;d&&(e=S("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{Vd:f,Jf:e,Mc:c})}
349
+ function yk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=zk(c.linePadding,c,a.m);f.paddingRight=zk(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
350
+ "contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=S("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Ak(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"==
351
+ c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=zk(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==qc?(f.width="100%",c.lineAlign==sc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==sc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=
345
352
  c.line+"%")):(f.height="100%",c.lineAlign==sc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%")));f.lineHeight=c.lineHeight;c.position&&(c.writingMode==qc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=
346
- c.writingMode);c.size&&(c.writingMode==qc?f.width=c.size+"%":f.height=c.size+"%")}function ek(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function fk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}
347
- N("shaka.text.UITextDisplayer",Zj);Zj.prototype.setTextVisibility=Zj.prototype.setTextVisibility;Zj.prototype.isTextVisible=Zj.prototype.isTextVisible;Zj.prototype.remove=Zj.prototype.remove;Zj.prototype.destroy=Zj.prototype.destroy;Zj.prototype.append=Zj.prototype.append;function gk(a,b){function c(h){for(var k=h,l=r(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,t){return p+"<"+t+">"},
353
+ c.writingMode);c.size&&(c.writingMode==qc?f.width=c.size+"%":f.height=c.size+"%")}function zk(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function Ak(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}
354
+ N("shaka.text.UITextDisplayer",uk);uk.prototype.setTextVisibility=uk.prototype.setTextVisibility;uk.prototype.isTextVisible=uk.prototype.isTextVisible;uk.prototype.remove=uk.prototype.remove;uk.prototype.destroy=uk.prototype.destroy;uk.prototype.append=uk.prototype.append;function Bk(a,b){function c(h){for(var k=h,l=r(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,t){return p+"<"+t+">"},
348
355
  "");k=k.reduceRight(function(p,t){return p+"</"+t+">"},"");return h.lineBreak||h.spacer?(h.spacer&&zb("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=r(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");
349
- break;case "right":k.push("align:right");break;case pc: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}N("shaka.text.WebVttGenerator",function(){});function hk(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function ik(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?jk:kk};d.ot=lk(c);var e=d.ot===mk||d.ot===nk||d.ot===ok||d.ot===pk;e&&(d.bl=qk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==pk&&(d.tb=rk(a,d.ot)/1E3);sk(a,b,d)}}catch(f){Ta("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
350
- function tk(a,b,c){try{if(!a.g.enabled)return b;var d=uk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=ok;break a;case "application/x-mpegurl":e=vk;break a}e=void 0}d.ot=e;d.su=!0;var f=wk(d);return xk(b,f)}catch(g){return Ta("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function yk(a,b){try{if(!a.g.enabled)return b;var c=uk(a);c.ot=zk;c.su=!0;var d=wk(c);return xk(b,d)}catch(e){return Ta("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),b}}
351
- function uk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.A,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function sk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,uk(a));c.pr=a.h.Ab();var e=c.ot===mk||c.ot===ok;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Ak(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=wk(c);f&&(b.uris=b.uris.map(function(g){return xk(g,f)}))}}}
352
- function lk(a){var b=a.type;if(a.init)return Bk;if("video"==b)return a.codecs.includes(",")?ok:mk;if("audio"==b)return nk;if("text"==b)return"application/mp4"===a.mimeType?pk:zk}function qk(a,b){var c=a.h.zb()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
353
- function rk(a,b){var c=a.h.$a();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case mk:return d.videoBandwidth||NaN;case nk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
354
- function wk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
355
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Ak(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=wk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
356
- function xk(a,b){if(!b||a.includes("offline:"))return a;var c=new jb(a);c.g.set("CMCD",b);return c.toString()}var vk="m",nk="a",mk="v",ok="av",Bk="i",zk="c",pk="tt",kk="v",jk="l";N("shaka.util.CmcdManager.StreamingFormat",{vh:"d",Kh:"h",ni:"s",Yh:"o"});function Ck(){}
357
- function Dk(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]=Ze(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ze(l)),k=Dk(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?(Ra("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Sa("Unexpected number of arguments for "+k),a[h]=b[h]):(Ra("Invalid config, unrecognized key "+
358
- k),g=!1)}return g}function Ek(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Fk(a,b){return a&&b}N("shaka.util.ConfigUtils",Ck);Ck.convertToConfigObject=Ek;Ck.mergeConfigObjects=Dk;function Gk(){}
359
- function Hk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Qe(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:cg,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Qe(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
356
+ break;case "right":k.push("align:right");break;case pc: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}N("shaka.text.WebVttGenerator",function(){});function Ck(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function Dk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?Ek:Fk};d.ot=Gk(c);var e=d.ot===Hk||d.ot===Ik||d.ot===Jk||d.ot===Kk;e&&(d.bl=Lk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==Kk&&(d.tb=Mk(a,d.ot)/1E3);Nk(a,b,d)}}catch(f){Ta("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
357
+ function Ok(a,b,c){try{if(!a.g.enabled)return b;var d=Pk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=Jk;break a;case "application/x-mpegurl":e=Qk;break a}e=void 0}d.ot=e;d.su=!0;var f=Rk(d);return Sk(b,f)}catch(g){return Ta("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Tk(a,b){try{if(!a.g.enabled)return b;var c=Pk(a);c.ot=Uk;c.su=!0;var d=Rk(c);return Sk(b,d)}catch(e){return Ta("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),b}}
358
+ function Pk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.A,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function Nk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Pk(a));c.pr=a.h.Ab();var e=c.ot===Hk||c.ot===Jk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Vk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Rk(c);f&&(b.uris=b.uris.map(function(g){return Sk(g,f)}))}}}
359
+ function Gk(a){var b=a.type;if(a.init)return Wk;if("video"==b)return a.codecs.includes(",")?Jk:Hk;if("audio"==b)return Ik;if("text"==b)return"application/mp4"===a.mimeType?Kk:Uk}function Lk(a,b){var c=a.h.zb()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
360
+ function Mk(a,b){var c=a.h.Za();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case Hk:return d.videoBandwidth||NaN;case Ik:return d.audioBandwidth||NaN;default:return d.bandwidth}}
361
+ function Rk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
362
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Vk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Rk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
363
+ function Sk(a,b){if(!b||a.includes("offline:"))return a;var c=new jb(a);c.g.set("CMCD",b);return c.toString()}var Qk="m",Ik="a",Hk="v",Jk="av",Wk="i",Uk="c",Kk="tt",Fk="v",Ek="l";N("shaka.util.CmcdManager.StreamingFormat",{Ah:"d",Oh:"h",si:"s",bi:"o"});function Xk(){}
364
+ function Yk(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]=Ze(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ze(l)),k=Yk(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?(Ra("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Sa("Unexpected number of arguments for "+k),a[h]=b[h]):(Ra("Invalid config, unrecognized key "+
365
+ k),g=!1)}return g}function Zk(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function $k(a,b){return a&&b}N("shaka.util.ConfigUtils",Xk);Xk.convertToConfigObject=Zk;Xk.mergeConfigObjects=Yk;function al(){}
366
+ function bl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Qe(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:yg,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Qe(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
360
367
  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"},
361
- manifestPreprocessor:function(g){return Fk([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E"}},d={retryParameters:Qe(),failureCallback:function(g){return Fk([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,
368
+ manifestPreprocessor:function(g){return $k([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E"}},d={retryParameters:Qe(),failureCallback:function(g){return $k([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,
362
369
  safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||Yc()||$c())d.gapDetectionThreshold=.5;if(Zc()||Yc()||$c())d.stallSkip=0;var e={trackSelectionCallback:function(g){return M(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;
363
- return M(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?A(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return Fk([g,h],void 0)},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new ye},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,
370
+ return M(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?A(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return $k([g,h],void 0)},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new ye},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,
364
371
  maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,
365
- maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return M(function(h){return h["return"](Ik(g,f.preferredAudioLanguage))})};return f}
366
- function Jk(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 Dk(a,b,c||Hk(),d,"")}
367
- function Ik(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Yb(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Qb(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/
368
- 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Mb&&"image"!=g.type||c.push(g);return c}N("shaka.util.PlayerConfiguration",Gk);Gk.mergeConfigObjects=Jk;function Kk(){this.g=null;this.h=[]}function Lk(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 Mk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
369
- function Nk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Ok(){this.i=this.h=null;this.g=[]}function Pk(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 Qk(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new Kk;this.h=new Ok};function T(a,b){cb.call(this);var c=this;this.l=Rk;this.gd=this.g=null;this.ba=!1;this.ld=new qf;this.ib=new qf;this.A=new qf;this.ge=this.C=this.hb=this.i=this.md=this.J=this.j=this.ma=this.W=this.od=this.K=this.hd=this.I=this.Xa=this.G=this.N=this.m=this.H=null;this.Ke=1E9;this.h=Sk(this);this.Je={width:Infinity,height:Infinity};this.B=null;this.Aa=new Ge(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ba=this.h.preferredTextLanguage;this.wb=this.h.preferredTextRole;
370
- this.jb=this.h.preferForcedSubs;this.fb=[];this.Ac=null;b&&b(this);this.H=Tk(this);this.H.ue(this.h.streaming.forceHTTPS);this.F=null;Uk&&(this.F=Gb(Uk));this.ld.o(window,"online",function(){c.ke()});this.R={name:"detach"};this.Z={name:"attach"};this.aa={name:"unload"};this.Le={name:"manifest-parser"};this.Ge={name:"manifest"};this.Oa={name:"media-source"};this.ie={name:"drm-engine"};this.$={name:"load"};this.Me={name:"src-equals-drm-engine"};this.Ya={name:"src-equals"};var d=new Map;d.set(this.Z,
371
- function(e,f){return We(Vk(c,e,f))});d.set(this.R,function(e){e.M&&(c.ib.rb(),e.M=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return We(e)});d.set(this.aa,function(e){return We(Wk(c,e))});d.set(this.Oa,function(e){e=Xk(c,e);return We(e)});d.set(this.Le,function(e,f){var g=Yk(c,e,f);return We(g)});d.set(this.Ge,function(e){return Zk(c,e)});d.set(this.ie,function(e){e=$k(c,e);return We(e)});d.set(this.$,function(e,f){return We(al(c,e,f))});d.set(this.Me,function(e,f){var g=bl(c,e,f);return We(g)});
372
- d.set(this.Ya,function(e,f){return cl(c,e,f)});this.na=new Mj(this.R,{og:function(e,f,g,h){var k=null;e==c.R&&(k=g==c.R?c.R:c.Z);e==c.Z&&(k=g==c.R||f.M!=h.M?c.R:g==c.Z?c.Z:g==c.Oa||g==c.$?c.Oa:g==c.Ya?c.Me:null);e==c.Oa&&(k=g==c.$&&f.M==h.M?c.Le:c.aa);e==c.Le&&(k=dl(c.$,c.Ge,c.aa,g,f,h));e==c.Ge&&(k=dl(c.$,c.ie,c.aa,g,f,h));e==c.ie&&(k=dl(c.$,c.$,c.aa,g,f,h));e==c.Me&&(k=g==c.Ya&&f.M==h.M?c.Ya:c.aa);if(e==c.$||e==c.Ya)k=c.aa;e==c.aa&&(k=h.M&&f.M==h.M?c.Z:c.R);return k},Tf:function(e,f,g){c.dispatchEvent(el(fl,
373
- (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return M(function(f){return 1==f.g?A(f,Wk(c,e),2):f["return"](e.M?c.Z:c.R)})},Kg:function(e){c.dispatchEvent(el(gl,(new Map).set("state",e.name)))}});a&&this.xc(a,!0)}u(T,cb);function el(a,b){return new O(a,b)}q=T.prototype;
374
- q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==hl)return c["return"]();a.l=hl;b=Rj(a.na,function(){return{node:a.R,payload:Nj(),Lb:!1}});return A(c,new Promise(function(d){b.ic=function(){};b.pd=function(){d()};b.Rb=function(){d()};b.onError=function(){d()};b.rd=function(){d()}}),2);case 2:return A(c,a.na.destroy(),3);case 3:a.ld&&(a.ld.release(),a.ld=null);a.ib&&(a.ib.release(),a.ib=null);a.A&&(a.A.release(),a.A=null);a.ge=null;a.C=null;a.h=null;a.B=null;a.gd=null;
372
+ maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return M(function(h){return h["return"](cl(g,f.preferredAudioLanguage))})};return f}
373
+ function dl(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 Yk(a,b,c||bl(),d,"")}
374
+ function cl(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Yb(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Qb(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/
375
+ 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Mb&&"image"!=g.type||c.push(g);return c}N("shaka.util.PlayerConfiguration",al);al.mergeConfigObjects=dl;function el(){this.g=null;this.h=[]}function fl(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 gl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
376
+ function hl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function il(){this.i=this.h=null;this.g=[]}function jl(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 kl(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new el;this.h=new il};function T(a,b){cb.call(this);var c=this;this.l=ll;this.hd=this.g=null;this.ba=!1;this.md=new qf;this.hb=new qf;this.A=new qf;this.ke=this.C=this.gb=this.i=this.nd=this.J=this.j=this.ma=this.W=this.pd=this.K=this.jd=this.I=this.Wa=this.F=this.N=this.m=this.H=null;this.Ne=1E9;this.h=ml(this);this.Me={width:Infinity,height:Infinity};this.B=null;this.Aa=new Ge(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ba=this.h.preferredTextLanguage;this.wb=this.h.preferredTextRole;
377
+ this.ib=this.h.preferForcedSubs;this.eb=[];this.Ac=null;b&&b(this);this.H=nl(this);this.H.xe(this.h.streaming.forceHTTPS);this.G=null;ol&&(this.G=Gb(ol));this.md.o(window,"online",function(){c.oe()});this.S={name:"detach"};this.Z={name:"attach"};this.aa={name:"unload"};this.Oe={name:"manifest-parser"};this.Je={name:"manifest"};this.Oa={name:"media-source"};this.le={name:"drm-engine"};this.$={name:"load"};this.Pe={name:"src-equals-drm-engine"};this.Xa={name:"src-equals"};var d=new Map;d.set(this.Z,
378
+ function(e,f){return We(pl(c,e,f))});d.set(this.S,function(e){e.M&&(c.hb.qb(),e.M=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return We(e)});d.set(this.aa,function(e){return We(ql(c,e))});d.set(this.Oa,function(e){e=rl(c,e);return We(e)});d.set(this.Oe,function(e,f){var g=sl(c,e,f);return We(g)});d.set(this.Je,function(e){return tl(c,e)});d.set(this.le,function(e){e=ul(c,e);return We(e)});d.set(this.$,function(e,f){return We(vl(c,e,f))});d.set(this.Pe,function(e,f){var g=wl(c,e,f);return We(g)});
379
+ d.set(this.Xa,function(e,f){return xl(c,e,f)});this.na=new hk(this.S,{sg:function(e,f,g,h){var k=null;e==c.S&&(k=g==c.S?c.S:c.Z);e==c.Z&&(k=g==c.S||f.M!=h.M?c.S:g==c.Z?c.Z:g==c.Oa||g==c.$?c.Oa:g==c.Xa?c.Pe:null);e==c.Oa&&(k=g==c.$&&f.M==h.M?c.Oe:c.aa);e==c.Oe&&(k=yl(c.$,c.Je,c.aa,g,f,h));e==c.Je&&(k=yl(c.$,c.le,c.aa,g,f,h));e==c.le&&(k=yl(c.$,c.$,c.aa,g,f,h));e==c.Pe&&(k=g==c.Xa&&f.M==h.M?c.Xa:c.aa);if(e==c.$||e==c.Xa)k=c.aa;e==c.aa&&(k=h.M&&f.M==h.M?c.Z:c.S);return k},Xf:function(e,f,g){c.dispatchEvent(zl(Al,
380
+ (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return M(function(f){return 1==f.g?A(f,ql(c,e),2):f["return"](e.M?c.Z:c.S)})},Og:function(e){c.dispatchEvent(zl(Bl,(new Map).set("state",e.name)))}});a&&this.xc(a,!0)}u(T,cb);function zl(a,b){return new O(a,b)}q=T.prototype;
381
+ q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==Cl)return c["return"]();a.l=Cl;b=mk(a.na,function(){return{node:a.S,payload:ik(),Lb:!1}});return A(c,new Promise(function(d){b.ic=function(){};b.qd=function(){d()};b.Rb=function(){d()};b.onError=function(){d()};b.sd=function(){d()}}),2);case 2:return A(c,a.na.destroy(),3);case 3:a.md&&(a.md.release(),a.md=null);a.hb&&(a.hb.release(),a.hb=null);a.A&&(a.A.release(),a.A=null);a.ke=null;a.C=null;a.h=null;a.B=null;a.hd=null;
375
382
  a.W=null;if(!a.H){c.D(4);break}return A(c,a.H.destroy(),5);case 5:a.H=null;case 4:cb.prototype.release.call(a),C(c)}})};
376
- function il(){window.Promise||Sa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Xc("Trident/"))return!1;var a=cd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Sc()?!0:Uc("application/x-mpegurl")}
377
- q.xc=function(a,b){b=void 0===b?!0:b;if(this.l==hl)return Promise.reject(jl());var c=Nj();c.M=a;Sc()||(b=!1);var d=b?this.Oa:this.Z,e=Rj(this.na,function(){return{node:d,payload:c,Lb:!1}});e.ic=function(){};return kl(e)};q.detach=function(){var a=this;if(this.l==hl)return Promise.reject(jl());var b=Rj(this.na,function(){return{node:a.R,payload:Nj(),Lb:!1}});b.ic=function(){};return kl(b)};
378
- q.He=function(a){var b=this;a=void 0===a?!0:a;if(this.l==hl)return Promise.reject(jl());Sc()||(a=!1);var c=Nj(),d=Rj(this.na,function(e){var f=e.M&&a?b.Oa:e.M?b.Z:b.R;c.M=e.M;return{node:f,payload:c,Lb:!1}});d.ic=function(){};return kl(d)};q.jh=function(a){this.Ac=a};
379
- q.load=function(a,b,c){var d=this;this.Ac=null;if(this.l==hl)return Promise.reject(jl());this.dispatchEvent(el(ll));var e=Nj();e.uri=a;e.Be=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=ml(this,e)?this.Ya:this.$,g=Rj(this.na,function(h){if(null==h.M)return null;e.M=h.M;return{node:f,payload:e,Lb:!0}});this.B=new Qk;this.W=nl(this);g.ic=function(){};return new Promise(function(h,k){g.rd=function(){return k(new P(2,7,7002))};g.pd=function(){h();d.dispatchEvent(el(ol))};g.Rb=function(){return k(jl())};
380
- g.onError=function(l){return k(l)}})};function ml(a,b){if(!Sc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=pg(d),c=pl[c]);if(c){if(""==(b.M||Vc()).canPlayType(c))return!1;if(!Sc()||!(c in og||pg(d)in qg)||a.h.streaming.preferNativeHls)return!0;if(ad())return a.h.streaming.useNativeHlsOnSafari}return!1}function Vk(a,b,c){null==b.M&&(b.M=c.M,a.ib.o(b.M,"error",function(){var d=ql(a);d&&rl(a,d)}));a.g=b.M;return Promise.resolve()}
381
- function Wk(a,b){var c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return a.l!=hl&&(a.l=Rk),c=a.fb.map(function(p){return p()}),a.fb=[],A(n,Promise.all(c),2);case 2:a.dispatchEvent(el(sl));b.mimeType=null;b.startTime=null;b.uri=null;b.M&&a.A.rb();a.Xa&&(a.Xa.release(),a.Xa=null);a.hd&&(a.hd.stop(),a.hd=null);if(!a.J){n.D(3);break}return A(n,a.J.stop(),4);case 4:a.J=null,a.md=null;case 3:if(!a.C){n.D(5);break}return A(n,a.C.stop(),5);case 5:if(!a.j){n.D(7);break}return A(n,a.j.destroy(),
382
- 8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.G&&(a.G.release(),a.G=null);if(!a.N){n.D(9);break}return A(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.M||!b.M.src){n.D(11);break}return A(n,new Promise(function(p){return(new Q(p)).S(.1)}),12);case 12:for(b.M.removeAttribute("src"),b.M.load();b.M.lastChild;)b.M.removeChild(b.M.firstChild);case 11:if(!a.m){n.D(13);break}return A(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.hb=null;a.K=null;if(a.i){d=r(a.i.variants);
383
- for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.B=new Qk;a.le=null;tl(a);C(n)}})}
384
- function Xk(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=new Ph,d=a.h.textDisplayFactory,e=Gb(d),a.le=d,f=ul(b.M,c,e,function(h,k,l){h=r(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,t=r(m.frames),v=t.next();!v.done;v=t.next())vl(a,n,p,"ID3",v.value);if(a.F)a.F.onHlsTimedMetadata(m,n)}}),A(g,f.G,2);a.N=f;C(g)})}
385
- function Yk(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.hb=d,f=a,A(h,ng(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.md=h.h;a.J=Gb(a.md);g=Ze(a.h.manifest);c.M&&"AUDIO"===c.M.nodeName&&(g.disableVideo=!0);a.J.configure(g);C(h)})}
386
- function Zk(a,b){var c=b.uri,d=a.H;a.od=new cj(function(){return a.La()});a.od.addEventListener("regionadd",function(g){g=g.region;wl(a,xl,g);if(a.F)a.F.onDashTimedMetadata(g)});a.ma=null;a.h.streaming.observeQualityChanges&&(a.ma=new Xi(function(){return a.zb()}),a.ma.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
387
- mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(el(yl,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.A=h.format,sk(k,g,{ot:vk,su:!k.i}))}catch(l){Ta("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){ik(a.W,g,h)},filter:function(g){return zl(a,g)},makeTextStreamsForClosedCaptions:function(g){return Al(a,g)},
388
- onTimelineRegionAdded:function(g){var h=a.od;a:{var k=r(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new O("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return rl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
389
- enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Se(function(){var g,h,k,l;return M(function(m){if(1==m.g)return g=a,A(m,a.J.start(c,e),2);g.i=m.h;h=el(Bl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new P(2,4,4036);Cl(a.i);k=Date.now()/1E3;l=k-f;a.B.H=l;C(m)})}(),function(){return a.J.stop()})}
390
- function $k(a,b){var c,d;return M(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Dl(a,{Qb:a.H,onError:function(f){rl(a,f)},qd:function(f){El(a,f)},onExpirationUpdated:function(f,g){Fl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Gl&&d&&(d=!1,a.B.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),A(e,If(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?A(e,a.m.xc(b.M),3):A(e,zl(a,a.i),0)})}
391
- function al(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return M(function(x){switch(x.g){case 1:b.startTime=c.startTime;null!=a.Ac&&(b.startTime=a.Ac,a.Ac=null);d=b.M;e=b.uri;a.hb=e;a.I=new Ti({fd:function(){return d.playbackRate},cd:function(){return d.defaultPlaybackRate},we:function(y){d.playbackRate=y},nf:function(y){d.currentTime+=y}});f=function(){return Hl(a)};g=function(){return Il(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.C&&a.ge==h||
392
- (a.ge=h,a.C=Gb(h),"function"!=typeof a.C.playbackRateChanged&&(zb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.C.playbackRateChanged=function(){}),a.C.configure(a.h.abr));a.Aa=new Ge(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ba=a.h.preferredTextLanguage;a.wb=a.h.preferredTextRole;a.jb=a.h.preferForcedSubs;Jl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(y,w,D){a.j&&y!=a.j.l&&Kl(a,y,!0,void 0===
393
- w?!1:w,void 0===D?0:D)});a.G=Ll(a,b.startTime);a.Xa=Ml(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Nl(a,k);Nd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Ol(a);a.j.configure(a.h.streaming);a.l=Pl;d.textTracks&&a.A.o(d.textTracks,"addtrack",function(y){if(y.track)switch(y=y.track,y.kind){case "chapters":Ql(a,y)}});a.dispatchEvent(el(Rl));l=null;if(m=a.$a().find(function(y){return y.active})){x.D(2);break}l=
394
- Sl(a)?a.C.chooseVariant():null;Kl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){x.D(3);break}n=a.G.m();return A(x,Tl(l,n),4);case 4:p=x.h,a.G.A(p);case 3:Ul(a,null,le(l));case 2:return t=a.pb().find(function(y){return y.active}),t||((v=ve(a.i.textStreams,a.Ba,a.wb,a.jb)[0]||null)&&Pk(a.B.h,v,!0),l&&(v?(l.audio&&Vl(a,l.audio,v)&&(a.ba=!0),a.ba&&a.N.l.setTextVisibility(!0),Wl(a)):a.ba=!1),v&&(a.h.streaming.alwaysStreamText||a.Pb())&&vj(a.j,v)),A(x,a.j.start(),5);case 5:a.h.abr.enabled&&(a.C.enable(),
395
- Xl(a)),ce(a.j?a.j.l:null,a.i),Yl(a.i),Zl(a),Sl(a),a.i.variants.some(function(y){return y.primary}),a.A.Ga(d,"loadedmetadata",function(){a.B.m=Date.now()/1E3-c.Be}),C(x)}})}
396
- function bl(a,b,c){var d,e,f,g,h,k,l;return M(function(m){return 1==m.g?(d=Nb,e=Date.now()/1E3,f=!0,a.m=Dl(a,{Qb:a.H,onError:function(n){rl(a,n)},qd:function(n){El(a,n)},onExpirationUpdated:function(n,p){Fl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==Gl&&f&&(f=!1,a.B.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=pg(g),k=pl[h],"application/x-mpegurl"==k&&ad()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
397
- createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Cd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.gb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,A(m,If(a.m,[l],[]),2)):A(m,a.m.xc(b.M),
383
+ function Dl(){window.Promise||Sa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Xc("Trident/"))return!1;var a=cd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Tc()?!0:Uc("application/x-mpegurl")}
384
+ q.xc=function(a,b){b=void 0===b?!0:b;if(this.l==Cl)return Promise.reject(El());var c=ik();c.M=a;Tc()||(b=!1);var d=b?this.Oa:this.Z,e=mk(this.na,function(){return{node:d,payload:c,Lb:!1}});e.ic=function(){};return Fl(e)};q.detach=function(){var a=this;if(this.l==Cl)return Promise.reject(El());var b=mk(this.na,function(){return{node:a.S,payload:ik(),Lb:!1}});b.ic=function(){};return Fl(b)};
385
+ q.Ke=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Cl)return Promise.reject(El());Tc()||(a=!1);var c=ik(),d=mk(this.na,function(e){var f=e.M&&a?b.Oa:e.M?b.Z:b.S;c.M=e.M;return{node:f,payload:c,Lb:!1}});d.ic=function(){};return Fl(d)};q.nh=function(a){this.Ac=a};
386
+ q.load=function(a,b,c){var d=this;this.Ac=null;if(this.l==Cl)return Promise.reject(El());this.dispatchEvent(zl(Gl));var e=ik();e.uri=a;e.Ee=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Hl(this,e)?this.Xa:this.$,g=mk(this.na,function(h){if(null==h.M)return null;e.M=h.M;return{node:f,payload:e,Lb:!0}});this.B=new kl;this.W=Il(this);g.ic=function(){};return new Promise(function(h,k){g.sd=function(){return k(new P(2,7,7002))};g.qd=function(){h();d.dispatchEvent(zl(Jl))};g.Rb=function(){return k(El())};
387
+ g.onError=function(l){return k(l)}})};function Hl(a,b){if(!Tc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Kg(d),c=Kl[c]);if(c){if(""==(b.M||Vc()).canPlayType(c))return!1;if(!Tc()||!(c in Jg||Kg(d)in Lg)||a.h.streaming.preferNativeHls)return!0;if(ad())return a.h.streaming.useNativeHlsOnSafari}return!1}function pl(a,b,c){null==b.M&&(b.M=c.M,a.hb.o(b.M,"error",function(){var d=Ll(a);d&&Ml(a,d)}));a.g=b.M;return Promise.resolve()}
388
+ function ql(a,b){var c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return a.l!=Cl&&(a.l=ll),c=a.eb.map(function(p){return p()}),a.eb=[],A(n,Promise.all(c),2);case 2:a.dispatchEvent(zl(Nl));b.mimeType=null;b.startTime=null;b.uri=null;b.M&&a.A.qb();a.Wa&&(a.Wa.release(),a.Wa=null);a.jd&&(a.jd.stop(),a.jd=null);if(!a.J){n.D(3);break}return A(n,a.J.stop(),4);case 4:a.J=null,a.nd=null;case 3:if(!a.C){n.D(5);break}return A(n,a.C.stop(),5);case 5:if(!a.j){n.D(7);break}return A(n,a.j.destroy(),
389
+ 8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.F&&(a.F.release(),a.F=null);if(!a.N){n.D(9);break}return A(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.M||!b.M.src){n.D(11);break}return A(n,new Promise(function(p){return(new Q(p)).R(.1)}),12);case 12:for(b.M.removeAttribute("src"),b.M.load();b.M.lastChild;)b.M.removeChild(b.M.firstChild);case 11:if(!a.m){n.D(13);break}return A(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.gb=null;a.K=null;if(a.i){d=r(a.i.variants);
390
+ for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.B=new kl;a.pe=null;Ol(a);C(n)}})}
391
+ function rl(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=new ji,d=a.h.textDisplayFactory,e=Gb(d),a.pe=d,f=Pl(b.M,c,e,function(h,k,l){h=r(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,t=r(m.frames),v=t.next();!v.done;v=t.next())Ql(a,n,p,"ID3",v.value);if(a.G)a.G.onHlsTimedMetadata(m,n)}}),A(g,f.G,2);a.N=f;C(g)})}
392
+ function sl(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.gb=d,f=a,A(h,Ig(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.nd=h.h;a.J=Gb(a.nd);g=Ze(a.h.manifest);c.M&&"AUDIO"===c.M.nodeName&&(g.disableVideo=!0);a.J.configure(g);C(h)})}
393
+ function tl(a,b){var c=b.uri,d=a.H;a.pd=new xj(function(){return a.La()});a.pd.addEventListener("regionadd",function(g){g=g.region;Rl(a,Sl,g);if(a.G)a.G.onDashTimedMetadata(g)});a.ma=null;a.h.streaming.observeQualityChanges&&(a.ma=new tj(function(){return a.zb()}),a.ma.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
394
+ mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(zl(Tl,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.A=h.format,Nk(k,g,{ot:Qk,su:!k.i}))}catch(l){Ta("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){Dk(a.W,g,h)},filter:function(g){return Ul(a,g)},makeTextStreamsForClosedCaptions:function(g){return Vl(a,g)},
395
+ onTimelineRegionAdded:function(g){var h=a.pd;a:{var k=r(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new O("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Ml(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
396
+ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Se(function(){var g,h,k,l;return M(function(m){if(1==m.g)return g=a,A(m,a.J.start(c,e),2);g.i=m.h;h=zl(Wl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new P(2,4,4036);Xl(a.i);k=Date.now()/1E3;l=k-f;a.B.H=l;C(m)})}(),function(){return a.J.stop()})}
397
+ function ul(a,b){var c,d;return M(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Yl(a,{Qb:a.H,onError:function(f){Ml(a,f)},rd:function(f){Zl(a,f)},onExpirationUpdated:function(f,g){$l(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==am&&d&&(d=!1,a.B.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),A(e,cg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?A(e,a.m.xc(b.M),3):A(e,Ul(a,a.i),0)})}
398
+ function vl(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return M(function(x){switch(x.g){case 1:b.startTime=c.startTime;null!=a.Ac&&(b.startTime=a.Ac,a.Ac=null);d=b.M;e=b.uri;a.gb=e;a.I=new pj({gd:function(){return d.playbackRate},dd:function(){return d.defaultPlaybackRate},ze:function(y){d.playbackRate=y},rf:function(y){d.currentTime+=y}});f=function(){return bm(a)};g=function(){return cm(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.C&&a.ke==h||
399
+ (a.ke=h,a.C=Gb(h),"function"!=typeof a.C.playbackRateChanged&&(zb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.C.playbackRateChanged=function(){}),a.C.configure(a.h.abr));a.Aa=new Ge(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ba=a.h.preferredTextLanguage;a.wb=a.h.preferredTextRole;a.ib=a.h.preferForcedSubs;dm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(y,w,D){a.j&&y!=a.j.l&&em(a,y,!0,void 0===
400
+ w?!1:w,void 0===D?0:D)});a.F=fm(a,b.startTime);a.Wa=gm(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);hm(a,k);Nd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=im(a);a.j.configure(a.h.streaming);a.l=jm;d.textTracks&&a.A.o(d.textTracks,"addtrack",function(y){if(y.track)switch(y=y.track,y.kind){case "chapters":km(a,y)}});a.dispatchEvent(zl(lm));l=null;if(m=a.Za().find(function(y){return y.active})){x.D(2);break}l=
401
+ mm(a)?a.C.chooseVariant():null;em(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){x.D(3);break}n=a.F.Wc();return A(x,nm(l,n),4);case 4:p=x.h,a.F.Td(p);case 3:om(a,null,le(l));case 2:return a.F.Sd(),t=a.ob().find(function(y){return y.active}),t||((v=ve(a.i.textStreams,a.Ba,a.wb,a.ib)[0]||null)&&jl(a.B.h,v,!0),l&&(v?(l.audio&&pm(a,l.audio,v)&&(a.ba=!0),a.ba&&a.N.l.setTextVisibility(!0),qm(a)):a.ba=!1),v&&(a.h.streaming.alwaysStreamText||a.Pb())&&Qj(a.j,v)),A(x,a.j.start(),5);case 5:a.h.abr.enabled&&
402
+ (a.C.enable(),rm(a)),ce(a.j?a.j.l:null,a.i),sm(a.i),tm(a),mm(a),a.i.variants.some(function(y){return y.primary}),a.A.Ga(d,"loadedmetadata",function(){a.B.m=Date.now()/1E3-c.Ee}),C(x)}})}
403
+ function wl(a,b,c){var d,e,f,g,h,k,l;return M(function(m){return 1==m.g?(d=Nb,e=Date.now()/1E3,f=!0,a.m=Yl(a,{Qb:a.H,onError:function(n){Ml(a,n)},rd:function(n){Zl(a,n)},onExpirationUpdated:function(n,p){$l(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==am&&f&&(f=!1,a.B.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Kg(g),k=Kl[h],"application/x-mpegurl"==k&&ad()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
404
+ createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Cd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.fb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,A(m,cg(a.m,[l],[]),2)):A(m,a.m.xc(b.M),
398
405
  0)})}
399
- function cl(a,b,c){function d(){return Hl(a)}b.uri=c.uri;b.startTime=c.startTime;a.hb=b.uri;var e=b.M;a.G=new Ii(e);var f=!1;a.fb.push(function(){f=!0});null!=b.startTime&&a.G.A(b.startTime);a.I=new Ti({fd:function(){return e.playbackRate},cd:function(){return e.defaultPlaybackRate},we:function(k){e.playbackRate=k},nf:function(k){e.currentTime+=k}});Nl(a,a.h.streaming.rebufferingGoal);a.A.o(e,"playing",d);a.A.o(e,"pause",d);a.A.o(e,"ended",d);a.A.o(e,"ratechange",function(){return Il(a)});"none"!=e.preload&&
400
- a.A.Ga(e,"loadedmetadata",function(){a.B.m=Date.now()/1E3-c.Be});e.audioTracks&&(a.A.o(e.audioTracks,"addtrack",function(){return Zl(a)}),a.A.o(e.audioTracks,"removetrack",function(){return Zl(a)}),a.A.o(e.audioTracks,"change",function(){return Zl(a)}));e.textTracks&&(a.A.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":$l(a,k);break;case "chapters":Ql(a,k);break;default:Zl(a)}}),a.A.o(e.textTracks,"removetrack",function(){return Zl(a)}),a.A.o(e.textTracks,
401
- "change",function(){return Zl(a)}));var g=pg(b.uri);e.src=tk(a.W,b.uri,pl[g]);(Yc()||Zc())&&e.load();a.l=am;a.dispatchEvent(el(Rl));var h=new Pc;zi(e,HTMLMediaElement.HAVE_METADATA,a.A,function(){h.resolve()});zi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){var k;return M(function(l){if(1==l.g)return bm(a),k=cm(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):A(l,new Promise(function(m){a.A.Ga(e.textTracks,"change",m);(new Q(m)).S(1)}),2);if(f)return l["return"]();dm(a);C(l)})});e.error?
402
- h.reject(ql(a)):"none"==e.preload&&(Sa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.A.Ga(e,"error",function(){h.reject(ql(a))});return new Se(h,function(){h.reject(new P(2,7,7001));return Promise.resolve()})}
403
- function bm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.wd(b);var c=a.h.preferredVariantRole;""!=c&&a.wd(b,c)}}function dm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.oe(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.oe(b,d,c)}}
404
- function $l(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,vl(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=em(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).za().S(.5);a.fb.push(function(){c.stop()})}}
405
- function vl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(el(fm,b))}function Ql(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).za().S(.5);a.fb.push(function(){c.stop()})}}function Cl(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 Dl(a,b){return new Bf(b,a.h.drm.updateExpirationTime)}
406
- function Tk(a){return new cf(function(b,c){a.C&&a.C.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(el(gm,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(el(hm,b))})}
407
- function Ll(a,b){return new Ji(a.g,a.i,a.h.streaming,b,function(){a.Xa&&Wi(a.Xa,!0);if(a.j)for(var c=a.j,d=c.g.ed(),e=c.h.smallGapLimit,f=r(c.j.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.j.get(g);h.ua=null;var k=c.g.V;g==Mb?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=di(k,g),k=Sh(k,d,e));if(!k&&((null!=ei(c.g.V,g)||h.Ta)&&yj(c,h),h.Ma&&(h.Ma.abort(),h.Ma=null),g===Mb))for(g=c.g.V.C.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Fh(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())Ah(h.value)}a.K&&
408
- im(a)},function(c){return a.dispatchEvent(c)})}function Ml(a){var b=new dj(a.od);b.addEventListener("enter",function(d){wl(a,jm,d.region)});b.addEventListener("exit",function(d){wl(a,km,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(wl(a,jm,e),wl(a,km,e))});var c=new Vi(a.g);c.g.add(b);a.ma&&c.g.add(a.ma);return c}function Nl(a,b){a.K=new Le;a.K.g=Ne;Oe(a.K,b,Math.min(.5,b/2));tl(a);a.hd=(new Q(function(){im(a)})).ha(.25)}
409
- function im(a){switch(a.l){case am:if(a.g.ended)var b=!0;else{var c=Rh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Pl:a:if(a.g.ended||bi(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Kb();var d=Rh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Th(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Me:Ne;c.g=d;b!=d&&tl(a)}function ul(a,b,c,d){return new Wh(a,b,c,d)}
410
- function nl(a){return new hk({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},zb:function(){return a.zb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},$a:function(){return a.$a()},Ab:function(){return a.Ab()},T:function(){return a.T()}},a.h.cmcd)}
411
- function Ol(a){return new jj(a.i,{ed:function(){return a.G.m()},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){ik(a.W,b,c)},V:a.N,Qb:a.H,onError:function(b){return rl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Mg:function(){a.J&&a.J.update&&a.J.update()},fe:function(){a.G&&a.G.G();im(a)},Lg:function(b,c){var d=c.Zd;d&&a.ma&&Zi(a.ma,d,b)}})}
412
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ek(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(zb("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=
413
- 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Jk(this.h,a,Sk(this));lm(this);return c};
414
- function lm(a){if(a.J){var b=Ze(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{mm(a,a.i)}catch(f){rl(a,f)}a.C&&Sl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||nm(a)}a.H&&a.H.ue(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.le!=b)){var c=Gb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.le=b;a.j&&(b=a.j,(c=b.j.get(Mb))&&
415
- tj(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),Xl(a));a.K&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Oe(a.K,b,Math.min(.5,b/2)));a.i&&Jl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Sk(this);Jk(a,this.h,Sk(this));return a};
416
- q.Wf=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.La().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.Wg=function(){for(var a in this.h)delete this.h[a];Jk(this.h,Sk(this),Sk(this));lm(this)};q.cf=function(){return this.l};q.ng=function(){return this.g};q.Dc=function(){return this.H};q.Td=function(){return this.hb};
417
- q.bd=function(){return this.F?this.F:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Nb=function(){return this.i?this.i.presentationTimeline.Nb():!1};q.jf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
418
- q.La=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.bc(),end:a.mb()}}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.Ag=function(){this.T()&&(this.g.currentTime=this.La().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Cc=function(){return this.m?this.m.Cc():Infinity};q.dd=function(){return this.m?this.m.dd():{}};
419
- q.Ic=function(){return this.K?this.K.g==Ne:!1};q.Ab=function(){return this.g?this.I?this.I.i:1:0};q.Fe=function(a){0==a?Sa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==Pl&&(this.C.playbackRateChanged(a),sj(this.j,1<Math.abs(a))))};q.Pe=function(){var a=this.I.cd();this.l==am&&this.I.set(a);this.l==Pl&&(this.I.set(a),this.C.playbackRateChanged(a),sj(this.j,!1))};
420
- q.$a=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,te(e)){var f=le(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 se(g)}):[]};
421
- q.pb=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=me(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?cm(this).map(function(f){return qe(f)}):[]};q.fg=function(){return this.i?this.i.imageStreams.map(function(a){return ne(a)}):[]};
422
- q.wg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B;return M(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.D(3):A(F,d.createSegmentIndex(),3):F["return"](null):F.D(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;t=l/n;
406
+ function xl(a,b,c){function d(){return bm(a)}b.uri=c.uri;b.startTime=c.startTime;a.gb=b.uri;var e=b.M;a.F=new ej(e);var f=!1;a.eb.push(function(){f=!0});null!=b.startTime&&a.F.Td(b.startTime);a.I=new pj({gd:function(){return e.playbackRate},dd:function(){return e.defaultPlaybackRate},ze:function(k){e.playbackRate=k},rf:function(k){e.currentTime+=k}});hm(a,a.h.streaming.rebufferingGoal);a.A.o(e,"playing",d);a.A.o(e,"pause",d);a.A.o(e,"ended",d);a.A.o(e,"ratechange",function(){return cm(a)});"none"!=e.preload&&
407
+ a.A.Ga(e,"loadedmetadata",function(){a.B.m=Date.now()/1E3-c.Ee});e.audioTracks&&(a.A.o(e.audioTracks,"addtrack",function(){return tm(a)}),a.A.o(e.audioTracks,"removetrack",function(){return tm(a)}),a.A.o(e.audioTracks,"change",function(){return tm(a)}));e.textTracks&&(a.A.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":um(a,k);break;case "chapters":km(a,k);break;default:tm(a)}}),a.A.o(e.textTracks,"removetrack",function(){return tm(a)}),a.A.o(e.textTracks,
408
+ "change",function(){return tm(a)}));var g=Kg(b.uri);e.src=Ok(a.W,b.uri,Kl[g]);(Yc()||Zc())&&e.load();a.l=vm;a.dispatchEvent(zl(lm));var h=new Pc;Ui(e,HTMLMediaElement.HAVE_METADATA,a.A,function(){a.F.Sd();h.resolve()});Ui(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){var k;return M(function(l){if(1==l.g)return wm(a),k=xm(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):A(l,new Promise(function(m){a.A.Ga(e.textTracks,"change",m);(new Q(m)).R(1)}),2);if(f)return l["return"]();ym(a);C(l)})});
409
+ e.error?h.reject(Ll(a)):"none"==e.preload&&(Sa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.A.Ga(e,"error",function(){h.reject(Ll(a))});return new Se(h,function(){h.reject(new P(2,7,7001));return Promise.resolve()})}
410
+ function wm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.xd(b);var c=a.h.preferredVariantRole;""!=c&&a.xd(b,c)}}function ym(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.re(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.re(b,d,c)}}
411
+ function um(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Ql(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=zm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).za().R(.5);a.eb.push(function(){c.stop()})}}
412
+ function Ql(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(zl(Am,b))}function km(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).za().R(.5);a.eb.push(function(){c.stop()})}}function Xl(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 Yl(a,b){return new Wf(b,a.h.drm.updateExpirationTime)}
413
+ function nl(a){return new cf(function(b,c){a.C&&a.C.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(zl(Bm,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(zl(Cm,b))})}
414
+ function fm(a,b){return new fj(a.g,a.i,a.h.streaming,b,function(){a.Wa&&sj(a.Wa,!0);if(a.j)for(var c=a.j,d=c.g.fd(),e=c.h.smallGapLimit,f=r(c.j.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.j.get(g);h.ua=null;var k=c.g.V;g==Mb?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=yi(k,g),k=mi(k,d,e));if(!k&&((null!=zi(c.g.V,g)||h.ab)&&Tj(c,h),h.Ma&&(h.Ma.abort(),h.Ma=null),g===Mb))for(g=c.g.V.C.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,$h(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())Vh(h.value)}a.K&&
415
+ Dm(a)},function(c){return a.dispatchEvent(c)})}function gm(a){var b=new yj(a.pd);b.addEventListener("enter",function(d){Rl(a,Em,d.region)});b.addEventListener("exit",function(d){Rl(a,Fm,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Rl(a,Em,e),Rl(a,Fm,e))});var c=new rj(a.g);c.g.add(b);a.ma&&c.g.add(a.ma);return c}function hm(a,b){a.K=new Le;a.K.g=Ne;Oe(a.K,b,Math.min(.5,b/2));Ol(a);a.jd=(new Q(function(){Dm(a)})).ha(.25)}
416
+ function Dm(a){switch(a.l){case vm:if(a.g.ended)var b=!0;else{var c=li(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case jm:a:if(a.g.ended||wi(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Kb();var d=li(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=ni(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Me:Ne;c.g=d;b!=d&&Ol(a)}function Pl(a,b,c,d){return new qi(a,b,c,d)}
417
+ function Il(a){return new Ck({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},zb:function(){return a.zb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Za:function(){return a.Za()},Ab:function(){return a.Ab()},T:function(){return a.T()}},a.h.cmcd)}
418
+ function im(a){return new Ej(a.i,{fd:function(){return a.F.Wc()},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Dk(a.W,b,c)},V:a.N,Qb:a.H,onError:function(b){return Ml(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Qg:function(){a.J&&a.J.update&&a.J.update()},je:function(){a.F&&a.F.tf();Dm(a)},Pg:function(b,c){var d=c.be;d&&a.ma&&vj(a.ma,d,b)}})}
419
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Zk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(zb("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=
420
+ 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=dl(this.h,a,ml(this));Gm(this);return c};
421
+ function Gm(a){if(a.J){var b=Ze(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Hm(a,a.i)}catch(f){Ml(a,f)}a.C&&mm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Im(a)}a.H&&a.H.xe(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.pe!=b)){var c=Gb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.pe=b;a.j&&(b=a.j,(c=b.j.get(Mb))&&
422
+ Oj(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),rm(a));a.K&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Oe(a.K,b,Math.min(.5,b/2)));a.i&&dm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=ml(this);dl(a,this.h,ml(this));return a};
423
+ q.$f=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.La().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.$g=function(){for(var a in this.h)delete this.h[a];dl(this.h,ml(this),ml(this));Gm(this)};q.gf=function(){return this.l};q.rg=function(){return this.g};q.Dc=function(){return this.H};q.Wd=function(){return this.gb};
424
+ q.cd=function(){return this.G?this.G:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Nb=function(){return this.i?this.i.presentationTimeline.Nb():!1};q.mf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
425
+ q.La=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.bc(),end:a.kb()}}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.Eg=function(){this.T()&&(this.g.currentTime=this.La().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Cc=function(){return this.m?this.m.Cc():Infinity};q.ed=function(){return this.m?this.m.ed():{}};
426
+ q.Ic=function(){return this.K?this.K.g==Ne:!1};q.Ab=function(){return this.g?this.I?this.I.i:1:0};q.Ie=function(a){0==a?Sa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==jm&&(this.C.playbackRateChanged(a),Nj(this.j,1<Math.abs(a))))};q.Se=function(){var a=this.I.dd();this.l==vm&&this.I.set(a);this.l==jm&&(this.I.set(a),this.C.playbackRateChanged(a),Nj(this.j,!1))};
427
+ q.Za=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,te(e)){var f=le(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 se(g)}):[]};
428
+ q.ob=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=me(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?xm(this).map(function(f){return qe(f)}):[]};q.jg=function(){return this.i?this.i.imageStreams.map(function(a){return ne(a)}):[]};
429
+ q.Ag=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B;return M(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.D(3):A(F,d.createSegmentIndex(),3):F["return"](null):F.D(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;t=l/n;
423
430
  v=m*n;x=f.l-f.startTime;y=f.i||x/v;w=f.startTime;z=D=0;1<v&&(B=Math.floor((b-f.startTime)/y),w=f.startTime+B*y,D=B%m*p,z=Math.floor(B/m)*t);return F["return"]({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:z,startTime:w,duration:y,uris:f.Ka(),width:p})}return F["return"](null)})};
424
- q.pe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(Pk(this.B.h,b,!1),vj(this.j,b),om(this),this.Ba=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=cm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,oe(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";om(this)}};
425
- q.qe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Sa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&te(d)&&(Kl(this,d,!1,b,c),this.Aa=new Fe(d),Sl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
426
- oe(c)==a.id){pm(this,c);break}};q.Vf=function(){return qm(this.$a())};q.vg=function(){return qm(this.pb())};q.Uf=function(){return Array.from(rm(this.$a()))};q.ug=function(){return Array.from(rm(this.pb()))};
427
- q.wd=function(a,b){if(this.i&&this.G){this.Aa=new Ge(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Aa.create(this.i.variants),f=null;e=r(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=le(f),this.qe(c,!0)):nm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Qb(a);f=d=null;e=
428
- r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=se(g);Qb(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?pm(this,f):d&&pm(this,d)}};
429
- q.oe=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Ba=a,this.wb=b||"",this.jb=c,(a=ve(this.i.textStreams,this.Ba,this.wb,this.jb)[0]||null)&&a!=this.j.A&&(Pk(this.B.h,a,!1),this.h.streaming.alwaysStreamText||this.Pb()))vj(this.j,a),om(this)}else{var d=Qb(a);(a=this.pb().find(function(e){return Qb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.pe(a)}};
430
- q.Yg=function(a){if(this.i&&this.G){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Aa=new Ge(b.language,"",0,a),nm(this))}};q.Pb=function(){var a=this.ba;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?cm(this).some(function(b){return"showing"==b.mode}):a};q.$e=function(){return this.g&&this.g.src&&this.g.textTracks?sm(this).map(function(a){return qe(a)}):[]};
431
- q.Yf=function(a){var b=Qb(a),c=sm(this).filter(function(f){return Qb(f.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function cm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
432
- function em(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function sm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
433
- q.ze=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==Pl)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ve(this.i.textStreams,this.Ba,this.wb,this.jb),0<a.length&&(vj(this.j,a[0]),om(this))):rj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=cm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Wl(this)}};
434
- q.pg=function(){if(!this.T())return null;var a=this.na.l,b=0;if(this.G)b=this.G.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
435
- q.df=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.zb=function(){if(this.l==Pl)return this.N.zb();var a={total:[],audio:[],video:[],text:[]};this.l==am&&(a.total=Uh(this.g.buffered));return a};
436
- q.getStats=function(){if(this.l!=Pl&&this.l!=am)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:[]};Hl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.B;b=Math.round(100*b);c.i=isNaN(c.i)?
437
- b:Math.max(c.i,b)}if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.B;var d=Number(c.totalVideoFrames);b.N=Number(c.droppedVideoFrames);b.K=d;this.B.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.B.B=c;if(this.l==Pl){if(c=this.j.l)this.B.F=(this.I?this.I.i:1)*c.bandwidth;c&&c.video&&(b=this.B,d=c.video.height||NaN,b.A=c.video.width||NaN,b.l=d);this.T()&&(c=this.df().valueOf()+1E3*this.La().end,this.B.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&
438
- (this.B.I=this.i.presentationTimeline.g);c=this.C.getBandwidthEstimate();this.B.C=c}this.l==am&&(c=this.B,b=a.videoHeight||NaN,c.A=a.videoWidth||NaN,c.l=b);var e=this.B;a=e.A;c=e.l;b=e.F;d=e.K;var f=e.N,g=e.J,h=e.C,k=e.i,l=e.m,m=e.H,n=e.j,p=Mk(e.g,"playing"),t=Mk(e.g,"paused"),v=Mk(e.g,"buffering"),x=e.B,y=e.G,w=e.I,D=Nk(e.g),z=[];e=r(e.h.g);for(var B=e.next();!B.done;B=e.next())B=B.value,z.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,
431
+ q.se=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(jl(this.B.h,b,!1),Qj(this.j,b),Jm(this),this.Ba=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=xm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,oe(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";Jm(this)}};
432
+ q.ue=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Sa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&te(d)&&(em(this,d,!1,b,c),this.Aa=new Fe(d),mm(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
433
+ oe(c)==a.id){Km(this,c);break}};q.Zf=function(){return Lm(this.Za())};q.zg=function(){return Lm(this.ob())};q.Yf=function(){return Array.from(Mm(this.Za()))};q.yg=function(){return Array.from(Mm(this.ob()))};
434
+ q.xd=function(a,b){if(this.i&&this.F){this.Aa=new Ge(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Aa.create(this.i.variants),f=null;e=r(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=le(f),this.ue(c,!0)):Im(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Qb(a);f=d=null;e=
435
+ r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=se(g);Qb(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Km(this,f):d&&Km(this,d)}};
436
+ q.re=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Ba=a,this.wb=b||"",this.ib=c,(a=ve(this.i.textStreams,this.Ba,this.wb,this.ib)[0]||null)&&a!=this.j.A&&(jl(this.B.h,a,!1),this.h.streaming.alwaysStreamText||this.Pb()))Qj(this.j,a),Jm(this)}else{var d=Qb(a);(a=this.ob().find(function(e){return Qb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.se(a)}};
437
+ q.bh=function(a){if(this.i&&this.F){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Aa=new Ge(b.language,"",0,a),Im(this))}};q.Pb=function(){var a=this.ba;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?xm(this).some(function(b){return"showing"==b.mode}):a};q.df=function(){return this.g&&this.g.src&&this.g.textTracks?Nm(this).map(function(a){return qe(a)}):[]};
438
+ q.cg=function(a){var b=Qb(a),c=Nm(this).filter(function(f){return Qb(f.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function xm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
439
+ function zm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Nm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
440
+ q.Ce=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==jm)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ve(this.i.textStreams,this.Ba,this.wb,this.ib),0<a.length&&(Qj(this.j,a[0]),Jm(this))):Mj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=xm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}qm(this)}};
441
+ q.ug=function(){if(!this.T())return null;var a=this.na.l,b=0;if(this.F)b=this.F.Wc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
442
+ q.hf=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.zb=function(){if(this.l==jm)return this.N.zb();var a={total:[],audio:[],video:[],text:[]};this.l==vm&&(a.total=oi(this.g.buffered));return a};
443
+ q.getStats=function(){if(this.l!=jm&&this.l!=vm)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:[]};bm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.B;b=Math.round(100*b);c.i=isNaN(c.i)?
444
+ b:Math.max(c.i,b)}if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.B;var d=Number(c.totalVideoFrames);b.N=Number(c.droppedVideoFrames);b.K=d;this.B.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.B.B=c;if(this.l==jm){if(c=this.j.l)this.B.F=(this.I?this.I.i:1)*c.bandwidth;c&&c.video&&(b=this.B,d=c.video.height||NaN,b.A=c.video.width||NaN,b.l=d);this.T()&&(c=this.hf().valueOf()+1E3*this.La().end,this.B.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&
445
+ (this.B.I=this.i.presentationTimeline.g);c=this.C.getBandwidthEstimate();this.B.C=c}this.l==vm&&(c=this.B,b=a.videoHeight||NaN,c.A=a.videoWidth||NaN,c.l=b);var e=this.B;a=e.A;c=e.l;b=e.F;d=e.K;var f=e.N,g=e.J,h=e.C,k=e.i,l=e.m,m=e.H,n=e.j,p=gl(e.g,"playing"),t=gl(e.g,"paused"),v=gl(e.g,"buffering"),x=e.B,y=e.G,w=e.I,D=hl(e.g),z=[];e=r(e.h.g);for(var B=e.next();!B.done;B=e.next())B=B.value,z.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,
439
446
  height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:t,bufferingTime:v,licenseTime:x,liveLatency:y,maxSegmentDuration:w,stateHistory:D,switchHistory:z}};
440
- q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;zb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=Pl&&this.l!=am)throw new P(1,7,7004);if(!d){var h=pg(a);d=tm[h];if(!d)throw new P(1,2,2011,h);}if(this.l==am){if("text/vtt"!=d)throw new P(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=yk(this.W,a);d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.pb().find(function(k){return k.language==
441
- b&&k.label==(f||"")&&k.kind==c}))return Zl(this),a;throw new P(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new P(1,4,4033);a={id:this.Ke++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ri(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:Mb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
442
- closedCaptions:null};if(!Fd(yd(a.mimeType,a.codecs)))throw new P(2,2,2014,d);this.i.textStreams.push(a);Zl(this);return me(a)};
443
- q.Kf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,x,y,w,D;return M(function(z){switch(z.g){case 1:if(h.l!=Pl&&h.l!=am)throw new P(1,7,7004);if(d){z.D(2);break}return A(z,um(h,a),3);case 3:d=z.h;case 2:k=[];if(h.F)try{k=h.F.getServerSideCuePoints()}catch(B){}if(h.l!=am){z.D(4);break}g&&(c="forced");return A(z,vm(h,a,b,c,d,f||"",k),5);case 5:l=h.pb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return Zl(h),z["return"](m);throw new P(1,2,2012);case 4:n=
444
- Nb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new P(1,4,4033);if(!k.length){z.D(6);break}return A(z,wm(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,v=xm(h,t,d,k),x=new Blob([v],{type:"text/vtt"}),a=Zh(x),d="text/vtt";case 6:y={id:h.Ke++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ri(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.oa,primary:!1,trickModeVideo:null,
445
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=yd(y.mimeType,y.codecs);D=Fd(w);if(!D)throw new P(2,2,2014,d);h.i.textStreams.push(y);Zl(h);return z["return"](me(y))}})};
446
- q.Jf=function(a,b,c){var d=this,e,f,g,h;return M(function(k){switch(k.g){case 1:if(d.l!=Pl&&d.l!=am)throw new P(1,7,7004);if(c){k.D(2);break}return A(k,um(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return A(k,vm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.$e();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return A(k,new Promise(function(l,m){d.A.Ga(f,"load",l);d.A.Ga(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return k["return"](h);
447
- case 5:throw new P(1,2,2012);}})};function um(a,b){var c,d;return M(function(e){switch(e.g){case 1:c=pg(b);if(d=tm[c])return e["return"](d);E(e,2);return A(e,rg(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:I(e);case 3:if(d)return e["return"](d);throw new P(1,2,2011,c);}})}
448
- function vm(a,b,c,d,e,f,g){var h,k,l,m;return M(function(n){if(1==n.g)return"text/vtt"!=e||g.length?A(n,wm(a,b,a.H,a.h.streaming.retryParameters),3):n.D(2);2!=n.g&&(h=n.h,k=xm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Zh(l),e="text/vtt");m=document.createElement("track");m.src=yk(a.W,b);m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
449
- function wm(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){e=nf;f=gf([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&sk(k,f,{ot:zk,su:!0})}catch(l){Ta("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return A(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}function xm(a,b,c,d){var e=Gd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Ic(b),b=c.parseMedia(b,a),gk(b,d);throw new P(2,2,2014,c);}
450
- q.ve=function(a,b){this.Je.width=a;this.Je.height=b};q.ke=function(){if(this.l==Pl){var a=this.j;if(a.i.g)a=!1;else if(a.B)a=!1;else{for(var b=r(a.j.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Gc&&(c.Gc=!1,qj(a,c,.1));a=!0}}else a=!1;return a};q.kg=function(){Sa("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};
451
- q.lg=function(){return this.md};function Sk(a){var b=Hk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.T()&&d.includes(c.code)&&(c.severity=1,a.ke())};b.textDisplayFactory=function(){return a.gd?new Zj(a.g,a.gd):new Tj(a.g)};return b}q.Ae=function(a){this.gd=a};
452
- function Al(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Si;h={id:a.Ke++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
453
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Mb,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 zl(a,b){return M(function(c){if(1==c.g)return A(c,ym(a,b),2);mm(a,b);C(c)})}
454
- function ym(a,b){var c;return M(function(d){if(1==d.g)return c=a.j?a.j.l:null,A(d,ae(c,b),2);Yl(b);C(d)})}
455
- function mm(a,b){if(a.l!=hl){for(var c=a.h.restrictions,d=a.Je,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=$d(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Zl(a);if((c=a.m?a.m.g:null)&&a.m.B)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((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=r(f.initData||[]),g=f.next();!g.done;g=
456
- f.next())g=g.value,Rf(a.m,g.initDataType,g.initData);zm(a,b)}}
457
- function Tl(a,b){var c,d,e,f,g;return M(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return M(function(t){if(1==t.g)return k?A(t,k.createSegmentIndex(),2):t["return"](null);n=(m=k.segmentIndex.Jb(l))?m.next().value:null;if(!n)return t["return"](null);p=n.startTime;return t["return"](p)})},A(h,e(c,b),2);if(3!=h.g)return f=h.h,A(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)})}
458
- function tl(a){var b=a.Ic();if(a.B&&a.K&&a.G){var c=a.I;c.j=b;Ui(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Hl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(el(Am,b))}function Il(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=el(Bm),a.dispatchEvent(b))}function Hl(a){if(a.B&&a.K){var b=a.B.g;a.K.g==Ne?Lk(b,"buffering"):a.g.paused?Lk(b,"paused"):a.g.ended?Lk(b,"ended"):Lk(b,"playing")}}
459
- function Sl(a){try{zm(a,a.i)}catch(c){return rl(a,c),!1}var b=a.i.variants.filter(function(c){return te(c)});b=a.Aa.create(b);a.C.setVariants(Array.from(b.values()));return!0}function nm(a){var b;(b=Sl(a)?a.C.chooseVariant():null)&&Kl(a,b,!0,!0,0)}
460
- function Kl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&uj(a.j,b,d,e,!0);else{var g=a.B.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));uj(a.j,b,d,e);d=null;f&&(d=le(f));b=le(b);c?Ul(a,d,b):Cm(a,d,b)}}function pm(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=se(c);var d=se(b);Cm(a,c,d)}
461
- function Vl(a,b,c){a=Qb(a.h.preferredTextLanguage);b=Qb(b.language);c=Qb(c.language);return Pb(c,a)&&!Pb(b,c)}function Ul(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=el(Dm,b);Em(a,b)}function Zl(a){var b=el(Fm);Em(a,b)}function Cm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=el(Gm,b);Em(a,b)}function om(a){var b=el(Hm);Em(a,b)}function Wl(a){var b=el(Im);Em(a,b)}function Xl(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Em(a,el(Jm,b))}
462
- function rl(a,b){if(a.l!=hl){var c=el(Km,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function wl(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(el(b,c))}
463
- function ql(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 P(2,3,3016,b,c,a.g.error.message)}
464
- function El(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Lm.includes(l)}h!=f.allowedByKeySystem&&
465
- (e=!0)}}}if(!e||Sl(a))(d=a.j.l)&&!d.allowedByKeySystem&&nm(a),e&&Zl(a)}}function Fl(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=el(Mm);a.dispatchEvent(b)}function Jl(a,b,c){0<b&&(a.T()||a.Af(b));b=a.getDuration();c<b&&(a.T()||a.bb(c))}
466
- function zm(a,b){var c=a.m?a.m.dd():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(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=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var t=c[d?"00":p];t?Lm.includes(t)&&h.add(t):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
467
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new P(2,4,4012,c);}function Yl(a){if(!a.variants.some(te))throw new P(2,4,4032);}function Em(a,b){M(function(c){if(1==c.g)return A(c,Promise.resolve(),2);a.l!=hl&&a.dispatchEvent(b);C(c)})}function rm(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Qb(c.language)):b.add("und");return b}
468
- function qm(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Qb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=r(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));
469
- h.push({language:l,role:n,label:p})}});return h}function jl(){return new P(2,7,7E3)}function dl(a,b,c,d,e,f){return d==a&&e.M==f.M&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Nj(){return{M:null,mimeType:null,startTime:null,Be:NaN,uri:null}}function kl(a){return new Promise(function(b,c){a.Rb=function(){return c(jl())};a.pd=function(){return b()};a.onError=function(d){return c(d)};a.rd=function(){return c(jl())}})}N("shaka.Player",T);T.prototype.setVideoContainer=T.prototype.Ae;
470
- T.prototype.getManifestParserFactory=T.prototype.lg;T.prototype.getManifest=T.prototype.kg;T.prototype.retryStreaming=T.prototype.ke;T.prototype.setMaxHardwareResolution=T.prototype.ve;T.prototype.addChaptersTrack=T.prototype.Jf;T.prototype.addTextTrackAsync=T.prototype.Kf;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.getStats=T.prototype.getStats;T.prototype.getBufferedInfo=T.prototype.zb;T.prototype.getPresentationStartTimeAsDate=T.prototype.df;
471
- T.prototype.getPlayheadTimeAsDate=T.prototype.pg;T.prototype.setTextTrackVisibility=T.prototype.ze;T.prototype.getChapters=T.prototype.Yf;T.prototype.getChaptersTracks=T.prototype.$e;T.prototype.isTextTrackVisible=T.prototype.Pb;T.prototype.selectVariantsByLabel=T.prototype.Yg;T.prototype.selectTextLanguage=T.prototype.oe;T.prototype.selectAudioLanguage=T.prototype.wd;T.prototype.getTextLanguages=T.prototype.ug;T.prototype.getAudioLanguages=T.prototype.Uf;T.prototype.getTextLanguagesAndRoles=T.prototype.vg;
472
- T.prototype.getAudioLanguagesAndRoles=T.prototype.Vf;T.prototype.selectVariantTrack=T.prototype.qe;T.prototype.selectTextTrack=T.prototype.pe;T.prototype.getThumbnails=T.prototype.wg;T.prototype.getImageTracks=T.prototype.fg;T.prototype.getTextTracks=T.prototype.pb;T.prototype.getVariantTracks=T.prototype.$a;T.prototype.cancelTrickPlay=T.prototype.Pe;T.prototype.trickPlay=T.prototype.Fe;T.prototype.getPlaybackRate=T.prototype.Ab;T.prototype.isBuffering=T.prototype.Ic;T.prototype.getKeyStatuses=T.prototype.dd;
473
- T.prototype.getExpiration=T.prototype.Cc;T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.keySystem=T.prototype.keySystem;T.prototype.goToLive=T.prototype.Ag;T.prototype.seekRange=T.prototype.La;T.prototype.isAudioOnly=T.prototype.jf;T.prototype.isInProgress=T.prototype.Nb;T.prototype.isLive=T.prototype.T;T.prototype.getAdManager=T.prototype.bd;T.prototype.getAssetUri=T.prototype.Td;T.prototype.getNetworkingEngine=T.prototype.Dc;T.prototype.getMediaElement=T.prototype.ng;
474
- T.prototype.getLoadMode=T.prototype.cf;T.prototype.resetConfiguration=T.prototype.Wg;T.prototype.getBufferFullness=T.prototype.Wf;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.updateStartTime=T.prototype.jh;T.prototype.unload=T.prototype.He;T.prototype.detach=T.prototype.detach;T.prototype.attach=T.prototype.xc;
475
- T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return M(function(h){if(1==h.g)return b={},a?A(h,gg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Sc()){for(var l in og)k[l]=!0;for(var m in qg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=Sc()?!!og[n]:Uc(n);for(var p in l)k[p]=
476
- Sc()?!!qg[p]:Uc(l[p]);c=k;k={};p=r('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(","));
477
- for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Sc()?Fd(l)?!0:MediaSource.isTypeSupported(l)||ud(l):Uc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Nm;for(g in f)e[g]=f[g]();return h["return"](e)})};T.isBrowserSupported=il;T.setAdManagerFactory=function(a){Uk=a};T.registerSupportPlugin=function(a,b){Nm[a]=b};T.prototype.destroy=T.prototype.destroy;
478
- var Jm="abrstatuschanged",Dm="adaptation",Am="buffering",hm="downloadfailed",gm="downloadheadersreceived",Gl="drmsessionupdate",Kj="emsg",Km="error",Mm="expirationupdated",ol="loaded",ll="loading",Bl="manifestparsed",yl="mediaqualitychanged",fm="metadata",fl="onstatechange",gl="onstateidle",Bm="ratechange",Rl="streaming",Hm="textchanged",Im="texttrackvisibility",xl="timelineregionadded",jm="timelineregionenter",km="timelineregionexit",Fm="trackschanged",sl="unloading",Gm="variantchanged",Om={ph:Jm,
479
- qh:Dm,rh:Am,wh:hm,xh:gm,yh:Gl,Gh:Kj,Error:Km,Hh:Mm,Nh:"largegap",Oh:ol,Ph:ll,Th:Bl,Uh:yl,Metadata:fm,Zh:fl,$h:gl,ji:Bm,pi:"sessiondata",ri:Rl,si:Hm,ti:Im,wi:xl,xi:jm,zi:km,Ai:Fm,Ei:sl,Gi:Gm},hl=0,Rk=1,Pl=2,am=3;T.LoadMode={DESTROYED:hl,NOT_LOADED:Rk,MEDIA_SOURCE:Pl,SRC_EQUALS:am};T.version="v3.3.11";var Pm=["3","3"];Ab=new function(a){this.g=a;this.i=Bb;this.h=Cb}(new yb(Number(Pm[0]),Number(Pm[1])));
480
- var Lm=["output-restricted","internal-error"],Nm={},Uk=null,pl={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"},tm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
481
- ssa:"text/x-ssa",ass:"text/x-ssa"};function Qm(){this.h=[];this.j=this.i=this.g=0};function Rm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new qf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=Rm.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
447
+ q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;zb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=jm&&this.l!=vm)throw new P(1,7,7004);if(!d){var h=Kg(a);d=Om[h];if(!d)throw new P(1,2,2011,h);}if(this.l==vm){if("text/vtt"!=d)throw new P(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=Tk(this.W,a);d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.ob().find(function(k){return k.language==
448
+ b&&k.label==(f||"")&&k.kind==c}))return tm(this),a;throw new P(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new P(1,4,4033);a={id:this.Ne++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:nj(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:Mb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
449
+ closedCaptions:null};if(!Ed(yd(a.mimeType,a.codecs)))throw new P(2,2,2014,d);this.i.textStreams.push(a);tm(this);return me(a)};
450
+ q.Of=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,x,y,w,D;return M(function(z){switch(z.g){case 1:if(h.l!=jm&&h.l!=vm)throw new P(1,7,7004);if(d){z.D(2);break}return A(z,Pm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(B){}if(h.l!=vm){z.D(4);break}g&&(c="forced");return A(z,Qm(h,a,b,c,d,f||"",k),5);case 5:l=h.ob();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return tm(h),z["return"](m);throw new P(1,2,2012);case 4:n=
451
+ Nb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new P(1,4,4033);if(!k.length){z.D(6);break}return A(z,Rm(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,v=Sm(h,t,d,k),x=new Blob([v],{type:"text/vtt"}),a=ti(x),d="text/vtt";case 6:y={id:h.Ne++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:nj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.oa,primary:!1,trickModeVideo:null,
452
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=yd(y.mimeType,y.codecs);D=Ed(w);if(!D)throw new P(2,2,2014,d);h.i.textStreams.push(y);tm(h);return z["return"](me(y))}})};
453
+ q.Nf=function(a,b,c){var d=this,e,f,g,h;return M(function(k){switch(k.g){case 1:if(d.l!=jm&&d.l!=vm)throw new P(1,7,7004);if(c){k.D(2);break}return A(k,Pm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return A(k,Qm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.df();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return A(k,new Promise(function(l,m){d.A.Ga(f,"load",l);d.A.Ga(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return k["return"](h);
454
+ case 5:throw new P(1,2,2012);}})};function Pm(a,b){var c,d;return M(function(e){switch(e.g){case 1:c=Kg(b);if(d=Om[c])return e["return"](d);E(e,2);return A(e,Mg(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:I(e);case 3:if(d)return e["return"](d);throw new P(1,2,2011,c);}})}
455
+ function Qm(a,b,c,d,e,f,g){var h,k,l,m;return M(function(n){if(1==n.g)return"text/vtt"!=e||g.length?A(n,Rm(a,b,a.H,a.h.streaming.retryParameters),3):n.D(2);2!=n.g&&(h=n.h,k=Sm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=ti(l),e="text/vtt");m=document.createElement("track");m.src=Tk(a.W,b);m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
456
+ function Rm(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){e=nf;f=gf([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&Nk(k,f,{ot:Uk,su:!0})}catch(l){Ta("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return A(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}function Sm(a,b,c,d){var e=Gd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Ic(b),b=c.parseMedia(b,a),Bk(b,d);throw new P(2,2,2014,c);}
457
+ q.ye=function(a,b){this.Me.width=a;this.Me.height=b};q.oe=function(a){if(this.l==jm){var b=this.j;a=void 0===a?.1:a;if(b.i.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Gc&&(d.Gc=!1,Lj(b,d,a));b=!0}}else b=!1;return b};
458
+ q.og=function(){Sa("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.pg=function(){return this.nd};
459
+ function ml(a){var b=bl();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.oe(d))}};b.textDisplayFactory=function(){return a.hd?new uk(a.g,a.hd):new ok(a.g)};return b}q.De=function(a){this.hd=a};
460
+ function Vl(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new oj;h={id:a.Ne++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
461
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Mb,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 Ul(a,b){return M(function(c){if(1==c.g)return A(c,Tm(a,b),2);Hm(a,b);C(c)})}
462
+ function Tm(a,b){var c;return M(function(d){if(1==d.g)return c=a.j?a.j.l:null,A(d,ae(c,b),2);sm(b);C(d)})}
463
+ function Hm(a,b){if(a.l!=Cl){for(var c=a.h.restrictions,d=a.Me,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=$d(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&tm(a);if((c=a.m?a.m.g:null)&&a.m.B)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((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=r(f.initData||[]),g=f.next();!g.done;g=
464
+ f.next())g=g.value,mg(a.m,g.initDataType,g.initData);Um(a,b)}}
465
+ function nm(a,b){var c,d,e,f,g;return M(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return M(function(t){if(1==t.g)return k?A(t,k.createSegmentIndex(),2):t["return"](null);n=(m=k.segmentIndex.Jb(l))?m.next().value:null;if(!n)return t["return"](null);p=n.startTime;return t["return"](p)})},A(h,e(c,b),2);if(3!=h.g)return f=h.h,A(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)})}
466
+ function Ol(a){var b=a.Ic();if(a.B&&a.K&&a.F){var c=a.I;c.j=b;qj(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);bm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(zl(Vm,b))}function cm(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=zl(Wm),a.dispatchEvent(b))}function bm(a){if(a.B&&a.K){var b=a.B.g;a.K.g==Ne?fl(b,"buffering"):a.g.paused?fl(b,"paused"):a.g.ended?fl(b,"ended"):fl(b,"playing")}}
467
+ function mm(a){try{Um(a,a.i)}catch(c){return Ml(a,c),!1}var b=a.i.variants.filter(function(c){return te(c)});b=a.Aa.create(b);a.C.setVariants(Array.from(b.values()));return!0}function Im(a){var b;(b=mm(a)?a.C.chooseVariant():null)&&em(a,b,!0,!0,0)}
468
+ function em(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Pj(a.j,b,d,e,!0);else{var g=a.B.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Pj(a.j,b,d,e);d=null;f&&(d=le(f));b=le(b);c?om(a,d,b):Xm(a,d,b)}}function Km(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=se(c);var d=se(b);Xm(a,c,d)}
469
+ function pm(a,b,c){a=Qb(a.h.preferredTextLanguage);b=Qb(b.language);c=Qb(c.language);return Pb(c,a)&&!Pb(b,c)}function om(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=zl(Ym,b);Zm(a,b)}function tm(a){var b=zl($m);Zm(a,b)}function Xm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=zl(an,b);Zm(a,b)}function Jm(a){var b=zl(bn);Zm(a,b)}function qm(a){var b=zl(cn);Zm(a,b)}function rm(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Zm(a,zl(dn,b))}
470
+ function Ml(a,b){if(a.l!=Cl){var c=zl(en,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Rl(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(zl(b,c))}
471
+ function Ll(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 P(2,3,3016,b,c,a.g.error.message)}
472
+ function Zl(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!fn.includes(l)}h!=f.allowedByKeySystem&&
473
+ (e=!0)}}}if(!e||mm(a))(d=a.j.l)&&!d.allowedByKeySystem&&Im(a),e&&tm(a)}}function $l(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=zl(gn);a.dispatchEvent(b)}function dm(a,b,c){0<b&&(a.T()||a.Ef(b));b=a.getDuration();c<b&&(a.T()||a.bb(c))}
474
+ function Um(a,b){var c=a.m?a.m.ed():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(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=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var t=c[d?"00":p];t?fn.includes(t)&&h.add(t):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
475
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new P(2,4,4012,c);}function sm(a){if(!a.variants.some(te))throw new P(2,4,4032);}function Zm(a,b){M(function(c){if(1==c.g)return A(c,Promise.resolve(),2);a.l!=Cl&&a.dispatchEvent(b);C(c)})}function Mm(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Qb(c.language)):b.add("und");return b}
476
+ function Lm(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Qb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=r(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));
477
+ h.push({language:l,role:n,label:p})}});return h}function El(){return new P(2,7,7E3)}function yl(a,b,c,d,e,f){return d==a&&e.M==f.M&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function ik(){return{M:null,mimeType:null,startTime:null,Ee:NaN,uri:null}}function Fl(a){return new Promise(function(b,c){a.Rb=function(){return c(El())};a.qd=function(){return b()};a.onError=function(d){return c(d)};a.sd=function(){return c(El())}})}N("shaka.Player",T);T.prototype.setVideoContainer=T.prototype.De;
478
+ T.prototype.getManifestParserFactory=T.prototype.pg;T.prototype.getManifest=T.prototype.og;T.prototype.retryStreaming=T.prototype.oe;T.prototype.setMaxHardwareResolution=T.prototype.ye;T.prototype.addChaptersTrack=T.prototype.Nf;T.prototype.addTextTrackAsync=T.prototype.Of;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.getStats=T.prototype.getStats;T.prototype.getBufferedInfo=T.prototype.zb;T.prototype.getPresentationStartTimeAsDate=T.prototype.hf;
479
+ T.prototype.getPlayheadTimeAsDate=T.prototype.ug;T.prototype.setTextTrackVisibility=T.prototype.Ce;T.prototype.getChapters=T.prototype.cg;T.prototype.getChaptersTracks=T.prototype.df;T.prototype.isTextTrackVisible=T.prototype.Pb;T.prototype.selectVariantsByLabel=T.prototype.bh;T.prototype.selectTextLanguage=T.prototype.re;T.prototype.selectAudioLanguage=T.prototype.xd;T.prototype.getTextLanguages=T.prototype.yg;T.prototype.getAudioLanguages=T.prototype.Yf;T.prototype.getTextLanguagesAndRoles=T.prototype.zg;
480
+ T.prototype.getAudioLanguagesAndRoles=T.prototype.Zf;T.prototype.selectVariantTrack=T.prototype.ue;T.prototype.selectTextTrack=T.prototype.se;T.prototype.getThumbnails=T.prototype.Ag;T.prototype.getImageTracks=T.prototype.jg;T.prototype.getTextTracks=T.prototype.ob;T.prototype.getVariantTracks=T.prototype.Za;T.prototype.cancelTrickPlay=T.prototype.Se;T.prototype.trickPlay=T.prototype.Ie;T.prototype.getPlaybackRate=T.prototype.Ab;T.prototype.isBuffering=T.prototype.Ic;T.prototype.getKeyStatuses=T.prototype.ed;
481
+ T.prototype.getExpiration=T.prototype.Cc;T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.keySystem=T.prototype.keySystem;T.prototype.goToLive=T.prototype.Eg;T.prototype.seekRange=T.prototype.La;T.prototype.isAudioOnly=T.prototype.mf;T.prototype.isInProgress=T.prototype.Nb;T.prototype.isLive=T.prototype.T;T.prototype.getAdManager=T.prototype.cd;T.prototype.getAssetUri=T.prototype.Wd;T.prototype.getNetworkingEngine=T.prototype.Dc;T.prototype.getMediaElement=T.prototype.rg;
482
+ T.prototype.getLoadMode=T.prototype.gf;T.prototype.resetConfiguration=T.prototype.$g;T.prototype.getBufferFullness=T.prototype.$f;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.updateStartTime=T.prototype.nh;T.prototype.unload=T.prototype.Ke;T.prototype.detach=T.prototype.detach;T.prototype.attach=T.prototype.xc;
483
+ T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return M(function(h){if(1==h.g)return b={},a?A(h,Cg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Tc()){for(var l in Jg)k[l]=!0;for(var m in Lg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=Tc()?!!Jg[n]:Uc(n);for(var p in l)k[p]=
484
+ Tc()?!!Lg[p]:Uc(l[p]);c=k;k={};p=r('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(","));
485
+ for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Tc()?Ed(l)?!0:MediaSource.isTypeSupported(l)||ud(l):Uc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=hn;for(g in f)e[g]=f[g]();return h["return"](e)})};T.isBrowserSupported=Dl;T.setAdManagerFactory=function(a){ol=a};T.registerSupportPlugin=function(a,b){hn[a]=b};T.prototype.destroy=T.prototype.destroy;
486
+ var dn="abrstatuschanged",Ym="adaptation",Vm="buffering",Cm="downloadfailed",Bm="downloadheadersreceived",am="drmsessionupdate",fk="emsg",en="error",gn="expirationupdated",Jl="loaded",Gl="loading",Wl="manifestparsed",Tl="mediaqualitychanged",Am="metadata",Al="onstatechange",Bl="onstateidle",Wm="ratechange",lm="streaming",bn="textchanged",cn="texttrackvisibility",Sl="timelineregionadded",Em="timelineregionenter",Fm="timelineregionexit",$m="trackschanged",Nl="unloading",an="variantchanged",jn={uh:dn,
487
+ vh:Ym,wh:Vm,Bh:Cm,Ch:Bm,Dh:am,Kh:fk,Error:en,Lh:gn,Rh:"largegap",Sh:Jl,Th:Gl,Xh:Wl,Yh:Tl,Metadata:Am,ci:Al,di:Bl,ni:Wm,wi:"sessiondata",xi:lm,zi:bn,Ai:cn,Bi:Sl,Ci:Em,Di:Fm,Ei:$m,Ii:Nl,Ki:an},Cl=0,ll=1,jm=2,vm=3;T.LoadMode={DESTROYED:Cl,NOT_LOADED:ll,MEDIA_SOURCE:jm,SRC_EQUALS:vm};T.version="v3.3.13";var kn=["3","3"];Ab=new function(a){this.g=a;this.i=Bb;this.h=Cb}(new yb(Number(kn[0]),Number(kn[1])));
488
+ var fn=["output-restricted","internal-error"],hn={},ol=null,Kl={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"},Om={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
489
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function ln(){this.h=[];this.j=this.i=this.g=0};function mn(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new qf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=mn.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
482
490
  q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
483
491
  q.isLinear=function(){return this.h.isLinear()};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.h.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};
484
- N("shaka.ads.ClientSideAd",Rm);Rm.prototype.release=Rm.prototype.release;Rm.prototype.getPositionInSequence=Rm.prototype.getPositionInSequence;Rm.prototype.getSequenceLength=Rm.prototype.getSequenceLength;Rm.prototype.setMuted=Rm.prototype.setMuted;Rm.prototype.resize=Rm.prototype.resize;Rm.prototype.isLinear=Rm.prototype.isLinear;Rm.prototype.isMuted=Rm.prototype.isMuted;Rm.prototype.setVolume=Rm.prototype.setVolume;Rm.prototype.getVolume=Rm.prototype.getVolume;Rm.prototype.play=Rm.prototype.play;
485
- Rm.prototype.pause=Rm.prototype.pause;Rm.prototype.skip=Rm.prototype.skip;Rm.prototype.canSkipNow=Rm.prototype.canSkipNow;Rm.prototype.getTimeUntilSkippable=Rm.prototype.getTimeUntilSkippable;Rm.prototype.isSkippable=Rm.prototype.isSkippable;Rm.prototype.isPaused=Rm.prototype.isPaused;Rm.prototype.getRemainingTime=Rm.prototype.getRemainingTime;Rm.prototype.getMinSuggestedDuration=Rm.prototype.getMinSuggestedDuration;Rm.prototype.getDuration=Rm.prototype.getDuration;function Sm(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new qf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.11");this.g=null;this.h.Ga(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Tm(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
486
- function(f){Um(e,f)});this.i.onended=function(){e.m.contentComplete()}}Sm.prototype.stop=function(){this.g&&this.g.stop();this.A&&Yj(this.A)};Sm.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Um(a,b){b.getError();Vm(a,null);a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
487
- function Tm(a,b){a.l(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Wm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
488
- a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)),a.g.start()}catch(f){Vm(a,null)}}
489
- function Wm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.l(new O(d,e))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Um(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Xm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Xm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
490
- function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Vm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Vm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
492
+ N("shaka.ads.ClientSideAd",mn);mn.prototype.release=mn.prototype.release;mn.prototype.getPositionInSequence=mn.prototype.getPositionInSequence;mn.prototype.getSequenceLength=mn.prototype.getSequenceLength;mn.prototype.setMuted=mn.prototype.setMuted;mn.prototype.resize=mn.prototype.resize;mn.prototype.isLinear=mn.prototype.isLinear;mn.prototype.isMuted=mn.prototype.isMuted;mn.prototype.setVolume=mn.prototype.setVolume;mn.prototype.getVolume=mn.prototype.getVolume;mn.prototype.play=mn.prototype.play;
493
+ mn.prototype.pause=mn.prototype.pause;mn.prototype.skip=mn.prototype.skip;mn.prototype.canSkipNow=mn.prototype.canSkipNow;mn.prototype.getTimeUntilSkippable=mn.prototype.getTimeUntilSkippable;mn.prototype.isSkippable=mn.prototype.isSkippable;mn.prototype.isPaused=mn.prototype.isPaused;mn.prototype.getRemainingTime=mn.prototype.getRemainingTime;mn.prototype.getMinSuggestedDuration=mn.prototype.getMinSuggestedDuration;mn.prototype.getDuration=mn.prototype.getDuration;function nn(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new qf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v3.3.13");this.g=null;this.h.Ga(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){on(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
494
+ function(f){pn(e,f)});this.i.onended=function(){e.m.contentComplete()}}nn.prototype.stop=function(){this.g&&this.g.stop();this.A&&tk(this.A)};nn.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function pn(a,b){b.getError();qn(a,null);a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
495
+ function on(a,b){a.l(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",d)))}rn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
496
+ a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)),a.i.addEventListener("play",function(){a.g.start()},{once:!0})}catch(f){qn(a,null)}}
497
+ function rn(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.l(new O(d,e))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){pn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){sn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){sn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
498
+ function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){qn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){qn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
491
499
  a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.o(a.g,
492
500
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,google.ima.AdEvent.Type.AD_METADATA,
493
- function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Xm(a,b){var c=b.getAd();a.j=new Rm(c,a.g);c=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new O("ad-started",c));a.j.isLinear()&&(a.A.setAttribute("ad-active","true"),a.i.pause())}
494
- function Vm(a,b){a.l(new O("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.A.removeAttribute("ad-active"),a.i.play())};function Ym(a,b){this.i=a;this.h=null;this.g=b}q=Ym.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)};
501
+ function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function sn(a,b){var c=b.getAd();a.j=new mn(c,a.g);c=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new O("ad-started",c));a.j.isLinear()&&(a.A.setAttribute("ad-active","true"),a.i.pause())}
502
+ function qn(a,b){a.l(new O("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.A.removeAttribute("ad-active"),a.i.play())};function tn(a,b){this.i=a;this.h=null;this.g=b}q=tn.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)};
495
503
  q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
496
- 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.h=this.i=null};N("shaka.ads.ServerSideAd",Ym);Ym.prototype.release=Ym.prototype.release;Ym.prototype.getPositionInSequence=Ym.prototype.getPositionInSequence;Ym.prototype.getSequenceLength=Ym.prototype.getSequenceLength;Ym.prototype.setMuted=Ym.prototype.setMuted;
497
- Ym.prototype.resize=Ym.prototype.resize;Ym.prototype.isLinear=Ym.prototype.isLinear;Ym.prototype.isMuted=Ym.prototype.isMuted;Ym.prototype.setVolume=Ym.prototype.setVolume;Ym.prototype.getVolume=Ym.prototype.getVolume;Ym.prototype.play=Ym.prototype.play;Ym.prototype.pause=Ym.prototype.pause;Ym.prototype.skip=Ym.prototype.skip;Ym.prototype.canSkipNow=Ym.prototype.canSkipNow;Ym.prototype.getTimeUntilSkippable=Ym.prototype.getTimeUntilSkippable;Ym.prototype.isSkippable=Ym.prototype.isSkippable;
498
- Ym.prototype.isPaused=Ym.prototype.isPaused;Ym.prototype.getRemainingTime=Ym.prototype.getRemainingTime;Ym.prototype.getMinSuggestedDuration=Ym.prototype.getMinSuggestedDuration;Ym.prototype.getDuration=Ym.prototype.getDuration;function Zm(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.A=null;this.F="";this.G=[];this.h=new qf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new O("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){$m(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
499
- e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Ym(f,e.l);e.C&&(e.m.h=e.C);e.i(new O("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
504
+ 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.h=this.i=null};N("shaka.ads.ServerSideAd",tn);tn.prototype.release=tn.prototype.release;tn.prototype.getPositionInSequence=tn.prototype.getPositionInSequence;tn.prototype.getSequenceLength=tn.prototype.getSequenceLength;tn.prototype.setMuted=tn.prototype.setMuted;
505
+ tn.prototype.resize=tn.prototype.resize;tn.prototype.isLinear=tn.prototype.isLinear;tn.prototype.isMuted=tn.prototype.isMuted;tn.prototype.setVolume=tn.prototype.setVolume;tn.prototype.getVolume=tn.prototype.getVolume;tn.prototype.play=tn.prototype.play;tn.prototype.pause=tn.prototype.pause;tn.prototype.skip=tn.prototype.skip;tn.prototype.canSkipNow=tn.prototype.canSkipNow;tn.prototype.getTimeUntilSkippable=tn.prototype.getTimeUntilSkippable;tn.prototype.isSkippable=tn.prototype.isSkippable;
506
+ tn.prototype.isPaused=tn.prototype.isPaused;tn.prototype.getRemainingTime=tn.prototype.getRemainingTime;tn.prototype.getMinSuggestedDuration=tn.prototype.getMinSuggestedDuration;tn.prototype.getDuration=tn.prototype.getDuration;function un(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.A=null;this.F="";this.G=[];this.h=new qf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new O("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){vn(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
507
+ e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new tn(f,e.l);e.C&&(e.m.h=e.C);e.i(new O("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
500
508
  var f=e.l.currentTime;e.A&&e.A>f&&(e.l.currentTime=e.A,e.A=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.h=e.C)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new O("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new O("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new O("ad-third-quartile"))});
501
509
  this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new O("ad-complete"));e.i(new O("ad-stopped"));e.B.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new O("ad-skipped"));e.i(new O("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G=
502
- f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Zm.prototype.stop=function(){this.F="";this.A=null;this.G=[]};Zm.prototype.release=function(){this.stop();this.h&&this.h.release()};Zm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
503
- function $m(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.l.currentTime=e.start)}})};function U(){cb.call(this);this.g=this.i=null;this.h=new Qm;this.j=navigator.language}u(U,cb);q=U.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new P(2,10,1E4);this.i&&this.i.release();this.i=new Sm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
504
- q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.h=new Qm};q.requestClientSideAds=function(a){if(!this.i)throw new P(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
505
- q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new Zm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
506
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.3.11";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
507
- (c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.3.11";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
510
+ f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}un.prototype.stop=function(){this.F="";this.A=null;this.G=[]};un.prototype.release=function(){this.stop();this.h&&this.h.release()};un.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
511
+ function vn(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.l.currentTime=e.start)}})};function U(){cb.call(this);this.g=this.i=null;this.h=new ln;this.j=navigator.language}u(U,cb);q=U.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new P(2,10,1E4);this.i&&this.i.release();this.i=new nn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
512
+ q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.h=new ln};q.requestClientSideAds=function(a){if(!this.i)throw new P(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
513
+ q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new un(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
514
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.3.13";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
515
+ (c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.3.13";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
508
516
  q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};N("shaka.ads.AdManager",U);
509
517
  U.prototype.onCueMetadataChange=U.prototype.onCueMetadataChange;U.prototype.onHlsTimedMetadata=U.prototype.onHlsTimedMetadata;U.prototype.onDashTimedMetadata=U.prototype.onDashTimedMetadata;U.prototype.getStats=U.prototype.getStats;U.prototype.getServerSideCuePoints=U.prototype.getServerSideCuePoints;U.prototype.replaceServerSideAdTagParameters=U.prototype.replaceServerSideAdTagParameters;U.prototype.requestServerSideStream=U.prototype.requestServerSideStream;U.prototype.initServerSide=U.prototype.initServerSide;
510
518
  U.prototype.requestClientSideAds=U.prototype.requestClientSideAds;U.prototype.onAssetUnload=U.prototype.onAssetUnload;U.prototype.release=U.prototype.release;U.prototype.initClientSide=U.prototype.initClientSide;U.prototype.setLocale=U.prototype.setLocale;U.ADS_LOADED="ads-loaded";U.AD_STARTED="ad-started";U.AD_FIRST_QUARTILE="ad-first-quartile";U.AD_MIDPOINT="ad-midpoint";U.AD_THIRD_QUARTILE="ad-third-quartile";U.AD_COMPLETE="ad-complete";U.AD_STOPPED="ad-stopped";U.AD_SKIPPED="ad-skipped";
511
519
  U.AD_VOLUME_CHANGED="ad-volume-changed";U.AD_MUTED="ad-muted";U.AD_PAUSED="ad-paused";U.AD_RESUMED="ad-resumed";U.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";U.CUEPOINTS_CHANGED="ad-cue-points-changed";U.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";U.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";U.AD_CLICKED="ad-clicked";U.AD_PROGRESS="ad-progress";U.AD_BUFFERING="ad-buffering";U.AD_IMPRESSION="ad-impression";U.AD_DURATION_CHANGED="ad-duration-changed";U.AD_CLOSED="ad-closed";
512
- U.AD_LOADED="ad-loaded";U.ALL_ADS_COMPLETED="all-ads-completed";U.AD_LINEAR_CHANGED="ad-linear-changed";U.AD_METADATA="ad-metadata";U.AD_RECOVERABLE_ERROR="ad-recoverable-error";U.AD_BREAK_READY="ad-break-ready";U.AD_INTERACTION="ad-interaction";Uk=function(){return new U};function an(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof O){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=r(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=r(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
513
- TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(Uh(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}})}
514
- function bn(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=cn(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})}
515
- function cn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
516
- var dn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),en="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),fn=["loop","playbackRate"],gn=["pause","play"],hn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
517
- getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},jn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},kn=[["getConfiguration","configure"]],ln=[["isTextTrackVisible","setTextTrackVisibility"]],mn="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
518
- nn=["attach","detach","load","unload"];function on(a,b,c,d,e,f){var g=this;this.I=a;this.j=new Q(b);this.R=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.N="";this.A=null;this.F=function(){return pn(g)};this.G=function(h,k){var l=bn(k);switch(l.type){case "event":var m=l.targetName;l=Oa(l.event);g.B(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.C&&(g.R(),g.C=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new P(l.severity,l.category,l.code);
519
- for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;qn.add(this)}q=on.prototype;q.destroy=function(){qn["delete"](this);rn(this);sn&&tn(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.ra=function(){return this.h};q.ud=function(){return this.N};
520
- q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.za();var a=new chrome.cast.SessionRequest(this.I);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(qn),d=c.next();!d.done;d=c.next())un(d.value,b)},function(b){for(var c=r(qn),d=c.next();!d.done;d=c.next())d=d.value,vn="available"==b,d.j.za()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});vn&&this.j.S(wn);(a=sn)&&a.status!=chrome.cast.SessionStatus.STOPPED?un(this,
521
- a):sn=null}else window.__onGCastApiAvailable!==xn&&(yn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=xn)};q.re=function(a){this.A=a;this.h&&zn(this,{type:"appData",appData:this.A})};q.cast=function(a){var b=this;return M(function(c){if(!b.m)throw new P(1,8,8E3);if(!vn)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new Pc;chrome.cast.requestSession(function(d){return An(b,a,d)},function(d){return Bn(b,d)});return A(c,b.l,0)})};
522
- function Cn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return An(a,b,c)},function(c){return Bn(a,c)})}}q.Zb=function(){if(this.h){rn(this);if(sn){tn(this);try{sn.stop(function(){},function(){})}catch(a){}sn=null}pn(this)}};
523
- q.get=function(a,b){var c=this;if("video"==a){if(gn.includes(b))return function(){return c.rf.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))}}else if("player"==a){if(jn[b]&&!this.get("player","isLive")())return function(){};if(mn.includes(b))return function(){return c.rf.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(nn.includes(b))return function(){return c.Tg.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(hn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
524
- q.set=function(a,b,c){this.g[a][b]=c;zn(this,{type:"set",targetName:a,property:b,value:c})};function An(a,b,c){sn=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);pn(a);zn(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}function Bn(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 P(2,8,c,b))}
525
- q.rf=function(a,b){zn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.Tg=function(a,b){var c=Fa.apply(2,arguments),d=new Pc,e=this.J.toString();this.J++;this.i[e]=d;try{zn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function un(a,b){var c=a.K();a.l=new Pc;a.C=!0;An(a,c,b)}function tn(a){var b=sn;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
526
- function pn(a){var b=sn?"connected"==sn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};rn(a)}a.h=b;a.N=b?sn.receiver.friendlyName:"";a.j.za()}function rn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function zn(a,b){var c=an(b),d=sn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Va)}catch(e){throw c=new P(2,8,8005,e),d=new O("error",(new Map).set("detail",c)),a.B("player",d),a.Zb(),c;}}var wn=.02,vn=!1,sn=null,yn=null,qn=new Set;
527
- function xn(a){yn?window.__onGCastApiAvailable=yn:delete window.__onGCastApiAvailable;yn=null;if(a)for(var b=r(qn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Dn(a,b,c){cb.call(this);var d=this;this.i=a;this.h=b;this.m=this.A=this.j=this.B=this.l=null;this.F=c;this.C=new Map;this.g=new on(c,function(){return En(d)},function(){return Fn(d)},function(e,f){return Gn(d,e,f)},function(){return Hn(d)},function(){return In(d)});Jn(this)}u(Dn,cb);q=Dn.prototype;
528
- q.destroy=function(a){a&&this.g.Zb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.l=this.i=null;cb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.ac=function(){return this.B};q.Oe=function(){return this.g.m&&vn};q.ra=function(){return this.g.ra()};q.ud=function(){return this.g.ud()};
529
- q.cast=function(){var a=this,b;return M(function(c){return 1==c.g?(b=In(a),A(c,a.g.cast(b),2)):a.h?A(c,a.h.He(),0):c["return"]()})};q.re=function(a){this.g.re(a)};q.Cf=function(){Cn(this.g)};q.Zb=function(){this.g.Zb()};
530
- q.Se=function(a){var b=this;return M(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.Zb();return A(c,b.g.destroy(),2)}b.g=null;b.g=new on(a,function(){return En(b)},function(){return Fn(b)},function(d,e){return Gn(b,d,e)},function(){return Hn(b)},function(){return In(b)});b.g.init();C(c)})};
531
- function Jn(a){a.g.init();a.m=new qf;for(var b=r(dn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.ra()||(f=Oa(f),a.j.dispatchEvent(f))});for(var d in Om)a.m.o(a.h,Om[d],function(f){a.g.ra()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.pc=e,Object.defineProperty(a.l,b.pc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Kn(a,f.pc)}}(b),set:function(f){return function(g){var h=f.pc;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={pc:b.pc};a.B={};Ln(a,
532
- function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return Mn(a,f)}})});Nn(a);a.j=new cb;a.j.jd=a.l;a.A=new cb;a.A.jd=a.B}function Nn(a){var b=new Map;Ln(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.C.set(c,e):a.C.set(e,c)}else b.set(d,c)})}
533
- function Ln(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(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)}}
534
- function In(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Td(),startTime:null};a.i.pause();for(var c=r(fn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=r(kn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=r(ln);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function En(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
535
- function Fn(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
536
- function Hn(a){for(var b=r(kn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(fn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(fn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(ln);for(k=
537
- h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new O(Km,h);a.h.dispatchEvent(h)})}
538
- function Kn(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.ra()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ra()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
539
- function Mn(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Dc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.bd()};
540
- if("setVideoContainer"==b)return function(c){return a.h.Ae(c)};if(a.g.ra()){if("getManifest"==b||"drmInfo"==b)return function(){Sa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Sa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ra()&&0==Object.keys(a.g.g.video).length&&hn[b]||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}function Gn(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}
541
- N("shaka.cast.CastProxy",Dn);Dn.prototype.changeReceiverId=Dn.prototype.Se;Dn.prototype.forceDisconnect=Dn.prototype.Zb;Dn.prototype.suggestDisconnect=Dn.prototype.Cf;Dn.prototype.setAppData=Dn.prototype.re;Dn.prototype.cast=Dn.prototype.cast;Dn.prototype.receiverName=Dn.prototype.ud;Dn.prototype.isCasting=Dn.prototype.ra;Dn.prototype.canCast=Dn.prototype.Oe;Dn.prototype.getPlayer=Dn.prototype.ac;Dn.prototype.getVideo=Dn.prototype.Bb;Dn.prototype.destroy=Dn.prototype.destroy;function On(a,b,c,d){cb.call(this);var e=this;this.g=a;this.h=b;this.j=new qf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.A=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new Q(function(){Pn(e)});Qn(this)}u(On,cb);q=On.prototype;q.isConnected=function(){return this.H};q.Dg=function(){return this.A};q.ah=function(a){this.i=a};q.Qf=function(){this.i=null};
542
- q.bh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.$g=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Zg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
520
+ U.AD_LOADED="ad-loaded";U.ALL_ADS_COMPLETED="all-ads-completed";U.AD_LINEAR_CHANGED="ad-linear-changed";U.AD_METADATA="ad-metadata";U.AD_RECOVERABLE_ERROR="ad-recoverable-error";U.AD_BREAK_READY="ad-break-ready";U.AD_INTERACTION="ad-interaction";ol=function(){return new U};function wn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof O){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=r(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=r(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
521
+ TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(oi(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}})}
522
+ function xn(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=yn(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})}
523
+ function yn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
524
+ var zn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),An="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Bn=["loop","playbackRate"],Cn=["pause","play"],Dn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
525
+ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},En={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Fn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Gn=[["getConfiguration","configure"]],Hn=[["isTextTrackVisible","setTextTrackVisibility"]],In="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
526
+ Jn=["attach","detach","load","unload"];function Kn(a,b,c,d,e,f){var g=this;this.I=a;this.j=new Q(b);this.S=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.N="";this.A=null;this.F=function(){return Ln(g)};this.G=function(h,k){var l=xn(k);switch(l.type){case "event":var m=l.targetName;l=Oa(l.event);g.B(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.C&&(g.S(),g.C=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new P(l.severity,l.category,l.code);
527
+ for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;Mn.add(this)}q=Kn.prototype;q.destroy=function(){Mn["delete"](this);Nn(this);On&&Pn(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.ra=function(){return this.h};q.vd=function(){return this.N};
528
+ q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.za();var a=new chrome.cast.SessionRequest(this.I);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(Mn),d=c.next();!d.done;d=c.next())Qn(d.value,b)},function(b){for(var c=r(Mn),d=c.next();!d.done;d=c.next())d=d.value,Rn="available"==b,d.j.za()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Rn&&this.j.R(Sn);(a=On)&&a.status!=chrome.cast.SessionStatus.STOPPED?Qn(this,
529
+ a):On=null}else window.__onGCastApiAvailable!==Tn&&(Un=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Tn)};q.ve=function(a){this.A=a;this.h&&Vn(this,{type:"appData",appData:this.A})};q.cast=function(a){var b=this;return M(function(c){if(!b.m)throw new P(1,8,8E3);if(!Rn)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new Pc;chrome.cast.requestSession(function(d){return Wn(b,a,d)},function(d){return Xn(b,d)});return A(c,b.l,0)})};
530
+ function Yn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return Wn(a,b,c)},function(c){return Xn(a,c)})}}q.Zb=function(){if(this.h){Nn(this);if(On){Pn(this);try{On.stop(function(){},function(){})}catch(a){}On=null}Ln(this)}};
531
+ q.get=function(a,b){var c=this;if("video"==a){if(Cn.includes(b))return function(){return c.wf.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))}}else if("player"==a){if(Fn[b]&&!this.get("player","isLive")())return function(){};if(In.includes(b))return function(){return c.wf.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(Jn.includes(b))return function(){return c.Xg.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(Dn[b]||En[b])return function(){return c.g[a][b]}}return this.g[a][b]};
532
+ q.set=function(a,b,c){this.g[a][b]=c;Vn(this,{type:"set",targetName:a,property:b,value:c})};function Wn(a,b,c){On=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);Ln(a);Vn(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}function Xn(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 P(2,8,c,b))}
533
+ q.wf=function(a,b){Vn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.Xg=function(a,b){var c=Fa.apply(2,arguments),d=new Pc,e=this.J.toString();this.J++;this.i[e]=d;try{Vn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Qn(a,b){var c=a.K();a.l=new Pc;a.C=!0;Wn(a,c,b)}function Pn(a){var b=On;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
534
+ function Ln(a){var b=On?"connected"==On.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Nn(a)}a.h=b;a.N=b?On.receiver.friendlyName:"";a.j.za()}function Nn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function Vn(a,b){var c=wn(b),d=On;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Va)}catch(e){throw c=new P(2,8,8005,e),d=new O("error",(new Map).set("detail",c)),a.B("player",d),a.Zb(),c;}}var Sn=.02,Rn=!1,On=null,Un=null,Mn=new Set;
535
+ function Tn(a){Un?window.__onGCastApiAvailable=Un:delete window.__onGCastApiAvailable;Un=null;if(a)for(var b=r(Mn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Zn(a,b,c){cb.call(this);var d=this;this.i=a;this.h=b;this.m=this.A=this.j=this.B=this.l=null;this.F=c;this.C=new Map;this.g=new Kn(c,function(){return $n(d)},function(){return ao(d)},function(e,f){return bo(d,e,f)},function(){return co(d)},function(){return eo(d)});fo(this)}u(Zn,cb);q=Zn.prototype;
536
+ q.destroy=function(a){a&&this.g.Zb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.l=this.i=null;cb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.ac=function(){return this.B};q.Re=function(){return this.g.m&&Rn};q.ra=function(){return this.g.ra()};q.vd=function(){return this.g.vd()};
537
+ q.cast=function(){var a=this,b;return M(function(c){return 1==c.g?(b=eo(a),A(c,a.g.cast(b),2)):a.h?A(c,a.h.Ke(),0):c["return"]()})};q.ve=function(a){this.g.ve(a)};q.Gf=function(){Yn(this.g)};q.Zb=function(){this.g.Zb()};
538
+ q.Ve=function(a){var b=this;return M(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.Zb();return A(c,b.g.destroy(),2)}b.g=null;b.g=new Kn(a,function(){return $n(b)},function(){return ao(b)},function(d,e){return bo(b,d,e)},function(){return co(b)},function(){return eo(b)});b.g.init();C(c)})};
539
+ function fo(a){a.g.init();a.m=new qf;for(var b=r(zn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.ra()||(f=Oa(f),a.j.dispatchEvent(f))});for(var d in jn)a.m.o(a.h,jn[d],function(f){a.g.ra()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.pc=e,Object.defineProperty(a.l,b.pc,{configurable:!1,enumerable:!0,get:function(f){return function(){return go(a,f.pc)}}(b),set:function(f){return function(g){var h=f.pc;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={pc:b.pc};a.B={};ho(a,
540
+ function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return io(a,f)}})});jo(a);a.j=new cb;a.j.kd=a.l;a.A=new cb;a.A.kd=a.B}function jo(a){var b=new Map;ho(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.C.set(c,e):a.C.set(e,c)}else b.set(d,c)})}
541
+ function ho(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(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)}}
542
+ function eo(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Wd(),startTime:null};a.i.pause();for(var c=r(Bn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=r(Gn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=r(Hn);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function $n(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
543
+ function ao(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
544
+ function co(a){for(var b=r(Gn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(Bn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(Bn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(Hn);for(k=
545
+ h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new O(en,h);a.h.dispatchEvent(h)})}
546
+ function go(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.ra()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ra()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
547
+ function io(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Dc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.cd()};
548
+ if("setVideoContainer"==b)return function(c){return a.h.De(c)};if(a.g.ra()){if("getManifest"==b||"drmInfo"==b)return function(){Sa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Sa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ra()&&0==Object.keys(a.g.g.video).length&&(Dn[b]||En[b])||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}
549
+ function bo(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}N("shaka.cast.CastProxy",Zn);Zn.prototype.changeReceiverId=Zn.prototype.Ve;Zn.prototype.forceDisconnect=Zn.prototype.Zb;Zn.prototype.suggestDisconnect=Zn.prototype.Gf;Zn.prototype.setAppData=Zn.prototype.ve;Zn.prototype.cast=Zn.prototype.cast;Zn.prototype.receiverName=Zn.prototype.vd;Zn.prototype.isCasting=Zn.prototype.ra;Zn.prototype.canCast=Zn.prototype.Re;Zn.prototype.getPlayer=Zn.prototype.ac;
550
+ Zn.prototype.getVideo=Zn.prototype.Bb;Zn.prototype.destroy=Zn.prototype.destroy;function ko(a,b,c,d){cb.call(this);var e=this;this.g=a;this.h=b;this.j=new qf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.A=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new Q(function(){lo(e)});mo(this)}u(ko,cb);q=ko.prototype;q.isConnected=function(){return this.H};q.Hg=function(){return this.A};q.fh=function(a){this.i=a};q.Uf=function(){this.i=null};
551
+ q.gh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.eh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.dh=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
543
552
  q.destroy=function(){var a=this,b,c;return M(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.A=!0,a.l=null,a.B=null,cb.prototype.release.call(a),A(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();C(d)})};
544
- function Qn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Rn(a)};b.onSenderDisconnected=function(){return Rn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Sn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Sn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return Tn(a,
545
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Un(a,e)};b.start();b=r(dn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Vn(a,"video",e)});for(var d in Om)a.j.o(a.h,Om[d],function(e){return Vn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.ve(3840,2160):a.h.ve(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.A=
546
- !1;Wn(a)});a.j.o(a.g,"playing",function(){a.A=!1;Wn(a)});a.j.o(a.g,"pause",function(){Wn(a)});a.j.o(a.h,"unloading",function(){a.A=!0;Wn(a)});a.j.o(a.g,"ended",function(){(new Q(function(){a.g&&a.g.ended&&(a.A=!0,Wn(a))})).S(Xn)})}function Rn(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Wn(a)}
547
- function Wn(a){var b;M(function(c){if(1==c.g)return A(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new O("caststatuschanged");a.dispatchEvent(b);Yn(a)||Zn(a);C(c)})}
548
- function $n(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;M(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,E(v,5),A(v,a.h.load(b.manifest,b.startTime),7)):A(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=I(v),h=Km,k=(new Map).set("detail",g),l=new O(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)t=b.playerAfterLoad[p],
549
- a.h[p](t);a.g.autoplay=f;b.manifest&&(a.g.play(),Zn(a));C(v)}})}function Vn(a,b,c){a.h&&(Pn(a),Sn(a,{type:"event",targetName:b,event:c},a.l))}
550
- function Pn(a){a.I.S(ao);for(var b={video:{},player:{}},c=r(en),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in jn)0==a.m%jn[e]&&(b.player[e]=a.h[e]());for(var f in hn)0==a.m%hn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.F&&(a.m+=1);Sn(a,{type:"update",update:b},a.l);Yn(a)}function Yn(a){return a.C&&(a.g.duration||a.h.T())?(bo(a),a.C=!1,!0):!1}
551
- function bo(a,b){var c={contentId:a.h.Td(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Zn(a,void 0===b?0:b,c)}
552
- function Un(a,b){var c=bn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;$n(a,c.initState,c.appData);Pn(a);break;case "appData":a.G(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.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
553
- c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return co(a,h,g,null)},function(k){return co(a,h,g,k)})}}
554
- function Tn(a,b){var c=bn(b.data);switch(c.type){case "PLAY":a.g.play();Zn(a);break;case "PAUSE":a.g.pause();Zn(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(),Zn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Zn(a));break;case "STOP":a.h.He().then(function(){a.h&&Zn(a)});break;case "GET_STATUS":bo(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));
555
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||Zn(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.G(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&bo(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Sn(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:Sn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
556
- function co(a,b,c,d){a.h&&Sn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Sn(a,b,c,d){a.H&&(a=an(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Zn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?eo:a.h.Ic()?fo:a.g.paused?go:ho,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Sn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
557
- N("shaka.cast.CastReceiver",On);On.prototype.destroy=On.prototype.destroy;On.prototype.setContentArtist=On.prototype.Zg;On.prototype.setContentImage=On.prototype.$g;On.prototype.setContentTitle=On.prototype.bh;On.prototype.clearContentMetadata=On.prototype.Qf;On.prototype.setContentMetadata=On.prototype.ah;On.prototype.isIdle=On.prototype.Dg;On.prototype.isConnected=On.prototype.isConnected;var ao=.5,Xn=5,eo="IDLE",ho="PLAYING",fo="BUFFERING",go="PAUSED";function io(a){var b=this;this.g=[];this.h=[];this.data=[];(new vg).box("moov",zg).X("pssh",function(c){if(!(1<c.version)){var d=Ic(c.reader.U,-12,c.size);b.data.push(d);b.g.push(rd(c.reader.Cb(16)));if(0<c.version){d=c.reader.P();for(var e=0;e<d;e++){var f=rd(c.reader.Cb(16));b.h.push(f)}}}}).parse(a)}
558
- function jo(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Lc(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 ko(a){if(!a)return a;var b=new io(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Rc:c.Rc},d=b.next())c.Rc=d.value,a.some(function(e){return function(f){return Gc(f,e.Rc)}}(c))||a.push(c.Rc);return sd.apply(md,ia(a))};function lo(a,b){var c=mo(a,b);return 1!=c.length?null:c[0]}function no(a,b,c){a=oo(a,b,c);return 1!=a.length?null:a[0]}function mo(a,b){for(var c=[],d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function po(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
559
- function oo(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function qo(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function ro(a,b,c){b=r(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 so(a){return Array.from(a.childNodes).every(to)?a.textContent.trim():null}
560
- function to(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function uo(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function vo(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)}
561
- function wo(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
562
- function xo(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 yo(a){a=Number(a);return 0===a%1?a:null}function zo(a){a=Number(a);return 0===a%1&&0<a?a:null}function Ao(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Bo(a){a=Number(a);return isNaN(a)?null:a}function Co(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
563
- function Do(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 Eo(a,b){try{var c=gd(a);return Do(c,b)}catch(d){return null}};function Fo(a,b,c){var d=Go(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 P(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.vf?(e=h.init||e,!1):!0}),f.length&&(a=Ho(e,f,c),0==a.length&&(a=[Ib("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Ib(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
564
- r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Ve:g,Hi:e,drmInfos:a,Ze:!0}}function Io(a,b,c,d){var e=Fo(a,c,d);if(b.Ze){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.Ze=!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 P(2,4,4008);return e.Ve||b.Ve}
565
- function Jo(a){var b=0,c=Lc(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=Ic(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
566
- function Ko(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Lo(a){a=no(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=pd(a.textContent);a=Jo(a).filter(function(b){return b.type===Mo})[0];if(!a)return"";a=hd(a.value,!0);return(a=Do(a,"WRMHEADER"))?Ko(a):""}
567
- function Ho(a,b,c){var d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.vf];if(f){var g;if(g=no(e.node,"urn:microsoft:playready","pro")){g=pd(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:jo(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Ib(f,e.init||a||g);if(f=No.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
568
- function Go(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=Oo(c.value))&&b.push(c);return b}
569
- function Oo(a){var b=a.getAttribute("schemeIdUri"),c=qo(a,"urn:mpeg:cenc:2013","default_KID"),d=oo(a,"urn:mpeg:cenc:2013","pssh").map(so);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new P(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:pd(f),keyId:null}})}catch(f){throw new P(2,4,4007);}return{node:a,vf:b,keyId:c,init:0<e.length?e:null}}
570
- var Mo=1,No=(new Map).set("com.widevine.alpha",function(a){return(a=no(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Lo).set("com.microsoft.playready.recommendation",Lo).set("com.microsoft.playready.software",Lo).set("com.microsoft.playready.hardware",Lo);function Po(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=
553
+ function mo(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return no(a)};b.onSenderDisconnected=function(){return no(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&oo(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);oo(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return po(a,
554
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return qo(a,e)};b.start();b=r(zn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return ro(a,"video",e)});for(var d in jn)a.j.o(a.h,jn[d],function(e){return ro(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.ye(3840,2160):a.h.ye(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.A=
555
+ !1;so(a)});a.j.o(a.g,"playing",function(){a.A=!1;so(a)});a.j.o(a.g,"pause",function(){so(a)});a.j.o(a.h,"unloading",function(){a.A=!0;so(a)});a.j.o(a.g,"ended",function(){(new Q(function(){a.g&&a.g.ended&&(a.A=!0,so(a))})).R(to)})}function no(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;so(a)}
556
+ function so(a){var b;M(function(c){if(1==c.g)return A(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new O("caststatuschanged");a.dispatchEvent(b);uo(a)||vo(a);C(c)})}
557
+ function wo(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;M(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,E(v,5),A(v,a.h.load(b.manifest,b.startTime),7)):A(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=I(v),h=en,k=(new Map).set("detail",g),l=new O(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)t=b.playerAfterLoad[p],
558
+ a.h[p](t);a.g.autoplay=f;b.manifest&&(a.g.play(),vo(a));C(v)}})}function ro(a,b,c){a.h&&(lo(a),oo(a,{type:"event",targetName:b,event:c},a.l))}
559
+ function lo(a){a.I.R(xo);for(var b={video:{},player:{}},c=r(An),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in Fn)0==a.m%Fn[e]&&(b.player[e]=a.h[e]());for(var f in Dn)0==a.m%Dn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;oo(a,{type:"update",update:b},a.l);for(var g in En)0==a.m%En[g]&&(b={player:{}},b.player[g]=a.h[g](),oo(a,{type:"update",update:b},a.l));a.F&&(a.m+=
560
+ 1);uo(a)}function uo(a){return a.C&&(a.g.duration||a.h.T())?(yo(a),a.C=!1,!0):!1}function yo(a,b){var c={contentId:a.h.Wd(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);vo(a,void 0===b?0:b,c)}
561
+ function qo(a,b){var c=xn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;wo(a,c.initState,c.appData);lo(a);break;case "appData":a.G(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.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
562
+ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return zo(a,h,g,null)},function(k){return zo(a,h,g,k)})}}
563
+ function po(a,b){var c=xn(b.data);switch(c.type){case "PLAY":a.g.play();vo(a);break;case "PAUSE":a.g.pause();vo(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(),vo(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),vo(a));break;case "STOP":a.h.Ke().then(function(){a.h&&vo(a)});break;case "GET_STATUS":yo(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));
564
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||vo(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.G(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&yo(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");oo(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:oo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
565
+ function zo(a,b,c,d){a.h&&oo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function oo(a,b,c,d){a.H&&(a=wn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function vo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?Ao:a.h.Ic()?Bo:a.g.paused?Co:Do,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);oo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
566
+ N("shaka.cast.CastReceiver",ko);ko.prototype.destroy=ko.prototype.destroy;ko.prototype.setContentArtist=ko.prototype.dh;ko.prototype.setContentImage=ko.prototype.eh;ko.prototype.setContentTitle=ko.prototype.gh;ko.prototype.clearContentMetadata=ko.prototype.Uf;ko.prototype.setContentMetadata=ko.prototype.fh;ko.prototype.isIdle=ko.prototype.Hg;ko.prototype.isConnected=ko.prototype.isConnected;var xo=.5,to=5,Ao="IDLE",Do="PLAYING",Bo="BUFFERING",Co="PAUSED";function Eo(a){var b=this;this.g=[];this.h=[];this.data=[];(new Qg).box("moov",Ug).X("pssh",function(c){if(!(1<c.version)){var d=Ic(c.reader.U,-12,c.size);b.data.push(d);b.g.push(rd(c.reader.Cb(16)));if(0<c.version){d=c.reader.P();for(var e=0;e<d;e++){var f=rd(c.reader.Cb(16));b.h.push(f)}}}}).parse(a)}
567
+ function Fo(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Lc(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 Go(a){if(!a)return a;var b=new Eo(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Rc:c.Rc},d=b.next())c.Rc=d.value,a.some(function(e){return function(f){return Gc(f,e.Rc)}}(c))||a.push(c.Rc);return sd.apply(md,ia(a))};function Ho(a,b,c){var d=Io(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 P(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.zf?(e=h.init||e,!1):!0}),f.length&&(a=Jo(e,f,c),0==a.length&&(a=[Ib("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Ib(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
568
+ r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Ye:g,Li:e,drmInfos:a,cf:!0}}function Ko(a,b,c,d){var e=Ho(a,c,d);if(b.cf){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.cf=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new P(2,4,4008);return e.Ye||b.Ye}
569
+ function Lo(a){var b=0,c=Lc(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=Ic(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
570
+ function Mo(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function No(a){a=Df(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=pd(a.textContent);a=Lo(a).filter(function(b){return b.type===Oo})[0];if(!a)return"";a=hd(a.value,!0);return(a=Tf(a,"WRMHEADER"))?Mo(a):""}
571
+ function Jo(a,b,c){var d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.zf];if(f){var g;if(g=Df(e.node,"urn:microsoft:playready","pro")){g=pd(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:Fo(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Ib(f,e.init||a||g);if(f=Po.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
572
+ function Io(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=Qo(c.value))&&b.push(c);return b}
573
+ function Qo(a){var b=a.getAttribute("schemeIdUri"),c=Gf(a,"urn:mpeg:cenc:2013","default_KID"),d=Ef(a,"urn:mpeg:cenc:2013","pssh").map(If);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new P(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:pd(f),keyId:null}})}catch(f){throw new P(2,4,4007);}return{node:a,zf:b,keyId:c,init:0<e.length?e:null}}
574
+ var Oo=1,Po=(new Map).set("com.widevine.alpha",function(a){return(a=Df(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",No).set("com.microsoft.playready.recommendation",No).set("com.microsoft.playready.software",No).set("com.microsoft.playready.hardware",No);function Ro(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=
571
575
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
572
- function Qo(a,b){var c=Ro(a,b,"timescale"),d=1;c&&(d=zo(c)||1);var e=Ro(a,b,"duration");c=zo(e||"");"image"==a.L.contentType&&(c=Bo(e||""));c&&(c/=d);var f=Ro(a,b,"startNumber");e=Number(Ro(a,b,"presentationTimeOffset"))||0;var g=Ao(f||"");if(null==f||null==g)g=1;var h=So(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.Y.duration||Infinity;h=mo(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],t=h[n+1],v=uo(p,"t",Ao),x=uo(p,"d",Ao);p=uo(p,"r",yo);null!=v&&(v-=e);if(!x)break;v=null!=v?v:m;p=
573
- p||0;if(0>p)if(t){t=uo(t,"t",Ao);if(null==t)break;else if(v>=t)break;p=Math.ceil((t-v)/x)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/x)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(t=0;t<=p;++t)m=v+x,l.push({start:v/f,end:m/f,hh:v}),v=m}f=l}return{timescale:d,ya:c,mc:g,sb:e/d||0,Ie:e,timeline:f}}function Ro(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Fb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
574
- function So(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Fb).map(function(d){return lo(d,c)}).reduce(function(d,e){return d||e})}
575
- function To(a,b,c,d,e,f){for(var g=qo(a,"http://www.w3.org/1999/xlink","href"),h=qo(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Te(new P(2,4,4028));if("onLoad"!=h)return Te(new P(2,4,4027));var m=Hb([d],[g]);return e.request(0,gf(m,b)).qa(function(n){n=Eo(n.data,a.tagName);if(!n)return Te(new P(2,4,4001,g));
576
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return Uo(a,b,c,m[0],e,f+1)})}
577
- function Uo(a,b,c,d,e,f){f=void 0===f?0:f;if(qo(a,"http://www.w3.org/1999/xlink","href")){var g=To(a,b,c,d,e,f);c&&(g=g.qa(void 0,function(){return Uo(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==qo(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Uo(k,b,c,d,e,f)));return Xe(g).qa(function(){return a})};function Vo(a,b,c,d,e,f,g){var h,k=(new vg).X("sidx",function(l){h=Wo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
578
- function Wo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.P();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.P();var m=g.reader.P()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var n=g.reader.kc();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.P(),t=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.P();g.reader.skip(4);if(1==t)throw new P(2,3,3006);h.push(new si(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Xo(a){this.h=Lc(a);this.g=new sg(this.h,0)}Xo.prototype.Ea=function(){return this.g.Ea()};
579
- function Yo(a){var b=Zo(a);if(7<b.length)throw new P(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Zo(a);a:{d=r($o);for(var e=d.next();!e.done;e=d.next())if(Gc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ia();else{if(8==b.length&&b[1]&224)throw new P(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.ia()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ia();d=Lc(a.h,a.g.ia(),b);a.g.skip(b);return new ap(c,
580
- d)}function Zo(a){var b=a.g.ia(),c=a.g.ka();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ic(a.h,b,c)}var $o=[[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 ap(a,b){this.id=a;this.g=b}
581
- function bp(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function cp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Xo(a.g);for(var n=null,p=null;a.Ea();){var t=Yo(a);if(187==t.id){var v=dp(t);v&&(t=c*v.ih,v=b+v.Sg,null!=n&&m.push(new si(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new si(n+g,d+g,l,p,null,f,g,h,k));return m}
582
- function dp(a){var b=new Xo(a.g);a=Yo(b);if(179!=a.id)throw new P(2,3,3013);a=bp(a);b=Yo(b);if(183!=b.id)throw new P(2,3,3012);b=new Xo(b.g);for(var c=0;b.Ea();){var d=Yo(b);if(241==d.id){c=bp(d);break}}return{ih:a,Sg:c}};function ep(a,b){var c=So(a,b,"Initialization");if(!c)return null;var d=a.L.Pa,e=c.getAttribute("sourceURL");e&&(d=Hb(a.L.Pa,[e]));e=0;var f=null;if(c=uo(c,"range",xo))e=c.start,f=c.end;return new qi(function(){return d},e,f,fp(a))}
583
- function gp(a,b){var c=Number(Ro(a,hp,"presentationTimeOffset"))||0,d=Ro(a,hp,"timescale"),e=1;d&&(e=zo(d)||1);var f=c/e||0,g=ep(a,hp);ip(a,g);var h=$e(a);return{$b:function(){var k=So(h,hp,"RepresentationIndex"),l=h.L.Pa;k&&(k=k.getAttribute("sourceURL"))&&(l=Hb(h.L.Pa,[k]));k=jp(h);return kp(h,b,g,l,k.start,k.end,f)}}}
584
- function kp(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,x,y,w,D,z,B,F;return M(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.xb||!a.Y.lf,l=a.Y.start,m=a.Y.duration,n=a.L.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Ka(),c.Ha,c.wa):null],p=null,A(G,Promise.all(v),2);x=G.h;y=x[0];w=x[1]||null;D=null;z=l-g;B=l;F=m?l+m:Infinity;if("mp4"==n)var H=Vo(y,e,d,c,z,B,F);else{H=new Xo(w);if(440786851!=Yo(H).id)throw new P(2,3,3008);var J=Yo(H);if(408125543!=J.id)throw new P(2,3,3009);H=J.g.byteOffset;
585
- J=new Xo(J.g);for(var K=null;J.Ea();){var L=Yo(J);if(357149030==L.id){K=L;break}}if(!K)throw new P(2,3,3010);K=new Xo(K.g);L=1E6;for(J=null;K.Ea();){var W=Yo(K);if(2807729==W.id)L=bp(W);else if(17545==W.id)if(4==W.g.byteLength)J=W.g.getFloat32(0);else if(8==W.g.byteLength)J=W.g.getFloat64(0);else throw new P(2,3,3003);}if(null==J)throw new P(2,3,3011);K=L/1E9;J*=K;L=Yo(new Xo(y));if(475249515!=L.id)throw new P(2,3,3007);H=cp(L,H,K,J,d,c,z,B,F)}D=H;h.hc(D);t=new Pi(D);k&&t.yb(B,F,!0);return G["return"](t)})}
586
- function hp(a){return a.Nc}function jp(a){var b=So(a,hp,"RepresentationIndex");a=Ro(a,hp,"indexRange");a=xo(a||"");b&&(a=uo(b,"range",xo,a));return a}function ip(a,b){lp(a,b);if(!jp(a))throw new P(2,4,4002);}function lp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Mb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
587
- function fp(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.nd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function mp(a,b){var c=ep(a,np),d=op(a);if(!d.ya&&!d.timeline&&1<d.dc.length)throw new P(2,4,4002);if(!d.ya&&!a.Y.duration&&!d.timeline&&1==d.dc.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.sa.id&&a.L.id&&(f=b[a.sa.id+","+a.L.id])&&(e=f.segmentIndex);var g=pp(a.Y.start,a.Y.duration,a.L.Pa,d,c);c=!e;e?e.fc(g,a.presentationTimeline.ob()):e=new Pi(g);a.presentationTimeline.hc(g);a.xb&&a.Y.lf||e.yb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
588
- Infinity,c);f&&(f.segmentIndex=e);return{$b:function(){e&&0!=e.O.length||e.ec(g);return Promise.resolve(e)}}}function np(a){return a.Db}function op(a){var b=yp(a);a=Qo(a,np);var c=a.mc;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,mc:c,sb:a.sb,timeline:a.timeline,dc:b}}
589
- function pp(a,b,c,d,e){var f=d.dc.length;d.timeline&&d.timeline.length!=d.dc.length&&(f=Math.min(d.timeline.length,d.dc.length));for(var g=a-d.sb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Hd:m.Hd},n++){var p=d.dc[n];m.Hd=Hb(c,[p.Jg]);var t=void 0;t=null!=d.ya?l+d.ya:d.timeline?d.timeline[n].end:l+b;k.push(new si(a+l,a+t,function(v){return function(){return v.Hd}}(m),p.start,p.end,e,g,a,h));l=t}return k}
590
- function yp(a){return[a.L.Db,a.Ca.Db,a.sa.Db].filter(Fb).map(function(b){return mo(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.hf&&(a.hf=!0);var c=b.getAttribute("media");b=uo(b,"mediaRange",xo,{start:0,end:null});return{Jg:c,start:b.start,end:b.end}})};function zp(a,b,c,d,e,f){var g=Ap(a),h=Bp(a);Cp(h);var k=$e(a);if(h.Hc)return lp(a,g),{$b:function(){var t=Po(h.Hc,k.L.id,null,k.bandwidth||null,null);t=Hb(k.L.Pa,[t]);return kp(k,b,g,t,0,null,h.sb)}};if(h.ya)return d||(a.presentationTimeline.be(h.ya),a.presentationTimeline.ce(a.Y.start)),{$b:function(){return Dp(k,h,e,g,f)}};var l=null;d=d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Ep(k,h,g);c=a.Y.start;var n=a.Y.duration?a.Y.start+a.Y.duration:Infinity,p=Infinity!=
591
- n;l?(p&&(new Pi(m)).yb(c,n,!0),l.fc(m,a.presentationTimeline.ob())):l=new Pi(m);a.presentationTimeline.hc(m);p&&l.yb(c,n);d&&a.xb&&(d.segmentIndex=l);return{$b:function(){l&&0!=l.O.length||l.ec(m);return Promise.resolve(l)}}}function Fp(a){return a.Oc}function Bp(a){var b=Qo(a,Fp),c=Ro(a,Fp,"media");a=Ro(a,Fp,"index");return{ya:b.ya,timescale:b.timescale,mc:b.mc,sb:b.sb,Ie:b.Ie,timeline:b.timeline,ae:c,Hc:a}}
592
- function Cp(a){var b=a.Hc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Hc&&(a.timeline=null),a.ya=null);if(!a.Hc&&!a.ae)throw new P(2,4,4002);}
593
- function Dp(a,b,c,d,e){function f(K){var L=(K-t)*p,W=L+b.sb,Z=L+l;L=Z+p;var ka=Math.min(L,h());Z=new si(Z,ka,function(){var ja=Po(x,w,K,y,W*v);return Hb(D,[ja])},0,null,d,z,l,h());Z.l=L;return Z}function g(){var K=[Math.max(k.ob(),l),Math.min(k.Kb(),h())].map(function(L){return L-l});return[Math.ceil(K[0]/p),Math.ceil(K[1]/p)-1].map(function(L){return L+t})}function h(){var K=null!=m&&e[m]||n;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.sa.id,n=a.Y.duration,p=b.ya,t=b.mc,v=b.timescale,
594
- x=b.ae,y=a.bandwidth||null,w=a.L.id,D=a.L.Pa,z=l-b.sb,B=g();a=a.xb?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 Pi(c);c=k.Kb()<h();F=k.T();if(c||F){var J=Math.max(a,B+1);H.xd(p,function(){var K=k.ob();H.Hb(K);var L=r(g());L.next();L=L.next().value;for(var W=[];J<=L;){var Z=f(J);W.push(Z);J++}return K>h()&&!W.length?null:W})}return Promise.resolve(H)}
595
- function Ep(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.sb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Gd:h.Gd,Kd:h.Kd,Nd:h.Nd,Dd:h.Dd,Pd:h.Pd,Ed:h.Ed},k++){var l=b.timeline[k],m=l.start,n=l.hh;l=l.end;h.Nd=k+b.mc;h.Pd=n+b.Ie;h.Kd=a.L.id;h.Dd=a.bandwidth||null;h.Gd=b.ae;h.Ed=a.L.Pa;g.push(new si(d+m,d+l,function(p){return function(){var t=Po(p.Gd,p.Kd,p.Nd,p.Dd||null,p.Pd);return Hb(p.Ed,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
596
- function Ap(a){var b=Ro(a,Fp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Pa;return new qi(function(){var f=Po(b,c,null,d,null);return Hb(e,[f])},0,null,fp(a))};function Gp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Gp.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
597
- function Hp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia;return M(function(Ma){switch(Ma.g){case 1:d=Nb;Ip(b);Jp(b);Kp(b);Lp(b);if(!c&&1==b.length){e=b[0];a.g=e.Xc;a.h=e.zd;a.j=e.textStreams;a.i=e.imageStreams;Ma.D(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ma["return"]();k=b.map(function(Da){return Da.Xc});l=b.map(function(Da){return Da.zd});m=b.map(function(Da){return Da.textStreams});n=b.map(function(Da){return Da.imageStreams});
598
- p=r(m);for(t=p.next();!t.done;t=p.next())v=t.value,v.push(Mp(d.oa));x=r(n);for(y=x.next();!y.done;y=x.next())w=y.value,w.push(Mp(d.wc));return A(Ma,Np(a.g,k,f,Op,Pp),3);case 3:return A(Ma,Np(a.h,l,f,Op,Pp),4);case 4:return A(Ma,Np(a.j,m,f,Op,Pp),5);case 5:return A(Ma,Np(a.i,n,f,Op,Pp),2);case 2:D=0;z=[];if(a.h.length&&a.g.length)for(K=r(a.g),L=K.next();!L.done;L=K.next())for(W=L.value,Z=r(a.h),ka=Z.next();!ka.done;ka=Z.next())ja=ka.value,ea=jg(W.drmInfos,ja.drmInfos),W.drmInfos.length&&ja.drmInfos.length&&
599
- !ea.length||(Ia=D++,z.push({id:Ia,language:W.language,primary:W.primary,audio:W,video:ja,bandwidth:(W.bandwidth||0)+(ja.bandwidth||0),drmInfos:ea,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),F=r(B),G=F.next();!G.done;G=F.next())H=G.value,J=D++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.Gb?H:null,video:H.type==d.gb?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
600
- a.l=z;C(Ma)}})}function Ip(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Xc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&jc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Xc=c}}
601
- function Kp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&jc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
602
- function Jp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.zd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&jc(e.roles,h.roles)&&Af(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.zd=c}}
603
- function Lp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
604
- function Qp(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W;return M(function(Z){switch(Z.g){case 1:b=Nb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.Gb})});d=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.gb})});e=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.oa})});f=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.wc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
605
- h.value,k.push(Rp(b.oa));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Rp(b.wc));return A(Z,Np([],c,0,Sp,Tp),2);case 2:return p=Z.h,A(Z,Np([],d,0,Sp,Tp),3);case 3:return t=Z.h,A(Z,Np([],e,0,Sp,Tp),4);case 4:return v=Z.h,A(Z,Np([],f,0,Sp,Tp),5);case 5:x=Z.h;y=0;if(t.length&&p.length)for(F=r(p),G=F.next();!G.done;G=F.next())for(H=G.value,J=r(t),K=J.next();!K.done;K=J.next())L=K.value,W=y++,L.variantIds.push(W),H.variantIds.push(W);else for(w=t.concat(p),D=r(w),z=D.next();!z.done;z=D.next())B=
576
+ function So(a,b){var c=To(a,b,"timescale"),d=1;c&&(d=Pf(c)||1);var e=To(a,b,"duration");c=Pf(e||"");"image"==a.L.contentType&&(c=Rf(e||""));c&&(c/=d);var f=To(a,b,"startNumber");e=Number(To(a,b,"presentationTimeOffset"))||0;var g=Qf(f||"");if(null==f||null==g)g=1;var h=Uo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.Y.duration||Infinity;h=Cf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],t=h[n+1],v=Kf(p,"t",Qf),x=Kf(p,"d",Qf);p=Kf(p,"r",Of);null!=v&&(v-=e);if(!x)break;v=null!=v?v:m;p=
577
+ p||0;if(0>p)if(t){t=Kf(t,"t",Qf);if(null==t)break;else if(v>=t)break;p=Math.ceil((t-v)/x)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/x)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(t=0;t<=p;++t)m=v+x,l.push({start:v/f,end:m/f,lh:v}),v=m}f=l}return{timescale:d,ya:c,mc:g,rb:e/d||0,Le:e,timeline:f}}function To(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Fb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
578
+ function Uo(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Fb).map(function(d){return Bf(d,c)}).reduce(function(d,e){return d||e})}
579
+ function Vo(a,b,c,d,e,f){for(var g=Gf(a,"http://www.w3.org/1999/xlink","href"),h=Gf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Te(new P(2,4,4028));if("onLoad"!=h)return Te(new P(2,4,4027));var m=Hb([d],[g]);return e.request(0,gf(m,b)).qa(function(n){n=Vf(n.data,a.tagName);if(!n)return Te(new P(2,4,4001,g));
580
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return Wo(a,b,c,m[0],e,f+1)})}
581
+ function Wo(a,b,c,d,e,f){f=void 0===f?0:f;if(Gf(a,"http://www.w3.org/1999/xlink","href")){var g=Vo(a,b,c,d,e,f);c&&(g=g.qa(void 0,function(){return Wo(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Gf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Wo(k,b,c,d,e,f)));return Xe(g).qa(function(){return a})};function Xo(a,b,c,d,e,f,g){var h,k=(new Qg).X("sidx",function(l){h=Yo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
582
+ function Yo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.P();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.P();var m=g.reader.P()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var n=g.reader.kc();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.P(),t=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.P();g.reader.skip(4);if(1==t)throw new P(2,3,3006);h.push(new Ni(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Zo(a){this.h=Lc(a);this.g=new Ng(this.h,0)}Zo.prototype.Ea=function(){return this.g.Ea()};
583
+ function $o(a){var b=ap(a);if(7<b.length)throw new P(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=ap(a);a:{d=r(bp);for(var e=d.next();!e.done;e=d.next())if(Gc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ia();else{if(8==b.length&&b[1]&224)throw new P(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.ia()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ia();d=Lc(a.h,a.g.ia(),b);a.g.skip(b);return new cp(c,
584
+ d)}function ap(a){var b=a.g.ia(),c=a.g.ka();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ic(a.h,b,c)}var bp=[[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 cp(a,b){this.id=a;this.g=b}
585
+ function dp(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function ep(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Zo(a.g);for(var n=null,p=null;a.Ea();){var t=$o(a);if(187==t.id){var v=fp(t);v&&(t=c*v.mh,v=b+v.Wg,null!=n&&m.push(new Ni(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new Ni(n+g,d+g,l,p,null,f,g,h,k));return m}
586
+ function fp(a){var b=new Zo(a.g);a=$o(b);if(179!=a.id)throw new P(2,3,3013);a=dp(a);b=$o(b);if(183!=b.id)throw new P(2,3,3012);b=new Zo(b.g);for(var c=0;b.Ea();){var d=$o(b);if(241==d.id){c=dp(d);break}}return{mh:a,Wg:c}};function gp(a,b){var c=Uo(a,b,"Initialization");if(!c)return null;var d=a.L.Pa,e=c.getAttribute("sourceURL");e&&(d=Hb(a.L.Pa,[e]));e=0;var f=null;if(c=Kf(c,"range",Nf))e=c.start,f=c.end;return new Li(function(){return d},e,f,hp(a))}
587
+ function ip(a,b){var c=Number(To(a,jp,"presentationTimeOffset"))||0,d=To(a,jp,"timescale"),e=1;d&&(e=Pf(d)||1);var f=c/e||0,g=gp(a,jp);kp(a,g);var h=$e(a);return{$b:function(){var k=Uo(h,jp,"RepresentationIndex"),l=h.L.Pa;k&&(k=k.getAttribute("sourceURL"))&&(l=Hb(h.L.Pa,[k]));k=lp(h);return mp(h,b,g,l,k.start,k.end,f)}}}
588
+ function mp(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,x,y,w,D,z,B,F;return M(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.xb||!a.Y.pf,l=a.Y.start,m=a.Y.duration,n=a.L.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Ka(),c.Ha,c.wa):null],p=null,A(G,Promise.all(v),2);x=G.h;y=x[0];w=x[1]||null;D=null;z=l-g;B=l;F=m?l+m:Infinity;if("mp4"==n)var H=Xo(y,e,d,c,z,B,F);else{H=new Zo(w);if(440786851!=$o(H).id)throw new P(2,3,3008);var J=$o(H);if(408125543!=J.id)throw new P(2,3,3009);H=J.g.byteOffset;
589
+ J=new Zo(J.g);for(var K=null;J.Ea();){var L=$o(J);if(357149030==L.id){K=L;break}}if(!K)throw new P(2,3,3010);K=new Zo(K.g);L=1E6;for(J=null;K.Ea();){var W=$o(K);if(2807729==W.id)L=dp(W);else if(17545==W.id)if(4==W.g.byteLength)J=W.g.getFloat32(0);else if(8==W.g.byteLength)J=W.g.getFloat64(0);else throw new P(2,3,3003);}if(null==J)throw new P(2,3,3011);K=L/1E9;J*=K;L=$o(new Zo(y));if(475249515!=L.id)throw new P(2,3,3007);H=ep(L,H,K,J,d,c,z,B,F)}D=H;h.hc(D);t=new lj(D);k&&t.yb(B,F,!0);return G["return"](t)})}
590
+ function jp(a){return a.Nc}function lp(a){var b=Uo(a,jp,"RepresentationIndex");a=To(a,jp,"indexRange");a=Nf(a||"");b&&(a=Kf(b,"range",Nf,a));return a}function kp(a,b){np(a,b);if(!lp(a))throw new P(2,4,4002);}function np(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Mb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
591
+ function hp(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.od,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function op(a,b){var c=gp(a,pp),d=qp(a);if(!d.ya&&!d.timeline&&1<d.dc.length)throw new P(2,4,4002);if(!d.ya&&!a.Y.duration&&!d.timeline&&1==d.dc.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.sa.id&&a.L.id&&(f=b[a.sa.id+","+a.L.id])&&(e=f.segmentIndex);var g=rp(a.Y.start,a.Y.duration,a.L.Pa,d,c);c=!e;e?e.fc(g,a.presentationTimeline.mb()):e=new lj(g);a.presentationTimeline.hc(g);a.xb&&a.Y.pf||e.yb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
592
+ Infinity,c);f&&(f.segmentIndex=e);return{$b:function(){e&&0!=e.O.length||e.ec(g);return Promise.resolve(e)}}}function pp(a){return a.Db}function qp(a){var b=Ap(a);a=So(a,pp);var c=a.mc;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,mc:c,rb:a.rb,timeline:a.timeline,dc:b}}
593
+ function rp(a,b,c,d,e){var f=d.dc.length;d.timeline&&d.timeline.length!=d.dc.length&&(f=Math.min(d.timeline.length,d.dc.length));for(var g=a-d.rb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Id:m.Id},n++){var p=d.dc[n];m.Id=Hb(c,[p.Ng]);var t=void 0;t=null!=d.ya?l+d.ya:d.timeline?d.timeline[n].end:l+b;k.push(new Ni(a+l,a+t,function(v){return function(){return v.Id}}(m),p.start,p.end,e,g,a,h));l=t}return k}
594
+ function Ap(a){return[a.L.Db,a.Ca.Db,a.sa.Db].filter(Fb).map(function(b){return Cf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.lf&&(a.lf=!0);var c=b.getAttribute("media");b=Kf(b,"mediaRange",Nf,{start:0,end:null});return{Ng:c,start:b.start,end:b.end}})};function Bp(a,b,c,d,e,f){var g=Cp(a),h=Dp(a);Ep(h);var k=$e(a);if(h.Hc)return np(a,g),{$b:function(){var t=Ro(h.Hc,k.L.id,null,k.bandwidth||null,null);t=Hb(k.L.Pa,[t]);return mp(k,b,g,t,0,null,h.rb)}};if(h.ya)return d||(a.presentationTimeline.fe(h.ya),a.presentationTimeline.ge(a.Y.start)),{$b:function(){return Fp(k,h,e,g,f)}};var l=null;d=d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Gp(k,h,g);c=a.Y.start;var n=a.Y.duration?a.Y.start+a.Y.duration:Infinity,p=Infinity!=
595
+ n;l?(p&&(new lj(m)).yb(c,n,!0),l.fc(m,a.presentationTimeline.mb())):l=new lj(m);a.presentationTimeline.hc(m);p&&l.yb(c,n);d&&a.xb&&(d.segmentIndex=l);return{$b:function(){l&&0!=l.O.length||l.ec(m);return Promise.resolve(l)}}}function Hp(a){return a.Oc}function Dp(a){var b=So(a,Hp),c=To(a,Hp,"media");a=To(a,Hp,"index");return{ya:b.ya,timescale:b.timescale,mc:b.mc,rb:b.rb,Le:b.Le,timeline:b.timeline,ee:c,Hc:a}}
596
+ function Ep(a){var b=a.Hc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Hc&&(a.timeline=null),a.ya=null);if(!a.Hc&&!a.ee)throw new P(2,4,4002);}
597
+ function Fp(a,b,c,d,e){function f(K){var L=(K-t)*p,W=L+b.rb,Z=L+l;L=Z+p;var ka=Math.min(L,h());Z=new Ni(Z,ka,function(){var ja=Ro(x,w,K,y,W*v);return Hb(D,[ja])},0,null,d,z,l,h());Z.l=L;return Z}function g(){var K=[Math.max(k.mb(),l),Math.min(k.Kb(),h())].map(function(L){return L-l});return[Math.ceil(K[0]/p),Math.ceil(K[1]/p)-1].map(function(L){return L+t})}function h(){var K=null!=m&&e[m]||n;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.sa.id,n=a.Y.duration,p=b.ya,t=b.mc,v=b.timescale,
598
+ x=b.ee,y=a.bandwidth||null,w=a.L.id,D=a.L.Pa,z=l-b.rb,B=g();a=a.xb?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 lj(c);c=k.Kb()<h();F=k.T();if(c||F){var J=Math.max(a,B+1);H.yd(p,function(){var K=k.mb();H.Hb(K);var L=r(g());L.next();L=L.next().value;for(var W=[];J<=L;){var Z=f(J);W.push(Z);J++}return K>h()&&!W.length?null:W})}return Promise.resolve(H)}
599
+ function Gp(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.rb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Hd:h.Hd,Ld:h.Ld,Od:h.Od,Ed:h.Ed,Qd:h.Qd,Fd:h.Fd},k++){var l=b.timeline[k],m=l.start,n=l.lh;l=l.end;h.Od=k+b.mc;h.Qd=n+b.Le;h.Ld=a.L.id;h.Ed=a.bandwidth||null;h.Hd=b.ee;h.Fd=a.L.Pa;g.push(new Ni(d+m,d+l,function(p){return function(){var t=Ro(p.Hd,p.Ld,p.Od,p.Ed||null,p.Qd);return Hb(p.Fd,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
600
+ function Cp(a){var b=To(a,Hp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Pa;return new Li(function(){var f=Ro(b,c,null,d,null);return Hb(e,[f])},0,null,hp(a))};function Ip(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Ip.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
601
+ function Jp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia;return M(function(Ma){switch(Ma.g){case 1:d=Nb;Kp(b);Lp(b);Mp(b);Np(b);if(!c&&1==b.length){e=b[0];a.g=e.Yc;a.h=e.Bd;a.j=e.textStreams;a.i=e.imageStreams;Ma.D(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ma["return"]();k=b.map(function(Da){return Da.Yc});l=b.map(function(Da){return Da.Bd});m=b.map(function(Da){return Da.textStreams});n=b.map(function(Da){return Da.imageStreams});
602
+ p=r(m);for(t=p.next();!t.done;t=p.next())v=t.value,v.push(Op(d.oa));x=r(n);for(y=x.next();!y.done;y=x.next())w=y.value,w.push(Op(d.wc));return A(Ma,Pp(a.g,k,f,Qp,Rp),3);case 3:return A(Ma,Pp(a.h,l,f,Qp,Rp),4);case 4:return A(Ma,Pp(a.j,m,f,Qp,Rp),5);case 5:return A(Ma,Pp(a.i,n,f,Qp,Rp),2);case 2:D=0;z=[];if(a.h.length&&a.g.length)for(K=r(a.g),L=K.next();!L.done;L=K.next())for(W=L.value,Z=r(a.h),ka=Z.next();!ka.done;ka=Z.next())ja=ka.value,ea=Fg(W.drmInfos,ja.drmInfos),W.drmInfos.length&&ja.drmInfos.length&&
603
+ !ea.length||(Ia=D++,z.push({id:Ia,language:W.language,primary:W.primary,audio:W,video:ja,bandwidth:(W.bandwidth||0)+(ja.bandwidth||0),drmInfos:ea,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),F=r(B),G=F.next();!G.done;G=F.next())H=G.value,J=D++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.Gb?H:null,video:H.type==d.fb?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
604
+ a.l=z;C(Ma)}})}function Kp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Yc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&jc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Yc=c}}
605
+ function Mp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&jc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
606
+ function Lp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Bd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&jc(e.roles,h.roles)&&Af(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Bd=c}}
607
+ function Np(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
608
+ function Sp(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W;return M(function(Z){switch(Z.g){case 1:b=Nb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.Gb})});d=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.fb})});e=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.oa})});f=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.wc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
609
+ h.value,k.push(Tp(b.oa));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Tp(b.wc));return A(Z,Pp([],c,0,Up,Vp),2);case 2:return p=Z.h,A(Z,Pp([],d,0,Up,Vp),3);case 3:return t=Z.h,A(Z,Pp([],e,0,Up,Vp),4);case 4:return v=Z.h,A(Z,Pp([],f,0,Up,Vp),5);case 5:x=Z.h;y=0;if(t.length&&p.length)for(F=r(p),G=F.next();!G.done;G=F.next())for(H=G.value,J=r(t),K=J.next();!K.done;K=J.next())L=K.value,W=y++,L.variantIds.push(W),H.variantIds.push(W);else for(w=t.concat(p),D=r(w),z=D.next();!z.done;z=D.next())B=
606
610
  z.value,B.variantIds=[y++];return Z["return"](t.concat(p).concat(v).concat(x))}})}
607
- function Np(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K;return M(function(L){switch(L.g){case 1:f=Nb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){L.D(4);break}m=l.value;return A(L,Up(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new P(2,4,4037);l=k.next();L.D(2);break;case 4:p=r(g);for(t=p.next();!t.done;t=p.next())for(v=t.value,x=r(v),y=x.next();!y.done;y=x.next())w=y.value,(D=Vp(w,b,d,e,g))&&a.push(D);z=r(g);for(t=z.next();!t.done;t=
611
+ function Pp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K;return M(function(L){switch(L.g){case 1:f=Nb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){L.D(4);break}m=l.value;return A(L,Wp(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new P(2,4,4037);l=k.next();L.D(2);break;case 4:p=r(g);for(t=p.next();!t.done;t=p.next())for(v=t.value,x=r(v),y=x.next();!y.done;y=x.next())w=y.value,(D=Xp(w,b,d,e,g))&&a.push(D);z=r(g);for(t=z.next();!t.done;t=
608
612
  z.next())for(B=t.value,F={},G=r(B),y=G.next();!y.done;F={vb:F.vb},y=G.next())if(F.vb=y.value,H=F.vb.type==f.oa&&!F.vb.language,J=F.vb.type==f.wc&&!F.vb.tilesLayout,!H&&!J&&(K=a.some(function(W){return function(Z){return Z.mimeType==W.vb.mimeType&&Ad(Z.codecs)==Ad(W.vb.codecs)}}(F))))throw new P(2,4,4037);return L["return"](a)}})}
609
- function Up(a,b,c,d,e){return M(function(f){if(1==f.g)return Wp(b,a),a.matchedStreams?a.segmentIndex?A(f,Xp(a,c),2):f.D(2):f["return"](!1);Yp(a,c,d,e);return f["return"](!0)})}
610
- function Xp(a,b){var c,d,e,f,g,h,k;return M(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return A(l,Promise.all(c),2)}if(a.segmentIndex instanceof Si)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);C(l)})}
611
- function Vp(a,b,c,d,e){var f=c(a);Wp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return M(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Si;return A(g,Xp(f,0),0)})});if(!f.matchedStreams)return null;Yp(f,0,d,e);return f}function Yp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==Wb(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
612
- function Op(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
613
- function Sp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
614
- function Pp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=jg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new P(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
615
- (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Op(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Pp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Pp(a.trickModeVideo,b)}
616
- function Tp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
617
- function Wp(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Zp,video:Zp,text:$p,image:aq}[f.type],h={audio:bq,video:cq,text:dq,image:eq}[f.type],k=null;e=r(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;c.push(f)}b.matchedStreams=c}function Zp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Ad(b.codecs)!=Ad(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<jg(c,d).length:1)}return c?!1:!0}
618
- function $p(a,b){return a.language?b.language?0==Wb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function aq(a){return a.tilesLayout?!0:!1}
619
- function bq(a,b,c){if(a.id==c.id)return!0;var d=Wb(a.language,b.language),e=Wb(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;
620
- d=fq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==gq)return!0;if(d==hq)return!1;d=fq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==gq?!0:d==hq?!1:a.bandwidth&&iq(a.bandwidth,b.bandwidth,c.bandwidth)==gq?!0:!1}
621
- function cq(a,b,c){if(a.id==c.id)return!0;var d=fq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==gq)return!0;if(d==hq)return!1;if(a.frameRate){d=fq(a.frameRate,b.frameRate,c.frameRate);if(d==gq)return!0;if(d==hq)return!1}return a.bandwidth&&iq(a.bandwidth,b.bandwidth,c.bandwidth)==gq?!0:!1}
622
- function dq(a,b,c){if(a.id==c.id)return!0;var d=Wb(a.language,b.language),e=Wb(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!=
623
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function eq(a,b,c){return a.id==c.id?!0:fq(a.width*a.height,b.width*b.height,c.width*c.height)==gq?!0:!1}function Rp(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}}
624
- function Mp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Pi([]),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}}
625
- function fq(a,b,c){if(b==a&&a!=c)return hq;if(c==a&&a!=b)return gq;if(b>a){if(c<=a||c-a<b-a)return gq;if(c-a>b-a)return hq}else{if(c>a)return hq;if(a-c<a-b)return gq;if(a-c>a-b)return hq}return jq}function iq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?gq:b<a?hq:jq}var gq=1,jq=0,hq=-1;function kq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new Gp;this.H=0;this.J=new ec(5);this.G=new Q(function(){lq(a)});this.A=new af;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=kq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return M(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,A(e,mq(c),2);d=e.h;c.h&&nq(c,d);if(!c.h)throw new P(2,7,7001);return e["return"](c.i)})};
626
- q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.A.destroy()};q.update=function(){var a=this,b;return M(function(c){if(1==c.g)return E(c,2),A(c,mq(a),4);if(2!=c.g)return va(c,0);b=I(c);if(!a.h||!b)return c["return"]();a.h.onError(b);C(c)})};q.onExpirationUpdated=function(){};
627
- function mq(a){var b,c,d,e,f,g,h;return M(function(k){if(1==k.g)return b=gf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),bf(a.A,e),A(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return A(k,oq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k["return"](h)})}
628
- function oq(a,b,c){var d,e,f,g,h;return M(function(k){if(1==k.g){d=Eo(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](pq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Uo(d,a.g.retryParameters,f,c,a.h.networkingEngine);bf(a.A,g);return A(k,g.promise,2)}h=k.h;return k["return"](pq(a,h,c))})}
629
- function pq(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da;return M(function(Qa){switch(Qa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=mo(b,"Location").map(so).filter(Fb);0<f.length&&(g=Hb(e,f),e=a.m=g);h=mo(b,"BaseURL");k=h.map(so);l=Hb(e,k);m=0;h&&h.length&&(m=uo(h[0],"availabilityTimeOffset",Bo)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=uo(b,"minBufferTime",wo)||0);a.H=uo(b,"minimumUpdatePeriod",wo,-1);t=uo(b,"availabilityStartTime",vo);v=uo(b,
630
- "timeShiftBufferDepth",wo);x=a.g.dash.ignoreSuggestedPresentationDelay;y=null;x||(y=uo(b,"suggestedPresentationDelay",wo));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=uo(b,"maxSegmentDuration",wo));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,F=r(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.Hb(B.ob());else J=a.g.defaultPresentationDelay||1.5*p,K=null!=y?y:J,B=new R(t,K,a.g.dash.autoCorrectDrift);B.Pc("static"==z);(L=B.T())&&
631
- !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.ye(v);W=b.getAttribute("profiles")||"";Z={xb:"static"!=z,presentationTimeline:B,sa:null,Y:null,Ca:null,L:null,bandwidth:0,hf:!1,Yb:m,profiles:W.split(",")};ka=qq(a,Z,l,b);ja=ka.duration;ea=ka.periods;"static"!=z&&ka.Xe||B.bb(ja||Infinity);a.C&&!a.F&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?B.wf(a.C):a.C&&Sa("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.");
632
- B.be(D||1);return A(Qa,Hp(a.j,ea,Z.xb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Qa.D(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.Ef()){Qa.D(4);break}Ma=mo(b,"UTCTiming");return A(Qa,rq(a,l,Ma),5);case 5:Da=Qa.h;if(!a.h)return Qa["return"]();B.xf(Da);case 4:B.Yd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),C(Qa)}})}
633
- function qq(a,b,c,d){var e=uo(d,"mediaPresentationDuration",wo),f=[],g=0;d=mo(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=uo(k,"start",wo,g),n=k.id,p=uo(k,"duration",wo),t=null;if(l){var v=uo(l,"start",wo);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=sq(a,b,c,{start:m,duration:t,node:k,lf:null==t||!l});f.push(g);b.sa.id&&t&&(a.N[b.sa.id]=t);if(null==t){g=
634
- null;break}g=m+t}}a.K=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,Xe:!1}:{periods:f,duration:g,Xe:!0}}
635
- function sq(a,b,c,d){b.sa=tq(d.node,null,c);b.Y=d;b.sa.Yb=b.Yb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=mo(d.node,"EventStream");c=b.presentationTimeline.ob();e=r(e);for(var f=e.next();!f.done;f=e.next())uq(a,d.start,d.duration,f.value,c);c=mo(d.node,"AdaptationSet").map(function(m){return vq(a,b,m)}).filter(Fb);if(b.xb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Vg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
636
- }d=c.filter(function(m){return!m.Ee});c=c.filter(function(m){return m.Ee});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ee.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Vc:h.Vc},l=k.next())h.Vc=l.value,h.Vc.trickModeVideo=e.streams.find(function(m){return function(n){return Ad(m.Vc.codecs)==Ad(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:wq(d,"audio");g=a.g.disableVideo?[]:wq(d,"video");f=a.g.disableText?
637
- []:wq(d,Mb);c=a.g.disableThumbnails?[]:wq(d,"image");if(!g.length&&!e.length)throw new P(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.sa.id,Xc:d,zd:e,textStreams:g,imageStreams:f}}
638
- function wq(a,b){return a.filter(function(c){return c.contentType==b})}
639
- function vq(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.Ca=tq(c,b.sa,null);var e=!1,f=mo(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Fb),h=void 0,k=b.Ca.contentType==Mb;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
640
- l}}var n;m=mo(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=mo(c,"SupplementalProperty");m=r(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
641
- 10)));m=mo(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var x=r(t),y=x.next();!y.done;y=x.next()){var w=y.value,D=y=void 0;w.includes("=")?(w=w.split("="),y=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(y="CC"+p,2==t.length?p+=2:p++,D=w);v.set(y,Qb(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
642
- 1,null!=t)for(t=r(t.split(";")),y=t.next();!y.done;y=t.next())y=y.value,w=x=void 0,y.includes("=")?(y=y.split("="),x="svc"+y[0],w=y[1].split(",")[0].split(":").pop()):(x="svc"+p,p++,w=y),v.set(x,Qb(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=mo(c,"ContentProtection");var z=Fo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=Qb(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=mo(c,"Label"))&&l.length&&
643
- (l=l[0],l.textContent&&(F=l.textContent));l=mo(c,"Representation");c=l.map(function(G){if(G=xq(a,b,z,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.Ca.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new P(2,4,4003);}if(!b.Ca.contentType||"application"==b.Ca.contentType)for(b.Ca.contentType=yq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.Ca.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
644
- m.value,p=r(z.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Fb);return{id:b.Ca.id||"__fake__"+a.I++,contentType:b.Ca.contentType,language:B,Ii:e,streams:c,drmInfos:z.drmInfos,Ee:f,Vg:k}}
645
- function xq(a,b,c,d,e,f,g,h,k,l){b.L=tq(l,b.Ca,null);a.C=Math.min(a.C,b.L.Yb);if(!zq(b.L))return null;var m=b.Y.start;b.bandwidth=uo(l,"bandwidth",zo)||0;var n=b.L.contentType,p=n==Mb||"application"==n;n="image"==n;try{var t=function(H,J,K){return Aq(a,H,J,K)};if(b.L.Nc)var v=gp(b,t);else if(b.L.Db)v=mp(b,a.l);else if(b.L.Oc)v=zp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var x=b.L.Pa,y=b.Y.duration||0;v={$b:function(){return Promise.resolve(Ri(m,y,x))}}}}catch(H){if((p||n)&&4002==H.code)return null;
646
- throw H;}t=mo(l,"ContentProtection");t=Io(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;mo(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=mo(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
613
+ function Wp(a,b,c,d,e){return M(function(f){if(1==f.g)return Yp(b,a),a.matchedStreams?a.segmentIndex?A(f,Zp(a,c),2):f.D(2):f["return"](!1);$p(a,c,d,e);return f["return"](!0)})}
614
+ function Zp(a,b){var c,d,e,f,g,h,k;return M(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return A(l,Promise.all(c),2)}if(a.segmentIndex instanceof oj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);C(l)})}
615
+ function Xp(a,b,c,d,e){var f=c(a);Yp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return M(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new oj;return A(g,Zp(f,0),0)})});if(!f.matchedStreams)return null;$p(f,0,d,e);return f}function $p(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==Wb(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
616
+ function Qp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
617
+ function Up(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
618
+ function Rp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Fg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new P(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
619
+ (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Qp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Rp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Rp(a.trickModeVideo,b)}
620
+ function Vp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
621
+ function Yp(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:aq,video:aq,text:bq,image:cq}[f.type],h={audio:dq,video:eq,text:fq,image:gq}[f.type],k=null;e=r(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;c.push(f)}b.matchedStreams=c}function aq(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Ad(b.codecs)!=Ad(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<Fg(c,d).length:1)}return c?!1:!0}
622
+ function bq(a,b){return a.language?b.language?0==Wb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function cq(a){return a.tilesLayout?!0:!1}
623
+ function dq(a,b,c){if(a.id==c.id)return!0;var d=Wb(a.language,b.language),e=Wb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
624
+ d=hq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==iq)return!0;if(d==jq)return!1;d=hq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==iq?!0:d==jq?!1:a.bandwidth&&kq(a.bandwidth,b.bandwidth,c.bandwidth)==iq?!0:!1}
625
+ function eq(a,b,c){if(a.id==c.id)return!0;var d=hq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==iq)return!0;if(d==jq)return!1;if(a.frameRate){d=hq(a.frameRate,b.frameRate,c.frameRate);if(d==iq)return!0;if(d==jq)return!1}return a.bandwidth&&kq(a.bandwidth,b.bandwidth,c.bandwidth)==iq?!0:!1}
626
+ function fq(a,b,c){if(a.id==c.id)return!0;var d=Wb(a.language,b.language),e=Wb(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!=
627
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function gq(a,b,c){return a.id==c.id?!0:hq(a.width*a.height,b.width*b.height,c.width*c.height)==iq?!0:!1}function Tp(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}}
628
+ function Op(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new lj([]),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}}
629
+ function hq(a,b,c){if(b==a&&a!=c)return jq;if(c==a&&a!=b)return iq;if(b>a){if(c<=a||c-a<b-a)return iq;if(c-a>b-a)return jq}else{if(c>a)return jq;if(a-c<a-b)return iq;if(a-c>a-b)return jq}return lq}function kq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?iq:b<a?jq:lq}var iq=1,lq=0,jq=-1;function mq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new Ip;this.H=0;this.J=new ec(5);this.G=new Q(function(){nq(a)});this.A=new af;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=mq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return M(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,A(e,oq(c),2);d=e.h;c.h&&pq(c,d);if(!c.h)throw new P(2,7,7001);return e["return"](c.i)})};
630
+ q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.A.destroy()};q.update=function(){var a=this,b;return M(function(c){if(1==c.g)return E(c,2),A(c,oq(a),4);if(2!=c.g)return va(c,0);b=I(c);if(!a.h||!b)return c["return"]();a.h.onError(b);C(c)})};q.onExpirationUpdated=function(){};
631
+ function oq(a){var b,c,d,e,f,g,h;return M(function(k){if(1==k.g)return b=gf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),bf(a.A,e),A(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return A(k,qq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k["return"](h)})}
632
+ function qq(a,b,c){var d,e,f,g,h;return M(function(k){if(1==k.g){d=Vf(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](rq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Wo(d,a.g.retryParameters,f,c,a.h.networkingEngine);bf(a.A,g);return A(k,g.promise,2)}h=k.h;return k["return"](rq(a,h,c))})}
633
+ function rq(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da;return M(function(Qa){switch(Qa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Cf(b,"Location").map(If).filter(Fb);0<f.length&&(g=Hb(e,f),e=a.m=g);h=Cf(b,"BaseURL");k=h.map(If);l=Hb(e,k);m=0;h&&h.length&&(m=Kf(h[0],"availabilityTimeOffset",Rf)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Kf(b,"minBufferTime",Mf)||0);a.H=Kf(b,"minimumUpdatePeriod",Mf,-1);t=Kf(b,"availabilityStartTime",Lf);v=Kf(b,
634
+ "timeShiftBufferDepth",Mf);x=a.g.dash.ignoreSuggestedPresentationDelay;y=null;x||(y=Kf(b,"suggestedPresentationDelay",Mf));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Kf(b,"maxSegmentDuration",Mf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,F=r(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.Hb(B.mb());else J=a.g.defaultPresentationDelay||1.5*p,K=null!=y?y:J,B=new R(t,K,a.g.dash.autoCorrectDrift);B.Pc("static"==z);(L=B.T())&&
635
+ !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.Be(v);W=b.getAttribute("profiles")||"";Z={xb:"static"!=z,presentationTimeline:B,sa:null,Y:null,Ca:null,L:null,bandwidth:0,lf:!1,Yb:m,profiles:W.split(",")};ka=sq(a,Z,l,b);ja=ka.duration;ea=ka.periods;"static"!=z&&ka.$e||B.bb(ja||Infinity);a.C&&!a.F&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?B.Af(a.C):a.C&&Sa("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.");
636
+ B.fe(D||1);return A(Qa,Jp(a.j,ea,Z.xb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Qa.D(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.If()){Qa.D(4);break}Ma=Cf(b,"UTCTiming");return A(Qa,tq(a,l,Ma),5);case 5:Da=Qa.h;if(!a.h)return Qa["return"]();B.Bf(Da);case 4:B.ae();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),C(Qa)}})}
637
+ function sq(a,b,c,d){var e=Kf(d,"mediaPresentationDuration",Mf),f=[],g=0;d=Cf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Kf(k,"start",Mf,g),n=k.id,p=Kf(k,"duration",Mf),t=null;if(l){var v=Kf(l,"start",Mf);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=uq(a,b,c,{start:m,duration:t,node:k,pf:null==t||!l});f.push(g);b.sa.id&&t&&(a.N[b.sa.id]=t);if(null==t){g=
638
+ null;break}g=m+t}}a.K=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,$e:!1}:{periods:f,duration:g,$e:!0}}
639
+ function uq(a,b,c,d){b.sa=vq(d.node,null,c);b.Y=d;b.sa.Yb=b.Yb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=Cf(d.node,"EventStream");c=b.presentationTimeline.mb();e=r(e);for(var f=e.next();!f.done;f=e.next())wq(a,d.start,d.duration,f.value,c);c=Cf(d.node,"AdaptationSet").map(function(m){return xq(a,b,m)}).filter(Fb);if(b.xb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Zg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
640
+ }d=c.filter(function(m){return!m.He});c=c.filter(function(m){return m.He});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.He.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Vc:h.Vc},l=k.next())h.Vc=l.value,h.Vc.trickModeVideo=e.streams.find(function(m){return function(n){return Ad(m.Vc.codecs)==Ad(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:yq(d,"audio");g=a.g.disableVideo?[]:yq(d,"video");f=a.g.disableText?
641
+ []:yq(d,Mb);c=a.g.disableThumbnails?[]:yq(d,"image");if(!g.length&&!e.length)throw new P(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.sa.id,Yc:d,Bd:e,textStreams:g,imageStreams:f}}
642
+ function yq(a,b){return a.filter(function(c){return c.contentType==b})}
643
+ function xq(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.Ca=vq(c,b.sa,null);var e=!1,f=Cf(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Fb),h=void 0,k=b.Ca.contentType==Mb;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
644
+ l}}var n;m=Cf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Cf(c,"SupplementalProperty");m=r(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
645
+ 10)));m=Cf(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var x=r(t),y=x.next();!y.done;y=x.next()){var w=y.value,D=y=void 0;w.includes("=")?(w=w.split("="),y=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(y="CC"+p,2==t.length?p+=2:p++,D=w);v.set(y,Qb(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
646
+ 1,null!=t)for(t=r(t.split(";")),y=t.next();!y.done;y=t.next())y=y.value,w=x=void 0,y.includes("=")?(y=y.split("="),x="svc"+y[0],w=y[1].split(",")[0].split(":").pop()):(x="svc"+p,p++,w=y),v.set(x,Qb(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Cf(c,"ContentProtection");var z=Ho(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=Qb(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=Cf(c,"Label"))&&l.length&&
647
+ (l=l[0],l.textContent&&(F=l.textContent));l=Cf(c,"Representation");c=l.map(function(G){if(G=zq(a,b,z,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.Ca.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new P(2,4,4003);}if(!b.Ca.contentType||"application"==b.Ca.contentType)for(b.Ca.contentType=Aq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.Ca.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
648
+ m.value,p=r(z.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Fb);return{id:b.Ca.id||"__fake__"+a.I++,contentType:b.Ca.contentType,language:B,Mi:e,streams:c,drmInfos:z.drmInfos,He:f,Zg:k}}
649
+ function zq(a,b,c,d,e,f,g,h,k,l){b.L=vq(l,b.Ca,null);a.C=Math.min(a.C,b.L.Yb);if(!Bq(b.L))return null;var m=b.Y.start;b.bandwidth=Kf(l,"bandwidth",Pf)||0;var n=b.L.contentType,p=n==Mb||"application"==n;n="image"==n;try{var t=function(H,J,K){return Cq(a,H,J,K)};if(b.L.Nc)var v=ip(b,t);else if(b.L.Db)v=op(b,a.l);else if(b.L.Oc)v=Bp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var x=b.L.Pa,y=b.Y.duration||0;v={$b:function(){return Promise.resolve(nj(m,y,x))}}}}catch(H){if((p||n)&&4002==H.code)return null;
650
+ throw H;}t=Cf(l,"ContentProtection");t=Ko(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;Cf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=Cf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
647
651
  (z=l.getAttribute("value")),!z))return null;var B;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");var F=b.L.id?b.sa.id+","+b.L.id:"",G={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,J,K;return M(function(L){if(1==L.g){J=(H=F&&b.xb&&a.l[F])?a.l[F]:G;if(J.segmentIndex)return L.D(0);K=J;return A(L,v.$b(),3)}K.segmentIndex=L.h;C(L)})},closeSegmentIndex:function(){G.segmentIndex&&
648
- (G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.Ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.L.nd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,
649
- hdr:B,tilesLayout:z,matchedStreams:[]};F&&b.xb&&!a.l[F]&&(a.l[F]=G);return G}function lq(a){var b,c;M(function(d){switch(d.g){case 1:return b=0,E(d,2),A(d,mq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=I(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();nq(a,b);C(d)}})}function nq(a,b){0>a.H||a.G.S(Math.max(3,a.H-b,fc(a.J)))}
650
- function tq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,nd:null,audioSamplingRate:null,Yb:0};c=c||b.Pa;var d=mo(a,"BaseURL"),e=d.map(so),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=uo(a,"frameRate",Co)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=mo(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
651
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=mo(a,"AudioChannelConfiguration");m=Bq(m)||b.nd;p=uo(a,"audioSamplingRate",Ao)||b.audioSamplingRate;f||(f=yq(g,h));var t=lo(a,"SegmentBase"),v=lo(a,"SegmentTemplate"),x=t?uo(t,"availabilityTimeOffset",Bo)||0:0,y=v?uo(v,"availabilityTimeOffset",Bo)||0:0;d=d&&d.length?uo(d[0],"availabilityTimeOffset",Bo)||0:0;d=b.Yb+d+x+y;return{Pa:Hb(c,e),Nc:t||b.Nc,Db:lo(a,"SegmentList")||b.Db,Oc:v||b.Oc,width:uo(a,"width",Ao)||b.width,height:uo(a,
652
- "height",Ao)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),nd:m,audioSamplingRate:p,Yb:d}}
653
- function Bq(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
654
- 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 zq(a){var b=a.Nc?1:0;b+=a.Db?1:0;b+=a.Oc?1:0;if(0==b)return a.contentType==Mb||"application"==a.contentType?!0:!1;1!=b&&(a.Nc&&(a.Db=null),a.Oc=null);return!0}
655
- function Cq(a,b,c,d){var e,f,g,h,k,l;return M(function(m){if(1==m.g)return e=Hb(b,[c]),f=gf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),bf(a.A,g),A(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=gd(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
656
- function rq(a,b,c){var d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.D(4);break}h=g.value;E(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.D(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.D(8);
657
- 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":Sa("NTP UTCTiming scheme is not supported");break;default:Sa("Unrecognized scheme in UTCTiming element",k)}n.D(9);break;case 7:return A(n,Cq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return A(n,Cq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
652
+ (G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.Ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.L.od,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,
653
+ hdr:B,tilesLayout:z,matchedStreams:[]};F&&b.xb&&!a.l[F]&&(a.l[F]=G);return G}function nq(a){var b,c;M(function(d){switch(d.g){case 1:return b=0,E(d,2),A(d,oq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=I(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();pq(a,b);C(d)}})}function pq(a,b){0>a.H||a.G.R(Math.max(3,a.H-b,fc(a.J)))}
654
+ function vq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,od:null,audioSamplingRate:null,Yb:0};c=c||b.Pa;var d=Cf(a,"BaseURL"),e=d.map(If),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Kf(a,"frameRate",Sf)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Cf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
655
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Cf(a,"AudioChannelConfiguration");m=Dq(m)||b.od;p=Kf(a,"audioSamplingRate",Qf)||b.audioSamplingRate;f||(f=Aq(g,h));var t=Bf(a,"SegmentBase"),v=Bf(a,"SegmentTemplate"),x=t?Kf(t,"availabilityTimeOffset",Rf)||0:0,y=v?Kf(v,"availabilityTimeOffset",Rf)||0:0;d=d&&d.length?Kf(d[0],"availabilityTimeOffset",Rf)||0:0;d=b.Yb+d+x+y;return{Pa:Hb(c,e),Nc:t||b.Nc,Db:Bf(a,"SegmentList")||b.Db,Oc:v||b.Oc,width:Kf(a,"width",Qf)||b.width,height:Kf(a,
656
+ "height",Qf)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),od:m,audioSamplingRate:p,Yb:d}}
657
+ function Dq(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
658
+ 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 Bq(a){var b=a.Nc?1:0;b+=a.Db?1:0;b+=a.Oc?1:0;if(0==b)return a.contentType==Mb||"application"==a.contentType?!0:!1;1!=b&&(a.Nc&&(a.Db=null),a.Oc=null);return!0}
659
+ function Eq(a,b,c,d){var e,f,g,h,k,l;return M(function(m){if(1==m.g)return e=Hb(b,[c]),f=gf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),bf(a.A,g),A(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=gd(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
660
+ function tq(a,b,c){var d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.D(4);break}h=g.value;E(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.D(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.D(8);
661
+ 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":Sa("NTP UTCTiming scheme is not supported");break;default:Sa("Unrecognized scheme in UTCTiming element",k)}n.D(9);break;case 7:return A(n,Eq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return A(n,Eq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
658
662
  case 9:va(n,3);break;case 5:I(n);case 3:g=f.next();n.D(2);break;case 4:return Sa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
659
- function uq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=uo(d,"timescale",Ao)||1;d=r(mo(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=uo(k,"presentationTime",Ao)||0,m=uo(k,"duration",Ao)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
660
- function Aq(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=nf,f=ij(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),bf(a.A,h),A(l,h.promise,2);k=l.h;return l["return"](k.data)})}function yq(a,b){return Fd(yd(a,b))?Mb:a.split("/")[0]}N("shaka.dash.DashParser",kq);qg.mpd=function(){return new kq};og["application/dash+xml"]=function(){return new kq};og["video/vnd.mpeg.dash.mpd"]=function(){return new kq};function Dq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Eq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Eq.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};
661
- Eq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Fq(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Gq(a,b){var c=a.getAttribute(b);if(!c)throw new P(2,4,4023,b);return c.value}function Hq(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.i=c}function Iq(a,b){this.name=a;this.value=b};function Jq(a,b){return a.filter(function(c){return c.name==b})}function Kq(a,b){return a.filter(function(c){return Gq(c,"TYPE")==b})}function Lq(a,b){var c=Jq(a,b);return c.length?c[0]:null}function Mq(a,b,c){c=void 0===c?0:c;return(a=Lq(a,b))?Number(a.value):c};function Nq(a){this.h=a;this.g=0}function Oq(a){Pq(a,/[ \t]+/gm)}function Pq(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 Qq(a){return a.g==a.h.length?null:(a=Pq(a,/[^ \t\n]*/gm))?a[0]:null};function Rq(){this.g=0}
662
- function Sq(a,b,c){b=gd(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 P(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Tq(a,g),--a.g,Uq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Tq(a,h);if(Vq.includes(h.name)){if(1!=b)throw new P(2,4,4017);
663
- var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Tq(a,m),Uq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Fq(m,"TYPE")?k.push(m):"MAP"==Fq(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Hb([d],[m.trim()])[0],h&&g.push(h),e.push(new Hq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Hq("",g,k)));return new Dq(c,b,f,
664
- e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Iq("URI",k)),e=!0)}}return new Dq(c,b,f)}function Tq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new P(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Nq(f);var h;(h=Pq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Pq(f,k);)d.push(new Iq(h[1],h[2]||h[3])),Oq(f)}return new Eq(c,e,d,g)}
665
- var Uq="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(" "),Vq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Wq(){}function Xq(a){try{var b=Yq(a);return Ve({uri:a,pf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Te(c)}}function Yq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new P(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new P(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=pd(a):e=kd(a);return{data:e,contentType:c}}
666
- N("shaka.net.DataUriPlugin",Wq);Wq.parse=Xq;df("data",Xq);function Zq(){var a=this;this.g=this.i=null;this.Aa=1;this.A=new Map;this.C=new Map;this.na=new Set;this.h=new Map;this.j=null;this.N="";this.$=new Rq;this.ma=0;this.F=new Q(function(){$q(a)});this.m=ar;this.G=null;this.aa=0;this.I=Infinity;this.Z=this.ba=0;this.H=new af;this.W=[];this.K=new Map;this.Ba=!1;this.B=new Map;this.R=null;this.va=new Map;this.J=new Map;this.l=!1}q=Zq.prototype;q.configure=function(a){this.g=a};
667
- q.start=function(a,b){var c=this,d,e;return M(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),A(f,br(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,A(f,cr(c,d.data),3);e=c.ma;0<e&&c.F.S(e);return f["return"](c.G)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.H&&(a.push(this.H.destroy()),this.H=null);this.g=this.i=null;this.na.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
668
- q.update=function(){var a=this,b,c,d;return M(function(e){if(1==e.g){if(a.m==ar)return e["return"]();b=[];a.R=null;c=Array.from(a.h.values());return c.length?A(e,dr(a,c[0]),2):e.D(2)}for(d=1;d<c.length;d++)b.push(dr(a,c[d]));return A(e,Promise.all(b),0)})};
669
- function dr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return M(function(x){if(1==x.g)return c=er,d=b.If,e=new jb(d),a.l&&b.Nf&&mb(e,new pb("_HLS_skip=YES")),A(x,br(a,e.toString()),2);if(3!=x.g){f=x.h;g=Sq(a.$,f.data,f.uri);if(1!=g.type)throw new P(2,4,4017);h=Jq(g.g,"EXT-X-DEFINE");k=fr(a,h);l=b.stream;return A(x,gr(a,b.yd,g,l.type,l.mimeType,b.$d,k,b.Sf,l.codecs,l.bandwidth),3)}m=x.h;l.segmentIndex.fc(m,a.j.ob());m.length&&(n=Mq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.$d.get(n),l.segmentIndex.Hb(p));t=m[m.length-
670
- 1];if(v=Lq(g.g,"EXT-X-ENDLIST"))hr(a,c.Hf),a.j.bb(t.endTime);C(x)})}q.onExpirationUpdated=function(){};
671
- function cr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd;return M(function(gb){switch(gb.g){case 1:c=Sq(a.$,b,a.N);if(0!=c.type)throw new P(2,4,4022);d=Jq(c.g,"EXT-X-DEFINE");ir(a,d);e=Jq(c.g,"EXT-X-MEDIA");f=Jq(c.g,"EXT-X-STREAM-INF");g=Jq(c.g,"EXT-X-IMAGE-STREAM-INF");jr(a,f);h=Jq(c.g,"EXT-X-SESSION-DATA");k=r(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Fq(m,"DATA-ID"),p=Fq(m,"URI"),t=Fq(m,"LANGUAGE"),v=Fq(m,"VALUE"),x=(new Map).set("id",n),p&&
672
- x.set("uri",Hb([a.N],[p])[0]),t&&x.set("language",t),v&&x.set("value",v),y=new O("sessiondata",x),a.i)a.i.onEvent(y);return A(gb,kr(a,e),2);case 2:return lr(a,e),A(gb,mr(a,f),3);case 3:return w=gb.h,A(gb,nr(a,e),4);case 4:return D=gb.h,A(gb,or(a,g),5);case 5:z=gb.h;if(!a.i)throw new P(2,7,7001);if(a.Ba&&0==w.length)throw new P(2,4,4034);F=B=Infinity;G=r(a.h.values());for(H=G.next();!H.done;H=G.next())J=H.value,B=Math.min(B,J.mf),"text"!=J.stream.type&&(F=Math.min(F,J.Ig-J.mf));a.m!=ar?(a.j=new R(0,
673
- a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.aa),a.j.Pc(!1)):(a.j=new R(null,0),a.j.Pc(!0));if(a.m!=ar)a.ma=a.I,K=er,a.m==K.Ne&&(L=a.j.td,isNaN(a.g.availabilityWindowOverride)||(L=a.g.availabilityWindowOverride),a.j.ye(L));else for(a.j.bb(F),a.j.offset(-B),W=r(a.h.values()),H=W.next();!H.done;H=W.next())Z=H.value,Z.stream.segmentIndex.offset(-B),Z.stream.segmentIndex.yb(0,F);a.W=[];ka=[];ja=r(w);for(ea=ja.next();!ea.done;ea=ja.next())for(Ia=ea.value,Ma=r([Ia.video,Ia.audio]),
674
- Da=Ma.next();!Da.done;Da=Ma.next())(Qa=Da.value)&&ka.push(Qa);return A(gb,Promise.all(ka.map(function(Tc){return M(function(He){return A(He,Tc.createSegmentIndex(),0)})})),6);case 6:ac=r(ka);for(Da=ac.next();!Da.done;Da=ac.next())Dd=Da.value,a.W.push(Dd.segmentIndex.O);pr(a);a.j.Yd();a.G={presentationTimeline:a.j,variants:w,textStreams:D,imageStreams:z,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.G);C(gb)}})}
675
- function ir(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Fq(e,"NAME");e=Fq(e,"VALUE");d&&e&&(a.A.has(d)||a.A.set(d,e))}}function fr(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Fq(f,"NAME");var g=Fq(f,"VALUE");f=Fq(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.A.get(f))&&c.set(f,e)}return c}
676
- function jr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Fq(e,"AUDIO");d=Fq(e,"VIDEO");var g=Fq(e,"SUBTITLES");e=qr(a,e);if(g){var h=Kb(Mb,e);a.B.set(g,h);ic(e,h)}f&&(g=Jb("audio",e),a.B.set(f,g));d&&(f=Jb("video",e),a.B.set(d,f))}}
677
- function nr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g)return c=Kq(b,"SUBTITLES"),d=c.map(function(x){var y,w,D;return M(function(z){if(1==z.g){if(y=a.g.disableText)return z["return"](null);E(z,2);return A(z,rr(a,x),4)}if(2!=z.g)return w=z.h,z["return"](w.stream);D=I(z);if(a.g.hls.ignoreTextStreamFailures)return z["return"](null);throw D;})}),A(v,Promise.all(d),2);e=v.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Gq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(n=
663
+ function wq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Kf(d,"timescale",Qf)||1;d=r(Cf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Kf(k,"presentationTime",Qf)||0,m=Kf(k,"duration",Qf)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
664
+ function Cq(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=nf,f=Dj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),bf(a.A,h),A(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Aq(a,b){return Ed(yd(a,b))?Mb:a.split("/")[0]}N("shaka.dash.DashParser",mq);Lg.mpd=function(){return new mq};Jg["application/dash+xml"]=function(){return new mq};Jg["video/vnd.mpeg.dash.mpd"]=function(){return new mq};function Fq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Gq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Gq.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};
665
+ Gq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Hq(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Iq(a,b){var c=a.getAttribute(b);if(!c)throw new P(2,4,4023,b);return c.value}function Jq(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.i=c}function Kq(a,b){this.name=a;this.value=b};function Lq(a,b){return a.filter(function(c){return c.name==b})}function Mq(a,b){return a.filter(function(c){return Iq(c,"TYPE")==b})}function Nq(a,b){var c=Lq(a,b);return c.length?c[0]:null}function Oq(a,b,c){c=void 0===c?0:c;return(a=Nq(a,b))?Number(a.value):c};function Pq(a){this.h=a;this.g=0}function Qq(a){Rq(a,/[ \t]+/gm)}function Rq(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 Sq(a){return a.g==a.h.length?null:(a=Rq(a,/[^ \t\n]*/gm))?a[0]:null};function Tq(){this.g=0}
666
+ function Uq(a,b,c){b=gd(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 P(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Vq(a,g),--a.g,Wq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Vq(a,h);if(Xq.includes(h.name)){if(1!=b)throw new P(2,4,4017);
667
+ var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Vq(a,m),Wq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Hq(m,"TYPE")?k.push(m):"MAP"==Hq(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Hb([d],[m.trim()])[0],h&&g.push(h),e.push(new Jq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Jq("",g,k)));return new Fq(c,b,f,
668
+ e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Kq("URI",k)),e=!0)}}return new Fq(c,b,f)}function Vq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new P(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Pq(f);var h;(h=Rq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Rq(f,k);)d.push(new Kq(h[1],h[2]||h[3])),Qq(f)}return new Gq(c,e,d,g)}
669
+ var Wq="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(" "),Xq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Yq(){}function Zq(a){try{var b=$q(a);return Ve({uri:a,uf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Te(c)}}function $q(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new P(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new P(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=pd(a):e=kd(a);return{data:e,contentType:c}}
670
+ N("shaka.net.DataUriPlugin",Yq);Yq.parse=Zq;df("data",Zq);function ar(){var a=this;this.g=this.i=null;this.Aa=1;this.A=new Map;this.C=new Map;this.na=new Set;this.h=new Map;this.j=null;this.N="";this.$=new Tq;this.ma=0;this.F=new Q(function(){br(a)});this.m=cr;this.G=null;this.aa=0;this.I=Infinity;this.Z=this.ba=0;this.H=new af;this.W=[];this.K=new Map;this.Ba=!1;this.B=new Map;this.S=null;this.va=new Map;this.J=new Map;this.l=!1}q=ar.prototype;q.configure=function(a){this.g=a};
671
+ q.start=function(a,b){var c=this,d,e;return M(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),A(f,dr(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,A(f,er(c,d.data),3);e=c.ma;0<e&&c.F.R(e);return f["return"](c.G)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.H&&(a.push(this.H.destroy()),this.H=null);this.g=this.i=null;this.na.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
672
+ q.update=function(){var a=this,b,c,d;return M(function(e){if(1==e.g){if(a.m==cr)return e["return"]();b=[];a.S=null;c=Array.from(a.h.values());return c.length?A(e,fr(a,c[0]),2):e.D(2)}for(d=1;d<c.length;d++)b.push(fr(a,c[d]));return A(e,Promise.all(b),0)})};
673
+ function fr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return M(function(x){if(1==x.g)return c=gr,d=b.Mf,e=new jb(d),a.l&&b.Rf&&nb(e,new pb("_HLS_skip=YES")),A(x,dr(a,e.toString()),2);if(3!=x.g){f=x.h;g=Uq(a.$,f.data,f.uri);if(1!=g.type)throw new P(2,4,4017);h=Lq(g.g,"EXT-X-DEFINE");k=hr(a,h);l=b.stream;return A(x,ir(a,b.zd,g,l.type,l.mimeType,b.ce,k,b.Wf,l.codecs,l.bandwidth),3)}m=x.h;l.segmentIndex.fc(m,a.j.mb());m.length&&(n=Oq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.ce.get(n),l.segmentIndex.Hb(p));t=m[m.length-
674
+ 1];if(v=Nq(g.g,"EXT-X-ENDLIST"))jr(a,c.Lf),a.j.bb(t.endTime);C(x)})}q.onExpirationUpdated=function(){};
675
+ function er(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,bc,Fd;return M(function(gb){switch(gb.g){case 1:c=Uq(a.$,b,a.N);if(0!=c.type)throw new P(2,4,4022);d=Lq(c.g,"EXT-X-DEFINE");kr(a,d);e=Lq(c.g,"EXT-X-MEDIA");f=Lq(c.g,"EXT-X-STREAM-INF");g=Lq(c.g,"EXT-X-IMAGE-STREAM-INF");lr(a,f);h=Lq(c.g,"EXT-X-SESSION-DATA");k=r(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Hq(m,"DATA-ID"),p=Hq(m,"URI"),t=Hq(m,"LANGUAGE"),v=Hq(m,"VALUE"),x=(new Map).set("id",n),p&&
676
+ x.set("uri",Hb([a.N],[p])[0]),t&&x.set("language",t),v&&x.set("value",v),y=new O("sessiondata",x),a.i)a.i.onEvent(y);return A(gb,mr(a,e),2);case 2:return nr(a,e),A(gb,or(a,f),3);case 3:return w=gb.h,A(gb,pr(a,e),4);case 4:return D=gb.h,A(gb,qr(a,g),5);case 5:z=gb.h;if(!a.i)throw new P(2,7,7001);if(a.Ba&&0==w.length)throw new P(2,4,4034);F=B=Infinity;G=r(a.h.values());for(H=G.next();!H.done;H=G.next())J=H.value,B=Math.min(B,J.qf),"text"!=J.stream.type&&(F=Math.min(F,J.Mg-J.qf));a.m!=cr?(a.j=new R(0,
677
+ a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.aa),a.j.Pc(!1)):(a.j=new R(null,0),a.j.Pc(!0));if(a.m!=cr)a.ma=a.I,K=gr,a.m==K.Qe&&(L=a.j.ud,isNaN(a.g.availabilityWindowOverride)||(L=a.g.availabilityWindowOverride),a.j.Be(L));else for(a.j.bb(F),a.j.offset(-B),W=r(a.h.values()),H=W.next();!H.done;H=W.next())Z=H.value,Z.stream.segmentIndex.offset(-B),Z.stream.segmentIndex.yb(0,F);a.W=[];ka=[];ja=r(w);for(ea=ja.next();!ea.done;ea=ja.next())for(Ia=ea.value,Ma=r([Ia.video,Ia.audio]),
678
+ Da=Ma.next();!Da.done;Da=Ma.next())(Qa=Da.value)&&ka.push(Qa);return A(gb,Promise.all(ka.map(function(Sc){return M(function(He){return A(He,Sc.createSegmentIndex(),0)})})),6);case 6:bc=r(ka);for(Da=bc.next();!Da.done;Da=bc.next())Fd=Da.value,a.W.push(Fd.segmentIndex.O);rr(a);a.j.ae();a.G={presentationTimeline:a.j,variants:w,textStreams:D,imageStreams:z,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.G);C(gb)}})}
679
+ function kr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Hq(e,"NAME");e=Hq(e,"VALUE");d&&e&&(a.A.has(d)||a.A.set(d,e))}}function hr(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Hq(f,"NAME");var g=Hq(f,"VALUE");f=Hq(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.A.get(f))&&c.set(f,e)}return c}
680
+ function lr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Hq(e,"AUDIO");d=Hq(e,"VIDEO");var g=Hq(e,"SUBTITLES");e=sr(a,e);if(g){var h=Kb(Mb,e);a.B.set(g,h);ic(e,h)}f&&(g=Kb("audio",e),g||(g=a.g.hls.defaultAudioCodec),a.B.set(f,g));d&&(f=Kb("video",e),f||(f=a.g.hls.defaultVideoCodec),a.B.set(d,f))}}
681
+ function pr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g)return c=Mq(b,"SUBTITLES"),d=c.map(function(x){var y,w,D;return M(function(z){if(1==z.g){if(y=a.g.disableText)return z["return"](null);E(z,2);return A(z,tr(a,x),4)}if(2!=z.g)return w=z.h,z["return"](w.stream);D=I(z);if(a.g.hls.ignoreTextStreamFailures)return z["return"](null);throw D;})}),A(v,Promise.all(d),2);e=v.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Iq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(n=
678
682
  r(m),p=n.next();!p.done;p=n.next())t=p.value,t.stream.codecs=l;return v["return"](e.filter(function(x){return x}))})}
679
- function or(a,b){var c,d;return M(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return M(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);E(l,2);return A(l,sr(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=I(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),A(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
680
- function kr(a,b){var c;return M(function(d){if(1==d.g)return b=b.filter(function(e){var f=Fq(e,"URI")||"";return"SUBTITLES"!=Fq(e,"TYPE")&&""!=f}),b.length?A(d,rr(a,b[0]),2):d.D(2);c=b.slice(1).map(function(e){return rr(a,e)});return A(d,Promise.all(c),0)})}
681
- function mr(a,b){var c,d,e;return M(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,v;return M(function(x){if(1==x.g)return h=Fq(g,"FRAME-RATE"),k=Number(Fq(g,"AVERAGE-BANDWIDTH"))||Number(Gq(g,"BANDWIDTH")),l=Fq(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=Fq(g,"VIDEO-RANGE"),A(x,tr(a,g,k),2);if(v=x.h){for(var y=x["return"],w=v.audio,D=v.video,z=r(D),B=z.next();!B.done;B=z.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
682
- void 0,B.frameRate=Number(h)||void 0,B.hdr=t||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!D.length||z)D=[null];z=[];w=r(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var F=r(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=B?B.stream:null;var J=H?H.stream:null,K=B?B.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.yd:"")+" - "+(B?B.yd:"");G&&J&&K.length&&L.length&&!(0<jg(K,L).length)||a.na.has(H)||(G={id:a.Aa++,language:G?G.language:"und",primary:!!G&&G.primary||
683
+ function qr(a,b){var c,d;return M(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return M(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);E(l,2);return A(l,ur(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=I(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),A(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
684
+ function mr(a,b){var c;return M(function(d){if(1==d.g)return b=b.filter(function(e){var f=Hq(e,"URI")||"";return"SUBTITLES"!=Hq(e,"TYPE")&&""!=f}),b.length?A(d,tr(a,b[0]),2):d.D(2);c=b.slice(1).map(function(e){return tr(a,e)});return A(d,Promise.all(c),0)})}
685
+ function or(a,b){var c,d,e;return M(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,v;return M(function(x){if(1==x.g)return h=Hq(g,"FRAME-RATE"),k=Number(Hq(g,"AVERAGE-BANDWIDTH"))||Number(Iq(g,"BANDWIDTH")),l=Hq(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=Hq(g,"VIDEO-RANGE"),A(x,vr(a,g,k),2);if(v=x.h){for(var y=x["return"],w=v.audio,D=v.video,z=r(D),B=z.next();!B.done;B=z.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
686
+ void 0,B.frameRate=Number(h)||void 0,B.hdr=t||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!D.length||z)D=[null];z=[];w=r(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var F=r(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=B?B.stream:null;var J=H?H.stream:null,K=B?B.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.zd:"")+" - "+(B?B.zd:"");G&&J&&K.length&&L.length&&!(0<Fg(K,L).length)||a.na.has(H)||(G={id:a.Aa++,language:G?G.language:"und",primary:!!G&&G.primary||
683
687
  !!J&&J.primary,audio:G,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(G),a.na.add(H))}}x=y.call(x,z)}else x=x["return"]([]);return x})}),A(f,Promise.all(c),2);d=f.h;e=d.reduce(Db,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
684
- function tr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,y;return M(function(w){if(1==w.g)return d=Nb,e=qr(a,b),f=Fq(b,"AUDIO"),g=Fq(b,"VIDEO"),k=(h=f||g)&&a.C.has(h)?a.C.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=Gq(b,"URI"),t=l.audio.find(function(D){return D&&D.yd==p}),v=Kb(d.gb,e),(x=Kb(d.Gb,e))&&!v?m=d.Gb:!k.length&&x&&v?(m=d.gb,e=[[v,x].join()]):l.audio.length&&t?(m=d.Gb,n=!0):m=l.video.length?d.Gb:d.gb,n?w.D(2):A(w,ur(a,b,e,m,c),3);2!=w.g&&(y=w.h);if(y)l[y.stream.type]=[y];else if(null===y)return w["return"](null);
685
- vr(l);return w["return"](l)})}function qr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Fq(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Bd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function wr(a){a=Fq(a,"LANGUAGE")||"und";return Qb(a)}
686
- function vr(a){a=r(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 lr(a,b){var c=Kq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=wr(e);var f=Gq(e,"GROUP-ID");e=Gq(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
687
- function rr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;return M(function(y){if(1==y.g){c=Gq(b,"GROUP-ID");d="";var w=Gq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Mb);e=w;e!=Mb&&c&&a.B.has(c)&&(d=a.B.get(c));f=xr(Gq(b,"URI"),a.A);if(a.h.has(f))return y["return"](a.h.get(f));g=wr(b);h=Fq(b,"NAME");k=Fq(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Fq(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Fq(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=Fq(b,"CHARACTERISTICS");t=Fq(b,"FORCED");
688
- v="YES"==t;return A(y,yr(a,f,d,e,g,l,h,m,null,p,v,n),2)}x=y.h;a.C.has(c)?a.C.get(c).push(x):a.C.set(c,[x]);if(null==x)return y["return"](null);if(a.h.has(f))return y["return"](a.h.get(f));a.h.set(f,x);return y["return"](x)})}
689
- function sr(a,b){var c,d,e,f,g,h,k,l,m,n;return M(function(p){if(1==p.g){c=xr(Gq(b,"URI"),a.A);d=Fq(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=wr(b);f=Fq(b,"NAME");g=Fq(b,"CHARACTERISTICS");return A(p,yr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Fq(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=
690
- Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Fq(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
691
- function ur(a,b,c,d,e){var f,g,h,k;return M(function(l){if(1==l.g){f=xr(Gq(b,"URI"),a.A);if(a.h.has(f))return l["return"](a.h.get(f));var m=Fq(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.K.get(m):null;h=Jb(d,c);return A(l,yr(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
692
- function yr(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd,gb,Tc,He,qp,rp,sp,tp,aj,bj,kg,up,vp,wp,xp;return M(function(nb){switch(nb.g){case 1:return t=Hb([a.N],[b])[0],A(nb,br(a,t),2);case 2:v=nb.h;t=v.uri;x=Sq(a.$,v.data,t);if(1!=x.type)throw new P(2,4,4017);y=[];if(x.segments)for(w=r(x.segments),D=w.next();!D.done;D=w.next())z=D.value,B=Jq(z.g,"EXT-X-KEY"),y.push.apply(y,ia(B));F=!1;G=[];H=new Set;J=r(y);for(K=J.next();!K.done;K=J.next())if(L=K.value,
693
- W=Gq(L,"METHOD"),"NONE"!=W){F=!0;if("AES-128"==W)return a.Ba=!0,nb["return"](null);Z=Gq(L,"KEYFORMAT");if(ja=(ka=zr[Z])?ka(L):null){if(ja.keyIds)for(ea=r(ja.keyIds),Ia=ea.next();!Ia.done;Ia=ea.next())Ma=Ia.value,H.add(Ma);G.push(ja)}}if(F&&!G.length)throw new P(2,4,4026);Da=Jq(x.g,"EXT-X-DEFINE");Qa=fr(a,Da);Ar(a,x);return A(nb,Br(a,d,c,x,Qa),3);case 3:return ac=nb.h,Cr.includes(ac)&&(c=""),Dd=new Map,gb=new Map,E(nb,4),A(nb,gr(a,b,x,d,ac,Dd,Qa,gb,c,p),6);case 6:Tc=nb.h;va(nb,5);break;case 4:He=I(nb);
694
- if(4035==He.code)return Sa("Skipping unsupported HLS stream",ac,b),nb["return"](null);throw He;case 5:qp=Tc[0].startTime;rp=Tc[Tc.length-1].endTime;sp=new Pi(Tc);tp=d==Mb?"subtitle":void 0;aj=[];if(l)for(bj=r(l.split(",")),kg=bj.next();!kg.done;kg=bj.next())up=kg.value,aj.push(up);wp=(vp=Lq(x.g,"EXT-X-SERVER-CONTROL"))?null!=vp.getAttribute("CAN-SKIP-UNTIL"):!1;xp={id:a.Aa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:sp,mimeType:ac,codecs:c,kind:tp,encrypted:F,
695
- drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:aj,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return nb["return"]({stream:xp,yd:b,If:t,mf:qp,Ig:rp,$d:Dd,Sf:gb,Nf:wp})}})}
696
- function Ar(a,b){var c=Lq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Lq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)hr(a,ar);else{c?hr(a,Dr):hr(a,Er);d=Lq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Lq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(Gq(c,"PART-TARGET")),a.I=Math.min(a.ba,a.I),c=Lq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=c?Number(Gq(c,"PART-HOLD-BACK")):0):a.I=Math.min(d,a.I);a.aa=Math.max(d,a.aa)}}
697
- function Fr(a,b,c,d){c=Lq(c,"EXT-X-MAP");if(!c)return null;var e=Gq(c,"URI");d=xr(Hb([b],[e])[0],d);b=[d,Fq(c,"BYTERANGE","")].join("-");a.va.has(b)||(c=Gr(d,c),a.va.set(b,c));return a.va.get(b)}function Gr(a,b){var c=0,d=null,e=Fq(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new qi(function(){return[a]},c,d)}
698
- function Hr(a,b,c,d,e,f,g,h,k){var l=d.g,m=xr(d.h,g),n=Lq(l,"EXTINF"),p=g=0,t=null;if(!n){if(0==d.i.length)throw new P(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var x={},y=0;y<d.i.length;x={Id:x.Id},y++){var w=d.i[y],D=0==y?c:v[v.length-1],z=0==y?e:D.endTime,B=Number(Fq(w,"DURATION"))||a.ba;if(B){B=z+B;var F=0,G=null;"EXT-X-PRELOAD-HINT"==w.name?F=(D=Fq(w,"BYTERANGE-START"))?Number(D):0:(F=Fq(w,"BYTERANGE"),D=r(Ir(D,F)),F=D.next().value,G=D.next().value);if(w=Fq(w,"URI"))x.Id=Hb([h],
699
- [w])[0],v.push(new si(z,B,function(H){return function(){return[H.Id]}}(x),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Lq(l,"EXT-X-BYTERANGE"))?(t=r(Ir(c,a.value)),p=t.next().value,t=t.next().value):v.length&&(p=v[0].Ha,t=v[v.length-1].wa);c="";a=null;"image"==k&&(c="1x1",k=Lq(l,"EXT-X-TILES"))&&(c=Gq(k,"LAYOUT"),(k=Fq(k,"DURATION"))&&(a=Number(k)));return new si(e,g,function(){return m.length?[m]:[]},p,t,b,f,0,Infinity,v,c,a)}
700
- function Ir(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+d-1);return[c,d]}function pr(a){if(a.j){for(var b=r(a.W),c=b.next();!c.done;c=b.next())a.j.hc(c.value);a.W=[]}}
701
- function gr(a,b,c,d,e,f,g,h,k,l){var m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:m=c.segments;p=Mq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(t=Lq(c.g,"EXT-X-SKIP"))?Number(Fq(t,"SKIPPED-SEGMENTS")):0;x=p+v;if(a.m!=ar&&f.has(x)){y=f.get(x);ea.D(2);break}if(null!=a.R){ea.D(3);break}n=Fr(a,c.h,m[0].g,g);w=a;return A(ea,Jr(a,b,n,e,x,!1,m[0],g,d,k,l),4);case 4:w.R=ea.h;case 3:y=a.R;case 2:D=m[0].h;D.split("/").pop();z=Mq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(z)||
702
- h.set(z,x),v))for(B=h;B.has(z+1)&&B.get(z+1)<x;)z++;F=a.J.get(z)||0;G=[];H=0;case 5:if(!(H<m.length)){ea.D(7);break}J=m[H];K=G[G.length-1];L=0==H?y:K.endTime;x=p+v+H;f.set(x,L);n=Fr(a,c.h,J.g,g);W=Lq(J.g,"EXT-X-DISCONTINUITY");if(!W){ea.D(8);break}z++;h.set(z,x);return A(ea,Kr(a,z,b,n,e,x,J,g,L,d,k,l),9);case 9:F=ea.h;case 8:!a.l&&(Z=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());ka=Lq(J.g,"EXTINF");a.l||ka?(ja=Hr(a,n,K,J,L,F,g,c.h,d))&&G.push(ja):a.l||Sa("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.");
703
- H++;ea.D(5);break;case 7:return ea["return"](G)}})}function Kr(a,b,c,d,e,f,g,h,k,l,m,n){var p,t;return M(function(v){if(1==v.g)return p=0,a.J.has(b)?(p=a.J.get(b),v.D(2)):A(v,Jr(a,c,d,e,f,!0,g,h,l,m,n),3);2!=v.g&&(t=v.h,p=k-t,a.J.set(b,p));return v["return"](p)})}
704
- function Lr(a,b,c,d,e,f){var g,h,k,l,m,n;return M(function(p){switch(p.g){case 1:g=nf;h=ij(b.Ka(),b.Ha,b.wa,a.g.retryParameters);a.i.modifySegmentRequest(h,{type:c,init:b instanceof qi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});if(a.g.hls.useFullSegmentsForStartTime)return p["return"](Mr(a,h,g));k=ij(b.Ka(),b.Ha,b.Ha+2048-1,a.g.retryParameters);a.i.modifySegmentRequest(k,{type:c,init:b instanceof qi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});E(p,2);return A(p,
705
- Mr(a,k,g),4);case 4:return l=p.h,p["return"](l);case 2:m=I(p);if(7001==m.code)throw m;Sa("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",k.uris[0]);return A(p,Mr(a,h,g),5);case 5:return n=p.h,p["return"](n)}})}
706
- function Jr(a,b,c,d,e,f,g,h,k,l,m){var n,p,t,v,x,y,w,D;return M(function(z){switch(z.g){case 1:n=Hr(a,c,null,g,0,0,h,"",k);if(a.G&&!f&&(p=a.h.get(b),t=p.$d.get(e),void 0!=t))return z["return"](t);d=d.toLowerCase();if(Cr.includes(d))throw Sa("Raw formats are not yet supported. Skipping "+d),new P(1,4,4035);if("video/webm"==d)throw Sa("WebM in HLS is not yet supported. Skipping."),new P(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){z.D(2);break}v=[Lr(a,n,k,d,l,m)];c&&v.push(Lr(a,c,k,d,l,m));return A(z,
707
- Promise.all(v),3);case 3:return x=z.h,y=x[0],w=x[1]||x[0],z["return"](Nr(b,y.uri,y.data,w.data));case 2:if("video/mp2t"!=d){z.D(4);break}return A(z,Lr(a,n,k,d,l,m),5);case 5:return D=z.h,z["return"](Or(b,D.uri,D.data));case 4:throw new P(2,4,4030,b);}})}
708
- function Nr(a,b,c,d){var e=0;(new vg).box("moov",zg).box("trak",zg).box("mdia",zg).X("mdhd",function(h){e=Mh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new P(2,4,4030,a,b);var f=0,g=!1;(new vg).box("moof",zg).box("traf",zg).X("tfdt",function(h){f=Lh(h.reader,h.version).Rd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new P(2,4,4030,a,b);return f}
709
- function Or(a,b,c){function d(){f.seek(g+188);h=f.ka();71!=h&&(f.seek(g+192),h=f.ka());71!=h&&(f.seek(g+204),h=f.ka());71!=h&&e();f.tf(1)}function e(){throw new P(2,4,4030,a,b);}var f=new sg(c,0),g=0,h=0;for(c=Math.min(f.U.byteLength-188,940);;){g=f.ia();h=f.ka();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.kc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.ka()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.ka(),f.skip(k)),1!=f.P()>>8)d();else{f.skip(3);c=f.ka()>>6;0!=c&&1!=c||e();0==f.ka()&&e();c=f.ka();k=
710
- f.kc();var l=f.kc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function xr(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(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 P(2,4,4039,f);}}return c}
711
- function Br(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,x;return M(function(y){if(1==y.g){f=Nb;g=nf;h=xr(d.segments[0].h,e);k=new jb(h);l=k.Na.split(".").pop();m=Pr[b];if(n=m[l])return y["return"](n);if(b==f.oa)return c&&"vtt"!=c&&"wvtt"!=c?y["return"]("application/mp4"):y["return"]("text/vtt");if(b==f.wc&&(!c||"jpeg"==c))return y["return"]("image/jpeg");p=gf([h],a.g.retryParameters);p.method="HEAD";return A(y,Mr(a,p,g),2)}t=y.h;v=t.headers["content-type"];return v?y["return"](v.split(";")[0]):(x=m.mp4,y["return"](x))})}
712
- function br(a,b){var c=gf([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Mr(a,c,0)}function $q(a){var b,c;M(function(d){if(1==d.g){if(!a.i)return d["return"]();E(d,2);return A(d,a.update(),4)}if(2!=d.g)return b=a.ma,a.F.S(b),va(d,0);c=I(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.F.S(.1);C(d)})}function hr(a,b){a.m=b;a.j&&a.j.Pc(a.m==ar);a.m!=ar||a.F.stop()}
713
- function Mr(a,b,c){if(!a.H)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b);bf(a.H,b);return b.promise}N("shaka.hls.HlsParser",Zq);
714
- var Cr=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Pr={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",
715
- vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},zr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Gq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Gq(a,"URI");b=Yq(b);b=Ic(b.data);b=Ib("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Fq(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
716
- Gq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Gq(a,"URI");a=Yq(a);a=Ic(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=jo(a,b);return Ib("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},ar="VOD",Er="EVENT",Dr="LIVE",er={Hf:ar,Ch:Er,Ne:Dr};qg.m3u8=function(){return new Zq};og["application/x-mpegurl"]=function(){return new Zq};og["application/vnd.apple.mpegurl"]=function(){return new Zq};function Qr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,pf:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=jd(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Rr(){}function Sr(a,b,c,d,e){var f=new Tr;yf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Ur,h={Qe:!1,Df:!1};a=Vr(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Se(a,function(){h.Qe=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Q(function(){h.Df=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
717
- function Vr(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,x,y,w,D,z;return M(function(B){switch(B.g){case 1:return h=Wr,k=Xr,p=n=0,t=Date.now(),E(B,2),A(B,h(a,c),4);case 4:return l=B.h,f(Yr(l.headers)),v=l.clone().body.getReader(),y=(x=l.headers.get("Content-Length"))?parseInt(x,10):0,w=function(F){function G(){var H,J;return M(function(K){switch(K.g){case 1:return E(K,2),A(K,v.read(),4);case 4:H=K.h;va(K,3);break;case 2:return I(K),K["return"]();case 3:if(H.done){K.D(5);break}n+=H.value.byteLength;if(!g){K.D(5);
718
- break}return A(K,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,n-p,y-n),p=n,t=J;H.done?F.close():(F.enqueue(H.value),G());C(K)}})}G()},new k({start:w}),A(B,l.arrayBuffer(),5);case 5:m=B.h;va(B,3);break;case 2:D=I(B);if(d.Qe)throw new P(1,1,7001,a,b);if(d.Df)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,D,b);case 3:return z=Yr(l.headers),B["return"](Qr(z,m,l.status,a,l.url,b))}})}function Yr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
719
- function Zr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}N("shaka.net.HttpFetchPlugin",Rr);Rr.isSupported=Zr;Rr.parse=Sr;var Wr=window.fetch,Ur=window.AbortController,Xr=window.ReadableStream,Tr=window.Headers;Zr()&&(df("http",Sr,2,!0),df("https",Sr,2,!0),df("blob",Sr,2,!0));function $r(){}
720
- function as(a,b,c,d,e){var f=new bs,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new P(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var t=cs(f);e(t);n=!0}};f.onload=function(){var t=cs(f),v=f.response;try{var x=Qr(t,v,f.status,a,f.responseURL,c);l(x)}catch(y){m(y)}};f.onerror=function(t){m(new P(1,1,1002,a,t,
688
+ function vr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,y;return M(function(w){if(1==w.g)return d=Nb,e=sr(a,b),f=Hq(b,"AUDIO"),g=Hq(b,"VIDEO"),k=(h=f||g)&&a.C.has(h)?a.C.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=Iq(b,"URI"),t=l.audio.find(function(D){return D&&D.zd==p}),v=Kb(d.fb,e),(x=Kb(d.Gb,e))&&!v?m=d.Gb:!k.length&&x&&v?(m=d.fb,e=[[v,x].join()]):l.audio.length&&t?(m=d.Gb,n=!0):m=l.video.length?d.Gb:d.fb,n?w.D(2):A(w,wr(a,b,e,m,c),3);2!=w.g&&(y=w.h);if(y)l[y.stream.type]=[y];else if(null===y)return w["return"](null);
689
+ xr(l);return w["return"](l)})}function sr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Hq(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Bd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function yr(a){a=Hq(a,"LANGUAGE")||"und";return Qb(a)}
690
+ function xr(a){a=r(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 nr(a,b){var c=Mq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=yr(e);var f=Iq(e,"GROUP-ID");e=Iq(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
691
+ function tr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;return M(function(y){if(1==y.g){c=Iq(b,"GROUP-ID");d="";var w=Iq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Mb);e=w;e!=Mb&&c&&a.B.has(c)&&(d=a.B.get(c));f=zr(Iq(b,"URI"),a.A);if(a.h.has(f))return y["return"](a.h.get(f));g=yr(b);h=Hq(b,"NAME");k=Hq(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Hq(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Hq(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=Hq(b,"CHARACTERISTICS");t=Hq(b,"FORCED");
692
+ v="YES"==t;return A(y,Ar(a,f,d,e,g,l,h,m,null,p,v,n),2)}x=y.h;a.C.has(c)?a.C.get(c).push(x):a.C.set(c,[x]);if(null==x)return y["return"](null);if(a.h.has(f))return y["return"](a.h.get(f));a.h.set(f,x);return y["return"](x)})}
693
+ function ur(a,b){var c,d,e,f,g,h,k,l,m,n;return M(function(p){if(1==p.g){c=zr(Iq(b,"URI"),a.A);d=Hq(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=yr(b);f=Hq(b,"NAME");g=Hq(b,"CHARACTERISTICS");return A(p,Ar(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Hq(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=
694
+ Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Hq(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
695
+ function wr(a,b,c,d,e){var f,g,h,k;return M(function(l){if(1==l.g){f=zr(Iq(b,"URI"),a.A);if(a.h.has(f))return l["return"](a.h.get(f));var m=Hq(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.K.get(m):null;h=Jb(d,c);return A(l,Ar(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
696
+ function Ar(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,bc,Fd,gb,Sc,He,sp,tp,up,vp,$i,aj,kg,wp,xp,yp,zp;return M(function(mb){switch(mb.g){case 1:return t=Hb([a.N],[b])[0],A(mb,dr(a,t),2);case 2:v=mb.h;t=v.uri;x=Uq(a.$,v.data,t);if(1!=x.type)throw new P(2,4,4017);y=[];if(x.segments)for(w=r(x.segments),D=w.next();!D.done;D=w.next())z=D.value,B=Lq(z.g,"EXT-X-KEY"),y.push.apply(y,ia(B));F=!1;G=[];H=new Set;J=r(y);for(K=J.next();!K.done;K=J.next())if(L=K.value,
697
+ W=Iq(L,"METHOD"),"NONE"!=W){F=!0;if("AES-128"==W)return a.Ba=!0,mb["return"](null);Z=Iq(L,"KEYFORMAT");if(ja=(ka=Br[Z])?ka(L):null){if(ja.keyIds)for(ea=r(ja.keyIds),Ia=ea.next();!Ia.done;Ia=ea.next())Ma=Ia.value,H.add(Ma);G.push(ja)}}if(F&&!G.length)throw new P(2,4,4026);Da=Lq(x.g,"EXT-X-DEFINE");Qa=hr(a,Da);Cr(a,x);return A(mb,Dr(a,d,c,x,Qa),3);case 3:return bc=mb.h,Er.includes(bc)&&(c=""),Fd=new Map,gb=new Map,E(mb,4),A(mb,ir(a,b,x,d,bc,Fd,Qa,gb,c,p),6);case 6:Sc=mb.h;va(mb,5);break;case 4:He=I(mb);
698
+ if(4035==He.code)return Sa("Skipping unsupported HLS stream",bc,b),mb["return"](null);throw He;case 5:sp=Sc[0].startTime;tp=Sc[Sc.length-1].endTime;up=new lj(Sc);vp=d==Mb?"subtitle":void 0;$i=[];if(l)for(aj=r(l.split(",")),kg=aj.next();!kg.done;kg=aj.next())wp=kg.value,$i.push(wp);yp=(xp=Nq(x.g,"EXT-X-SERVER-CONTROL"))?null!=xp.getAttribute("CAN-SKIP-UNTIL"):!1;zp={id:a.Aa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:up,mimeType:bc,codecs:c,kind:vp,encrypted:F,
699
+ drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:$i,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return mb["return"]({stream:zp,zd:b,Mf:t,qf:sp,Mg:tp,ce:Fd,Wf:gb,Rf:yp})}})}
700
+ function Cr(a,b){var c=Nq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Nq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)jr(a,cr);else{c?jr(a,Fr):jr(a,Gr);d=Nq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Nq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(Iq(c,"PART-TARGET")),a.I=Math.min(a.ba,a.I),c=Nq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=c?Number(Iq(c,"PART-HOLD-BACK")):0):a.I=Math.min(d,a.I);a.aa=Math.max(d,a.aa)}}
701
+ function Hr(a,b,c,d){c=Nq(c,"EXT-X-MAP");if(!c)return null;var e=Iq(c,"URI");d=zr(Hb([b],[e])[0],d);b=[d,Hq(c,"BYTERANGE","")].join("-");a.va.has(b)||(c=Ir(d,c),a.va.set(b,c));return a.va.get(b)}function Ir(a,b){var c=0,d=null,e=Hq(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Li(function(){return[a]},c,d)}
702
+ function Jr(a,b,c,d,e,f,g,h,k){var l=d.g,m=zr(d.h,g),n=Nq(l,"EXTINF"),p=g=0,t=null;if(!n){if(0==d.i.length)throw new P(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var x={},y=0;y<d.i.length;x={Jd:x.Jd},y++){var w=d.i[y],D=0==y?c:v[v.length-1],z=0==y?e:D.endTime,B=Number(Hq(w,"DURATION"))||a.ba;if(B){B=z+B;var F=0,G=null;"EXT-X-PRELOAD-HINT"==w.name?F=(D=Hq(w,"BYTERANGE-START"))?Number(D):0:(F=Hq(w,"BYTERANGE"),D=r(Kr(D,F)),F=D.next().value,G=D.next().value);if(w=Hq(w,"URI"))x.Jd=Hb([h],
703
+ [w])[0],v.push(new Ni(z,B,function(H){return function(){return[H.Jd]}}(x),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Nq(l,"EXT-X-BYTERANGE"))?(t=r(Kr(c,a.value)),p=t.next().value,t=t.next().value):v.length&&(p=v[0].Ha,t=v[v.length-1].wa);c="";a=null;"image"==k&&(c="1x1",k=Nq(l,"EXT-X-TILES"))&&(c=Iq(k,"LAYOUT"),(k=Hq(k,"DURATION"))&&(a=Number(k)));return new Ni(e,g,function(){return m.length?[m]:[]},p,t,b,f,0,Infinity,v,c,a)}
704
+ function Kr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+d-1);return[c,d]}function rr(a){if(a.j){for(var b=r(a.W),c=b.next();!c.done;c=b.next())a.j.hc(c.value);a.W=[]}}
705
+ function ir(a,b,c,d,e,f,g,h,k,l){var m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:m=c.segments;p=Oq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(t=Nq(c.g,"EXT-X-SKIP"))?Number(Hq(t,"SKIPPED-SEGMENTS")):0;x=p+v;if(a.m!=cr&&f.has(x)){y=f.get(x);ea.D(2);break}if(null!=a.S){ea.D(3);break}n=Hr(a,c.h,m[0].g,g);w=a;return A(ea,Lr(a,b,n,e,x,!1,m[0],g,d,k,l),4);case 4:w.S=ea.h;case 3:y=a.S;case 2:D=m[0].h;D.split("/").pop();z=Oq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(z)||
706
+ h.set(z,x),v))for(B=h;B.has(z+1)&&B.get(z+1)<x;)z++;F=a.J.get(z)||0;G=[];H=0;case 5:if(!(H<m.length)){ea.D(7);break}J=m[H];K=G[G.length-1];L=0==H?y:K.endTime;x=p+v+H;f.set(x,L);n=Hr(a,c.h,J.g,g);W=Nq(J.g,"EXT-X-DISCONTINUITY");if(!W){ea.D(8);break}z++;h.set(z,x);return A(ea,Mr(a,z,b,n,e,x,J,g,L,d,k,l),9);case 9:F=ea.h;case 8:!a.l&&(Z=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());ka=Nq(J.g,"EXTINF");a.l||ka?(ja=Jr(a,n,K,J,L,F,g,c.h,d))&&G.push(ja):a.l||Sa("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.");
707
+ H++;ea.D(5);break;case 7:return ea["return"](G)}})}function Mr(a,b,c,d,e,f,g,h,k,l,m,n){var p,t;return M(function(v){if(1==v.g)return p=0,a.J.has(b)?(p=a.J.get(b),v.D(2)):A(v,Lr(a,c,d,e,f,!0,g,h,l,m,n),3);2!=v.g&&(t=v.h,p=k-t,a.J.set(b,p));return v["return"](p)})}
708
+ function Nr(a,b,c,d,e,f){var g,h,k,l,m,n;return M(function(p){switch(p.g){case 1:g=nf;h=Dj(b.Ka(),b.Ha,b.wa,a.g.retryParameters);a.i.modifySegmentRequest(h,{type:c,init:b instanceof Li,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});if(a.g.hls.useFullSegmentsForStartTime)return p["return"](Or(a,h,g));k=Dj(b.Ka(),b.Ha,b.Ha+2048-1,a.g.retryParameters);a.i.modifySegmentRequest(k,{type:c,init:b instanceof Li,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});E(p,2);return A(p,
709
+ Or(a,k,g),4);case 4:return l=p.h,p["return"](l);case 2:m=I(p);if(7001==m.code)throw m;Sa("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",k.uris[0]);return A(p,Or(a,h,g),5);case 5:return n=p.h,p["return"](n)}})}
710
+ function Lr(a,b,c,d,e,f,g,h,k,l,m){var n,p,t,v,x,y,w,D;return M(function(z){switch(z.g){case 1:n=Jr(a,c,null,g,0,0,h,"",k);if(a.G&&!f&&(p=a.h.get(b),t=p.ce.get(e),void 0!=t))return z["return"](t);d=d.toLowerCase();if(Er.includes(d))throw Sa("Raw formats are not yet supported. Skipping "+d),new P(1,4,4035);if("video/webm"==d)throw Sa("WebM in HLS is not yet supported. Skipping."),new P(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){z.D(2);break}v=[Nr(a,n,k,d,l,m)];c&&v.push(Nr(a,c,k,d,l,m));return A(z,
711
+ Promise.all(v),3);case 3:return x=z.h,y=x[0],w=x[1]||x[0],z["return"](Pr(b,y.uri,y.data,w.data));case 2:if("video/mp2t"!=d){z.D(4);break}return A(z,Nr(a,n,k,d,l,m),5);case 5:return D=z.h,z["return"](Qr(b,D.uri,D.data));case 4:throw new P(2,4,4030,b);}})}
712
+ function Pr(a,b,c,d){var e=0;(new Qg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).X("mdhd",function(h){e=gi(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new P(2,4,4030,a,b);var f=0,g=!1;(new Qg).box("moof",Ug).box("traf",Ug).X("tfdt",function(h){f=fi(h.reader,h.version).Ud/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new P(2,4,4030,a,b);return f}
713
+ function Qr(a,b,c){function d(){f.seek(g+188);h=f.ka();71!=h&&(f.seek(g+192),h=f.ka());71!=h&&(f.seek(g+204),h=f.ka());71!=h&&e();f.xf(1)}function e(){throw new P(2,4,4030,a,b);}var f=new Ng(c,0),g=0,h=0;for(c=Math.min(f.U.byteLength-188,940);;){g=f.ia();h=f.ka();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.kc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.ka()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.ka(),f.skip(k)),1!=f.P()>>8)d();else{f.skip(3);c=f.ka()>>6;0!=c&&1!=c||e();0==f.ka()&&e();c=f.ka();k=
714
+ f.kc();var l=f.kc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function zr(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(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 P(2,4,4039,f);}}return c}
715
+ function Dr(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,x;return M(function(y){if(1==y.g){f=Nb;g=nf;h=zr(d.segments[0].h,e);k=new jb(h);l=k.Na.split(".").pop();m=Rr[b];if(n=m[l])return y["return"](n);if(b==f.oa)return c&&"vtt"!=c&&"wvtt"!=c?y["return"]("application/mp4"):y["return"]("text/vtt");if(b==f.wc&&(!c||"jpeg"==c))return y["return"]("image/jpeg");p=gf([h],a.g.retryParameters);p.method="HEAD";return A(y,Or(a,p,g),2)}t=y.h;v=t.headers["content-type"];return v?y["return"](v.split(";")[0]):(x=m.mp4,y["return"](x))})}
716
+ function dr(a,b){var c=gf([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Or(a,c,0)}function br(a){var b,c;M(function(d){if(1==d.g){if(!a.i)return d["return"]();E(d,2);return A(d,a.update(),4)}if(2!=d.g)return b=a.ma,a.F.R(b),va(d,0);c=I(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.F.R(.1);C(d)})}function jr(a,b){a.m=b;a.j&&a.j.Pc(a.m==cr);a.m!=cr||a.F.stop()}
717
+ function Or(a,b,c){if(!a.H)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b);bf(a.H,b);return b.promise}N("shaka.hls.HlsParser",ar);
718
+ var Er=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Rr={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",
719
+ vtt:"text/vtt",webvtt:"txt/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Br={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Iq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Iq(a,"URI");b=$q(b);b=Ic(b.data);b=Ib("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Hq(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
720
+ Iq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Iq(a,"URI");a=$q(a);a=Ic(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Fo(a,b);return Ib("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},cr="VOD",Gr="EVENT",Fr="LIVE",gr={Lf:cr,Gh:Gr,Qe:Fr};Lg.m3u8=function(){return new ar};Jg["application/x-mpegurl"]=function(){return new ar};Jg["application/vnd.apple.mpegurl"]=function(){return new ar};function Sr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,uf:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=jd(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Tr(){}function Ur(a,b,c,d,e){var f=new Vr;yf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Wr,h={Te:!1,Hf:!1};a=Xr(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Se(a,function(){h.Te=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Q(function(){h.Hf=!0;g.abort()});k.R(b/1E3);a["finally"](function(){k.stop()})}return a}
721
+ function Xr(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,x,y,w,D,z;return M(function(B){switch(B.g){case 1:return h=Yr,k=Zr,p=n=0,t=Date.now(),E(B,2),A(B,h(a,c),4);case 4:return l=B.h,f($r(l.headers)),v=l.clone().body.getReader(),y=(x=l.headers.get("Content-Length"))?parseInt(x,10):0,w=function(F){function G(){var H,J;return M(function(K){switch(K.g){case 1:return E(K,2),A(K,v.read(),4);case 4:H=K.h;va(K,3);break;case 2:return I(K),K["return"]();case 3:if(H.done){K.D(5);break}n+=H.value.byteLength;if(!g){K.D(5);
722
+ break}return A(K,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,n-p,y-n),p=n,t=J;H.done?F.close():(F.enqueue(H.value),G());C(K)}})}G()},new k({start:w}),A(B,l.arrayBuffer(),5);case 5:m=B.h;va(B,3);break;case 2:D=I(B);if(d.Te)throw new P(1,1,7001,a,b);if(d.Hf)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,D,b);case 3:return z=$r(l.headers),B["return"](Sr(z,m,l.status,a,l.url,b))}})}function $r(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
723
+ function as(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}N("shaka.net.HttpFetchPlugin",Tr);Tr.isSupported=as;Tr.parse=Ur;var Yr=window.fetch,Wr=window.AbortController,Zr=window.ReadableStream,Vr=window.Headers;as()&&(df("http",Ur,2,!0),df("https",Ur,2,!0),df("blob",Ur,2,!0));function bs(){}
724
+ function cs(a,b,c,d,e){var f=new ds,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new P(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var t=es(f);e(t);n=!0}};f.onload=function(){var t=es(f),v=f.response;try{var x=Sr(t,v,f.status,a,f.responseURL,c);l(x)}catch(y){m(y)}};f.onerror=function(t){m(new P(1,1,1002,a,t,
721
725
  c))};f.ontimeout=function(){m(new P(1,1,1003,a,c))};f.onprogress=function(t){var v=Date.now();if(100<v-g||t.lengthComputable&&t.loaded==t.total)d(v-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Se(k,function(){f.abort();return Promise.resolve()})}
722
- function cs(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}N("shaka.net.HttpXHRPlugin",$r);$r.parse=as;var bs=window.XMLHttpRequest;df("http",as,1,!0);df("https",as,1,!0);df("blob",as,1,!0);function ds(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function es(a){return a.Ka().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ha+":"+a.wa}function fs(a,b){return ij(a.g.Ka(),a.g.Ha,a.g.wa,b.streaming.retryParameters)};function gs(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function hs(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}gs.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 is(a){var b=this;this.A=a;this.j=new Map;this.i=new of(function(){return js(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new gs}is.prototype.destroy=function(){return this.i.destroy()};function ks(a,b,c){a.m=b;a.l=c}function js(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
723
- function ls(a,b,c,d,e,f){pf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return M(function(v){if(1==v.g)return A(v,ms(a,c),2);h=v.h;if(a.i.g)throw new P(2,9,7001);if(e)for(m in k=Ic(h),l=new io(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.l(p,t);a.g.close(d,h.byteLength);var x=a.g;a.m(0==x.i?0:x.j/x.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function ns(a){return M(function(b){return 1==b.g?A(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
724
- function ms(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=nf,d=a.A.request(c,b),e=function(){return d.abort()},a.h.push(e),A(g,d.promise,2);f=g.h;ic(a.h,e);return g["return"](f.data)})};function os(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Pc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}os.prototype.abort=function(){var a=this;return M(function(b){if(1==b.g){try{a.i.abort()}catch(c){}E(b,2);return A(b,a.g,4)}if(2!=b.g)return va(b,0);I(b);C(b)})};
725
- function ps(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return M(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return A(g,b(f.key,f.value,f),2)}f["continue"]();C(g)})}})}os.prototype.store=function(){return this.h};os.prototype.promise=function(){return this.g};function qs(a){this.h=a;this.g=[]}qs.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function rs(a,b){return ss(a,b,"readwrite")}function ss(a,b,c){c=a.h.transaction([b],c);var d=new os(c,b);a.g.push(d);d.promise().then(function(){ic(a.g,d)},function(){ic(a.g,d)});return d};function ts(a,b,c){this.h=new qs(a);this.i=b;this.g=c}q=ts.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return us(this.i)};q.removeSegments=function(a,b){return vs(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return M(function(d){if(1==d.g)return A(d,ws(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Te(e)}))})};q.addManifests=function(){return us(this.g)};
726
- q.updateManifest=function(){return Promise.reject(new P(2,9,9016,"Cannot modify values in "+this.g))};function xs(a,b,c){a=rs(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=rs(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return vs(this,this.g,a,b)};
727
- q.getManifests=function(a){var b=this,c;return M(function(d){if(1==d.g)return A(d,ws(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.zc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=ss(a.h,a.g,"readonly"),c=new Map,A(d,ps(b,function(e,f){var g;return M(function(h){if(1==h.g)return A(h,a.zc(f),2);g=h.h;c.set(e,g);C(h)})}),2)):3!=d.g?A(d,b.promise(),3):d["return"](c)})};q.Te=function(a){return a};q.zc=function(a){return Promise.resolve(a)};
728
- function us(a){return Promise.reject(new P(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){if(1==m.g){d=rs(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Uc:g.Uc},k=h.next())l=k.value,g.Uc=e.add(l),g.Uc.onsuccess=function(n){return function(){f.push(n.Uc.result)}}(g);return A(m,d.promise(),2)}return m["return"](f)})};
729
- function vs(a,b,c,d){a=rs(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Tc:e.Tc},f=c.next())e.Tc=f.value,b["delete"](e.Tc).onsuccess=function(g){return function(){return d(g.Tc)}}(e);return a.promise()}
730
- function ws(a,b,c){var d,e,f,g,h,k,l;return M(function(m){if(1==m.g){d=ss(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={uc:h.uc,qc:h.qc},l=k.next())h.qc=l.value,h.uc=e.get(h.qc),h.uc.onsuccess=function(n){return function(){void 0==n.uc.result&&g.push(n.qc);f[n.qc]=n.uc.result}}(h);return A(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function ys(a){this.g=new qs(a)}ys.prototype.destroy=function(){return this.g.destroy()};ys.prototype.getAll=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=ss(a.g,"session-ids","readonly"),c=[],A(d,ps(b,function(e,f){c.push(f)}),2)):3!=d.g?A(d,b.promise(),3):d["return"](c)})};ys.prototype.add=function(a){var b=rs(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
731
- ys.prototype.remove=function(a){var b=this,c;return M(function(d){return 1==d.g?(c=rs(b.g,"session-ids"),A(d,ps(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):A(d,c.promise(),0)})};function zs(){this.g=new Map}zs.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};zs.prototype.init=function(){var a=this;As.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
732
- function Bs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Sa:d,Da:f},Da:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function Cs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Sa:d,Da:f},e)})})}
733
- function Ds(a,b,c){a=a.g.get(b);if(!a)throw new P(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new P(2,9,9013,"Could not find cell with name "+c);return b}function Es(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Fs(a){var b=Array.from(a.g.keys());if(!b.length)throw new P(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
734
- function Gs(a){var b,c,d;return M(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=As,d.forEach(function(f){(f=f())&&b.push(f)})),A(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):A(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Hs(a,b){As.set(a,b)}N("shaka.offline.StorageMuxer",zs);zs.unregister=function(a){As["delete"](a)};zs.register=Hs;zs.prototype.destroy=zs.prototype.destroy;var As=new Map;function Is(){ts.apply(this,arguments)}u(Is,ts);Is.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return M(function(g){d=rs(c.h,c.g);e=d.store();f=new Pc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new P(2,9,9012,"Could not find values for "+a))};return A(g,Promise.all([d.promise(),f]),0)})};
735
- Is.prototype.zc=function(a){var b,c,d,e,f,g;return M(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=Js(a.periods[c],e),b.push(f);return A(h,Qp(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})})};
736
- function Js(a,b){Ks(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Ls(e,a.startTime,b)})}
737
- function Ls(a,b,c){var d=a.initSegmentUri?Ms(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=Ms(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
738
- 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}}Is.prototype.Te=function(a){return{data:a.data}};function Ms(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 P(2,9,9004,"Could not parse uri "+a);}
739
- function Ks(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
740
- f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Ns(){ts.apply(this,arguments)}u(Ns,ts);
741
- Ns.prototype.zc=function(a){var b,c,d,e,f,g;return M(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Os(n,k.startTime,k.startTime+e));f=l;b.push(f)}return A(h,Qp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
726
+ function es(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}N("shaka.net.HttpXHRPlugin",bs);bs.parse=cs;var ds=window.XMLHttpRequest;df("http",cs,1,!0);df("https",cs,1,!0);df("blob",cs,1,!0);function fs(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function gs(a){return a.Ka().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ha+":"+a.wa}function hs(a,b){return Dj(a.g.Ka(),a.g.Ha,a.g.wa,b.streaming.retryParameters)};function is(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function js(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}is.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 ks(a){var b=this;this.A=a;this.j=new Map;this.i=new of(function(){return ls(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new is}ks.prototype.destroy=function(){return this.i.destroy()};function ms(a,b,c){a.m=b;a.l=c}function ls(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
727
+ function ns(a,b,c,d,e,f){pf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return M(function(v){if(1==v.g)return A(v,os(a,c),2);h=v.h;if(a.i.g)throw new P(2,9,7001);if(e)for(m in k=Ic(h),l=new Eo(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.l(p,t);a.g.close(d,h.byteLength);var x=a.g;a.m(0==x.i?0:x.j/x.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function ps(a){return M(function(b){return 1==b.g?A(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
728
+ function os(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=nf,d=a.A.request(c,b),e=function(){return d.abort()},a.h.push(e),A(g,d.promise,2);f=g.h;ic(a.h,e);return g["return"](f.data)})};function qs(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Pc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}qs.prototype.abort=function(){var a=this;return M(function(b){if(1==b.g){try{a.i.abort()}catch(c){}E(b,2);return A(b,a.g,4)}if(2!=b.g)return va(b,0);I(b);C(b)})};
729
+ function rs(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return M(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return A(g,b(f.key,f.value,f),2)}f["continue"]();C(g)})}})}qs.prototype.store=function(){return this.h};qs.prototype.promise=function(){return this.g};function ss(a){this.h=a;this.g=[]}ss.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function ts(a,b){return us(a,b,"readwrite")}function us(a,b,c){c=a.h.transaction([b],c);var d=new qs(c,b);a.g.push(d);d.promise().then(function(){ic(a.g,d)},function(){ic(a.g,d)});return d};function vs(a,b,c){this.h=new ss(a);this.i=b;this.g=c}q=vs.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return ws(this.i)};q.removeSegments=function(a,b){return xs(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return M(function(d){if(1==d.g)return A(d,ys(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.We(e)}))})};q.addManifests=function(){return ws(this.g)};
730
+ q.updateManifest=function(){return Promise.reject(new P(2,9,9016,"Cannot modify values in "+this.g))};function zs(a,b,c){a=ts(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=ts(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return xs(this,this.g,a,b)};
731
+ q.getManifests=function(a){var b=this,c;return M(function(d){if(1==d.g)return A(d,ys(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.zc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=us(a.h,a.g,"readonly"),c=new Map,A(d,rs(b,function(e,f){var g;return M(function(h){if(1==h.g)return A(h,a.zc(f),2);g=h.h;c.set(e,g);C(h)})}),2)):3!=d.g?A(d,b.promise(),3):d["return"](c)})};q.We=function(a){return a};q.zc=function(a){return Promise.resolve(a)};
732
+ function ws(a){return Promise.reject(new P(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){if(1==m.g){d=ts(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Uc:g.Uc},k=h.next())l=k.value,g.Uc=e.add(l),g.Uc.onsuccess=function(n){return function(){f.push(n.Uc.result)}}(g);return A(m,d.promise(),2)}return m["return"](f)})};
733
+ function xs(a,b,c,d){a=ts(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Tc:e.Tc},f=c.next())e.Tc=f.value,b["delete"](e.Tc).onsuccess=function(g){return function(){return d(g.Tc)}}(e);return a.promise()}
734
+ function ys(a,b,c){var d,e,f,g,h,k,l;return M(function(m){if(1==m.g){d=us(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={uc:h.uc,qc:h.qc},l=k.next())h.qc=l.value,h.uc=e.get(h.qc),h.uc.onsuccess=function(n){return function(){void 0==n.uc.result&&g.push(n.qc);f[n.qc]=n.uc.result}}(h);return A(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function As(a){this.g=new ss(a)}As.prototype.destroy=function(){return this.g.destroy()};As.prototype.getAll=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=us(a.g,"session-ids","readonly"),c=[],A(d,rs(b,function(e,f){c.push(f)}),2)):3!=d.g?A(d,b.promise(),3):d["return"](c)})};As.prototype.add=function(a){var b=ts(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
735
+ As.prototype.remove=function(a){var b=this,c;return M(function(d){return 1==d.g?(c=ts(b.g,"session-ids"),A(d,rs(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):A(d,c.promise(),0)})};function Bs(){this.g=new Map}Bs.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Bs.prototype.init=function(){var a=this;Cs.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
736
+ function Ds(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Sa:d,Da:f},Da:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function Es(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Sa:d,Da:f},e)})})}
737
+ function Fs(a,b,c){a=a.g.get(b);if(!a)throw new P(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new P(2,9,9013,"Could not find cell with name "+c);return b}function Gs(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Hs(a){var b=Array.from(a.g.keys());if(!b.length)throw new P(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
738
+ function Is(a){var b,c,d;return M(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Cs,d.forEach(function(f){(f=f())&&b.push(f)})),A(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):A(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Js(a,b){Cs.set(a,b)}N("shaka.offline.StorageMuxer",Bs);Bs.unregister=function(a){Cs["delete"](a)};Bs.register=Js;Bs.prototype.destroy=Bs.prototype.destroy;var Cs=new Map;function Ks(){vs.apply(this,arguments)}u(Ks,vs);Ks.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return M(function(g){d=ts(c.h,c.g);e=d.store();f=new Pc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new P(2,9,9012,"Could not find values for "+a))};return A(g,Promise.all([d.promise(),f]),0)})};
739
+ Ks.prototype.zc=function(a){var b,c,d,e,f,g;return M(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=Ls(a.periods[c],e),b.push(f);return A(h,Sp(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})})};
740
+ function Ls(a,b){Ms(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Ns(e,a.startTime,b)})}
741
+ function Ns(a,b,c){var d=a.initSegmentUri?Os(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=Os(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
742
+ 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}}Ks.prototype.We=function(a){return{data:a.data}};function Os(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 P(2,9,9004,"Could not parse uri "+a);}
743
+ function Ms(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
744
+ f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Ps(){vs.apply(this,arguments)}u(Ps,vs);
745
+ Ps.prototype.zc=function(a){var b,c,d,e,f,g;return M(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Qs(n,k.startTime,k.startTime+e));f=l;b.push(f)}return A(h,Sp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
742
746
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
743
- function Os(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,
744
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Ps(){ts.apply(this,arguments)}u(Ps,ts);q=Ps.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return xs(this,a,b)};q.zc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Qs(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Qs.prototype;
745
- q.init=function(){var a=this,b=new Pc,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 Is(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Ns(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Ns(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
746
- e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Ps(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new ys(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=r(["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 P(2,9,9001,c.error));d.preventDefault()};return b};
747
- q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return A(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),C(b)}})};
747
+ function Qs(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,
748
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Rs(){vs.apply(this,arguments)}u(Rs,vs);q=Rs.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return zs(this,a,b)};q.zc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Ss(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Ss.prototype;
749
+ q.init=function(){var a=this,b=new Pc,c=!1,d=new Q(function(){c=!0;b.reject(new P(2,9,9017))});d.R(2);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Ks(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Ps(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
750
+ new Ps(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Rs(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new As(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new P(2,
751
+ 9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return A(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),C(b)}})};
748
752
  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};
749
- q.erase=function(){var a=this;return M(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),A(b,Rs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,A(b,a.init(),0)}})};
750
- function Rs(){var a=new Pc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new P(2,9,9001,b.error));c.preventDefault()};return a}Hs("idb",function(){return $c()||Wc()||!window.indexedDB?null:new Qs});function Ss(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ss.prototype.Sa=function(){return this.i};Ss.prototype.Da=function(){return this.h};Ss.prototype.key=function(){return this.l};Ss.prototype.toString=function(){return this.j};
751
- function Ts(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 Ss(b,c,d,Number(a[4])):null};function Us(a,b){this.h=a;this.g=b}
752
- function Vs(a,b){var c=new R(null,0);c.bb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ws(a,d,e,c);e=b.streams.filter(function(l){return l.type==Mb}).map(function(l){return Xs(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Xs(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
753
+ q.erase=function(){var a=this;return M(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),A(b,Ts(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,A(b,a.init(),0)}})};
754
+ function Ts(){var a=new Pc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new P(2,9,9001,b.error));c.preventDefault()};return a}Js("idb",function(){return $c()||Wc()||!window.indexedDB?null:new Ss});function Us(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Us.prototype.Sa=function(){return this.i};Us.prototype.Da=function(){return this.h};Us.prototype.key=function(){return this.l};Us.prototype.toString=function(){return this.j};
755
+ function Vs(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 Us(b,c,d,Number(a[4])):null};function Ws(a,b){this.h=a;this.g=b}
756
+ function Xs(a,b){var c=new R(null,0);c.bb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ys(a,d,e,c);e=b.streams.filter(function(l){return l.type==Mb}).map(function(l){return Zs(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Zs(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
753
757
  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}}
754
- function Ws(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=
755
- e.value,g=Xs(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Xs(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
756
- function Xs(a,b,c){var d=b.segments.map(function(e){return Ys(a,e)});c.hc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Pi(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,
757
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Ys(a,b){var c=new Ss("segment",a.h,a.g,b.dataKey);return new si(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Zs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
758
- function Zs(a,b){var c=new Ss("segment",a.h,a.g,b);return new qi(function(){return[c.toString()]},0,null)};function $s(){this.g=null}q=$s.prototype;q.configure=function(){};
759
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:d=Ts(a);c.g=d;if(null==d||"manifest"!=d.g)throw new P(2,1,9004,a);e=new zs;ua(m);return A(m,e.init(),4);case 4:return A(m,Ds(e,d.Sa(),d.Da()),5);case 5:return f=m.h,A(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Us(d.Sa(),d.Da()),l=Vs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),A(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
760
- q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:return d=c.g,e=new zs,E(m,2,3),A(m,e.init(),5);case 5:return A(m,Ds(e,d.Sa(),d.Da()),6);case 6:return f=m.h,A(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.D(3);break}return A(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),A(m,e.destroy(),10);case 10:xa(m,0);break;case 2:I(m),m.D(3)}})};
761
- og["application/x-offline-manifest"]=function(){return new $s};function at(){}function bt(a){var b=Ts(a);b&&"manifest"==b.g?(a={uri:a,pf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ve(a)):a=b&&"segment"==b.g?ct(b.key(),b):Te(new P(2,1,9004,a));return a}
762
- function ct(a,b){var c=new zs;return Ve(void 0).qa(function(){return c.init()}).qa(function(){return Ds(c,b.Sa(),b.Da())}).qa(function(d){return d.getSegments([b.key()])}).qa(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}N("shaka.offline.OfflineScheme",at);at.plugin=bt;df("offline",bt);function dt(a,b,c){var d,e,f,g,h,k;return M(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),x=v.next();!x.done;x=v.next())if(x=x.value,et(x.info,p)){x.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=ft(a,b,g);return A(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l["return"](d)}})}
763
- function ft(a,b,c){var d,e;return M(function(f){switch(f.g){case 1:return d=new Bf({Qb:b,onError:function(){},qd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),E(f,2),d.configure(a),A(f,Jf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return I(f),A(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return E(f,6),A(f,Sf(d),8);case 8:va(f,7);break;case 6:return I(f),A(f,d.destroy(),
764
- 9);case 9:return f["return"]([]);case 7:return e=[],A(f,Promise.all(c.sessionIds.map(function(g){return M(function(h){if(1==h.g)return E(h,2),A(h,Tf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);I(h);C(h)})})),10);case 10:return A(f,d.destroy(),11);case 11:return f["return"](e)}})}
765
- function et(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&jc(a.audioCapabilities,b.audioCapabilities,c)&&jc(a.videoCapabilities,b.videoCapabilities,c)};function gt(a,b,c){var d=b.presentationTimeline.getDuration();b=ht(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function it(a,b){var c=Vs(new Us(a.Sa(),a.Da()),b),d=b.appMetadata||{};c=ht(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
766
- function ht(a){var b=[],c=ue(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(le(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(me(c.value));return b};function jt(){this.g={}}function kt(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function lt(a,b){a.g[b.id]=b.bandwidth||2048}function mt(a,b){var c=a.g[b];null==c&&(c=0);return c};function nt(a){var b=this;if(a&&a.constructor!=T)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Dc()):(this.h=Hk(),this.g=new cf);this.i=[];this.j=[];var c=!a;this.l=new of(function(){var d,e,f,g,h;return M(function(k){switch(k.g){case 1:return A(k,Promise.all(b.j.map(function(l){return js(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return A(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return A(k,b.g.destroy(),4);
767
- case 4:b.h=null,b.g=null,C(k)}})})}function ot(){if(Sc())a:{var a=r(As.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=nt.prototype;q.destroy=function(){return this.l.destroy()};
768
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ek(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(zb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return Jk(this.h,a)};q.getConfiguration=function(){var a=Hk();Jk(a,this.h,Hk());return a};q.Dc=function(){return this.g};
769
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new is(this.g);this.j.push(f);b=pt(this,a,b||{},function(){var h;return M(function(k){if(1==k.g)return A(k,ng(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Gb(h))})},e,f);var g=new Se(b,function(){return js(f)});g["finally"](function(){ic(d.j,f)});g.then=function(h){zb("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.");
770
- return g.promise.then(h)};return qt(this,g)};q.sg=function(){zb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
771
- function pt(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,x,y,w,D,z;return M(function(B){switch(B.g){case 1:return rt(),h=g=null,k=new zs,n=m=l=null,E(B,2,3),A(B,d(),5);case 5:return g=B.h,A(B,st(a,b,g,e),6);case 6:p=B.h;tt(a);t=!p.presentationTimeline.T()&&!p.presentationTimeline.Nb();if(!t)throw new P(2,9,9005,b);return A(B,ut(a,p,function(F){n=n||F},e),7);case 7:h=B.h;tt(a);if(n)throw n;return A(B,vt(p,e),8);case 8:return A(B,k.init(),9);case 9:return tt(a),A(B,Bs(k),10);case 10:return l=B.h,tt(a),v=wt(h,
772
- p,b,c,e,f),x=v.Gg,y=v.Ce,A(B,l.Da.addManifests([x]),11);case 11:w=B.h;tt(a);m=w[0];tt(a);if(n)throw n;return A(B,xt(a,y,m,x,f,e,l.Da,p,h),12);case 12:return tt(a),D=new Ss("manifest",l.path.Sa,l.path.Da,m),B["return"](it(D,x));case 3:return wa(B),A(B,k.destroy(),13);case 13:if(!g){B.D(14);break}return A(B,g.stop(),14);case 14:if(!h){B.D(16);break}return A(B,h.destroy(),16);case 16:xa(B,0);break;case 2:z=I(B);if(null==m){B.D(18);break}return A(B,yt(m),18);case 18:throw n||z;}})}
773
- function xt(a,b,c,d,e,f,g,h,k){var l,m,n,p,t,v,x,y,w,D;return M(function(z){switch(z.g){case 1:l={};m=0;n=function(B,F){var G,H,J,K,L,W,Z;return M(function(ka){if(1==ka.g){G={};H=r(B);for(J=H.next();!J.done;G={Fb:G.Fb},J=H.next())G.Fb=J.value,K=fs(G.Fb,f),L=G.Fb.i,W=G.Fb.h,Z=function(ja){return function(ea){var Ia,Ma,Da;return M(function(Qa){if(1==Qa.g)return A(Qa,g.addSegments([{data:ea}]),2);Ia=Qa.h;tt(a);Ma=ja.Fb.g;Da=es(Ma);l[Da]=Ia[0];m+=ea.byteLength;C(Qa)})}}(G),ls(e,G.Fb.groupId,K,L,W,Z);
774
- return A(ka,ns(e),2)}if(!F)return ka.D(0);tt(a);zt(h,d,k,f);return A(ka,g.updateManifest(c,d),0)})};p=!1;E(z,2);if(!At(h)||!p||Bt(h)){z.D(4);break}return A(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return tt(a),b=b.filter(function(B){return!B.h}),t=l,v=m,l={},m=0,A(z,Ct(g,c,d,t,v,function(){return tt(a)}),6);case 6:tt(a);case 4:if(p){z.D(7);break}return A(z,n(b,!1),8);case 8:return tt(a),x=l,y=m,l={},m=0,A(z,Ct(g,c,d,x,y,function(){return tt(a)}),9);case 9:tt(a);case 7:va(z,0);break;case 2:return w=
775
- I(z),D=Object.values(l),A(z,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function yt(a){var b,c,d,e;return M(function(f){switch(f.g){case 1:return b=new zs,A(f,b.init(),2);case 2:return A(f,Bs(b),3);case 3:return c=f.h,d=new Ss("manifest",c.path.Sa,c.path.Da,a),A(f,b.destroy(),4);case 4:return e=new nt,A(f,e.remove(d.toString()),0)}})}
776
- function Ct(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,x,y;return M(function(w){switch(w.g){case 1:g=!1;E(w,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=r(m.segments),p=n.next();!p.done;p=n.next())t=p.value,v=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=v&&(t.dataKey=v,t.pendingSegmentRefId=void 0),v=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=v&&(t.initSegmentKey=v,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
777
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return A(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return x=I(w),A(w,yt(b),5);case 5:if(g){w.D(6);break}y=Object.values(d);return A(w,a.removeSegments(y,function(){}),6);case 6:throw x;}})}
778
- function vt(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:return c={width:Infinity,height:Infinity},Zd(a,b.restrictions,c),A(ea,be(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Nd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(le(m));n=r(a.textStreams);for(p=n.next();!p.done;p=n.next())t=
758
+ function Ys(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=
759
+ e.value,g=Zs(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Zs(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
760
+ function Zs(a,b,c){var d=b.segments.map(function(e){return $s(a,e)});c.hc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new lj(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,
761
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function $s(a,b){var c=new Us("segment",a.h,a.g,b.dataKey);return new Ni(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?at(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
762
+ function at(a,b){var c=new Us("segment",a.h,a.g,b);return new Li(function(){return[c.toString()]},0,null)};function bt(){this.g=null}q=bt.prototype;q.configure=function(){};
763
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:d=Vs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new P(2,1,9004,a);e=new Bs;ua(m);return A(m,e.init(),4);case 4:return A(m,Fs(e,d.Sa(),d.Da()),5);case 5:return f=m.h,A(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ws(d.Sa(),d.Da()),l=Xs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),A(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
764
+ q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:return d=c.g,e=new Bs,E(m,2,3),A(m,e.init(),5);case 5:return A(m,Fs(e,d.Sa(),d.Da()),6);case 6:return f=m.h,A(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.D(3);break}return A(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),A(m,e.destroy(),10);case 10:xa(m,0);break;case 2:I(m),m.D(3)}})};
765
+ Jg["application/x-offline-manifest"]=function(){return new bt};function ct(){}function dt(a){var b=Vs(a);b&&"manifest"==b.g?(a={uri:a,uf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ve(a)):a=b&&"segment"==b.g?et(b.key(),b):Te(new P(2,1,9004,a));return a}
766
+ function et(a,b){var c=new Bs;return Ve(void 0).qa(function(){return c.init()}).qa(function(){return Fs(c,b.Sa(),b.Da())}).qa(function(d){return d.getSegments([b.key()])}).qa(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}N("shaka.offline.OfflineScheme",ct);ct.plugin=dt;df("offline",dt);function ft(a,b,c){var d,e,f,g,h,k;return M(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),x=v.next();!x.done;x=v.next())if(x=x.value,gt(x.info,p)){x.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=ht(a,b,g);return A(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l["return"](d)}})}
767
+ function ht(a,b,c){var d,e;return M(function(f){switch(f.g){case 1:return d=new Wf({Qb:b,onError:function(){},rd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),E(f,2),d.configure(a),A(f,dg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return I(f),A(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return E(f,6),A(f,ng(d),8);case 8:va(f,7);break;case 6:return I(f),A(f,d.destroy(),
768
+ 9);case 9:return f["return"]([]);case 7:return e=[],A(f,Promise.all(c.sessionIds.map(function(g){return M(function(h){if(1==h.g)return E(h,2),A(h,og(d,g),4);if(2!=h.g)return e.push(g),va(h,0);I(h);C(h)})})),10);case 10:return A(f,d.destroy(),11);case 11:return f["return"](e)}})}
769
+ function gt(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&jc(a.audioCapabilities,b.audioCapabilities,c)&&jc(a.videoCapabilities,b.videoCapabilities,c)};function it(a,b,c){var d=b.presentationTimeline.getDuration();b=jt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function kt(a,b){var c=Xs(new Ws(a.Sa(),a.Da()),b),d=b.appMetadata||{};c=jt(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
770
+ function jt(a){var b=[],c=ue(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(le(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(me(c.value));return b};function lt(){this.g={}}function mt(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function nt(a,b){a.g[b.id]=b.bandwidth||2048}function ot(a,b){var c=a.g[b];null==c&&(c=0);return c};function pt(a){var b=this;if(a&&a.constructor!=T)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Dc()):(this.h=bl(),this.g=new cf);this.i=[];this.j=[];var c=!a;this.l=new of(function(){var d,e,f,g,h;return M(function(k){switch(k.g){case 1:return A(k,Promise.all(b.j.map(function(l){return ls(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return A(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return A(k,b.g.destroy(),4);
771
+ case 4:b.h=null,b.g=null,C(k)}})})}function qt(){if(Tc())a:{var a=r(Cs.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=pt.prototype;q.destroy=function(){return this.l.destroy()};
772
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Zk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(zb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return dl(this.h,a)};q.getConfiguration=function(){var a=bl();dl(a,this.h,bl());return a};q.Dc=function(){return this.g};
773
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new ks(this.g);this.j.push(f);b=rt(this,a,b||{},function(){var h;return M(function(k){if(1==k.g)return A(k,Ig(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Gb(h))})},e,f);var g=new Se(b,function(){return ls(f)});g["finally"](function(){ic(d.j,f)});g.then=function(h){zb("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.");
774
+ return g.promise.then(h)};return st(this,g)};q.xg=function(){zb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
775
+ function rt(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,x,y,w,D,z;return M(function(B){switch(B.g){case 1:return tt(),h=g=null,k=new Bs,n=m=l=null,E(B,2,3),A(B,d(),5);case 5:return g=B.h,A(B,ut(a,b,g,e),6);case 6:p=B.h;vt(a);t=!p.presentationTimeline.T()&&!p.presentationTimeline.Nb();if(!t)throw new P(2,9,9005,b);return A(B,wt(a,p,function(F){n=n||F},e),7);case 7:h=B.h;vt(a);if(n)throw n;return A(B,xt(p,e),8);case 8:return A(B,k.init(),9);case 9:return vt(a),A(B,Ds(k),10);case 10:return l=B.h,vt(a),v=yt(h,
776
+ p,b,c,e,f),x=v.Kg,y=v.Fe,A(B,l.Da.addManifests([x]),11);case 11:w=B.h;vt(a);m=w[0];vt(a);if(n)throw n;return A(B,zt(a,y,m,x,f,e,l.Da,p,h),12);case 12:return vt(a),D=new Us("manifest",l.path.Sa,l.path.Da,m),B["return"](kt(D,x));case 3:return wa(B),A(B,k.destroy(),13);case 13:if(!g){B.D(14);break}return A(B,g.stop(),14);case 14:if(!h){B.D(16);break}return A(B,h.destroy(),16);case 16:xa(B,0);break;case 2:z=I(B);if(null==m){B.D(18);break}return A(B,At(m),18);case 18:throw n||z;}})}
777
+ function zt(a,b,c,d,e,f,g,h,k){var l,m,n,p,t,v,x,y,w,D;return M(function(z){switch(z.g){case 1:l={};m=0;n=function(B,F){var G,H,J,K,L,W,Z;return M(function(ka){if(1==ka.g){G={};H=r(B);for(J=H.next();!J.done;G={Fb:G.Fb},J=H.next())G.Fb=J.value,K=hs(G.Fb,f),L=G.Fb.i,W=G.Fb.h,Z=function(ja){return function(ea){var Ia,Ma,Da;return M(function(Qa){if(1==Qa.g)return A(Qa,g.addSegments([{data:ea}]),2);Ia=Qa.h;vt(a);Ma=ja.Fb.g;Da=gs(Ma);l[Da]=Ia[0];m+=ea.byteLength;C(Qa)})}}(G),ns(e,G.Fb.groupId,K,L,W,Z);
778
+ return A(ka,ps(e),2)}if(!F)return ka.D(0);vt(a);Bt(h,d,k,f);return A(ka,g.updateManifest(c,d),0)})};p=!1;E(z,2);if(!Ct(h)||!p||Dt(h)){z.D(4);break}return A(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return vt(a),b=b.filter(function(B){return!B.h}),t=l,v=m,l={},m=0,A(z,Et(g,c,d,t,v,function(){return vt(a)}),6);case 6:vt(a);case 4:if(p){z.D(7);break}return A(z,n(b,!1),8);case 8:return vt(a),x=l,y=m,l={},m=0,A(z,Et(g,c,d,x,y,function(){return vt(a)}),9);case 9:vt(a);case 7:va(z,0);break;case 2:return w=
779
+ I(z),D=Object.values(l),A(z,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function At(a){var b,c,d,e;return M(function(f){switch(f.g){case 1:return b=new Bs,A(f,b.init(),2);case 2:return A(f,Ds(b),3);case 3:return c=f.h,d=new Us("manifest",c.path.Sa,c.path.Da,a),A(f,b.destroy(),4);case 4:return e=new pt,A(f,e.remove(d.toString()),0)}})}
780
+ function Et(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,x,y;return M(function(w){switch(w.g){case 1:g=!1;E(w,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=r(m.segments),p=n.next();!p.done;p=n.next())t=p.value,v=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=v&&(t.dataKey=v,t.pendingSegmentRefId=void 0),v=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=v&&(t.initSegmentKey=v,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
781
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return A(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return x=I(w),A(w,At(b),5);case 5:if(g){w.D(6);break}y=Object.values(d);return A(w,a.removeSegments(y,function(){}),6);case 6:throw x;}})}
782
+ function xt(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x,y,w,D,z,B,F,G,H,J,K,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:return c={width:Infinity,height:Infinity},Zd(a,b.restrictions,c),A(ea,be(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Nd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(le(m));n=r(a.textStreams);for(p=n.next();!p.done;p=n.next())t=
779
783
  p.value,d.push(me(t));v=r(a.imageStreams);for(x=v.next();!x.done;x=v.next())y=x.value,d.push(ne(y));return A(ea,b.offline.trackSelectionCallback(d),3);case 3:w=ea.h;D=a.presentationTimeline.getDuration();z=0;B=r(w);for(F=B.next();!F.done;F=B.next())G=F.value,H=G.bandwidth*D/8,z+=H;E(ea,4);return A(ea,b.offline.downloadSizeCallback(z),6);case 6:J=ea.h;if(!J)throw new P(2,9,9014);va(ea,5);break;case 4:K=I(ea);if(K instanceof P)throw K;throw new P(2,9,9015);case 5:L=new Set;W=new Set;Z=new Set;ka=r(w);
780
- for(F=ka.next();!F.done;F=ka.next())ja=F.value,"variant"==ja.type&&L.add(ja.id),"text"==ja.type&&W.add(ja.id),"image"==ja.type&&Z.add(ja.id);a.variants=a.variants.filter(function(Ia){return L.has(Ia.id)});a.textStreams=a.textStreams.filter(function(Ia){return W.has(Ia.id)});a.imageStreams=a.imageStreams.filter(function(Ia){return Z.has(Ia.id)});Dt(a);C(ea)}})}
781
- function wt(a,b,c,d,e,f){var g=gt(c,b,d),h=e.offline.progressCallback;ks(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Rf(a,"cenc",t)});var k=At(b)&&!Bt(b),l=null;k&&(l=Et.get(a.g.keySystem));for(var m=new jt,n=r(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=r(b.imageStreams);for(p=n.next();!p.done;p=n.next())lt(m,p.value);p=r(b.variants);for(n=p.next();!n.done;n=p.next())kt(m,n.value);m=Ft(f,m,b);f=m.streams;m=m.Ce;p=a.g;n=e.offline.usePersistentLicense;
782
- p&&n&&(p.initData=[]);return{Gg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Cc(),streams:f,sessionIds:n?Xf(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},Ce:m}}function At(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
783
- function Bt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function zt(a,b,c,d){b.expiration=c.Cc();c=Xf(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(At(a)&&d.offline.usePersistentLicense&&!c.length)throw new P(2,9,9007);}q.remove=function(a){return Gt(this,Ht(this,a))};
784
- function Ht(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:rt();c=Ts(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new zs;ua(k);return A(k,e.init(),4);case 4:return A(k,Ds(e,d.Sa(),d.Da()),5);case 5:return f=k.h,A(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],A(k,Promise.all([It(a,h,e),Jt(f,d,h)]),2);case 2:return wa(k),A(k,e.destroy(),8);case 8:xa(k,0)}})}
785
- function Kt(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:yd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:yd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function It(a,b,c){return M(function(d){return A(d,Lt(a.g,a.h.drm,c,b),0)})}
786
- function Jt(a,b,c){function d(){}var e=Mt(c);it(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Ug=function(){return Gt(this,Nt(this))};
787
- function Nt(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return rt(),b=a.g,c=a.h.drm,d=new zs,e=!1,ua(n),A(n,d.init(),4);case 4:f=[],Es(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.D(2);break}k=h.value;return A(n,k.getAll(),8);case 8:return l=n.h,A(n,dt(c,b,l),9);case 9:return m=n.h,A(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.D(5);break;case 2:return wa(n),A(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
788
- q.list=function(){return Gt(this,Ot())};function Ot(){var a,b,c;return M(function(d){switch(d.g){case 1:return rt(),a=[],b=new zs,ua(d),A(d,b.init(),4);case 4:return c=Promise.resolve(),Cs(b,function(e,f){c=c.then(function(){var g;return M(function(h){if(1==h.g)return A(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=it(new Ss("manifest",e.Sa,e.Da,l),k);a.push(m)});C(h)})})}),A(d,c,2);case 2:return wa(d),A(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
789
- function st(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),tt(a),A(l,c.start(b,
790
- g),2);if(3!=l.g)return h=l.h,tt(a),k=Pt(h),A(l,Promise.all(db(k,function(m){return m.createSegmentIndex()})),3);tt(a);if(e)throw e;return l["return"](h)})}function ut(a,b,c,d){var e;return M(function(f){switch(f.g){case 1:return e=new Bf({Qb:a.g,onError:c,qd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),A(f,Gf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return A(f,Sf(e),3);case 3:return A(f,Qf(e),4);case 4:return f["return"](e)}})}
791
- function Ft(a,b,c){var d=new Map,e=Pt(c),f=new Map;e=r(e);for(var g=e.next();!g.done;g=e.next()){g=g.value;var h=Qt(a,b,c,g,d);f.set(g.id,h)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&f.get(b.audio.id).variantIds.push(b.id),b.video&&f.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(f.values()),Ce:Array.from(d.values())}}
792
- function Qt(a,b,c,d,e){var f={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
793
- tilesLayout:d.tilesLayout};Rt(d,c.presentationTimeline.ob(),function(g){var h=es(g),k=void 0;if(!e.has(h)){var l=g.endTime-g.startTime;l=mt(b,d.id)*l;l=hs(a.g,l);e.set(h,new ds(g,l,d.id,!1))}g.g&&(k=es(g.g),e.has(k)||(l=.5*mt(b,d.id),l=hs(a.g,l),e.set(k,new ds(g.g,l,d.id,!0))));f.segments.push({pendingInitSegmentRefId:k,initSegmentKey:k?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,
794
- pendingSegmentRefId:h,dataKey:0})});return f}function Rt(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 tt(a){if(a.l.g)throw new P(2,9,7001);}function rt(){if(!ot())throw new P(2,9,9E3);}function Gt(a,b){return M(function(c){if(1==c.g)return a.i.push(b),ua(c),A(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);ic(a.i,b);return xa(c,0)})}function qt(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){ic(a.i,c)})}
795
- function Mt(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
796
- function Lt(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Fs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Kt(d,!1),videoCapabilities:Kt(d,!0)}});return A(h,dt(b,a,f),2)}return 3!=h.g?(g=h.h,A(h,e.remove(g),3)):A(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
797
- function Pt(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
798
- function Dt(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}N("shaka.offline.Storage",nt);nt.deleteAll=function(){var a;return M(function(b){return 1==b.g?(a=new zs,ua(b),A(b,Gs(a),2)):5!=b.g?(wa(b),A(b,a.destroy(),5)):xa(b,0)})};nt.prototype.list=nt.prototype.list;
799
- nt.prototype.removeEmeSessions=nt.prototype.Ug;nt.prototype.remove=nt.prototype.remove;nt.prototype.getStoreInProgress=nt.prototype.sg;nt.prototype.store=nt.prototype.store;nt.prototype.getNetworkingEngine=nt.prototype.Dc;nt.prototype.getConfiguration=nt.prototype.getConfiguration;nt.prototype.configure=nt.prototype.configure;nt.prototype.destroy=nt.prototype.destroy;nt.support=ot;
800
- var Et=(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");
801
- Nm.offline=ot;function St(){}function Tt(){for(var a=r(Ut),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Mf()}catch(c){Sa("Error installing polyfill!",c)}}}function Vt(a,b){for(var c={priority:b||0,Mf:a},d=0;d<Ut.length;d++)if(Ut[d].priority<c.priority){Ut.splice(d,0,c);return}Ut.push(c)}N("shaka.polyfill",St);St.register=Vt;St.installAll=Tt;var Ut=[];function Wt(){}function Xt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Yt(b.value)}function Yt(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)}})}St.Aria=Wt;Wt.install=Xt;Vt(Xt);function Zt(){}function $t(){au()}St.EncryptionScheme=Zt;Zt.install=$t;Vt($t,-2);function bu(){}
802
- function cu(){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}}),
803
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",du);document.addEventListener("webkitfullscreenerror",du);document.addEventListener("mozfullscreenchange",du);document.addEventListener("mozfullscreenerror",du);document.addEventListener("MSFullscreenChange",du);document.addEventListener("MSFullscreenError",du)}}
804
- function du(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)}St.Fullscreen=bu;bu.install=cu;Vt(cu);function eu(){}function fu(){}St.MathRound=eu;eu.install=fu;Vt(fu);function gu(){}function hu(){if($c()||ad()||bd()||Xc("PlayStation 5")||Zc()||Yc()||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),iu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=ju}
805
- function ju(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,x,y;return M(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(!Sc()||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=Uc(g),!h)||a.audio&&(k=a.audio.contentType,
784
+ for(F=ka.next();!F.done;F=ka.next())ja=F.value,"variant"==ja.type&&L.add(ja.id),"text"==ja.type&&W.add(ja.id),"image"==ja.type&&Z.add(ja.id);a.variants=a.variants.filter(function(Ia){return L.has(Ia.id)});a.textStreams=a.textStreams.filter(function(Ia){return W.has(Ia.id)});a.imageStreams=a.imageStreams.filter(function(Ia){return Z.has(Ia.id)});Ft(a);C(ea)}})}
785
+ function yt(a,b,c,d,e,f){var g=it(c,b,d),h=e.offline.progressCallback;ms(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&mg(a,"cenc",t)});var k=Ct(b)&&!Dt(b),l=null;k&&(l=Gt.get(a.g.keySystem));for(var m=new lt,n=r(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=r(b.imageStreams);for(p=n.next();!p.done;p=n.next())nt(m,p.value);p=r(b.variants);for(n=p.next();!n.done;n=p.next())mt(m,n.value);m=Ht(f,m,b);f=m.streams;m=m.Fe;p=a.g;n=e.offline.usePersistentLicense;
786
+ p&&n&&(p.initData=[]);return{Kg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Cc(),streams:f,sessionIds:n?sg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},Fe:m}}function Ct(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
787
+ function Dt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Bt(a,b,c,d){b.expiration=c.Cc();c=sg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Ct(a)&&d.offline.usePersistentLicense&&!c.length)throw new P(2,9,9007);}q.remove=function(a){return It(this,Jt(this,a))};
788
+ function Jt(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:tt();c=Vs(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new Bs;ua(k);return A(k,e.init(),4);case 4:return A(k,Fs(e,d.Sa(),d.Da()),5);case 5:return f=k.h,A(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],A(k,Promise.all([Kt(a,h,e),Lt(f,d,h)]),2);case 2:return wa(k),A(k,e.destroy(),8);case 8:xa(k,0)}})}
789
+ function Mt(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:yd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:yd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Kt(a,b,c){return M(function(d){return A(d,Nt(a.g,a.h.drm,c,b),0)})}
790
+ function Lt(a,b,c){function d(){}var e=Ot(c);kt(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Yg=function(){return It(this,Pt(this))};
791
+ function Pt(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return tt(),b=a.g,c=a.h.drm,d=new Bs,e=!1,ua(n),A(n,d.init(),4);case 4:f=[],Gs(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.D(2);break}k=h.value;return A(n,k.getAll(),8);case 8:return l=n.h,A(n,ft(c,b,l),9);case 9:return m=n.h,A(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.D(5);break;case 2:return wa(n),A(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
792
+ q.list=function(){return It(this,Qt())};function Qt(){var a,b,c;return M(function(d){switch(d.g){case 1:return tt(),a=[],b=new Bs,ua(d),A(d,b.init(),4);case 4:return c=Promise.resolve(),Es(b,function(e,f){c=c.then(function(){var g;return M(function(h){if(1==h.g)return A(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=kt(new Us("manifest",e.Sa,e.Da,l),k);a.push(m)});C(h)})})}),A(d,c,2);case 2:return wa(d),A(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
793
+ function ut(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),vt(a),A(l,c.start(b,
794
+ g),2);if(3!=l.g)return h=l.h,vt(a),k=Rt(h),A(l,Promise.all(db(k,function(m){return m.createSegmentIndex()})),3);vt(a);if(e)throw e;return l["return"](h)})}function wt(a,b,c,d){var e;return M(function(f){switch(f.g){case 1:return e=new Wf({Qb:a.g,onError:c,rd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),A(f,ag(e,b.variants,d.offline.usePersistentLicense),2);case 2:return A(f,ng(e),3);case 3:return A(f,lg(e),4);case 4:return f["return"](e)}})}
795
+ function Ht(a,b,c){var d=new Map,e=Rt(c),f=new Map;e=r(e);for(var g=e.next();!g.done;g=e.next()){g=g.value;var h=St(a,b,c,g,d);f.set(g.id,h)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&f.get(b.audio.id).variantIds.push(b.id),b.video&&f.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(f.values()),Fe:Array.from(d.values())}}
796
+ function St(a,b,c,d,e){var f={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
797
+ tilesLayout:d.tilesLayout};Tt(d,c.presentationTimeline.mb(),function(g){var h=gs(g),k=void 0;if(!e.has(h)){var l=g.endTime-g.startTime;l=ot(b,d.id)*l;l=js(a.g,l);e.set(h,new fs(g,l,d.id,!1))}g.g&&(k=gs(g.g),e.has(k)||(l=.5*ot(b,d.id),l=js(a.g,l),e.set(k,new fs(g.g,l,d.id,!0))));f.segments.push({pendingInitSegmentRefId:k,initSegmentKey:k?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,
798
+ pendingSegmentRefId:h,dataKey:0})});return f}function Tt(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 vt(a){if(a.l.g)throw new P(2,9,7001);}function tt(){if(!qt())throw new P(2,9,9E3);}function It(a,b){return M(function(c){if(1==c.g)return a.i.push(b),ua(c),A(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);ic(a.i,b);return xa(c,0)})}function st(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){ic(a.i,c)})}
799
+ function Ot(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
800
+ function Nt(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Hs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Mt(d,!1),videoCapabilities:Mt(d,!0)}});return A(h,ft(b,a,f),2)}return 3!=h.g?(g=h.h,A(h,e.remove(g),3)):A(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
801
+ function Rt(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
802
+ function Ft(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}N("shaka.offline.Storage",pt);pt.deleteAll=function(){var a;return M(function(b){return 1==b.g?(a=new Bs,ua(b),A(b,Is(a),2)):5!=b.g?(wa(b),A(b,a.destroy(),5)):xa(b,0)})};pt.prototype.list=pt.prototype.list;
803
+ pt.prototype.removeEmeSessions=pt.prototype.Yg;pt.prototype.remove=pt.prototype.remove;pt.prototype.getStoreInProgress=pt.prototype.xg;pt.prototype.store=pt.prototype.store;pt.prototype.getNetworkingEngine=pt.prototype.Dc;pt.prototype.getConfiguration=pt.prototype.getConfiguration;pt.prototype.configure=pt.prototype.configure;pt.prototype.destroy=pt.prototype.destroy;pt.support=qt;
804
+ var Gt=(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");
805
+ hn.offline=qt;function Ut(){}function Vt(){for(var a=r(Wt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Qf()}catch(c){Sa("Error installing polyfill!",c)}}}function Xt(a,b){for(var c={priority:b||0,Qf:a},d=0;d<Wt.length;d++)if(Wt[d].priority<c.priority){Wt.splice(d,0,c);return}Wt.push(c)}N("shaka.polyfill",Ut);Ut.register=Xt;Ut.installAll=Vt;var Wt=[];function Yt(){}function Zt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())$t(b.value)}function $t(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)}})}Ut.Aria=Yt;Yt.install=Zt;Xt(Zt);function au(){}function bu(){cu()}Ut.EncryptionScheme=au;au.install=bu;Xt(bu,-2);function du(){}
806
+ function eu(){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}}),
807
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",fu);document.addEventListener("webkitfullscreenerror",fu);document.addEventListener("mozfullscreenchange",fu);document.addEventListener("mozfullscreenerror",fu);document.addEventListener("MSFullscreenChange",fu);document.addEventListener("MSFullscreenError",fu)}}
808
+ function fu(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)}Ut.Fullscreen=du;du.install=eu;Xt(eu);function gu(){}function hu(){}Ut.MathRound=gu;gu.install=hu;Xt(hu);function iu(){}function ju(){if($c()||ad()||bd()||Xc("PlayStation 5")||Zc()||Yc()||Xc("PC=EOS")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),ku=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=lu}
809
+ function lu(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,x,y;return M(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(!Tc()||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=Uc(g),!h)||a.audio&&(k=a.audio.contentType,
806
810
  l=Uc(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&&(t={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(t));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));x={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
807
- n.length&&(x.audioCapabilities=n);p.length&&(x.videoCapabilities=p);E(w,3);return A(w,navigator.requestMediaKeySystemAccess(m.keySystem,[x]),5);case 5:y=w.h;va(w,4);break;case 3:I(w);case 4:y&&(b.supported=!0,b.keySystemAccess=y);case 2:return w["return"](b)}})}St.MediaCapabilities=gu;gu.install=hu;var iu=null;gu.originalMcap=iu;Vt(hu,-1);function ku(){}function lu(){var a=cd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?mu():a?(nu(),12>=a?(ou(),pu()):ou()):(Xc("Tizen 2")||Xc("Tizen 3")||Xc("Tizen 4"))&&qu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&ru()}
808
- function ou(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function pu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function nu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
809
- function qu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Bd(b)[0]&&a(b)}}function mu(){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)}}
810
- function ru(){var a=MediaSource.isTypeSupported;Zc()||(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)})}St.MediaSource=ku;ku.install=lu;Vt(lu);function su(){}function tu(){screen.orientation||void 0!=window.orientation&&uu()}function uu(){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 vu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}St.Orientation=su;
811
- su.install=tu;function vu(){cb.call(this);this.type="";this.angle=0}u(vu,cb);
812
- vu.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)};
813
- vu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Vt(tu);function wu(){}function xu(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=yu,window.MediaKeys=zu,window.MediaKeySystemAccess=Au,navigator.requestMediaKeySystemAccess=Bu)}function Bu(a,b){try{var c=new Au(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
814
- function yu(a){var b=this.mediaKeys;b&&b!=a&&Cu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Cu(a,this):Promise.resolve()}function Du(a){a=Ic(a.initData);if(Lc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=hd(a.subarray(4),!0);a=kd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Jc(a);this.dispatchEvent(b)}St.PatchedMediaKeysApple=wu;wu.install=xu;
815
- function Au(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(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=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
811
+ n.length&&(x.audioCapabilities=n);p.length&&(x.videoCapabilities=p);E(w,3);return A(w,navigator.requestMediaKeySystemAccess(m.keySystem,[x]),5);case 5:y=w.h;va(w,4);break;case 3:I(w);case 4:y&&(b.supported=!0,b.keySystemAccess=y);case 2:return w["return"](b)}})}Ut.MediaCapabilities=iu;iu.install=ju;var ku=null;iu.originalMcap=ku;Xt(ju,-1);function mu(){}function nu(){var a=cd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?ou():a?(pu(),12>=a?(qu(),ru()):qu()):(Xc("Tizen 2")||Xc("Tizen 3")||Xc("Tizen 4"))&&su());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&tu()}
812
+ function qu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function ru(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function pu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
813
+ function su(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Bd(b)[0]&&a(b)}}function ou(){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)}}
814
+ function tu(){var a=MediaSource.isTypeSupported;Zc()||(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)})}Ut.MediaSource=mu;mu.install=nu;Xt(nu);function uu(){}function vu(){screen.orientation||void 0!=window.orientation&&wu()}function wu(){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 xu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}Ut.Orientation=uu;
815
+ uu.install=vu;function xu(){cb.call(this);this.type="";this.angle=0}u(xu,cb);
816
+ xu.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)};
817
+ xu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Xt(vu);function yu(){}function zu(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Au,window.MediaKeys=Bu,window.MediaKeySystemAccess=Cu,navigator.requestMediaKeySystemAccess=Du)}function Du(a,b){try{var c=new Cu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
818
+ function Au(a){var b=this.mediaKeys;b&&b!=a&&Eu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Eu(a,this):Promise.resolve()}function Fu(a){a=Ic(a.initData);if(Lc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=hd(a.subarray(4),!0);a=kd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Jc(a);this.dispatchEvent(b)}Ut.PatchedMediaKeysApple=yu;yu.install=zu;
819
+ function Cu(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(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=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
816
820
  k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=r(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;}
817
- Au.prototype.createMediaKeys=function(){var a=new zu(this.keySystem);return Promise.resolve(a)};Au.prototype.getConfiguration=function(){return this.g};function zu(a){this.h=new WebKitMediaKeys(a);this.g=new qf}zu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Eu(this.h,a)};zu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
818
- function Cu(a,b){a.g.rb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",Du);try{return zi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Eu(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new qf;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Fu}u(Eu,cb);q=Eu.prototype;
819
- q.generateRequest=function(a,b){var c=this;this.g=new Pc;try{var d=this.l.createSession("video/mp4",Ic(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"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",Jc(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.h&&(Gu(c,"usable"),c.h.resolve(),c.h=null)});this.j.o(d,"webkitkeyerror",function(){var e=
820
- Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Gu(c,"output-not-allowed");break;default:Gu(c,"internal-error")}});Gu(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
821
- q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.rb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Gu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
822
- function Fu(){this.size=0;this.g=void 0}q=Fu.prototype;q.forEach=function(a){this.g&&a(this.g,lg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=lg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Vt(xu);function Hu(){}function Iu(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Ju,window.MediaKeySystemAccess=Ku,navigator.requestMediaKeySystemAccess=Lu,HTMLMediaElement.prototype.setMediaKeys=Mu)}function Lu(a,b){try{var c=new Ku(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
823
- function Nu(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Jc(ko(a.initData));this.dispatchEvent(b)}}St.PatchedMediaKeysMs=Hu;Hu.install=Iu;
824
- function Ku(a,b){this.keySystem=a;for(var c=!1,d=r(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=r(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=
821
+ Cu.prototype.createMediaKeys=function(){var a=new Bu(this.keySystem);return Promise.resolve(a)};Cu.prototype.getConfiguration=function(){return this.g};function Bu(a){this.h=new WebKitMediaKeys(a);this.g=new qf}Bu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Gu(this.h,a)};Bu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
822
+ function Eu(a,b){a.g.qb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",Fu);try{return Ui(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Gu(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new qf;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Hu}u(Gu,cb);q=Gu.prototype;
823
+ q.generateRequest=function(a,b){var c=this;this.g=new Pc;try{var d=this.l.createSession("video/mp4",Ic(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"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",Jc(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.h&&(Iu(c,"usable"),c.h.resolve(),c.h=null)});this.j.o(d,"webkitkeyerror",function(){var e=
824
+ Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Iu(c,"output-not-allowed");break;default:Iu(c,"internal-error")}});Iu(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
825
+ q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.qb()}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 Iu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
826
+ function Hu(){this.size=0;this.g=void 0}q=Hu.prototype;q.forEach=function(a){this.g&&a(this.g,Gg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Gg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Xt(zu);function Ju(){}function Ku(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Lu,window.MediaKeySystemAccess=Mu,navigator.requestMediaKeySystemAccess=Nu,HTMLMediaElement.prototype.setMediaKeys=Ou)}function Nu(a,b){try{var c=new Mu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
827
+ function Pu(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Jc(Go(a.initData));this.dispatchEvent(b)}}Ut.PatchedMediaKeysMs=Ju;Ju.install=Ku;
828
+ function Mu(a,b){this.keySystem=a;for(var c=!1,d=r(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=r(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=
825
829
  !0));if(e.videoCapabilities)for(h=r(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;}
826
- Ku.prototype.createMediaKeys=function(){var a=new Ju(this.keySystem);return Promise.resolve(a)};Ku.prototype.getConfiguration=function(){return this.g};function Mu(a){var b=this.mediaKeys;b&&b!=a&&Ou(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Ou(a,this):Promise.resolve()}function Ju(a){this.h=new MSMediaKeys(a);this.g=new qf}
827
- Ju.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Pu(this.h,a)};Ju.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Ou(a,b){a.g.rb();if(!b)return Promise.resolve();a.g.o(b,"msneedkey",Nu);try{return zi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
828
- function Pu(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new qf;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Qu}u(Pu,cb);q=Pu.prototype;
829
- q.generateRequest=function(a,b){var c=this;this.g=new Pc;try{this.i=this.l.createSession("video/mp4",Ic(b),null),this.j.o(this.i,"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",Jc(d.message));d=new O("message",d);c.dispatchEvent(d)}),this.j.o(this.i,"mskeyadded",function(){c.g?(Ru(c,"usable"),c.g.resolve(),c.g=null):c.h&&(Ru(c,"usable"),c.h.resolve(),c.h=null)}),this.j.o(this.i,"mskeyerror",
830
- function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Ru(c,"output-not-allowed");break;default:Ru(c,"internal-error")}}),Ru(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
831
- q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.rb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Ru(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
832
- function Qu(){this.size=0;this.g=void 0}q=Qu.prototype;q.forEach=function(a){this.g&&a(this.g,lg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=lg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Vt(Iu);function Su(){}function Tu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Uu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Vu,window.MediaKeys=Wu,window.MediaKeySystemAccess=Xu)}function Uu(){return Promise.reject(Error("The key system specified is not supported."))}
833
- function Vu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}St.PatchedMediaKeysNop=Su;Su.install=Tu;function Wu(){throw new TypeError("Illegal constructor.");}Wu.prototype.createSession=function(){};Wu.prototype.setServerCertificate=function(){};function Xu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Xu.prototype.getConfiguration=function(){};Xu.prototype.createMediaKeys=function(){};Vt(Tu,-10);function Yu(){}function Zu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)$u="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=av;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=bv;window.MediaKeys=cv;window.MediaKeySystemAccess=dv}}
834
- function ev(a){var b=$u;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function av(a,b){try{var c=new dv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function bv(a){var b=this.mediaKeys;b&&b!=a&&fv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&fv(a,this);return Promise.resolve()}St.PatchedMediaKeysWebkit=Yu;Yu.install=Zu;
835
- function dv(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=r(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=r(g.audioCapabilities),
830
+ Mu.prototype.createMediaKeys=function(){var a=new Lu(this.keySystem);return Promise.resolve(a)};Mu.prototype.getConfiguration=function(){return this.g};function Ou(a){var b=this.mediaKeys;b&&b!=a&&Qu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Qu(a,this):Promise.resolve()}function Lu(a){this.h=new MSMediaKeys(a);this.g=new qf}
831
+ Lu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Ru(this.h,a)};Lu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Qu(a,b){a.g.qb();if(!b)return Promise.resolve();a.g.o(b,"msneedkey",Pu);try{return Ui(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
832
+ function Ru(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new qf;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Su}u(Ru,cb);q=Ru.prototype;
833
+ q.generateRequest=function(a,b){var c=this;this.g=new Pc;try{this.i=this.l.createSession("video/mp4",Ic(b),null),this.j.o(this.i,"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",Jc(d.message));d=new O("message",d);c.dispatchEvent(d)}),this.j.o(this.i,"mskeyadded",function(){c.g?(Tu(c,"usable"),c.g.resolve(),c.g=null):c.h&&(Tu(c,"usable"),c.h.resolve(),c.h=null)}),this.j.o(this.i,"mskeyerror",
834
+ function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Tu(c,"output-not-allowed");break;default:Tu(c,"internal-error")}}),Tu(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
835
+ q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.qb()}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 Tu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
836
+ function Su(){this.size=0;this.g=void 0}q=Su.prototype;q.forEach=function(a){this.g&&a(this.g,Gg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Gg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Xt(Ku);function Uu(){}function Vu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Wu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Xu,window.MediaKeys=Yu,window.MediaKeySystemAccess=Zu)}function Wu(){return Promise.reject(Error("The key system specified is not supported."))}
837
+ function Xu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Ut.PatchedMediaKeysNop=Uu;Uu.install=Vu;function Yu(){throw new TypeError("Illegal constructor.");}Yu.prototype.createSession=function(){};Yu.prototype.setServerCertificate=function(){};function Zu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Zu.prototype.getConfiguration=function(){};Zu.prototype.createMediaKeys=function(){};Xt(Vu,-10);function $u(){}function av(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)bv="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=cv;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=dv;window.MediaKeys=ev;window.MediaKeySystemAccess=fv}}
838
+ function gv(a){var b=bv;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function cv(a,b){try{var c=new fv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function dv(a){var b=this.mediaKeys;b&&b!=a&&hv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&hv(a,this);return Promise.resolve()}Ut.PatchedMediaKeysWebkit=$u;$u.install=av;
839
+ function fv(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=r(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=r(g.audioCapabilities),
836
840
  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=r(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"]):
837
- 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;}dv.prototype.createMediaKeys=function(){var a=new cv(this.g);return Promise.resolve(a)};dv.prototype.getConfiguration=function(){return this.h};function cv(a){this.l=a;this.h=null;this.g=new qf;this.i=[];this.j=new Map}
838
- function fv(a,b){a.h=b;a.g.rb();var c=$u;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Jc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=gv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=gv(a,d.sessionId))hv(d,"usable"),
839
- d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=gv(a,d.sessionId);e&&e.handleError(d)}))}cv.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new iv(b,this.l,a);this.i.push(a);return a};cv.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
840
- function gv(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 iv(a,b,c){cb.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 Pc;this.keyStatuses=new jv}u(iv,cb);q=iv.prototype;
841
- 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?hv(this,"output-restricted"):1==b?hv(this,"expired"):hv(this,"internal-error"))};
842
- function kv(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=Ic(kd("LOAD_SESSION|"+c));else{var e=kd("PERSISTENT|");d=sd(e,b)}else d=Ic(b)}catch(g){return Promise.reject(g)}a.h=new Pc;var f=ev("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Q(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
843
- function lv(a,b,c){if(a.g)a.g.then(function(){return lv(a,b,c)})["catch"](function(){return lv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=gd(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=pd(e.keys[0].k);e=pd(e.keys[0].kid)}else d=Ic(c),e=null;var f=ev("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
844
- function hv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return kv(this,b,null)};q.load=function(a){return"persistent-license"==this.l?kv(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Pc;lv(this,b,a);return b};
845
- 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=ev("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 jv(){this.size=0;this.g=void 0}q=jv.prototype;q.forEach=function(a){this.g&&a(this.g,lg.value())};q.get=function(a){if(this.has(a))return this.g};
846
- q.has=function(a){var b=lg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var $u="";Vt(Zu);function mv(){}function nv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ov,Object.defineProperty(a,"disablePictureInPicture",{get:pv,set:qv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=rv,document.addEventListener("webkitpresentationmodechanged",sv,!0))}}
847
- function sv(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)}
848
- function ov(){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 rv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
849
- function pv(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function qv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}St.PiPWebkit=mv;mv.install=nv;Vt(nv);function tv(){}function uv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=vv))}function vv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}St.RandomUUID=tv;tv.install=uv;Vt(uv);function wv(){}function xv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=yv)}function yv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}St.StorageEstimate=wv;wv.install=xv;Vt(xv);function zv(){}function Av(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Bv})}function Bv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}St.Symbol=zv;zv.install=Av;Vt(Av);function Cv(){}function Dv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}St.VideoPlayPromise=Cv;Cv.install=Dv;Vt(Dv);function Ev(){}function Fv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Xc("Web0S")&&Xc("Chrome/38.0.2125.122 Safari/537.36"))&&(a.getVideoPlaybackQuality=Gv)}}function Gv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}St.VideoPlaybackQuality=Ev;Ev.install=Fv;Vt(Fv);function Hv(){}function Iv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Jv;else if(6==b)a=Kv;else{try{var c=!!Jv(1,2,"")}catch(d){c=!1}c&&(a=Jv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Jv(a,b,c){return new window.TextTrackCue(a,b,c)}function Kv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}St.VTTCue=Hv;Hv.install=Iv;Vt(Iv);function Lv(){}Lv.prototype.parseInit=function(){};Lv.prototype.parseMedia=function(a,b){var c=null,d=[],e=gd(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Mv.exec(f))){var g=Nv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new lc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};N("shaka.text.LrcTextParser",Lv);Lv.prototype.parseMedia=Lv.prototype.parseMedia;
850
- Lv.prototype.parseInit=Lv.prototype.parseInit;var Mv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Nv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Gd["application/x-subtitle-lrc"]=function(){return new Lv};function Ov(){}Ov.prototype.parseInit=function(){};
851
- Ov.prototype.parseMedia=function(a,b){var c=gd(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(z){throw new P(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new P(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new P(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=ro(g,Pv,"frameRate"),k=ro(g,Pv,"subFrameRate"),l=ro(g,Pv,"frameRateMultiplier"),
852
- m=ro(g,Pv,"tickRate"),n=ro(g,Pv,"cellResolution");c=g.getAttribute("xml:space")||"default";e=ro(g,Qv,"extent");if("default"!=c&&"preserve"!=c)throw new P(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Rv(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])?po(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=r(g),t=p.next();!t.done;t=
853
- p.next()){var v=t.value;t=new nc;var x=v.getAttribute("xml:id");if(x){t.id=x;var y=null;e&&(y=Sv.exec(e)||Tv.exec(e));x=y?Number(y[1]):null;y=y?Number(y[2]):null;var w,D;if(w=Uv(v,l,"extent"))w=(D=Sv.exec(w))||Tv.exec(w),null!=w&&(t.width=Number(w[1]),t.height=Number(w[2]),D||(null!=x&&(t.width=100*t.width/x),null!=y&&(t.height=100*t.height/y)),t.widthUnits=D||null!=x?Dc:0,t.heightUnits=D||null!=y?Dc:0);if(v=Uv(v,l,"origin"))w=(D=Sv.exec(v))||Tv.exec(v),null!=w&&(t.viewportAnchorX=Number(w[1]),t.viewportAnchorY=
854
- Number(w[2]),D||(null!=y&&(t.viewportAnchorY=100*t.viewportAnchorY/y),null!=x&&(t.viewportAnchorX=100*t.viewportAnchorX/x)),t.viewportAnchorUnits=D||null!=x?Dc:0)}else t=null;t&&m.push(t)}if(mo(f,"p").length)throw new P(2,2,2001,"<p> can only be inside <div> in TTML");e=r(mo(f,"div"));for(p=e.next();!p.done;p=e.next())if(mo(p.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(f=Vv(f,b.periodStart,h,k,l,g,m,c,n,null,!1))f.backgroundColor||(f.backgroundColor="transparent"),
855
- d.push(f)}return d};
856
- function Vv(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var t=null,v=r(Wv),x=v.next();!x.done&&!(t=Xv(p,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));x=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
857
- a=[];if(!x)for(var y=r(p.childNodes),w=y.next();!w.done;w=y.next())(w=Vv(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;y=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||y||"br"==p.tagName||0!=a.length||d&&!h))return null;w=Yv(p,c);y=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=Zv(n,c,y,w),y=w.start,w=w.end,n=n.parentNode;null==y&&(y=0);y+=b;w=null==w?Infinity:w+b;if(!D&&0<a.length)for(y=Infinity,w=0,b=r(a),
858
- c=b.next();!c.done;c=b.next())c=c.value,y=Math.min(y,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new lc(y,w,""),e.lineBreak=!0,e;b="";x&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new lc(y,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Xv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
859
- (g=Xv(l,"region",f,"")[0]);$v(b,p,g,t,e,v,0==a.length);return b}
860
- function $v(a,b,c,d,e,f,g){f=f||g;"rtl"==aw(b,c,e,"direction",f)&&(a.direction="rtl");g=aw(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=mc);(g=aw(b,c,e,"textAlign",!0))?(a.positionAlign=bw[g],a.lineAlign=cw[g],a.textAlign=xc[g.toUpperCase()]):a.textAlign=pc;if(g=aw(b,c,e,"displayAlign",!0))a.displayAlign=yc[g.toUpperCase()];if(g=aw(b,c,e,"color",f))a.color=g;if(g=aw(b,c,e,"backgroundColor",
861
- f))a.backgroundColor=g;if(g=aw(b,c,e,"border",f))a.border=g;if(g=aw(b,c,e,"fontFamily",f))a.fontFamily=g;(g=aw(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=aw(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=aw(b,c,e,"lineHeight",f))&&g.match(dw)&&(a.lineHeight=g);(g=aw(b,c,e,"fontSize",f))&&(g.match(dw)||g.match(ew))&&(a.fontSize=g);if(g=aw(b,c,e,"fontStyle",f))a.fontStyle=Cc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
862
- d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=aw(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(dw)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(dw)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=aw(b,c,e,"letterSpacing",f))&&d.match(dw)&&(a.letterSpacing=d);(d=aw(b,c,e,"linePadding",f))&&d.match(dw)&&(a.linePadding=d);if(f=aw(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Uv(c,e,"textDecoration"))&&fw(a,c);(b=
863
- gw(b,e,"textDecoration"))&&fw(a,b)}
864
- function fw(a,b){for(var c=r(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")&&ic(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&ic(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
865
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&ic(a.textDecoration,"overline")}}function aw(a,b,c,d,e){e=void 0===e?!0:e;return(a=gw(a,c,d))?a:e?Uv(b,c,d):null}function Uv(a,b,c){if(!a)return null;var d=ro(a,Qv,c);return d?d:hw(a,b,c)}function gw(a,b,c){var d=ro(a,Qv,c);return d?d:hw(a,b,c)}
866
- function hw(a,b,c){a=Xv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=qo(a[e],"urn:ebu:tt:style",c);f||(f=ro(a[e],Qv,c));f||(f=gw(a[e],b,c));f&&(d=f)}return d}
867
- function Xv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?qo(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Zv(a,b,c,d){a=Yv(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}}
868
- function Yv(a,b){var c=iw(a.getAttribute("begin"),b),d=iw(a.getAttribute("end"),b),e=iw(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
869
- function iw(a,b){var c=null;if(jw.test(a)){c=jw.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(kw.test(a))c=lw(kw,a);else if(mw.test(a))c=lw(mw,a);else if(nw.test(a))c=nw.exec(a),c=Number(c[1])/b.frameRate;else if(ow.test(a))c=ow.exec(a),c=Number(c[1])/b.g;else if(pw.test(a))c=lw(pw,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
870
- function lw(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)}N("shaka.text.TtmlTextParser",Ov);Ov.prototype.parseMedia=Ov.prototype.parseMedia;Ov.prototype.parseInit=Ov.prototype.parseInit;function Rv(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]))}
871
- var Sv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,ew=/^(\d{1,2}(?:\.\d+)?|100)%$/,dw=/^(\d+px|\d+em|\d*\.?\d+c)$/,Tv=/^(\d+)px (\d+)px$/,jw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,kw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,mw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,nw=/^(\d*(?:\.\d*)?)f$/,ow=/^(\d*(?:\.\d*)?)t$/,pw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),cw={left:sc,center:"center",right:"end",start:sc,
872
- end:"end"},bw={left:"line-left",center:"center",right:"line-right"},Pv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Qv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Wv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Gd["application/ttml+xml"]=function(){return new Ov};function qw(){this.g=new Ov}qw.prototype.parseInit=function(a){var b=!1;(new vg).box("moov",zg).box("trak",zg).box("mdia",zg).box("minf",zg).box("stbl",zg).X("stsd",Bg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};qw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new vg).box("mdat",Cg(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new P(2,2,2007);return e};N("shaka.text.Mp4TtmlParser",qw);qw.prototype.parseMedia=qw.prototype.parseMedia;
873
- qw.prototype.parseInit=qw.prototype.parseInit;Gd['application/mp4; codecs="stpp"']=function(){return new qw};Gd['application/mp4; codecs="stpp.ttml"']=function(){return new qw};Gd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new qw};Gd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new qw};function rw(){}rw.prototype.parseInit=function(){};
874
- rw.prototype.parseMedia=function(a,b){var c=gd(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 P(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=sw(new Nq(e[1]));if(null==c)throw new P(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=
875
- [];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new Nq(g);var h=new nc;Qq(g);Oq(g);for(var k=Qq(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))?
876
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Oq(g);k=Qq(g)}f.push(h)}e=new Map;tw(e);g=[];d=r(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 lc(0,0,"");for(var n=!1,p=0;p<k.length;p++){var t=
841
+ 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;}fv.prototype.createMediaKeys=function(){var a=new ev(this.g);return Promise.resolve(a)};fv.prototype.getConfiguration=function(){return this.h};function ev(a){this.l=a;this.h=null;this.g=new qf;this.i=[];this.j=new Map}
842
+ function hv(a,b){a.h=b;a.g.qb();var c=bv;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Jc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=iv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=iv(a,d.sessionId))jv(d,"usable"),
843
+ d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=iv(a,d.sessionId);e&&e.handleError(d)}))}ev.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new kv(b,this.l,a);this.i.push(a);return a};ev.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
844
+ function iv(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 kv(a,b,c){cb.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 Pc;this.keyStatuses=new lv}u(kv,cb);q=kv.prototype;
845
+ 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?jv(this,"output-restricted"):1==b?jv(this,"expired"):jv(this,"internal-error"))};
846
+ function mv(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=Ic(kd("LOAD_SESSION|"+c));else{var e=kd("PERSISTENT|");d=sd(e,b)}else d=Ic(b)}catch(g){return Promise.reject(g)}a.h=new Pc;var f=gv("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Q(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).R(.01)}return a.h}
847
+ function nv(a,b,c){if(a.g)a.g.then(function(){return nv(a,b,c)})["catch"](function(){return nv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=gd(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=pd(e.keys[0].k);e=pd(e.keys[0].kid)}else d=Ic(c),e=null;var f=gv("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
848
+ function jv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return mv(this,b,null)};q.load=function(a){return"persistent-license"==this.l?mv(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Pc;nv(this,b,a);return b};
849
+ 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=gv("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 lv(){this.size=0;this.g=void 0}q=lv.prototype;q.forEach=function(a){this.g&&a(this.g,Gg.value())};q.get=function(a){if(this.has(a))return this.g};
850
+ q.has=function(a){var b=Gg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var bv="";Xt(av);function ov(){}function pv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=qv,Object.defineProperty(a,"disablePictureInPicture",{get:rv,set:sv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=tv,document.addEventListener("webkitpresentationmodechanged",uv,!0))}}
851
+ function uv(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)}
852
+ function qv(){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 tv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
853
+ function rv(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function sv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Ut.PiPWebkit=ov;ov.install=pv;Xt(pv);function vv(){}function wv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=xv))}function xv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Ut.RandomUUID=vv;vv.install=wv;Xt(wv);function yv(){}function zv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Av)}function Av(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Ut.StorageEstimate=yv;yv.install=zv;Xt(zv);function Bv(){}function Cv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Dv})}function Dv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Ut.Symbol=Bv;Bv.install=Cv;Xt(Cv);function Ev(){}function Fv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Ut.VideoPlayPromise=Ev;Ev.install=Fv;Xt(Fv);function Gv(){}function Hv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Xc("Web0S")&&Xc("Chrome/38.0.2125.122 Safari/537.36"))&&(a.getVideoPlaybackQuality=Iv)}}function Iv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ut.VideoPlaybackQuality=Gv;Gv.install=Hv;Xt(Hv);function Jv(){}function Kv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Lv;else if(6==b)a=Mv;else{try{var c=!!Lv(1,2,"")}catch(d){c=!1}c&&(a=Lv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Lv(a,b,c){return new window.TextTrackCue(a,b,c)}function Mv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Ut.VTTCue=Jv;Jv.install=Kv;Xt(Kv);function Nv(){}Nv.prototype.parseInit=function(){};Nv.prototype.parseMedia=function(a,b){var c=null,d=[],e=gd(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Ov.exec(f))){var g=Pv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new lc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};N("shaka.text.LrcTextParser",Nv);Nv.prototype.parseMedia=Nv.prototype.parseMedia;
854
+ Nv.prototype.parseInit=Nv.prototype.parseInit;var Ov=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Pv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Gd["application/x-subtitle-lrc"]=function(){return new Nv};function Qv(){}Qv.prototype.parseInit=function(){};
855
+ Qv.prototype.parseMedia=function(a,b){var c=gd(a),d=[];if(""==c)return d;var e=Tf(c,"tt");if(!e)throw new P(2,2,2005,"Failed to parse TTML.");c=e.getElementsByTagName("body")[0];if(!c)return[];var f=Hf(e,Rv,"frameRate"),g=Hf(e,Rv,"subFrameRate"),h=Hf(e,Rv,"frameRateMultiplier"),k=Hf(e,Rv,"tickRate"),l=Hf(e,Rv,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=Hf(e,Sv,"extent");if("default"!=m&&"preserve"!=m)throw new P(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Tv(f,g,
856
+ h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Ff(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=r(e),t=p.next();!t.done;t=p.next()){var v=t.value;t=new nc;var x=v.getAttribute("xml:id");if(x){t.id=x;var y=null;n&&(y=Uv.exec(n)||Vv.exec(n));x=y?Number(y[1]):null;y=y?Number(y[2]):null;var w,D;if(w=Wv(v,h,"extent"))w=(D=Uv.exec(w))||Vv.exec(w),
857
+ null!=w&&(t.width=Number(w[1]),t.height=Number(w[2]),D||(null!=x&&(t.width=100*t.width/x),null!=y&&(t.height=100*t.height/y)),t.widthUnits=D||null!=x?Dc:0,t.heightUnits=D||null!=y?Dc:0);if(v=Wv(v,h,"origin"))w=(D=Uv.exec(v))||Vv.exec(v),null!=w&&(t.viewportAnchorX=Number(w[1]),t.viewportAnchorY=Number(w[2]),D||(null!=y&&(t.viewportAnchorY=100*t.viewportAnchorY/y),null!=x&&(t.viewportAnchorX=100*t.viewportAnchorX/x)),t.viewportAnchorUnits=D||null!=x?Dc:0)}else t=null;t&&k.push(t)}if(Cf(c,"p").length)throw new P(2,
858
+ 2,2001,"<p> can only be inside <div> in TTML");n=r(Cf(c,"div"));for(p=n.next();!p.done;p=n.next())if(Cf(p.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(c=Xv(c,b.periodStart,f,g,h,e,k,m,l,null,!1))c.backgroundColor||(c.backgroundColor="transparent"),d.push(c);return d};
859
+ function Xv(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var t=null,v=r(Yv),x=v.next();!x.done&&!(t=Zv(p,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));x=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
860
+ a=[];if(!x)for(var y=r(p.childNodes),w=y.next();!w.done;w=y.next())(w=Xv(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;y=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||y||"br"==p.tagName||0!=a.length||d&&!h))return null;w=$v(p,c);y=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=aw(n,c,y,w),y=w.start,w=w.end,n=n.parentNode;null==y&&(y=0);y+=b;w=null==w?Infinity:w+b;if(!D&&0<a.length)for(y=Infinity,w=0,b=r(a),
861
+ c=b.next();!c.done;c=b.next())c=c.value,y=Math.min(y,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new lc(y,w,""),e.lineBreak=!0,e;b="";x&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new lc(y,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Zv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
862
+ (g=Zv(l,"region",f,"")[0]);bw(b,p,g,t,e,v,0==a.length);return b}
863
+ function bw(a,b,c,d,e,f,g){f=f||g;"rtl"==cw(b,c,e,"direction",f)&&(a.direction="rtl");g=cw(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=mc);(g=cw(b,c,e,"textAlign",!0))?(a.positionAlign=dw[g],a.lineAlign=ew[g],a.textAlign=xc[g.toUpperCase()]):a.textAlign=pc;if(g=cw(b,c,e,"displayAlign",!0))a.displayAlign=yc[g.toUpperCase()];if(g=cw(b,c,e,"color",f))a.color=g;if(g=cw(b,c,e,"backgroundColor",
864
+ f))a.backgroundColor=g;if(g=cw(b,c,e,"border",f))a.border=g;if(g=cw(b,c,e,"fontFamily",f))a.fontFamily=g;(g=cw(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=cw(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=cw(b,c,e,"lineHeight",f))&&g.match(fw)&&(a.lineHeight=g);(g=cw(b,c,e,"fontSize",f))&&(g.match(fw)||g.match(gw))&&(a.fontSize=g);if(g=cw(b,c,e,"fontStyle",f))a.fontStyle=Cc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
865
+ d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=cw(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(fw)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(fw)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=cw(b,c,e,"letterSpacing",f))&&d.match(fw)&&(a.letterSpacing=d);(d=cw(b,c,e,"linePadding",f))&&d.match(fw)&&(a.linePadding=d);if(f=cw(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Wv(c,e,"textDecoration"))&&hw(a,c);(b=
866
+ iw(b,e,"textDecoration"))&&hw(a,b)}
867
+ function hw(a,b){for(var c=r(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")&&ic(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&ic(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
868
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&ic(a.textDecoration,"overline")}}function cw(a,b,c,d,e){e=void 0===e?!0:e;return(a=iw(a,c,d))?a:e?Wv(b,c,d):null}function Wv(a,b,c){if(!a)return null;var d=Hf(a,Sv,c);return d?d:jw(a,b,c)}function iw(a,b,c){var d=Hf(a,Sv,c);return d?d:jw(a,b,c)}
869
+ function jw(a,b,c){a=Zv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Gf(a[e],"urn:ebu:tt:style",c);f||(f=Hf(a[e],Sv,c));f||(f=iw(a[e],b,c));f&&(d=f)}return d}
870
+ function Zv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Gf(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function aw(a,b,c,d){a=$v(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}}
871
+ function $v(a,b){var c=kw(a.getAttribute("begin"),b),d=kw(a.getAttribute("end"),b),e=kw(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
872
+ function kw(a,b){var c=null;if(lw.test(a)){c=lw.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(mw.test(a))c=nw(mw,a);else if(ow.test(a))c=nw(ow,a);else if(pw.test(a))c=pw.exec(a),c=Number(c[1])/b.frameRate;else if(qw.test(a))c=qw.exec(a),c=Number(c[1])/b.g;else if(rw.test(a))c=nw(rw,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
873
+ function nw(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)}N("shaka.text.TtmlTextParser",Qv);Qv.prototype.parseMedia=Qv.prototype.parseMedia;Qv.prototype.parseInit=Qv.prototype.parseInit;function Tv(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]))}
874
+ var Uv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,gw=/^(\d{1,2}(?:\.\d+)?|100)%$/,fw=/^(\d+px|\d+em|\d*\.?\d+c)$/,Vv=/^(\d+)px (\d+)px$/,lw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,mw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,ow=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,pw=/^(\d*(?:\.\d*)?)f$/,qw=/^(\d*(?:\.\d*)?)t$/,rw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),ew={left:sc,center:"center",right:"end",start:sc,
875
+ end:"end"},dw={left:"line-left",center:"center",right:"line-right"},Rv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Sv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Yv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Gd["application/ttml+xml"]=function(){return new Qv};function sw(){this.g=new Qv}sw.prototype.parseInit=function(a){var b=!1;(new Qg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).box("minf",Ug).box("stbl",Ug).X("stsd",Wg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};sw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Qg).box("mdat",Xg(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new P(2,2,2007);return e};N("shaka.text.Mp4TtmlParser",sw);sw.prototype.parseMedia=sw.prototype.parseMedia;
876
+ sw.prototype.parseInit=sw.prototype.parseInit;Gd['application/mp4; codecs="stpp"']=function(){return new sw};Gd['application/mp4; codecs="stpp.ttml"']=function(){return new sw};Gd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new sw};Gd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new sw};function tw(){}tw.prototype.parseInit=function(){};
877
+ tw.prototype.parseMedia=function(a,b){var c=gd(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 P(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=uw(new Pq(e[1]));if(null==c)throw new P(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=
878
+ [];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new Pq(g);var h=new nc;Sq(g);Qq(g);for(var k=Sq(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))?
879
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Qq(g);k=Sq(g)}f.push(h)}e=new Map;vw(e);g=[];d=r(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 lc(0,0,"");for(var n=!1,p=0;p<k.length;p++){var t=
877
880
  /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(t){var v=t[2].trim().replace(";","");switch(t[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=vc;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
878
- !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 Nq(h[0]);m=sw(k);t=Pq(k,/[ \t]+--\x3e[ \t]+/g);n=sw(k);if(null==m||null==t||null==n)throw new P(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=
879
- ""):h=new lc(m,n,"");uw(p,h,e);Oq(k);for(m=Qq(k);m;)vw(h,m,f),Oq(k),m=Qq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function tw(a){for(var b=r(Object.entries(Ac)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new lc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(Bc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new lc(0,0,""),e.backgroundColor=d,a.set(c,e)}
880
- function uw(a,b,c){0===c.size&&tw(c);a=ww(a);var d=Do("<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=r(d);for(d=a.next();!d.done;d=a.next())xw(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
881
- function ww(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 yw(a,b){return a&&0<a.length?a:b}
882
- function xw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=yw(h.backgroundColor,e.backgroundColor),e.color=yw(h.color,e.color),e.fontFamily=yw(h.fontFamily,e.fontFamily),e.fontSize=yw(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=
883
- "italic";break;case "u":e.textDecoration.push("underline")}}if(to(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())xw(a.value,e,c,d)}
884
- function vw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=pc:a.textAlign=xc[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"==
885
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=zw(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=zc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=rc,a.line=Number(c[1]),c[2]&&(a.lineAlign=zc[c[2].toUpperCase()])}function zw(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
886
- function sw(a){a=Pq(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)}N("shaka.text.VttTextParser",rw);rw.prototype.parseMedia=rw.prototype.parseMedia;rw.prototype.parseInit=rw.prototype.parseInit;Gd["text/vtt"]=function(){return new rw};Gd['text/vtt; codecs="vtt"']=function(){return new rw};Gd['text/vtt; codecs="wvtt"']=function(){return new rw};function Aw(){this.g=null}Aw.prototype.parseInit=function(a){var b=this,c=!1;(new vg).box("moov",zg).box("trak",zg).box("mdia",zg).X("mdhd",function(d){d=Mh(d.reader,d.version);b.g=d.timescale}).box("minf",zg).box("stbl",zg).X("stsd",Bg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};
887
- Aw.prototype.parseMedia=function(a,b){if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new vg).box("moof",zg).box("traf",zg).X("tfdt",function(B){g=!0;c=Lh(B.reader,B.version).Rd}).X("tfhd",function(B){l=Kh(B.reader,B.flags).We}).X("trun",function(B){h=!0;d=Nh(B.reader,B.version,B.flags).uf}).box("mdat",Cg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);for(var m=c,n=new sg(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var v=t.me||l,x=t.vd?
888
- c+t.vd:m;m=x+(v||0);var y=0;do{var w=n.P();y+=w;var D=n.P(),z=null;"vttc"==Dg(D)?8<w&&(z=n.Cb(w-8)):n.skip(w-8);v&&z&&(w=Bw(z,b.periodStart+x/this.g,b.periodStart+m/this.g),f.push(w))}while(t.sampleSize&&y<t.sampleSize)}return f.filter(Fb)};function Bw(a,b,c){var d,e,f;(new vg).box("payl",Cg(function(g){d=gd(g)})).box("iden",Cg(function(g){e=gd(g)})).box("sttg",Cg(function(g){f=gd(g)})).parse(a);return d?Cw(d,e,f,b,c):null}
889
- function Cw(a,b,c,d,e){d=new lc(d,e,"");uw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Nq(c),b=Qq(a);b;)vw(d,b,[]),Oq(a),b=Qq(a);return d}N("shaka.text.Mp4VttParser",Aw);Aw.prototype.parseMedia=Aw.prototype.parseMedia;Aw.prototype.parseInit=Aw.prototype.parseInit;Gd['application/mp4; codecs="wvtt"']=function(){return new Aw};function Dw(){}Dw.prototype.parseInit=function(){};Dw.prototype.parseMedia=function(a){var b=gd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Nq(c[0]),e=Ew(d),f=Pq(d,/,/g);d=Ew(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new lc(e,d,c.slice(1).join("\n").trim()))}return a};
890
- function Ew(a){a=Pq(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)}N("shaka.text.SbvTextParser",Dw);Dw.prototype.parseMedia=Dw.prototype.parseMedia;Dw.prototype.parseInit=Dw.prototype.parseInit;Gd["text/x-subviewer"]=function(){return new Dw};function Fw(){this.g=new rw}Fw.prototype.parseInit=function(){};Fw.prototype.parseMedia=function(a,b){var c=gd(a);c=Gw(c);c=Ic(kd(c));return this.g.parseMedia(c,b)};function Gw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}N("shaka.text.SrtTextParser",Fw);Fw.srt2webvtt=Gw;Fw.prototype.parseMedia=Fw.prototype.parseMedia;
891
- Fw.prototype.parseInit=Fw.prototype.parseInit;Gd["text/srt"]=function(){return new Fw};function Hw(){}Hw.prototype.parseInit=function(){};
892
- Hw.prototype.parseMedia=function(a){var b="",c="";a=gd(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Iw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Jw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Kw);else if("Style"==e){e=f.split(Kw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
893
- [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Od:e.Od},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Jw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Kw);else if("Dialogue"==f){g=g.split(Kw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Lw(f.Start);var k=Lw(f.End);g=new lc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Od=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Od}}(e)))&&Mw(g,f);d.push(g)}return d};
894
- function Mw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Nw(c))a.color=c;if(c=b.BackColour)if(c=Nw(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=tc;a.textAlign="start";break;case 2:a.displayAlign=tc;a.textAlign=pc;break;case 3:a.displayAlign=tc;a.textAlign="end";
881
+ !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 Pq(h[0]);m=uw(k);t=Rq(k,/[ \t]+--\x3e[ \t]+/g);n=uw(k);if(null==m||null==t||null==n)throw new P(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=
882
+ ""):h=new lc(m,n,"");ww(p,h,e);Qq(k);for(m=Sq(k);m;)xw(h,m,f),Qq(k),m=Sq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function vw(a){for(var b=r(Object.entries(Ac)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new lc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(Bc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new lc(0,0,""),e.backgroundColor=d,a.set(c,e)}
883
+ function ww(a,b,c){0===c.size&&vw(c);a=yw(a);var d=Tf("<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=r(d);for(d=a.next();!d.done;d=a.next())zw(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
884
+ function yw(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 Aw(a,b){return a&&0<a.length?a:b}
885
+ function zw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=Aw(h.backgroundColor,e.backgroundColor),e.color=Aw(h.color,e.color),e.fontFamily=Aw(h.fontFamily,e.fontFamily),e.fontSize=Aw(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=
886
+ "italic";break;case "u":e.textDecoration.push("underline")}}if(Jf(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())zw(a.value,e,c,d)}
887
+ function xw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=pc:a.textAlign=xc[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"==
888
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Bw(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=zc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=rc,a.line=Number(c[1]),c[2]&&(a.lineAlign=zc[c[2].toUpperCase()])}function Bw(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
889
+ function uw(a){a=Rq(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)}N("shaka.text.VttTextParser",tw);tw.prototype.parseMedia=tw.prototype.parseMedia;tw.prototype.parseInit=tw.prototype.parseInit;Gd["text/vtt"]=function(){return new tw};Gd['text/vtt; codecs="vtt"']=function(){return new tw};Gd['text/vtt; codecs="wvtt"']=function(){return new tw};function Cw(){this.g=null}Cw.prototype.parseInit=function(a){var b=this,c=!1;(new Qg).box("moov",Ug).box("trak",Ug).box("mdia",Ug).X("mdhd",function(d){d=gi(d.reader,d.version);b.g=d.timescale}).box("minf",Ug).box("stbl",Ug).X("stsd",Wg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};
890
+ Cw.prototype.parseMedia=function(a,b){if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Qg).box("moof",Ug).box("traf",Ug).X("tfdt",function(B){g=!0;c=fi(B.reader,B.version).Ud}).X("tfhd",function(B){l=ei(B.reader,B.flags).Ze}).X("trun",function(B){h=!0;d=hi(B.reader,B.version,B.flags).yf}).box("mdat",Xg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);for(var m=c,n=new Ng(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var v=t.qe||l,x=t.wd?
891
+ c+t.wd:m;m=x+(v||0);var y=0;do{var w=n.P();y+=w;var D=n.P(),z=null;"vttc"==Yg(D)?8<w&&(z=n.Cb(w-8)):n.skip(w-8);v&&z&&(w=Dw(z,b.periodStart+x/this.g,b.periodStart+m/this.g),f.push(w))}while(t.sampleSize&&y<t.sampleSize)}return f.filter(Fb)};function Dw(a,b,c){var d,e,f;(new Qg).box("payl",Xg(function(g){d=gd(g)})).box("iden",Xg(function(g){e=gd(g)})).box("sttg",Xg(function(g){f=gd(g)})).parse(a);return d?Ew(d,e,f,b,c):null}
892
+ function Ew(a,b,c,d,e){d=new lc(d,e,"");ww(a,d,new Map);b&&(d.id=b);if(c)for(a=new Pq(c),b=Sq(a);b;)xw(d,b,[]),Qq(a),b=Sq(a);return d}N("shaka.text.Mp4VttParser",Cw);Cw.prototype.parseMedia=Cw.prototype.parseMedia;Cw.prototype.parseInit=Cw.prototype.parseInit;Gd['application/mp4; codecs="wvtt"']=function(){return new Cw};function Fw(){}Fw.prototype.parseInit=function(){};Fw.prototype.parseMedia=function(a){var b=gd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Pq(c[0]),e=Gw(d),f=Rq(d,/,/g);d=Gw(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new lc(e,d,c.slice(1).join("\n").trim()))}return a};
893
+ function Gw(a){a=Rq(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)}N("shaka.text.SbvTextParser",Fw);Fw.prototype.parseMedia=Fw.prototype.parseMedia;Fw.prototype.parseInit=Fw.prototype.parseInit;Gd["text/x-subviewer"]=function(){return new Fw};function Hw(){this.g=new tw}Hw.prototype.parseInit=function(){};Hw.prototype.parseMedia=function(a,b){var c=gd(a);c=Iw(c);c=Ic(kd(c));return this.g.parseMedia(c,b)};function Iw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}N("shaka.text.SrtTextParser",Hw);Hw.srt2webvtt=Iw;Hw.prototype.parseMedia=Hw.prototype.parseMedia;
894
+ Hw.prototype.parseInit=Hw.prototype.parseInit;Gd["text/srt"]=function(){return new Hw};function Jw(){}Jw.prototype.parseInit=function(){};
895
+ Jw.prototype.parseMedia=function(a){var b="",c="";a=gd(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Kw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Lw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Mw);else if("Style"==e){e=f.split(Mw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
896
+ [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Pd:e.Pd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Lw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Mw);else if("Dialogue"==f){g=g.split(Mw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Nw(f.Start);var k=Nw(f.End);g=new lc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Pd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Pd}}(e)))&&Ow(g,f);d.push(g)}return d};
897
+ function Ow(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Pw(c))a.color=c;if(c=b.BackColour)if(c=Pw(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=tc;a.textAlign="start";break;case 2:a.displayAlign=tc;a.textAlign=pc;break;case 3:a.displayAlign=tc;a.textAlign="end";
895
898
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=pc;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=pc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
896
- function Nw(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 Lw(a){a=Ow.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}N("shaka.text.SsaTextParser",Hw);Hw.prototype.parseMedia=Hw.prototype.parseMedia;Hw.prototype.parseInit=Hw.prototype.parseInit;var Iw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Jw=/^\s*([^:]+):\s*(.*)/,Kw=/\s*,\s*/,Ow=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
897
- Gd["text/x-ssa"]=function(){return new Hw};/*
899
+ function Pw(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 Nw(a){a=Qw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}N("shaka.text.SsaTextParser",Jw);Jw.prototype.parseMedia=Jw.prototype.parseMedia;Jw.prototype.parseInit=Jw.prototype.parseInit;var Kw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Lw=/^\s*([^:]+):\s*(.*)/,Mw=/\s*,\s*/,Qw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
900
+ Gd["text/x-ssa"]=function(){return new Jw};/*
898
901
  @license
899
902
  EME Encryption Scheme Polyfill
900
903
  Copyright 2019 Google LLC
901
904
  SPDX-License-Identifier: Apache-2.0
902
905
  */
903
- function Pw(){}var Qw;function Rw(){Qw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Qw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Sw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
904
- function Sw(a,b){var c=this,d;return M(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),A(e,Qw.call(c,a,b),2);d=e.h;if(Tw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Qw,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Uw;return e["return"](Uw.call(c,
906
+ function Rw(){}var Sw;function Tw(){Sw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Sw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Uw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
907
+ function Uw(a,b){var c=this,d;return M(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),A(e,Sw.call(c,a,b),2);d=e.h;if(Vw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Sw,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Ww;return e["return"](Ww.call(c,
905
908
  a,b))})}
906
- function Uw(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return M(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Vw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Ww(h.videoCapabilities,d),l=Ww(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."),
907
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return A(t,Qw.call(c,a,e),2)}p=t.h;return t["return"](new Xw(p,d))})}function Ww(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}N("EmeEncryptionSchemePolyfill",Pw);Pw.install=Rw;function Yw(){}var Zw;
908
- function $w(){Zw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Zw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=ax):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
909
- function ax(a){var b=this,c,d,e;return M(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),A(f,Zw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&Tw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Zw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
910
- navigator.mediaCapabilities.decodingInfo=bx;if(d){f.D(3);break}e=c;return A(f,cx(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](bx.call(b,a))}})}
911
- function bx(a){var b=this,c,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Vw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):A(m,Zw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
912
- new Xw(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return A(m,cx(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
913
- function cx(a){var b,c;return M(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return A(d,
914
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}N("McEncryptionSchemePolyfill",Yw);Yw.install=$w;function Xw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
915
- Xw.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Xw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
916
- function Vw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Tw(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}
917
- function dx(){}function au(){Rw();$w()}N("EncryptionSchemePolyfills",dx);dx.install=au;"undefined"!==typeof module&&module.exports&&(module.exports=dx);/*
909
+ function Ww(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return M(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Xw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Yw(h.videoCapabilities,d),l=Yw(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."),
910
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return A(t,Sw.call(c,a,e),2)}p=t.h;return t["return"](new Zw(p,d))})}function Yw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}N("EmeEncryptionSchemePolyfill",Rw);Rw.install=Tw;function $w(){}var ax;
911
+ function bx(){ax?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(ax=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=cx):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
912
+ function cx(a){var b=this,c,d,e;return M(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),A(f,ax.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&Vw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=ax,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
913
+ navigator.mediaCapabilities.decodingInfo=dx;if(d){f.D(3);break}e=c;return A(f,ex(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](dx.call(b,a))}})}
914
+ function dx(a){var b=this,c,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Xw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):A(m,ax.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
915
+ new Zw(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return A(m,ex(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
916
+ function ex(a){var b,c;return M(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return A(d,
917
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}N("McEncryptionSchemePolyfill",$w);$w.install=bx;function Zw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
918
+ Zw.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Zw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
919
+ function Xw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Vw(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}
920
+ function fx(){}function cu(){Tw();bx()}N("EncryptionSchemePolyfills",fx);fx.install=cu;"undefined"!==typeof module&&module.exports&&(module.exports=fx);/*
918
921
  @license
919
922
  Copyright 2013 Ali Al Dallal
920
923
 
@@ -938,7 +941,7 @@ function dx(){}function au(){Rw();$w()}N("EncryptionSchemePolyfills",dx);dx.inst
938
941
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
939
942
  SOFTWARE.
940
943
  */
941
- for(var ex={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
944
+ for(var gx={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
942
945
  "ar-SA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",u:"Arabic (Saudi Arabia)"},"ay-BO":{s:"Aymar aru",u:"Aymara"},az:{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"az-AZ":{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"be-BY":{s:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",u:"Belarusian"},bg:{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",u:"Bulgarian"},"bg-BG":{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
943
946
  u:"Bulgarian"},bn:{s:"\u09ac\u09be\u0982\u09b2\u09be",u:"Bengali"},"bn-IN":{s:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",u:"Bengali (India)"},"bn-BD":{s:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",u:"Bengali (Bangladesh)"},"bs-BA":{s:"Bosanski",u:"Bosnian"},ca:{s:"Catal\u00e0",u:"Catalan"},"ca-ES":{s:"Catal\u00e0",u:"Catalan"},cak:{s:"Maya Kaqchikel",u:"Kaqchikel"},"ck-US":{s:"\u13e3\u13b3\u13a9 (tsalagi)",u:"Cherokee"},cs:{s:"\u010ce\u0161tina",
944
947
  u:"Czech"},"cs-CZ":{s:"\u010ce\u0161tina",u:"Czech"},cy:{s:"Cymraeg",u:"Welsh"},"cy-GB":{s:"Cymraeg",u:"Welsh"},da:{s:"Dansk",u:"Danish"},"da-DK":{s:"Dansk",u:"Danish"},de:{s:"Deutsch",u:"German"},"de-AT":{s:"Deutsch (\u00d6sterreich)",u:"German (Austria)"},"de-DE":{s:"Deutsch (Deutschland)",u:"German (Germany)"},"de-CH":{s:"Deutsch (Schweiz)",u:"German (Switzerland)"},dsb:{s:"Dolnoserb\u0161\u0107ina",u:"Lower Sorbian"},el:{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",u:"Greek"},"el-GR":{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
@@ -959,54 +962,54 @@ u:"Slovak"},"sk-SK":{s:"Sloven\u010dina (Slovakia)",u:"Slovak (Slovakia)"},sl:{s
959
962
  sw:{s:"Kiswahili",u:"Swahili"},"sw-KE":{s:"Kiswahili",u:"Swahili (Kenya)"},ta:{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},"ta-IN":{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},te:{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},"te-IN":{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},tg:{s:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",u:"Tajik"},"tg-TJ":{s:"\u0442\u043e\u04b7\u0438\u043a\u04e3",u:"Tajik"},th:{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
960
963
  u:"Thai"},"th-TH":{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",u:"Thai (Thailand)"},tl:{s:"Filipino",u:"Filipino"},"tl-PH":{s:"Filipino",u:"Filipino"},tlh:{s:"tlhIngan-Hol",u:"Klingon"},tr:{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tr-TR":{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tt-RU":{s:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",u:"Tatar"},uk:{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",u:"Ukrainian"},"uk-UA":{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
961
964
  u:"Ukrainian"},ur:{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},"ur-PK":{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},uz:{s:"O'zbek",u:"Uzbek"},"uz-UZ":{s:"O'zbek",u:"Uzbek"},vi:{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"vi-VN":{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"xh-ZA":{s:"isiXhosa",u:"Xhosa"},yi:{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",u:"Yiddish"},"yi-DE":{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",u:"Yiddish (German)"},zh:{s:"\u4e2d\u6587",u:"Chinese"},"zh-HANS":{s:"\u4e2d\u6587\u7b80\u4f53",
962
- u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},fx=r(Object.keys(ex)),gx=fx.next();!gx.done;gx=
963
- fx.next()){var hx=gx.value;ex[hx.toLowerCase()]=ex[hx]};function V(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new qf;this.localization=this.controls.Ba;this.player=this.controls.ac();this.video=this.controls.Bb();this.adManager=this.player.bd();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
964
- V.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};N("shaka.ui.Element",V);V.prototype.release=V.prototype.release;function ix(a){return jx(a,"shaka-back-to-overflow-button")}function jx(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function kx(a){a&&(a=jx(a,"shaka-chosen-item"))&&a.parentElement.focus()}function lx(){var a=S("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
965
- function mx(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function nx(a,b){V.call(this,a,b);var c=this;this.i=S("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=S("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Q(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=mx(e-d,!1)+" / "+mx(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
966
- ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.za();c.g.ha(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.za(),this.g.ha(.5))}u(nx,V);nx.prototype.release=function(){this.g.stop();this.g=null;V.prototype.release.call(this)};N("shaka.ui.AdCounter",nx);function ox(a,b){V.call(this,a,b);var c=this;this.g=S("div");this.g.classList.add("shaka-ad-position");X(this.g,!1);this.parent.appendChild(this.g);this.h=S("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&px(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&px(c)});this.eventManager.o(this.adManager,"ad-started",function(){px(c)});this.eventManager.o(this.adManager,
967
- "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&px(this)}u(ox,V);function px(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}N("shaka.ui.AdPosition",ox);function qx(a,b){V.call(this,a,b);var c=this;this.button=Xj();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
968
- c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?rx(c.controls):sx(c.controls)});this.ad&&(this.g(),this.h())}u(qx,V);qx.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.$;return a};qx.prototype.g=function(){};qx.prototype.h=function(){};
969
- N("shaka.ui.PlayButton",qx);function tx(a,b){qx.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}u(tx,qx);tx.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};tx.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};N("shaka.ui.BigPlayButton",tx);function ux(a,b){V.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=S("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";X(c.g,!0)}else X(c.g,
970
- !1)});this.eventManager.o(window,"click",function(){X(c.g,!1)});vx(this)}u(ux,V);ux.prototype.release=function(){this.h=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];V.prototype.release.call(this)};function wx(a,b){xx.set(a,b)}function vx(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=xx.get(c);d?a.i.push(d.create(a.g,a.controls)):Sa("Unrecognized context menu element:",c)}}N("shaka.ui.ContextMenu",ux);
971
- ux.registerElement=wx;var xx=new Map;function yx(a,b,c,d){V.call(this,a,b);var e=this;this.container=S("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ia(c));this.g=!1;this.bar=document.createElement("input");this.l=new Q(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ia(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
972
- this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Ob()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Ob()&&(e.g=!0,zx(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(zx(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,zx(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
973
- "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}u(yx,V);q=yx.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);V.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.S(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
974
- q.setValue=function(a){this.g||(this.bar.value=a)};function zx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}N("shaka.ui.RangeElement",yx);yx.prototype.setValue=yx.prototype.setValue;yx.prototype.getValue=yx.prototype.getValue;yx.prototype.changeTo=yx.prototype.changeTo;yx.prototype.onChangeEnd=yx.prototype.onChangeEnd;yx.prototype.onChange=yx.prototype.onChange;
975
- yx.prototype.onChangeStart=yx.prototype.onChangeStart;yx.prototype.setRange=yx.prototype.setRange;function Ax(a,b){yx.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=S("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new Q(function(){c.video.currentTime=c.getValue()});this.A=new Q(function(){Bx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Cx(c)});this.eventManager.o(this.localization,
976
- "locale-changed",function(){return Cx(c)});this.eventManager.o(this.adManager,"ad-started",function(){Dx(c)||X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Dx(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Ex(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Ex(c)});this.setValue(this.video.currentTime);this.update();Cx(this);this.ad&&X(this.container,!1)}u(Ax,yx);q=Ax.prototype;
977
- q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);yx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.xe(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.S(.125))};q.onChangeEnd=function(){this.h.za();this.controls.xe(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
978
- q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.La(),g=f.end-f.start;this.setRange(f.start,f.end);Dx(this)?(X(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
965
+ u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},hx=r(Object.keys(gx)),ix=hx.next();!ix.done;ix=
966
+ hx.next()){var jx=ix.value;gx[jx.toLowerCase()]=gx[jx]};function V(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new qf;this.localization=this.controls.Ba;this.player=this.controls.ac();this.video=this.controls.Bb();this.adManager=this.player.cd();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
967
+ V.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};N("shaka.ui.Element",V);V.prototype.release=V.prototype.release;function kx(a){return lx(a,"shaka-back-to-overflow-button")}function lx(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function mx(a){a&&(a=lx(a,"shaka-chosen-item"))&&a.parentElement.focus()}function nx(){var a=S("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
968
+ function ox(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function px(a,b){V.call(this,a,b);var c=this;this.i=S("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=S("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Q(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=ox(e-d,!1)+" / "+ox(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
969
+ ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.za();c.g.ha(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.za(),this.g.ha(.5))}u(px,V);px.prototype.release=function(){this.g.stop();this.g=null;V.prototype.release.call(this)};N("shaka.ui.AdCounter",px);function qx(a,b){V.call(this,a,b);var c=this;this.g=S("div");this.g.classList.add("shaka-ad-position");X(this.g,!1);this.parent.appendChild(this.g);this.h=S("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&rx(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&rx(c)});this.eventManager.o(this.adManager,"ad-started",function(){rx(c)});this.eventManager.o(this.adManager,
970
+ "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&rx(this)}u(qx,V);function rx(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}N("shaka.ui.AdPosition",qx);function sx(a,b){V.call(this,a,b);var c=this;this.button=sk();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
971
+ c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?tx(c.controls):ux(c.controls)});this.ad&&(this.g(),this.h())}u(sx,V);sx.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.$;return a};sx.prototype.g=function(){};sx.prototype.h=function(){};
972
+ N("shaka.ui.PlayButton",sx);function vx(a,b){sx.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}u(vx,sx);vx.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};vx.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};N("shaka.ui.BigPlayButton",vx);function wx(a,b){V.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=S("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";X(c.g,!0)}else X(c.g,
973
+ !1)});this.eventManager.o(window,"click",function(){X(c.g,!1)});xx(this)}u(wx,V);wx.prototype.release=function(){this.h=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];V.prototype.release.call(this)};function yx(a,b){zx.set(a,b)}function xx(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=zx.get(c);d?a.i.push(d.create(a.g,a.controls)):Sa("Unrecognized context menu element:",c)}}N("shaka.ui.ContextMenu",wx);
974
+ wx.registerElement=yx;var zx=new Map;function Ax(a,b,c,d){V.call(this,a,b);var e=this;this.container=S("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ia(c));this.g=!1;this.bar=document.createElement("input");this.l=new Q(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ia(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
975
+ this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Ob()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Ob()&&(e.g=!0,Bx(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(Bx(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,Bx(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
976
+ "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}u(Ax,V);q=Ax.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);V.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.R(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
977
+ q.setValue=function(a){this.g||(this.bar.value=a)};function Bx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}N("shaka.ui.RangeElement",Ax);Ax.prototype.setValue=Ax.prototype.setValue;Ax.prototype.getValue=Ax.prototype.getValue;Ax.prototype.changeTo=Ax.prototype.changeTo;Ax.prototype.onChangeEnd=Ax.prototype.onChangeEnd;Ax.prototype.onChange=Ax.prototype.onChange;
978
+ Ax.prototype.onChangeStart=Ax.prototype.onChangeStart;Ax.prototype.setRange=Ax.prototype.setRange;function Cx(a,b){Ax.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=S("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new Q(function(){c.video.currentTime=c.getValue()});this.A=new Q(function(){Dx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Ex(c)});this.eventManager.o(this.localization,
979
+ "locale-changed",function(){return Ex(c)});this.eventManager.o(this.adManager,"ad-started",function(){Fx(c)||X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Fx(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Gx(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Gx(c)});this.setValue(this.video.currentTime);this.update();Ex(this);this.ad&&X(this.container,!1)}u(Cx,Ax);q=Cx.prototype;
980
+ q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);Ax.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Ae(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.R(.125))};q.onChangeEnd=function(){this.h.za();this.controls.Ae(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
981
+ q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.La(),g=f.end-f.start;this.setRange(f.start,f.end);Fx(this)?(X(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
979
982
  a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):X(this.container,!1)};
980
- function Bx(a){if(a.i.length){for(var b=a.player.La(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
981
- 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function Ex(a){Bx(a);var b=a.player.La();b=b.end-b.start;a.player.T()&&5<b&&a.A.ha(1)}function Dx(a){var b=a.player.La();b=b.end-b.start;return a.player.T()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Cx(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}N("shaka.ui.SeekBar",Ax);function Fx(){}
982
- Fx.prototype.create=function(a,b){return new Ax(a,b)};Ax.Factory=Fx;function Y(a,b,c,d){cb.call(this);var e=this;this.W=!0;this.i=d;this.B=new Dn(c,a,this.i.castReceiverAppId);this.hb=!0;this.A=this.B.Bb();this.C=c;this.F=this.B.ac();this.Aa=a;this.j=b;this.Xa=this.F.bd();this.m=this.l=null;this.$=!1;this.G=[];this.wb=[];this.jb=!1;this.aa=new Q(function(){e.j.style.cursor="none";e.jb=!1;Gx(e)});this.ma=new Q(function(){e.g.removeAttribute("shown");e.I.S(2)});this.I=new Q(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.Oa=new Q(function(){e.Ob()&&
983
- Hx(e)});this.J=null;this.H=[];this.Ba=Ix();this.h=new qf;this.configure(this.i);Jx(this);this.na=new Set;Kx(this);this.Oa.ha(.125);this.h.o(this.Ba,"locale-changed",function(f){e.Xa.setLocale(f.locales[0])})}u(Y,cb);q=Y.prototype;
984
- q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.C){b.D(2);break}return A(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ma&&(a.ma.stop(),a.ma=null);a.I&&(a.I.stop(),a.I=null);a.Oa&&(a.Oa.stop(),a.Oa=null);Lx(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.B){b.D(4);break}return A(b,a.B.destroy(),5);case 5:a.B=null;case 4:if(!a.Aa){b.D(6);break}return A(b,a.Aa.destroy(),7);case 7:a.Aa=
985
- null;case 6:a.F=null,a.C=null,a.A=null,a.Ba=null,a.na.clear(),cb.prototype.release.call(a),C(b)}})};function Lx(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function Mx(a,b){Nx.set(a,b)}q.Lf=function(a){this.hb=a;Kx(this)};q.Fg=function(){Gx(this)};
986
- q.configure=function(a){this.i=a;this.B.Se(a.castReceiverAppId);this.m&&(this.m=null);this.fb&&(this.fb=null);this.Ya&&(this.Ya=null);this.g?(Yj(this.g),Lx(this)):(Ox(this),Px(this));this.j.classList.add("shaka-video-container");this.C.classList.add("shaka-video");Qx(this);this.i.addBigPlayButton&&Rx(this);this.i.customContextMenu&&(this.Ya=new ux(this.Z,this),this.H.push(this.Ya));this.ba||Sx(this);this.ib=S("div");this.ib.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.ib);
987
- Tx(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Ux(this);this.wb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Gx(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.o(b,"click",c);this.h.o(b,"dblclick",c)}};
988
- q.se=function(a){(this.W=a)?(this.j.setAttribute("shaka-controls","true"),this.C.tabIndex=-1,this.C.controls=!1):this.j.removeAttribute("shaka-controls");Gx(this)};q.yf=function(a){this.C.controls=a;this.C.tabIndex=a?0:-1;a&&this.se(!1)};q.getAd=function(){return this.l};q.Xf=function(){return this.B};q.jg=function(){return this.Ba};q.zg=function(){return this.j};q.Bb=function(){return this.A};q.ig=function(){return this.C};q.ac=function(){return this.F};q.hg=function(){return this.Aa};q.cg=function(){return this.g};
989
- q.rg=function(){return this.ib};q.Zf=function(){return this.R};q.$f=function(){return this.i};q.Eg=function(){return this.$};q.xe=function(a){this.$=a};q.Cg=function(){return this.hb};q.bf=function(){return this.m?this.m.getValue():this.A.currentTime};q.zf=function(a){this.J=a};q.Wc=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.cc=function(){this.I.za()};
990
- q.De=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),A(c,document.exitFullscreen(),0);E(c,4);if(!document.pictureInPictureElement){c.D(6);break}return A(c,document.exitPictureInPicture(),6);case 6:return A(c,a.j.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){c.D(9);break}E(c,10);return A(c,screen.orientation.lock("landscape"),12);case 12:va(c,
991
- 9,4);break;case 10:I(c,4);case 9:va(c,0);break;case 4:b=I(c),a.dispatchEvent(new O("error",(new Map).set("detail",b))),c.D(0)}})};q.Bf=function(){X(this.K,!0);X(this.R,!0);this.g.setAttribute("ad-active","true")};q.ef=function(){X(this.K,!1);X(this.R,!1);this.g.removeAttribute("ad-active")};function sx(a){a.W&&a.A.duration&&(a.F.Pe(),a.A.paused&&!a.$?a.A.play():a.A.pause())}function rx(a){a.l&&a.l.isPaused()?a.l.play():a.l&&a.l.pause()}
992
- function Ox(a){a.g=S("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.A.duration&&(a.Ob()?a.J=Date.now():(Vx(a,b),b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){Wx(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&document.fullscreenEnabled&&a.De()})}
993
- function Rx(a){var b=S("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.fb=new tx(b,a);a.H.push(a.fb)}function Qx(a){var b=S("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Xx(a){a.K=S("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.l&&a.l.isLinear();X(a.K,b);a.N.appendChild(a.K);b=new ox(a.K,a);a.H.push(b);b=new nx(a.K,a);a.H.push(b)}
994
- function Sx(a){a.ba=S("div");a.ba.classList.add("shaka-spinner-container");a.j.appendChild(a.ba);var b=S("div");b.classList.add("shaka-spinner");a.ba.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
983
+ function Dx(a){if(a.i.length){for(var b=a.player.La(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
984
+ 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function Gx(a){Dx(a);var b=a.player.La();b=b.end-b.start;a.player.T()&&5<b&&a.A.ha(1)}function Fx(a){var b=a.player.La();b=b.end-b.start;return a.player.T()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Ex(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}N("shaka.ui.SeekBar",Cx);function Hx(){}
985
+ Hx.prototype.create=function(a,b){return new Cx(a,b)};Cx.Factory=Hx;function Y(a,b,c,d){cb.call(this);var e=this;this.W=!0;this.i=d;this.B=new Zn(c,a,this.i.castReceiverAppId);this.gb=!0;this.A=this.B.Bb();this.C=c;this.F=this.B.ac();this.Aa=a;this.j=b;this.Wa=this.F.cd();this.m=this.l=null;this.$=!1;this.G=[];this.wb=[];this.ib=!1;this.aa=new Q(function(){e.j.style.cursor="none";e.ib=!1;Ix(e)});this.ma=new Q(function(){e.g.removeAttribute("shown");e.I.R(2)});this.I=new Q(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.Oa=new Q(function(){e.Ob()&&
986
+ Jx(e)});this.J=null;this.H=[];this.Ba=Kx();this.h=new qf;this.configure(this.i);Lx(this);this.na=new Set;Mx(this);this.Oa.ha(.125);this.h.o(this.Ba,"locale-changed",function(f){e.Wa.setLocale(f.locales[0])})}u(Y,cb);q=Y.prototype;
987
+ q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.C){b.D(2);break}return A(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ma&&(a.ma.stop(),a.ma=null);a.I&&(a.I.stop(),a.I=null);a.Oa&&(a.Oa.stop(),a.Oa=null);Nx(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.B){b.D(4);break}return A(b,a.B.destroy(),5);case 5:a.B=null;case 4:if(!a.Aa){b.D(6);break}return A(b,a.Aa.destroy(),7);case 7:a.Aa=
988
+ null;case 6:a.F=null,a.C=null,a.A=null,a.Ba=null,a.na.clear(),cb.prototype.release.call(a),C(b)}})};function Nx(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function Ox(a,b){Px.set(a,b)}q.Pf=function(a){this.gb=a;Mx(this)};q.Jg=function(){Ix(this)};
989
+ q.configure=function(a){this.i=a;this.B.Ve(a.castReceiverAppId);this.m&&(this.m=null);this.eb&&(this.eb=null);this.Xa&&(this.Xa=null);this.g?(tk(this.g),Nx(this)):(Qx(this),Rx(this));this.j.classList.add("shaka-video-container");this.C.classList.add("shaka-video");Sx(this);this.i.addBigPlayButton&&Tx(this);this.i.customContextMenu&&(this.Xa=new wx(this.Z,this),this.H.push(this.Xa));this.ba||Ux(this);this.hb=S("div");this.hb.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.hb);
990
+ Vx(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Wx(this);this.wb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Ix(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.o(b,"click",c);this.h.o(b,"dblclick",c)}};
991
+ q.we=function(a){(this.W=a)?(this.j.setAttribute("shaka-controls","true"),this.C.tabIndex=-1,this.C.controls=!1):this.j.removeAttribute("shaka-controls");Ix(this)};q.Cf=function(a){this.C.controls=a;this.C.tabIndex=a?0:-1;a&&this.we(!1)};q.getAd=function(){return this.l};q.ag=function(){return this.B};q.ng=function(){return this.Ba};q.Dg=function(){return this.j};q.Bb=function(){return this.A};q.mg=function(){return this.C};q.ac=function(){return this.F};q.lg=function(){return this.Aa};q.gg=function(){return this.g};
992
+ q.wg=function(){return this.hb};q.dg=function(){return this.S};q.eg=function(){return this.i};q.Ig=function(){return this.$};q.Ae=function(a){this.$=a};q.Gg=function(){return this.gb};q.ef=function(){return this.m?this.m.getValue():this.A.currentTime};q.Df=function(a){this.J=a};q.Xc=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.cc=function(){this.I.za()};
993
+ q.Ge=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),A(c,document.exitFullscreen(),0);E(c,4);if(!document.pictureInPictureElement){c.D(6);break}return A(c,document.exitPictureInPicture(),6);case 6:return A(c,a.j.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){c.D(9);break}E(c,10);return A(c,screen.orientation.lock("landscape"),12);case 12:va(c,
994
+ 9,4);break;case 10:I(c,4);case 9:va(c,0);break;case 4:b=I(c),a.dispatchEvent(new O("error",(new Map).set("detail",b))),c.D(0)}})};q.Ff=function(){X(this.K,!0);X(this.S,!0);this.g.setAttribute("ad-active","true")};q.jf=function(){X(this.K,!1);X(this.S,!1);this.g.removeAttribute("ad-active")};function ux(a){a.W&&a.A.duration&&(a.F.Se(),a.A.paused&&!a.$?a.A.play():a.A.pause())}function tx(a){a.l&&a.l.isPaused()?a.l.play():a.l&&a.l.pause()}
995
+ function Qx(a){a.g=S("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.A.duration&&(a.Ob()?a.J=Date.now():(Xx(a,b),b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){Yx(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&document.fullscreenEnabled&&a.Ge()})}
996
+ function Tx(a){var b=S("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.eb=new vx(b,a);a.H.push(a.eb)}function Sx(a){var b=S("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Zx(a){a.K=S("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.l&&a.l.isLinear();X(a.K,b);a.N.appendChild(a.K);b=new qx(a.K,a);a.H.push(b);b=new px(a.K,a);a.H.push(b)}
997
+ function Ux(a){a.ba=S("div");a.ba.classList.add("shaka-spinner-container");a.j.appendChild(a.ba);var b=S("div");b.classList.add("shaka-spinner");a.ba.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
995
998
  b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
996
- function Tx(a){a.N=S("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.g.appendChild(a.N);a.h.o(a.N,"click",function(e){e.target.closest(".shaka-overflow-button")||a.cc()});Xx(a);a.Z=S("div");a.Z.classList.add("shaka-controls-button-panel");a.Z.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.Z.classList.add("shaka-tooltips-on");a.N.appendChild(a.Z);for(var b={},c=r(a.i.controlPanelElements),d=c.next();!d.done;b={rc:b.rc},d=c.next())d=
997
- d.value,Nx.get(d)?(d=Nx.get(d).create(a.Z,a),"function"!=typeof d.release&&(zb("shaka.extern.IUIElement","Please update UI elements to have a release() method."),b.rc=d,b.rc.release=function(e){return function(){e.rc.destroy&&e.rc.destroy()}}(b)),a.H.push(d)):Sa("Unrecognized control panel element requested:",d)}function Ux(a){if(a.i.addSeekBar)a.m=Yx.create(a.N,a),a.H.push(a.m);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
998
- function Px(a){a.R=S("div");a.R.classList.add("shaka-client-side-ad-container");X(a.R,!1);a.h.o(a.R,"click",function(){Wx(a)});a.j.appendChild(a.R)}
999
- function Jx(a){a.h.o(a.F,"buffering",function(){a.W&&X(a.ba,a.F.Ic())});a.W&&X(a.ba,a.F.Ic());a.h.o(window,"keydown",function(b){Zx(a,b)});a.h.o(window,"click",function(){return a.cc()});a.h.o(a,"submenuopen",function(){a.cc()});a.h.o(a.A,"play",function(){Gx(a)});a.h.o(a.A,"pause",function(){Gx(a)});a.h.o(a.j,"mousemove",function(b){Vx(a,b)});a.h.o(a.j,"touchmove",function(b){Vx(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){Vx(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.za()});
1000
- a.h.o(a.B,"caststatuschanged",function(){Kx(a)});a.h.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&Vx(a,b);if(a.i.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.m&&!d&&(b.preventDefault(),$x(a,a.m.getValue()-5));break;case "ArrowRight":a.m&&!d&&(b.preventDefault(),$x(a,a.m.getValue()+5));break;case "Home":a.m&&$x(a,a.F.La().start);break;
1001
- case "End":a.m&&$x(a,a.F.La().end);break;case " ":e&&ay(a)}});a.h.o(a.j,"keyup",function(b){a.na["delete"](b.key)});a.h.o(a.Xa,"ad-started",function(b){a.l=b.ad;a.Bf()});a.h.o(a.Xa,"ad-stopped",function(){a.l=null;a.ef()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return M(function(b){return A(b,by(a),0)})});a.h.o(document,"fullscreenchange",function(){a.l&&a.l.resize(a.C.offsetWidth,a.C.offsetHeight)})}
1002
- function by(a){return M(function(b){return a.A&&0!=a.A.readyState&&!a.B.ra()&&a.i.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?A(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?A(b,document.exitFullscreen(),0):b.D(0):b["return"]()})}
1003
- function Vx(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Gx(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.jb=!0,a.I.stop(),a.Ob()||(Hx(a),Gx(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.S(3))}function cy(a){return window.matchMedia("hover: hover").matches?a.wb.some(function(b){return b.matches(":hover")}):!1}
1004
- function Gx(a){var b=a.l?a.l.isPaused():!1,c=a.A.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.l||!a.l.isLinear())&&c||a.jb||d||cy(a)?(Hx(a),a.g.setAttribute("shown","true"),a.ma.stop()):a.ma.S(a.i.fadeDelay)}function Wx(a){a.W&&(a.Wc()?a.I.za():a.i.singleClickForPlayAndPause&&ay(a))}function ay(a){a.l&&a.l.isLinear()?rx(a):sx(a)}
1005
- function Kx(a){var b=a.B.ra();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Ob=function(){return this.W?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function $x(a,b){a.m.changeTo(b);a.Ob()&&Hx(a)}
1006
- function Hx(a){if(a.m)if(a.m.setValue(a.A.currentTime),a.m.update(),a.m.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
1007
- function Zx(a,b){a.na.add(b.key);var c=a.Wc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Gx(a),a.h.o(window,"mousedown",function(){a.h.nc(window,"mousedown")}));"Escape"==b.key&&a.I.za();c&&a.na.has("Tab")&&dy(a,b)}
1008
- function dy(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.na.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1009
- function Ix(){var a=new Zb("en");a.ea("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
999
+ function Vx(a){a.N=S("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.g.appendChild(a.N);a.h.o(a.N,"click",function(e){e.target.closest(".shaka-overflow-button")||a.cc()});Zx(a);a.Z=S("div");a.Z.classList.add("shaka-controls-button-panel");a.Z.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.Z.classList.add("shaka-tooltips-on");a.N.appendChild(a.Z);for(var b={},c=r(a.i.controlPanelElements),d=c.next();!d.done;b={rc:b.rc},d=c.next())d=
1000
+ d.value,Px.get(d)?(d=Px.get(d).create(a.Z,a),"function"!=typeof d.release&&(zb("shaka.extern.IUIElement","Please update UI elements to have a release() method."),b.rc=d,b.rc.release=function(e){return function(){e.rc.destroy&&e.rc.destroy()}}(b)),a.H.push(d)):Sa("Unrecognized control panel element requested:",d)}function Wx(a){if(a.i.addSeekBar)a.m=$x.create(a.N,a),a.H.push(a.m);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
1001
+ function Rx(a){a.S=S("div");a.S.classList.add("shaka-client-side-ad-container");X(a.S,!1);a.h.o(a.S,"click",function(){Yx(a)});a.j.appendChild(a.S)}
1002
+ function Lx(a){a.h.o(a.F,"buffering",function(){a.W&&X(a.ba,a.F.Ic())});a.W&&X(a.ba,a.F.Ic());a.h.o(window,"keydown",function(b){ay(a,b)});a.h.o(window,"click",function(){return a.cc()});a.h.o(a,"submenuopen",function(){a.cc()});a.h.o(a.A,"play",function(){Ix(a)});a.h.o(a.A,"pause",function(){Ix(a)});a.h.o(a.j,"mousemove",function(b){Xx(a,b)});a.h.o(a.j,"touchmove",function(b){Xx(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){Xx(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.za()});
1003
+ a.h.o(a.B,"caststatuschanged",function(){Mx(a)});a.h.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&Xx(a,b);if(a.i.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.m&&!d&&(b.preventDefault(),by(a,a.m.getValue()-5));break;case "ArrowRight":a.m&&!d&&(b.preventDefault(),by(a,a.m.getValue()+5));break;case "Home":a.m&&by(a,a.F.La().start);break;
1004
+ case "End":a.m&&by(a,a.F.La().end);break;case " ":e&&cy(a)}});a.h.o(a.j,"keyup",function(b){a.na["delete"](b.key)});a.h.o(a.Wa,"ad-started",function(b){a.l=b.ad;a.Ff()});a.h.o(a.Wa,"ad-stopped",function(){a.l=null;a.jf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return M(function(b){return A(b,dy(a),0)})});a.h.o(document,"fullscreenchange",function(){a.l&&a.l.resize(a.C.offsetWidth,a.C.offsetHeight)})}
1005
+ function dy(a){return M(function(b){return a.A&&0!=a.A.readyState&&!a.B.ra()&&a.i.enableFullscreenOnRotation&&document.fullscreenEnabled?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?A(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?A(b,document.exitFullscreen(),0):b.D(0):b["return"]()})}
1006
+ function Xx(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Ix(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.ib=!0,a.I.stop(),a.Ob()||(Jx(a),Ix(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.R(3))}function ey(a){return window.matchMedia("hover: hover").matches?a.wb.some(function(b){return b.matches(":hover")}):!1}
1007
+ function Ix(a){var b=a.l?a.l.isPaused():!1,c=a.A.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.l||!a.l.isLinear())&&c||a.ib||d||ey(a)?(Jx(a),a.g.setAttribute("shown","true"),a.ma.stop()):a.ma.R(a.i.fadeDelay)}function Yx(a){a.W&&(a.Xc()?a.I.za():a.i.singleClickForPlayAndPause&&cy(a))}function cy(a){a.l&&a.l.isLinear()?tx(a):ux(a)}
1008
+ function Mx(a){var b=a.B.ra();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Ob=function(){return this.W?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function by(a,b){a.m.changeTo(b);a.Ob()&&Jx(a)}
1009
+ function Jx(a){if(a.m)if(a.m.setValue(a.A.currentTime),a.m.update(),a.m.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
1010
+ function ay(a,b){a.na.add(b.key);var c=a.Xc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Ix(a),a.h.o(window,"mousedown",function(){a.h.nc(window,"mousedown")}));"Escape"==b.key&&a.I.za();c&&a.na.has("Tab")&&fy(a,b)}
1011
+ function fy(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.na.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1012
+ function Kx(){var a=new Zb("en");a.ea("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
1010
1013
  ["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
1011
1014
  ["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],
1012
1015
  ["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],
@@ -1064,75 +1067,75 @@ a.ea("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
1064
1067
  ["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.ea("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],
1065
1068
  ["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],
1066
1069
  ["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],
1067
- ["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Re(navigator.languages||[]);return a}N("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Ob;Y.prototype.hideAdUI=Y.prototype.ef;Y.prototype.showAdUI=Y.prototype.Bf;
1068
- Y.prototype.toggleFullScreen=Y.prototype.De;Y.prototype.hideSettingsMenus=Y.prototype.cc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Wc;Y.prototype.setLastTouchEventTime=Y.prototype.zf;Y.prototype.getDisplayTime=Y.prototype.bf;Y.prototype.isCastAllowed=Y.prototype.Cg;Y.prototype.setSeeking=Y.prototype.xe;Y.prototype.isSeeking=Y.prototype.Eg;Y.prototype.getConfig=Y.prototype.$f;Y.prototype.getClientSideAdContainer=Y.prototype.Zf;Y.prototype.getServerSideAdContainer=Y.prototype.rg;
1069
- Y.prototype.getControlsContainer=Y.prototype.cg;Y.prototype.getLocalPlayer=Y.prototype.hg;Y.prototype.getPlayer=Y.prototype.ac;Y.prototype.getLocalVideo=Y.prototype.ig;Y.prototype.getVideo=Y.prototype.Bb;Y.prototype.getVideoContainer=Y.prototype.zg;Y.prototype.getLocalization=Y.prototype.jg;Y.prototype.getCastProxy=Y.prototype.Xf;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.yf;Y.prototype.setEnabledShakaControls=Y.prototype.se;Y.prototype.configure=Y.prototype.configure;
1070
- Y.prototype.loadComplete=Y.prototype.Fg;Y.prototype.allowCast=Y.prototype.Lf;Y.registerSeekBar=function(a){Yx=a};Y.registerElement=Mx;Y.prototype.destroy=Y.prototype.destroy;var Nx=new Map,Yx=new Fx;function ey(a,b){V.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=Xj();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=S("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1071
- this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);fy(this);this.eventManager.o(this.localization,"locale-updated",function(){gy(c)});this.eventManager.o(this.localization,"locale-changed",function(){gy(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&X(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){X(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){X(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.zf(Date.now());
1072
- d.stopPropagation()});this.eventManager.o(this.g,"click",function(){hy(c)});gy(this);this.ad&&this.ad.isLinear()&&X(this.g,!1)}u(ey,V);ey.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];V.prototype.release.call(this)};function iy(a,b){jy.set(a,b)}
1073
- function fy(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,jy.get(c)?(c=jy.get(c),a.i.push(c.create(a.h,a.controls))):Sa("Unrecognized overflow menu element requested:",c)}function hy(a){if(a.controls.Wc())a.controls.cc();else{X(a.h,!0);Gx(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};fb(a.h.childNodes,b)&&hb(a.h.childNodes,b)[0].focus()}}function gy(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1074
- N("shaka.ui.OverflowMenu",ey);ey.registerElement=iy;function ky(){}ky.prototype.create=function(a,b){return new ey(a,b)};Mx("overflow_menu",new ky);var jy=new Map;function ly(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=S("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");d.appendChild(this.j);
1075
- this.i=S("span");this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);my(this);ny(this);this.eventManager.o(this.localization,"locale-updated",function(){my(c)});this.eventManager.o(this.localization,"locale-changed",function(){my(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});d=this.controls.Bb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=
1076
- c.player.cf()==am;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){ny(c)})}u(ly,V);function ny(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function my(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}N("shaka.ui.AirPlayButton",ly);function oy(){}oy.prototype.create=function(a,b){return new ly(a,b)};iy("airplay",new oy);
1077
- Mx("airplay",new oy);function py(a,b,c){this.i=a;this.h=qy(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Ud()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.Ae(b);b.ui=this;c.ui=this}q=py.prototype;q.destroy=function(){var a=this;return M(function(b){if(1==b.g)return a.g?A(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?A(b,a.i.destroy(),4):b.D(4);a.i=null;C(b)})};q.Ud=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:ad()&&1<navigator.maxTouchPoints};
1078
- q.getConfiguration=function(){var a=qy(this);Dk(a,this.h,qy(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ek(a,b));Dk(this.h,a,qy(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new O("uiupdated"))};q.ag=function(){return this.g};q.eh=function(a){this.g.se(a)};
1079
- function qy(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
1080
- "picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},trackLabelFormat:ry,fadeDelay:0,
1081
- doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Ud()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1082
- function sy(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return M(function(t){switch(t.g){case 1:Tt();if(!il())return ty("shaka-ui-load-failed",uy),t["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.D(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),vy(f,e));t.D(2);break}h=r(a);k=h.next();
1083
- case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;n=r(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));E(t,7);return A(t,vy(l,m),9);case 9:va(t,5);break;case 7:return I(t),ty("shaka-ui-load-failed",wy),t["return"]();case 5:k=h.next();t.D(4);break;case 2:ty("shaka-ui-loaded"),C(t)}})}
1084
- function ty(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1085
- function vy(a,b){var c,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:c=new T(b);d=new py(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.yf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=r(b.querySelectorAll("source"));
1086
- k=h.next();case 2:if(k.done){m.D(0);break}l=k.value;E(m,5);return A(m,d.g.ac().load(l.getAttribute("src")),7);case 7:m.D(0);break;case 5:I(m);case 3:k=h.next(),m.D(2)}})}N("shaka.ui.Overlay",py);py.prototype.setEnabled=py.prototype.eh;py.prototype.getControls=py.prototype.ag;py.prototype.configure=py.prototype.configure;py.prototype.getConfiguration=py.prototype.getConfiguration;py.prototype.isMobile=py.prototype.Ud;py.prototype.destroy=py.prototype.destroy;var ry=0;
1087
- py.TrackLabelFormat={LANGUAGE:ry,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var uy=0,wy=1;py.FailReasonCode={NO_BROWSER_SUPPORT:uy,PLAYER_FAILED_TO_LOAD:wy};"complete"==document.readyState?M(function(a){if(1==a.g)return A(a,Promise.resolve(),2);sy();C(a)}):window.addEventListener("load",sy);function xy(a,b,c,d,e,f,g){function h(z,B){return z+": "+B}function k(z){return"variant"==z.type?z.audioRoles?z.audioRoles.join(", "):void 0:z.roles.join(", ")}var l=a.find(function(z){return 1==z.active}),m=ix(b);Yj(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={Va:n.Va},p=a.next()){n.Va=p.value;p=n.Va.language;var t=
1088
- n.Va.forced,v=f.resolve(dc.Gf),x=k(n.Va),y=h(p,x);if(!m.has(y)){m.add(y);var w=Xj();w.addEventListener("click",function(z){return function(){c(z.Va)}}(n));var D=S("span");w.appendChild(D);D.textContent=yy(p,f);switch(g){case ry:t&&(D.textContent+=" ("+v+")");break;case 1:x?D.textContent=x:(Sa("Track #"+n.Va.id+" does not have a role, but the UI is configured to only show role."),D.textContent="?");t&&(D.textContent+=" ("+v+")");break;case 2:x&&(D.textContent+=": "+x);t&&(D.textContent+=" ("+v+")");
1089
- break;case 3:n.Va.label?D.textContent=n.Va.label:(Sa("Track #"+n.Va.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&y==l&&(w.appendChild(lx()),D.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=D.textContent);b.appendChild(w)}}}
1090
- function yy(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Vb(a);return a in ex?ex[a].s:c in ex?ex[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function zy(a,b,c){V.call(this,a,b);var d=this;Ay(this,c);By(this);Cy(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new O("submenuopen")),X(d.menu,!0),kx(d.menu)):X(d.menu,!1)})}u(zy,V);
1091
- function Ay(a,b){a.button=Xj();a.button.classList.add("shaka-overflow-button");a.icon=S("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=S("label");c.classList.add("shaka-overflow-button-label");c.classList.add("shaka-overflow-menu-only");a.nameSpan=S("span");c.appendChild(a.nameSpan);a.currentSelection=S("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1092
- function By(a){a.menu=S("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Xj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.cc()});var b=S("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1093
- S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Cy(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){X(a.parent,!0);a.parent.childNodes[0].focus();Gx(a.controls)}))}N("shaka.ui.SettingsMenu",zy);function Dy(a,b){zy.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){Ey(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ey(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.$a().length;X(c.button,d);Fy(c)});this.eventManager.o(this.player,"variantchanged",
1094
- function(){Fy(c)});Ey(this);Fy(this)}u(Dy,zy);function Fy(a){var b=a.player.$a();xy(b,a.menu,function(c){a.player.wd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);kx(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1095
- function Ey(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}N("shaka.ui.AudioLanguageSelection",Dy);function Gy(){}Gy.prototype.create=function(a,b){return new Dy(a,b)};iy("language",new Gy);Mx("language",new Gy);function Hy(a,b){V.call(this,a,b);var c=this;this.h=this.controls.B;this.g=Xj();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=S("span");d.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");
1096
- d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);Iy(this);Jy(this);this.eventManager.o(this.localization,"locale-updated",function(){Iy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Iy(c)});this.eventManager.o(this.g,"click",function(){Ky(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Jy(c)})}u(Hy,V);
1097
- function Ky(a){var b;M(function(c){if(1==c.g){if(a.h.ra())return a.h.Cf(),c.D(0);E(c,3);a.g.disabled=!0;return A(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=I(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));C(c)})}function Jy(a){var b=a.h.Oe()&&a.controls.hb,c=a.h.ra();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Ly(a)}
1098
- function Ly(a){a.j.textContent=a.h.ra()?a.h.ud():a.localization.resolve("OFF")}function Iy(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Ly(a)}N("shaka.ui.CastButton",Hy);function My(){}My.prototype.create=function(a,b){return new Hy(a,b)};iy("cast",new My);Mx("cast",new My);function Ny(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Oy(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){Oy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Oy(c)});
1099
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Fe(d);c.g.setAttribute("shaka-status",d+"x")}})}u(Ny,V);function Oy(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}N("shaka.ui.FastForwardButton",Ny);function Py(){}Py.prototype.create=function(a,b){return new Ny(a,b)};Mx("fast_forward",new Py);function Qy(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Ry(this);this.eventManager.o(this.localization,"locale-updated",function(){Ry(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ry(c)});this.eventManager.o(this.g,
1100
- "click",function(){return M(function(d){return A(d,c.controls.De(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Ry(c)})}u(Qy,V);function Ry(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}N("shaka.ui.FullscreenButton",Qy);function Sy(){}Sy.prototype.create=function(a,b){return new Qy(a,b)};Mx("fullscreen",new Sy);function Ty(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("LOOP");d.appendChild(this.j);this.l=S("span");this.l.classList.add("shaka-current-selection-span");
1101
- d.appendChild(this.l);this.g.appendChild(d);Uy(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Uy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Uy(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.za();c.h.ha(1)});this.m=this.video.loop;this.h=new Q(function(){c.m!=c.video.loop&&(Uy(c),c.m=c.video.loop)});this.h.ha(1)}u(Ty,V);Ty.prototype.release=function(){this.h.stop();this.h=null;V.prototype.release.call(this)};
1102
- function Uy(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}N("shaka.ui.LoopButton",Ty);function Vy(){}Vy.prototype.create=function(a,b){return new Ty(a,b)};iy("loop",new Vy);Mx("loop",new Vy);wx("loop",new Vy);function Wy(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);Xy(this);Yy(this);this.eventManager.o(this.localization,"locale-updated",function(){Xy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Xy(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1103
- this.eventManager.o(this.video,"volumechange",function(){Xy(c);Yy(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Xy(c);Yy(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Xy(c);Yy(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Xy(c);Yy(c)})}u(Wy,V);function Xy(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1104
- function Yy(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}N("shaka.ui.MuteButton",Wy);function Zy(){}Zy.prototype.create=function(a,b){return new Wy(a,b)};Mx("mute",new Zy);function $y(a,b){V.call(this,a,b);var c=this;this.l=this.controls.C;this.g=Xj();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);
1105
- this.h=S("span");this.h.classList.add("shaka-current-selection-span");d.appendChild(this.h);this.g.appendChild(d);az(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){az(c)});this.eventManager.o(this.localization,"locale-changed",function(){az(c)});this.eventManager.o(this.g,"click",function(){bz(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
1070
+ ["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Ue(navigator.languages||[]);return a}N("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Ob;Y.prototype.hideAdUI=Y.prototype.jf;Y.prototype.showAdUI=Y.prototype.Ff;
1071
+ Y.prototype.toggleFullScreen=Y.prototype.Ge;Y.prototype.hideSettingsMenus=Y.prototype.cc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Xc;Y.prototype.setLastTouchEventTime=Y.prototype.Df;Y.prototype.getDisplayTime=Y.prototype.ef;Y.prototype.isCastAllowed=Y.prototype.Gg;Y.prototype.setSeeking=Y.prototype.Ae;Y.prototype.isSeeking=Y.prototype.Ig;Y.prototype.getConfig=Y.prototype.eg;Y.prototype.getClientSideAdContainer=Y.prototype.dg;Y.prototype.getServerSideAdContainer=Y.prototype.wg;
1072
+ Y.prototype.getControlsContainer=Y.prototype.gg;Y.prototype.getLocalPlayer=Y.prototype.lg;Y.prototype.getPlayer=Y.prototype.ac;Y.prototype.getLocalVideo=Y.prototype.mg;Y.prototype.getVideo=Y.prototype.Bb;Y.prototype.getVideoContainer=Y.prototype.Dg;Y.prototype.getLocalization=Y.prototype.ng;Y.prototype.getCastProxy=Y.prototype.ag;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.Cf;Y.prototype.setEnabledShakaControls=Y.prototype.we;Y.prototype.configure=Y.prototype.configure;
1073
+ Y.prototype.loadComplete=Y.prototype.Jg;Y.prototype.allowCast=Y.prototype.Pf;Y.registerSeekBar=function(a){$x=a};Y.registerElement=Ox;Y.prototype.destroy=Y.prototype.destroy;var Px=new Map,$x=new Hx;function gy(a,b){V.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=sk();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=S("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1074
+ this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);hy(this);this.eventManager.o(this.localization,"locale-updated",function(){iy(c)});this.eventManager.o(this.localization,"locale-changed",function(){iy(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&X(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){X(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){X(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Df(Date.now());
1075
+ d.stopPropagation()});this.eventManager.o(this.g,"click",function(){jy(c)});iy(this);this.ad&&this.ad.isLinear()&&X(this.g,!1)}u(gy,V);gy.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];V.prototype.release.call(this)};function ky(a,b){ly.set(a,b)}
1076
+ function hy(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,ly.get(c)?(c=ly.get(c),a.i.push(c.create(a.h,a.controls))):Sa("Unrecognized overflow menu element requested:",c)}function jy(a){if(a.controls.Xc())a.controls.cc();else{X(a.h,!0);Ix(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};fb(a.h.childNodes,b)&&hb(a.h.childNodes,b)[0].focus()}}function iy(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1077
+ N("shaka.ui.OverflowMenu",gy);gy.registerElement=ky;function my(){}my.prototype.create=function(a,b){return new gy(a,b)};Ox("overflow_menu",new my);var ly=new Map;function ny(a,b){V.call(this,a,b);var c=this;this.g=sk();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=S("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");d.appendChild(this.j);
1078
+ this.i=S("span");this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);oy(this);py(this);this.eventManager.o(this.localization,"locale-updated",function(){oy(c)});this.eventManager.o(this.localization,"locale-changed",function(){oy(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});d=this.controls.Bb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=
1079
+ c.player.gf()==vm;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){py(c)})}u(ny,V);function py(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function oy(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}N("shaka.ui.AirPlayButton",ny);function qy(){}qy.prototype.create=function(a,b){return new ny(a,b)};ky("airplay",new qy);
1080
+ Ox("airplay",new qy);function ry(a,b,c){this.i=a;this.h=sy(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Xd()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.De(b);b.ui=this;c.ui=this}q=ry.prototype;q.destroy=function(){var a=this;return M(function(b){if(1==b.g)return a.g?A(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?A(b,a.i.destroy(),4):b.D(4);a.i=null;C(b)})};q.Xd=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:ad()&&1<navigator.maxTouchPoints};
1081
+ q.getConfiguration=function(){var a=sy(this);Yk(a,this.h,sy(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Zk(a,b));Yk(this.h,a,sy(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new O("uiupdated"))};q.fg=function(){return this.g};q.ih=function(a){this.g.we(a)};
1082
+ function sy(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
1083
+ "picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},trackLabelFormat:ty,fadeDelay:0,
1084
+ doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Xd()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1085
+ function uy(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return M(function(t){switch(t.g){case 1:Vt();if(!Dl())return vy("shaka-ui-load-failed",wy),t["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.D(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),xy(f,e));t.D(2);break}h=r(a);k=h.next();
1086
+ case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;n=r(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));E(t,7);return A(t,xy(l,m),9);case 9:va(t,5);break;case 7:return I(t),vy("shaka-ui-load-failed",yy),t["return"]();case 5:k=h.next();t.D(4);break;case 2:vy("shaka-ui-loaded"),C(t)}})}
1087
+ function vy(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1088
+ function xy(a,b){var c,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:c=new T(b);d=new ry(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.Cf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=r(b.querySelectorAll("source"));
1089
+ k=h.next();case 2:if(k.done){m.D(0);break}l=k.value;E(m,5);return A(m,d.g.ac().load(l.getAttribute("src")),7);case 7:m.D(0);break;case 5:I(m);case 3:k=h.next(),m.D(2)}})}N("shaka.ui.Overlay",ry);ry.prototype.setEnabled=ry.prototype.ih;ry.prototype.getControls=ry.prototype.fg;ry.prototype.configure=ry.prototype.configure;ry.prototype.getConfiguration=ry.prototype.getConfiguration;ry.prototype.isMobile=ry.prototype.Xd;ry.prototype.destroy=ry.prototype.destroy;var ty=0;
1090
+ ry.TrackLabelFormat={LANGUAGE:ty,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var wy=0,yy=1;ry.FailReasonCode={NO_BROWSER_SUPPORT:wy,PLAYER_FAILED_TO_LOAD:yy};"complete"==document.readyState?M(function(a){if(1==a.g)return A(a,Promise.resolve(),2);uy();C(a)}):window.addEventListener("load",uy);function zy(a,b,c,d,e,f,g){function h(z,B){return z+": "+B}function k(z){return"variant"==z.type?z.audioRoles?z.audioRoles.join(", "):void 0:z.roles.join(", ")}var l=a.find(function(z){return 1==z.active}),m=kx(b);tk(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={Ua:n.Ua},p=a.next()){n.Ua=p.value;p=n.Ua.language;var t=
1091
+ n.Ua.forced,v=f.resolve(dc.Kf),x=k(n.Ua),y=h(p,x);if(!m.has(y)){m.add(y);var w=sk();w.addEventListener("click",function(z){return function(){c(z.Ua)}}(n));var D=S("span");w.appendChild(D);D.textContent=Ay(p,f);switch(g){case ty:t&&(D.textContent+=" ("+v+")");break;case 1:x?D.textContent=x:(Sa("Track #"+n.Ua.id+" does not have a role, but the UI is configured to only show role."),D.textContent="?");t&&(D.textContent+=" ("+v+")");break;case 2:x&&(D.textContent+=": "+x);t&&(D.textContent+=" ("+v+")");
1092
+ break;case 3:n.Ua.label?D.textContent=n.Ua.label:(Sa("Track #"+n.Ua.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&y==l&&(w.appendChild(nx()),D.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=D.textContent);b.appendChild(w)}}}
1093
+ function Ay(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Vb(a);return a in gx?gx[a].s:c in gx?gx[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function By(a,b,c){V.call(this,a,b);var d=this;Cy(this,c);Dy(this);Ey(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new O("submenuopen")),X(d.menu,!0),mx(d.menu)):X(d.menu,!1)})}u(By,V);
1094
+ function Cy(a,b){a.button=sk();a.button.classList.add("shaka-overflow-button");a.icon=S("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=S("label");c.classList.add("shaka-overflow-button-label");c.classList.add("shaka-overflow-menu-only");a.nameSpan=S("span");c.appendChild(a.nameSpan);a.currentSelection=S("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1095
+ function Dy(a){a.menu=S("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=sk();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.cc()});var b=S("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1096
+ S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Ey(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}X(a.parent,!0);fb(a.parent.childNodes,b)&&hb(a.parent.childNodes,b)[0].focus();Ix(a.controls)}))}N("shaka.ui.SettingsMenu",By);function Fy(a,b){By.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){Gy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Gy(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Za().length;X(c.button,d);Hy(c)});this.eventManager.o(this.player,"variantchanged",
1097
+ function(){Hy(c)});Gy(this);Hy(this)}u(Fy,By);function Hy(a){var b=a.player.Za();zy(b,a.menu,function(c){a.player.xd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);mx(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1098
+ function Gy(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}N("shaka.ui.AudioLanguageSelection",Fy);function Iy(){}Iy.prototype.create=function(a,b){return new Fy(a,b)};ky("language",new Iy);Ox("language",new Iy);function Jy(a,b){V.call(this,a,b);var c=this;this.h=this.controls.B;this.g=sk();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=S("span");d.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");
1099
+ d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);Ky(this);Ly(this);this.eventManager.o(this.localization,"locale-updated",function(){Ky(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ky(c)});this.eventManager.o(this.g,"click",function(){My(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Ly(c)})}u(Jy,V);
1100
+ function My(a){var b;M(function(c){if(1==c.g){if(a.h.ra())return a.h.Gf(),c.D(0);E(c,3);a.g.disabled=!0;return A(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=I(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));C(c)})}function Ly(a){var b=a.h.Re()&&a.controls.gb,c=a.h.ra();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Ny(a)}
1101
+ function Ny(a){a.j.textContent=a.h.ra()?a.h.vd():a.localization.resolve("OFF")}function Ky(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Ny(a)}N("shaka.ui.CastButton",Jy);function Oy(){}Oy.prototype.create=function(a,b){return new Jy(a,b)};ky("cast",new Oy);Ox("cast",new Oy);function Py(a,b){V.call(this,a,b);var c=this;this.g=sk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Qy(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){Qy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Qy(c)});
1102
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Ie(d);c.g.setAttribute("shaka-status",d+"x")}})}u(Py,V);function Qy(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}N("shaka.ui.FastForwardButton",Py);function Ry(){}Ry.prototype.create=function(a,b){return new Py(a,b)};Ox("fast_forward",new Ry);function Sy(a,b){V.call(this,a,b);var c=this;this.g=sk();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Ty(this);this.eventManager.o(this.localization,"locale-updated",function(){Ty(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ty(c)});this.eventManager.o(this.g,
1103
+ "click",function(){return M(function(d){return A(d,c.controls.Ge(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Ty(c)})}u(Sy,V);function Ty(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}N("shaka.ui.FullscreenButton",Sy);function Uy(){}Uy.prototype.create=function(a,b){return new Sy(a,b)};Ox("fullscreen",new Uy);function Vy(a,b){V.call(this,a,b);var c=this;this.g=sk();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("LOOP");d.appendChild(this.j);this.l=S("span");this.l.classList.add("shaka-current-selection-span");
1104
+ d.appendChild(this.l);this.g.appendChild(d);Wy(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Wy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Wy(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.za();c.h.ha(1)});this.m=this.video.loop;this.h=new Q(function(){c.m!=c.video.loop&&(Wy(c),c.m=c.video.loop)});this.h.ha(1)}u(Vy,V);Vy.prototype.release=function(){this.h.stop();this.h=null;V.prototype.release.call(this)};
1105
+ function Wy(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}N("shaka.ui.LoopButton",Vy);function Xy(){}Xy.prototype.create=function(a,b){return new Vy(a,b)};ky("loop",new Xy);Ox("loop",new Xy);yx("loop",new Xy);function Yy(a,b){V.call(this,a,b);var c=this;this.g=sk();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);Zy(this);$y(this);this.eventManager.o(this.localization,"locale-updated",function(){Zy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Zy(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1106
+ this.eventManager.o(this.video,"volumechange",function(){Zy(c);$y(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Zy(c);$y(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Zy(c);$y(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Zy(c);$y(c)})}u(Yy,V);function Zy(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1107
+ function $y(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}N("shaka.ui.MuteButton",Yy);function az(){}az.prototype.create=function(a,b){return new Yy(a,b)};Ox("mute",new az);function bz(a,b){V.call(this,a,b);var c=this;this.l=this.controls.C;this.g=sk();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);
1108
+ this.h=S("span");this.h.classList.add("shaka-current-selection-span");d.appendChild(this.h);this.g.appendChild(d);cz(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){cz(c)});this.eventManager.o(this.localization,"locale-changed",function(){cz(c)});this.eventManager.o(this.g,"click",function(){dz(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
1106
1109
  "branding_watermark";c.g.ariaLabel=c.localization.resolve("EXIT_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("ON")});this.eventManager.o(this.l,"leavepictureinpicture",function(){c.i.textContent="picture_in_picture_alt";c.g.ariaLabel=c.localization.resolve("ENTER_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("OFF")});this.eventManager.o(this.controls,"caststatuschanged",function(e){e.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!1):
1107
- document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){cz(c)})}u($y,V);function bz(a){var b;M(function(c){if(1==c.g)return E(c,2),document.pictureInPictureElement?A(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),A(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=I(c);a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));C(c)})}
1108
- function az(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.ariaLabel=a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
1109
- function cz(a){M(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.D(0);if(!a.player||!a.player.jf())return X(a.g,!0),b.D(0);X(a.g,!1);return document.pictureInPictureElement?A(b,document.exitPictureInPicture(),0):b.D(0)})}N("shaka.ui.PipButton",$y);function dz(){}dz.prototype.create=function(a,b){return new $y(a,b)};iy("picture_in_picture",new dz);Mx("picture_in_picture",new dz);wx("picture_in_picture",new dz);function ez(a,b){zy.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){fz(c)});this.eventManager.o(this.localization,"locale-changed",function(){fz(c)});this.eventManager.o(this.player,"ratechange",function(){gz(c,c.player.Ab())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1110
- "x",d]}));fz(this);hz(this);gz(this,this.player.Ab())}u(ez,zy);function fz(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1111
- function gz(a,b){var c=jx(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(lx()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1112
- "x")}function hz(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={sc:b.sc},d=c.next()){b.sc=d.value;d=Xj();var e=S("span");e.textContent=b.sc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.sc);a.video.defaultPlaybackRate=a.g.get(f.sc)}}(b));a.menu.appendChild(d)}kx(a.menu)}N("shaka.ui.PlaybackRateSelection",ez);function iz(){}iz.prototype.create=function(a,b){return new ez(a,b)};iy("playback_rate",new iz);Mx("playback_rate",new iz);function jz(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-current-time");kz(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.La().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.bf(),f=c.video.duration,g=c.player.La(),h=g.end-g.start;c.player.T()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(kz(c,"- "+mx(e,f)),c.g.disabled=
1113
- !1):(kz(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=mx(e,d),f&&(e+=" / "+mx(f,d)),kz(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}u(jz,V);function kz(a,b){b!=a.g.textContent&&(a.g.textContent=b)}N("shaka.ui.PresentationTimeTracker",jz);function lz(){}lz.prototype.create=function(a,b){return new jz(a,b)};Mx("time_and_duration",new lz);function mz(a,b){zy.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){nz(c)});this.eventManager.o(this.localization,"locale-changed",function(){nz(c)});this.eventManager.o(this.player,"variantchanged",function(){oz(c)});this.eventManager.o(this.player,"trackschanged",function(){oz(c)});this.eventManager.o(this.player,
1114
- "abrstatuschanged",function(){oz(c)});oz(this);nz(this)}u(mz,zy);
1115
- function oz(a){var b=a.player.$a();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height})==l});var d=ix(a.menu);Yj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e=
1116
- {vc:e.vc},g=f.next()){e.vc=g.value;g=Xj();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.vc;a.player.configure({abr:{enabled:!1}});a.player.qe(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=S("span");h.textContent=e.vc.height+"p";g.appendChild(h);d||e.vc!=c||(g.ariaSelected="true",g.appendChild(lx()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Xj();e.classList.add("shaka-enable-abr-button");
1117
- a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});oz(a)});a.g=S("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(lx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);kx(a.menu);a.controls.dispatchEvent(new O("resolutionselectionupdated"))}}
1118
- function nz(a){a.button.ariaLabel=a.localization.resolve("RESOLUTION");a.backButton.ariaLabel=a.localization.resolve("RESOLUTION");a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}N("shaka.ui.ResolutionSelection",mz);function pz(){}
1119
- pz.prototype.create=function(a,b){return new mz(a,b)};iy("quality",new pz);Mx("quality",new pz);function qz(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);rz(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){rz(c)});this.eventManager.o(this.localization,"locale-changed",function(){rz(c)});
1120
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Fe(d);c.g.setAttribute("shaka-status",d+"x")}})}u(qz,V);function rz(a){a.g.ariaLabel=a.localization.resolve("REWIND")}N("shaka.ui.RewindButton",qz);function sz(){}sz.prototype.create=function(a,b){return new qz(a,b)};Mx("rewind",new sz);function tz(a,b){V.call(this,a,b);var c=this;this.j=S("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=S("div");this.h.classList.add("shaka-skip-ad-counter");X(this.h,!1);this.j.appendChild(this.h);this.g=Xj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);uz(this);this.i=new Q(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1121
- d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){uz(c)});this.eventManager.o(this.localization,"locale-changed",function(){uz(c)});this.eventManager.o(this.adManager,"ad-started",function(){vz(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.o(this.g,
1122
- "click",function(){c.ad.skip()});this.ad&&vz(this)}u(tz,V);tz.prototype.release=function(){this.i.stop();this.i=null;V.prototype.release.call(this)};function uz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function vz(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.za(),a.i.ha(.5))}N("shaka.ui.SkipAdButton",tz);function wz(a,b){qx.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}u(wz,qx);wz.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};wz.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
1123
- N("shaka.ui.SmallPlayButton",wz);function xz(){}xz.prototype.create=function(a,b){return new wz(a,b)};Mx("play_pause",new xz);function yz(a,b){V.call(this,a,b);var c=S("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}u(yz,V);N("shaka.ui.Spacer",yz);function zz(){}zz.prototype.create=function(a,b){return new yz(a,b)};Mx("spacer",new zz);function Az(a,b){function c(l){return mx(h.h[l],!1)+" (m)"}function d(l){return Math.round(h.h[l]/1E3)+" (kbits/s)"}function e(l){return h.h[l].toFixed(2)+" (s)"}function f(l){return h.h[l]+" (frames)"}function g(l){return h.h[l]+" (px)"}V.call(this,a,b);var h=this;this.i=Xj();this.i.classList.add("shaka-statistics-button");this.j=S("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);var k=S("label");k.classList.add("shaka-overflow-button-label");
1110
+ document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){ez(c)})}u(bz,V);function dz(a){var b;M(function(c){if(1==c.g)return E(c,2),document.pictureInPictureElement?A(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),A(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=I(c);a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));C(c)})}
1111
+ function cz(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.ariaLabel=a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
1112
+ function ez(a){M(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.D(0);if(!a.player||!a.player.mf())return X(a.g,!0),b.D(0);X(a.g,!1);return document.pictureInPictureElement?A(b,document.exitPictureInPicture(),0):b.D(0)})}N("shaka.ui.PipButton",bz);function fz(){}fz.prototype.create=function(a,b){return new bz(a,b)};ky("picture_in_picture",new fz);Ox("picture_in_picture",new fz);yx("picture_in_picture",new fz);function gz(a,b){By.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){hz(c)});this.eventManager.o(this.localization,"locale-changed",function(){hz(c)});this.eventManager.o(this.player,"ratechange",function(){iz(c,c.player.Ab())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1113
+ "x",d]}));hz(this);jz(this);iz(this,this.player.Ab())}u(gz,By);function hz(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1114
+ function iz(a,b){var c=lx(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(nx()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1115
+ "x")}function jz(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={sc:b.sc},d=c.next()){b.sc=d.value;d=sk();var e=S("span");e.textContent=b.sc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.sc);a.video.defaultPlaybackRate=a.g.get(f.sc)}}(b));a.menu.appendChild(d)}mx(a.menu)}N("shaka.ui.PlaybackRateSelection",gz);function kz(){}kz.prototype.create=function(a,b){return new gz(a,b)};ky("playback_rate",new kz);Ox("playback_rate",new kz);function lz(a,b){V.call(this,a,b);var c=this;this.g=sk();this.g.classList.add("shaka-current-time");mz(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.La().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.ef(),f=c.video.duration,g=c.player.La(),h=g.end-g.start;c.player.T()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(mz(c,"- "+ox(e,f)),c.g.disabled=
1116
+ !1):(mz(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=ox(e,d),f&&(e+=" / "+ox(f,d)),mz(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}u(lz,V);function mz(a,b){b!=a.g.textContent&&(a.g.textContent=b)}N("shaka.ui.PresentationTimeTracker",lz);function nz(){}nz.prototype.create=function(a,b){return new lz(a,b)};Ox("time_and_duration",new nz);function oz(a,b){By.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){pz(c)});this.eventManager.o(this.localization,"locale-changed",function(){pz(c)});this.eventManager.o(this.player,"variantchanged",function(){qz(c)});this.eventManager.o(this.player,"trackschanged",function(){qz(c)});this.eventManager.o(this.player,
1117
+ "abrstatuschanged",function(){qz(c)});qz(this);pz(this)}u(oz,By);
1118
+ function qz(a){var b=a.player.Za();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height})==l});var d=kx(a.menu);tk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e=
1119
+ {vc:e.vc},g=f.next()){e.vc=g.value;g=sk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.vc;a.player.configure({abr:{enabled:!1}});a.player.ue(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=S("span");h.textContent=e.vc.height+"p";g.appendChild(h);d||e.vc!=c||(g.ariaSelected="true",g.appendChild(nx()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=sk();e.classList.add("shaka-enable-abr-button");
1120
+ a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});qz(a)});a.g=S("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(nx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);mx(a.menu);a.controls.dispatchEvent(new O("resolutionselectionupdated"))}}
1121
+ function pz(a){a.button.ariaLabel=a.localization.resolve("RESOLUTION");a.backButton.ariaLabel=a.localization.resolve("RESOLUTION");a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}N("shaka.ui.ResolutionSelection",oz);function rz(){}
1122
+ rz.prototype.create=function(a,b){return new oz(a,b)};ky("quality",new rz);Ox("quality",new rz);function sz(a,b){V.call(this,a,b);var c=this;this.g=sk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);tz(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){tz(c)});this.eventManager.o(this.localization,"locale-changed",function(){tz(c)});
1123
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Ie(d);c.g.setAttribute("shaka-status",d+"x")}})}u(sz,V);function tz(a){a.g.ariaLabel=a.localization.resolve("REWIND")}N("shaka.ui.RewindButton",sz);function uz(){}uz.prototype.create=function(a,b){return new sz(a,b)};Ox("rewind",new uz);function vz(a,b){V.call(this,a,b);var c=this;this.j=S("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=S("div");this.h.classList.add("shaka-skip-ad-counter");X(this.h,!1);this.j.appendChild(this.h);this.g=sk();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);wz(this);this.i=new Q(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1124
+ d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){wz(c)});this.eventManager.o(this.localization,"locale-changed",function(){wz(c)});this.eventManager.o(this.adManager,"ad-started",function(){xz(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.o(this.g,
1125
+ "click",function(){c.ad.skip()});this.ad&&xz(this)}u(vz,V);vz.prototype.release=function(){this.i.stop();this.i=null;V.prototype.release.call(this)};function wz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function xz(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.za(),a.i.ha(.5))}N("shaka.ui.SkipAdButton",vz);function yz(a,b){sx.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}u(yz,sx);yz.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};yz.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
1126
+ N("shaka.ui.SmallPlayButton",yz);function zz(){}zz.prototype.create=function(a,b){return new yz(a,b)};Ox("play_pause",new zz);function Az(a,b){V.call(this,a,b);var c=S("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}u(Az,V);N("shaka.ui.Spacer",Az);function Bz(){}Bz.prototype.create=function(a,b){return new Az(a,b)};Ox("spacer",new Bz);function Cz(a,b){function c(l){return ox(h.h[l],!1)+" (m)"}function d(l){return Math.round(h.h[l]/1E3)+" (kbits/s)"}function e(l){return h.h[l].toFixed(2)+" (s)"}function f(l){return h.h[l]+" (frames)"}function g(l){return h.h[l]+" (px)"}V.call(this,a,b);var h=this;this.i=sk();this.i.classList.add("shaka-statistics-button");this.j=S("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);var k=S("label");k.classList.add("shaka-overflow-button-label");
1124
1127
  this.A=S("span");k.appendChild(this.A);this.m=S("span");this.m.classList.add("shaka-current-selection-span");k.appendChild(this.m);this.i.appendChild(k);this.parent.appendChild(this.i);this.g=S("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-statistics-container");this.g.classList.add("shaka-hidden");this.controls.g.appendChild(this.g);this.F=[];this.G=["stateHistory","switchHistory"];this.h=this.player.getStats();
1125
- this.B={};this.C={width:g,height:g,completionPercent:function(l){return h.h[l]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f};this.l=new Q(function(){h.h=h.player.getStats();for(var l=r(h.F),m=l.next();!m.done;m=l.next())m=m.value,h.B[m].textContent=h.C[m](m)});Bz(this);Cz(this);this.eventManager.o(this.localization,
1126
- "locale-updated",function(){Bz(h)});this.eventManager.o(this.localization,"locale-changed",function(){Bz(h)});this.eventManager.o(this.i,"click",function(){X(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ha(.1),X(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),X(h.g,!1));Bz(h)})}u(Az,V);
1127
- function Bz(a){a.A.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1128
- function Cz(a){for(var b=r(a.controls.i.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=S("div"),h=S("label");h.textContent=c+":";g.appendChild(h);h=S("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Sa("Unrecognized statistic element:",c)}Az.prototype.release=function(){this.l.stop();this.l=null;V.prototype.release.call(this)};N("shaka.ui.StatisticsButton",Az);function Dz(){}
1129
- Dz.prototype.create=function(a,b){return new Az(a,b)};iy("statistics",new Dz);wx("statistics",new Dz);function Ez(a,b){zy.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Pb()?this.button.ariaPressed="true":this.button.ariaPressed="false";Fz(this);this.eventManager.o(this.localization,"locale-updated",function(){Gz(c);Hz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Gz(c);Hz(c)});this.eventManager.o(this.player,
1130
- "texttrackvisibility",function(){Iz(c);Hz(c)});this.eventManager.o(this.player,"textchanged",function(){Hz(c)});this.eventManager.o(this.player,"trackschanged",function(){Jz(c)});Iz(this);Gz(this);Hz(this);Jz(this)}u(Ez,zy);function Fz(a){var b=Xj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(lx());a.g=S("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1131
- function Iz(a){a.player.Pb()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new O("captionselectionupdated"))}
1132
- function Hz(a){var b=a.player.pb();xy(b,a.menu,function(c){return Kz(a,c)},a.player.Pb(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=Xj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.ze(!1);Hz(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Pb()||(b.ariaSelected="true",b.appendChild(lx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1133
- a.currentSelection.textContent);kx(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function Kz(a,b){return M(function(c){a.player.pe(b);return A(c,a.player.ze(!0),0)})}function Gz(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
1134
- function Jz(a){var b=0<a.player.pb().length;X(a.button,b);Hz(a)}N("shaka.ui.TextSelection",Ez);function Lz(){}Lz.prototype.create=function(a,b){return new Ez(a,b)};iy("captions",new Lz);Mx("captions",new Lz);function Mz(a,b){yx.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return Nz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return Oz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return Oz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return Nz(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Pz(c)});
1135
- this.eventManager.o(this.localization,"locale-changed",function(){return Pz(c)});Nz(this);Pz(this);if(this.ad)this.onChange()}u(Mz,yx);Mz.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function Nz(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Qz(a)}function Oz(a){var b=a.ad.getVolume();a.setValue(b);Qz(a)}
1136
- function Qz(a){var b=a.h.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function Pz(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}N("shaka.ui.VolumeBar",Mz);function Rz(){}Rz.prototype.create=function(a,b){return new Mz(a,b)};Mx("volume",new Rz);}).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})();
1128
+ this.B={};this.C={width:g,height:g,completionPercent:function(l){return h.h[l]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f};this.l=new Q(function(){h.h=h.player.getStats();for(var l=r(h.F),m=l.next();!m.done;m=l.next())m=m.value,h.B[m].textContent=h.C[m](m)});Dz(this);Ez(this);this.eventManager.o(this.localization,
1129
+ "locale-updated",function(){Dz(h)});this.eventManager.o(this.localization,"locale-changed",function(){Dz(h)});this.eventManager.o(this.i,"click",function(){X(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ha(.1),X(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),X(h.g,!1));Dz(h)})}u(Cz,V);
1130
+ function Dz(a){a.A.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1131
+ function Ez(a){for(var b=r(a.controls.i.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=S("div"),h=S("label");h.textContent=c+":";g.appendChild(h);h=S("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Sa("Unrecognized statistic element:",c)}Cz.prototype.release=function(){this.l.stop();this.l=null;V.prototype.release.call(this)};N("shaka.ui.StatisticsButton",Cz);function Fz(){}
1132
+ Fz.prototype.create=function(a,b){return new Cz(a,b)};ky("statistics",new Fz);yx("statistics",new Fz);function Gz(a,b){By.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Pb()?this.button.ariaPressed="true":this.button.ariaPressed="false";Hz(this);this.eventManager.o(this.localization,"locale-updated",function(){Iz(c);Jz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Iz(c);Jz(c)});this.eventManager.o(this.player,
1133
+ "texttrackvisibility",function(){Kz(c);Jz(c)});this.eventManager.o(this.player,"textchanged",function(){Jz(c)});this.eventManager.o(this.player,"trackschanged",function(){Lz(c)});Kz(this);Iz(this);Jz(this);Lz(this)}u(Gz,By);function Hz(a){var b=sk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(nx());a.g=S("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1134
+ function Kz(a){a.player.Pb()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new O("captionselectionupdated"))}
1135
+ function Jz(a){var b=a.player.ob();zy(b,a.menu,function(c){return Mz(a,c)},a.player.Pb(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=sk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Ce(!1);Jz(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Pb()||(b.ariaSelected="true",b.appendChild(nx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1136
+ a.currentSelection.textContent);mx(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function Mz(a,b){return M(function(c){a.player.se(b);return A(c,a.player.Ce(!0),0)})}function Iz(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
1137
+ function Lz(a){var b=0<a.player.ob().length;X(a.button,b);Jz(a)}N("shaka.ui.TextSelection",Gz);function Nz(){}Nz.prototype.create=function(a,b){return new Gz(a,b)};ky("captions",new Nz);Ox("captions",new Nz);function Oz(a,b){Ax.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return Pz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return Qz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return Qz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return Pz(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Rz(c)});
1138
+ this.eventManager.o(this.localization,"locale-changed",function(){return Rz(c)});Pz(this);Rz(this);if(this.ad)this.onChange()}u(Oz,Ax);Oz.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function Pz(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Sz(a)}function Qz(a){var b=a.ad.getVolume();a.setValue(b);Sz(a)}
1139
+ function Sz(a){var b=a.h.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function Rz(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}N("shaka.ui.VolumeBar",Oz);function Tz(){}Tz.prototype.create=function(a,b){return new Oz(a,b)};Ox("volume",new Tz);}).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})();
1137
1140
 
1138
1141
  //# sourceMappingURL=shaka-player.ui.map