shaka-player 3.2.17 → 3.2.19

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 (41) hide show
  1. package/.github/workflows/selenium-lab-tests.yaml +22 -0
  2. package/CHANGELOG.md +27 -0
  3. package/dist/locales.js +28 -28
  4. package/dist/shaka-player.compiled.d.ts +5 -0
  5. package/dist/shaka-player.compiled.debug.d.ts +5 -0
  6. package/dist/shaka-player.compiled.debug.externs.js +4 -0
  7. package/dist/shaka-player.compiled.debug.js +93 -87
  8. package/dist/shaka-player.compiled.debug.map +3 -3
  9. package/dist/shaka-player.compiled.externs.js +4 -0
  10. package/dist/shaka-player.compiled.js +258 -255
  11. package/dist/shaka-player.compiled.map +3 -3
  12. package/dist/shaka-player.ui.d.ts +5 -0
  13. package/dist/shaka-player.ui.debug.d.ts +5 -0
  14. package/dist/shaka-player.ui.debug.externs.js +4 -0
  15. package/dist/shaka-player.ui.debug.js +107 -101
  16. package/dist/shaka-player.ui.debug.map +3 -3
  17. package/dist/shaka-player.ui.externs.js +4 -0
  18. package/dist/shaka-player.ui.js +271 -267
  19. package/dist/shaka-player.ui.map +3 -3
  20. package/externs/shaka/text.js +7 -0
  21. package/lib/dash/segment_template.js +17 -5
  22. package/lib/hls/hls_parser.js +1 -1
  23. package/lib/player.js +7 -1
  24. package/lib/polyfill/media_capabilities.js +1 -0
  25. package/lib/text/cue.js +6 -0
  26. package/lib/text/ui_text_displayer.js +25 -9
  27. package/lib/text/vtt_text_parser.js +256 -91
  28. package/lib/text/web_vtt_generator.js +21 -9
  29. package/lib/util/dom_utils.js +3 -1
  30. package/lib/util/platform.js +8 -0
  31. package/lib/util/stream_utils.js +6 -0
  32. package/package.json +1 -1
  33. package/support.html +1 -0
  34. package/test/dash/dash_parser_manifest_unit.js +0 -36
  35. package/test/player_unit.js +4 -2
  36. package/test/test/util/layout_tests.js +433 -0
  37. package/test/test/util/util.js +0 -120
  38. package/test/{ui → text}/text_displayer_layout_unit.js +59 -235
  39. package/test/text/ui_text_displayer_unit.js +72 -4
  40. package/test/text/vtt_text_parser_unit.js +127 -6
  41. package/test/text/web_vtt_layout_integration.js +528 -0
@@ -16,10 +16,10 @@ ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(v
16
16
  function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ha(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ia="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ja;
17
17
  if("function"==typeof Object.setPrototypeOf)ja=Object.setPrototypeOf;else{var ka;a:{var la={a:!0},na={};try{na.__proto__=la;ka=na.a;break a}catch(a){}ka=!1}ja=ka?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ja;
18
18
  function pa(a,b){a.prototype=ia(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.ri=b.prototype}function qa(){this.v=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.B=this.i=null}function ra(a){if(a.v)throw new TypeError("Generator is already running");a.v=!0}qa.prototype.A=function(a){this.h=a};
19
- function sa(a,b){a.i={Re:b,bf:!0};a.g=a.m||a.j}qa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.C=function(a){this.g=a};function z(a){a.g=0}function A(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ta(a){a.m=0;a.j=2}function ua(a,b,c){a.g=b;a.m=c||0}function F(a,b){a.m=b||0;var c=a.i.Re;a.i=null;return c}function va(a){a.B=[a.i];a.m=0;a.j=0}
20
- function wa(a,b){var c=a.B.splice(0)[0];(c=a.i=a.i||c)?c.bf?a.g=a.m||a.j:void 0!=c.C&&a.j<c.C?(a.g=c.C,a.i=null):a.g=a.j:a.g=b}function xa(a){this.g=new qa;this.h=a}function za(a,b){ra(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)}
19
+ function sa(a,b){a.i={Se:b,cf:!0};a.g=a.m||a.j}qa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.C=function(a){this.g=a};function z(a){a.g=0}function A(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ta(a){a.m=0;a.j=2}function ua(a,b,c){a.g=b;a.m=c||0}function F(a,b){a.m=b||0;var c=a.i.Se;a.i=null;return c}function va(a){a.B=[a.i];a.m=0;a.j=0}
20
+ function wa(a,b){var c=a.B.splice(0)[0];(c=a.i=a.i||c)?c.cf?a.g=a.m||a.j:void 0!=c.C&&a.j<c.C?(a.g=c.C,a.i=null):a.g=a.j:a.g=b}function xa(a){this.g=new qa;this.h=a}function za(a,b){ra(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.v=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(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.v=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.v=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.bf)throw b.Re;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.v=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.v=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.cf)throw b.Se;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
23
  function Ca(a){this.next=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l.next,b,a.g.A):(a.g.A(b),b=Ba(a));return b};this["throw"]=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l["throw"],b,a.g.A):(sa(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 Da(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 I(a){return Da(new Ca(new xa(a)))}function Ea(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
25
25
  ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.v=!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=
@@ -40,7 +40,7 @@ m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.ite
40
40
  ea("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
41
41
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
42
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});ea("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});
43
- function Ia(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{Ye:e,yf:f}}return{Ye:-1,yf:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ia(this,b,c).Ye}});ea("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 Ia(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{Ze:e,yf:f}}return{Ze:-1,yf:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ia(this,b,c).Ze}});ea("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
  ea("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,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 Ja(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
  ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ja(this,b,"includes").indexOf(b,c||0)}});ea("Array.prototype.find",function(a){return a?a:function(b,c){return Ia(this,b,c).yf}});ea("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ja(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 Ka="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};ea("Object.assign",function(a){return a||Ka});ea("Array.prototype.values",function(a){return a?a:function(){return Ha(this,function(b,c){return c})}});
@@ -54,7 +54,7 @@ function K(a,b){var c=a.split("."),d=La;c[0]in d||"undefined"==typeof d.execScri
54
54
  SPDX-License-Identifier: Apache-2.0
55
55
  */
56
56
  function M(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
57
- function Ma(a){var b=new M(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}M.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};M.prototype.stopImmediatePropagation=function(){this.g=!0};M.prototype.stopPropagation=function(){};K("shaka.util.FakeEvent",M);function Na(){}function Oa(){}function Pa(){}function Qa(a){var b=Ea.apply(1,arguments);Sa.has(a)||(Sa.add(a),Pa.apply(Na,ha(b)))}function Ta(){}function Wa(){}function Xa(){}function Ya(){}var Sa=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);Pa=$a[2];Oa=$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.ua=new ab;this.Vc=this}cb.prototype.addEventListener=function(a,b){this.ua&&this.ua.push(a,b)};cb.prototype.removeEventListener=function(a,b){this.ua&&this.ua.remove(a,b)};cb.prototype.dispatchEvent=function(a){if(!this.ua)return!0;var b=this.ua.get(a.type)||[],c=this.ua.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Vc;a.currentTarget=this.Vc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
57
+ function Ma(a){var b=new M(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}M.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};M.prototype.stopImmediatePropagation=function(){this.g=!0};M.prototype.stopPropagation=function(){};K("shaka.util.FakeEvent",M);function Na(){}function Oa(){}function Pa(){}function Qa(a){var b=Ea.apply(1,arguments);Sa.has(a)||(Sa.add(a),Pa.apply(Na,ha(b)))}function Ta(){}function Wa(){}function Xa(){}function Ya(){}var Sa=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);Pa=$a[2];Oa=$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.ua=new ab;this.cd=this}cb.prototype.addEventListener=function(a,b){this.ua&&this.ua.push(a,b)};cb.prototype.removeEventListener=function(a,b){this.ua&&this.ua.remove(a,b)};cb.prototype.dispatchEvent=function(a){if(!this.ua)return!0;var b=this.ua.get(a.type)||[],c=this.ua.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.cd;a.currentTarget=this.cd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
58
58
  cb.prototype.release=function(){this.ua=null};function db(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function eb(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function fb(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function gb(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())e=e.value,b(e)&&c.push(e);return c};/*
59
59
  @license
60
60
  Copyright 2008 The Closure Library Authors
@@ -65,9 +65,9 @@ var hb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
65
65
  Copyright 2006 The Closure Library Authors
66
66
  SPDX-License-Identifier: Apache-2.0
67
67
  */
68
- function ib(a){var b;a instanceof ib?(jb(this,a.Ua),this.Ob=a.Ob,this.Va=a.Va,mb(this,a.bc),this.Na=a.Na,nb(this,a.g.clone()),this.Bb=a.Bb):a&&(b=String(a).match(hb))?(jb(this,b[1]||"",!0),this.Ob=ob(b[2]||""),this.Va=ob(b[3]||"",!0),mb(this,b[4]),this.Na=ob(b[5]||"",!0),nb(this,b[6]||"",!0),this.Bb=ob(b[7]||"")):this.g=new pb(null)}q=ib.prototype;q.Ua="";q.Ob="";q.Va="";q.bc=null;q.Na="";q.Bb="";
69
- q.toString=function(){var a=[],b=this.Ua;b&&a.push(qb(b,rb,!0),":");if(b=this.Va){a.push("//");var c=this.Ob;c&&a.push(qb(c,rb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.bc;null!=b&&a.push(":",String(b))}if(b=this.Na)this.Va&&"/"!=b.charAt(0)&&a.push("/"),a.push(qb(b,"/"==b.charAt(0)?sb:tb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Bb)&&a.push("#",qb(b,ub));return a.join("")};
70
- q.resolve=function(a){var b=this.clone();"data"===b.Ua&&(b=new ib);var c=!!a.Ua;c?jb(b,a.Ua):c=!!a.Ob;c?b.Ob=a.Ob:c=!!a.Va;c?b.Va=a.Va:c=null!=a.bc;var d=a.Na;if(c)mb(b,a.bc);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.Va&&!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(""):".."==
68
+ function ib(a){var b;a instanceof ib?(jb(this,a.Ua),this.Ob=a.Ob,this.Wa=a.Wa,mb(this,a.bc),this.Na=a.Na,nb(this,a.g.clone()),this.Bb=a.Bb):a&&(b=String(a).match(hb))?(jb(this,b[1]||"",!0),this.Ob=ob(b[2]||""),this.Wa=ob(b[3]||"",!0),mb(this,b[4]),this.Na=ob(b[5]||"",!0),nb(this,b[6]||"",!0),this.Bb=ob(b[7]||"")):this.g=new pb(null)}q=ib.prototype;q.Ua="";q.Ob="";q.Wa="";q.bc=null;q.Na="";q.Bb="";
69
+ q.toString=function(){var a=[],b=this.Ua;b&&a.push(qb(b,rb,!0),":");if(b=this.Wa){a.push("//");var c=this.Ob;c&&a.push(qb(c,rb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.bc;null!=b&&a.push(":",String(b))}if(b=this.Na)this.Wa&&"/"!=b.charAt(0)&&a.push("/"),a.push(qb(b,"/"==b.charAt(0)?sb:tb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Bb)&&a.push("#",qb(b,ub));return a.join("")};
70
+ q.resolve=function(a){var b=this.clone();"data"===b.Ua&&(b=new ib);var c=!!a.Ua;c?jb(b,a.Ua):c=!!a.Ob;c?b.Ob=a.Ob:c=!!a.Wa;c?b.Wa=a.Wa:c=null!=a.bc;var d=a.Na;if(c)mb(b,a.bc);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.Wa&&!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(""):".."==
71
71
  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.Bb;c&&(b.Bb=a.Bb);return b};q.clone=function(){return new ib(this)};function jb(a,b,c){a.Ua=c?ob(b,!0):b;a.Ua&&(a.Ua=a.Ua.replace(/:$/,""))}function mb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.bc=b}else a.bc=null}function nb(a,b,c){b instanceof pb?a.g=b:(c||(b=qb(b,vb)),a.g=new pb(b))}
72
72
  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}q=pb.prototype;q.La=null;q.Uc=null;
73
73
  q.add=function(a,b){if(!this.La&&(this.La={},this.Uc=0,this.g))for(var c=this.g.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.g=null;(c=this.La.hasOwnProperty(a)&&this.La[a])||(this.La[a]=c=[]);c.push(b);this.Uc++;return this};
@@ -81,7 +81,7 @@ FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESP
81
81
  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,INDEXED_DB_INIT_TIMED_OUT:9017,
82
82
  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 xb(a,b){this.g=a;this.h=b}xb.prototype.toString=function(){return"v"+this.g+"."+this.h};function yb(a,b){var c=new xb(4,0),d=zb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Ab(a,b,c,d){Pa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Bb(a,b,c,d){Oa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var zb=null;function Cb(a,b){return a.concat(b)}function Db(){}function Eb(a){return null!=a}function Fb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(yb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){yb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Gb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new ib(d)});return a.map(function(d){return new ib(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Cb,[]).map(function(d){return d.toString()})}function Hb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
83
83
  function Ib(a,b){if(1==b.length)return b[0];var c=Jb(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function Jb(a,b){for(var c=t(Kb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Lb?"":null}
84
- var Lb="text",Mb={bb:"video",xb:"audio",ka:Lb,pc:"image",eh:"application"},Kb={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 Nb(a,b){a=Ob(a);b=Ob(b);return a.split("-")[0]==b.split("-")[0]}function Pb(a,b){a=Ob(a);b=Ob(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Qb(a,b){a=Ob(a);b=Ob(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Ob(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Rb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Sb(a,b){a=Ob(a);b=Ob(b);return b==a?4:Pb(b,a)?3:Qb(b,a)?2:Pb(a,b)?1:0}
84
+ var Lb="text",Mb={cb:"video",zb:"audio",ma:Lb,pc:"image",eh:"application"},Kb={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 Nb(a,b){a=Ob(a);b=Ob(b);return a.split("-")[0]==b.split("-")[0]}function Pb(a,b){a=Ob(a);b=Ob(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Qb(a,b){a=Ob(a);b=Ob(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Ob(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Rb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Sb(a,b){a=Ob(a);b=Ob(b);return b==a?4:Pb(b,a)?3:Qb(b,a)?2:Pb(a,b)?1:0}
85
85
  function Tb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Rb.get(a)||a}function Ub(a){return a.language?Ob(a.language):a.audio&&a.audio.language?Ob(a.audio.language):a.video&&a.video.language?Ob(a.video.language):"und"}
86
86
  function Vb(a,b){for(var c=Ob(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(Ob(f.value));e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Pb(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Qb(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Pb(c,f))return f;return null}
87
87
  var Rb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
@@ -90,13 +90,13 @@ var Rb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
90
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",
91
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",
92
92
  "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Wb(a){cb.call(this);this.j=Ob(a);this.i=new Map;this.g=new Set;this.h=new Map}pa(Wb,cb);q=Wb.prototype;q.release=function(){cb.prototype.release.call(this)};
93
- q.Le=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Ob(c.value));Xb(this);a=gb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new M("unknown-locales",(new Map).set("locales",a)));a=gb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new M("locale-changed",a))};
93
+ q.Me=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Ob(c.value));Xb(this);a=gb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new M("unknown-locales",(new Map).set("locales",a)));a=gb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new M("locale-changed",a))};
94
94
  q.ba=function(a,b,c){a=Ob(a);void 0===c&&(c=Yb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Yb||d.set(f,e)});this.h.set(a,d);Xb(this);this.dispatchEvent(new M("locale-updated"));return this};q.Pg=function(a){for(var b=t(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 M("unknown-localization",a));return""};
95
95
  function Xb(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=t(d),h=g.next();!h.done;f={Sb:f.Sb},h=g.next()){f.Sb=h.value;e.add(f.Sb);e.add(Tb(f.Sb));h=gb(b.keys(),function(l){return function(m){var n=l.Sb,p=Tb(m),r=Tb(n);return m!=p&&n!=r&&p==r}}(f));h.sort();var k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=gb(b.keys(),function(l){return function(m){return Tb(m)==l.Sb}}(f));h.sort();k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=t(e);for(h=e.next();!h.done;h=e.next())(h=
96
96
  b.get(h.value))&&c.push(h);c.reverse();a.i.clear();b=t(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=t(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Zb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new M("missing-localizations",d)))}function Zb(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}K("shaka.ui.Localization",Wb);
97
- Wb.prototype.resolve=Wb.prototype.resolve;Wb.prototype.resolveDictionary=Wb.prototype.Pg;Wb.prototype.insert=Wb.prototype.ba;Wb.prototype.changeLocale=Wb.prototype.Le;Wb.prototype.release=Wb.prototype.release;var Yb=1;Wb.ConflictResolution={USE_OLD:0,USE_NEW:Yb};Wb.UNKNOWN_LOCALES="unknown-locales";Wb.UNKNOWN_LOCALIZATION="unknown-localization";Wb.MISSING_LOCALIZATIONS="missing-localizations";Wb.LOCALE_CHANGED="locale-changed";Wb.LOCALE_UPDATED="locale-updated";var $b={ei:"UNDETERMINED_LANGUAGE",Qh:"REPLAY",ph:"EXIT_FULL_SCREEN",jh:"CAPTIONS",Wh:"SKIP_TO_LIVE",ii:"UNRECOGNIZED_LANGUAGE",BACK:"BACK",Hh:"NOT_APPLICABLE",Af:"SUBTITLE_FORCED",Fh:"MUTE",Mh:"PAUSE",yh:"LOOP",Oh:"PLAY",kh:"CAST",Sh:"REWIND",dh:"AIRPLAY",He:"LIVE",ah:"AD_DURATION",nh:"ENTER_PICTURE_IN_PICTURE",Ih:"OFF",Eh:"MULTIPLE_LANGUAGES",wh:"FULL_SCREEN",Ph:"PLAYBACK_RATE",Nh:"PICTURE_IN_PICTURE",AD_PROGRESS:"AD_PROGRESS",Jh:"ON",mh:"ENTER_LOOP_MODE",fh:"AUTO_QUALITY",Vh:"SKIP_AD",ki:"VOLUME",
98
- qh:"EXIT_LOOP_MODE",rh:"EXIT_PICTURE_IN_PICTURE",xh:"LANGUAGE",Uh:"SEEK",Rh:"RESOLUTION",Dh:"MORE_SETTINGS",bh:"AD_TIME",gi:"UNMUTE",vh:"FAST_FORWARD"};function ac(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}ac.prototype.sample=function(a,b){var c=Math.pow(this.i,a);c=b*(1-c)+c*this.g;isNaN(c)||(this.g=c,this.h+=a)};function bc(a){return a.g/(1-Math.pow(a.i,a.h))};function cc(){this.h=new ac(2);this.i=new ac(5);this.g=0}cc.prototype.sample=function(a,b){if(!(16E3>b)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.i.sample(d,c)}};cc.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(bc(this.h),bc(this.i))};function dc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ec(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={xd:d.xd},e=a.next()){d.xd=e.value;e=b.findIndex(function(f){return function(g){return c(f.xd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
99
- function gc(a,b,c){c||(c=dc);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 hc(a,b,c){this.startTime=a;this.direction=ic;this.endTime=b;this.payload=c;this.region=new jc;this.position=null;this.positionAlign=kc;this.size=0;this.textAlign=lc;this.writingMode=mc;this.lineInterpretation=nc;this.line=null;this.lineHeight="";this.lineAlign=oc;this.displayAlign=pc;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=qc;this.fontStyle=rc;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
97
+ Wb.prototype.resolve=Wb.prototype.resolve;Wb.prototype.resolveDictionary=Wb.prototype.Pg;Wb.prototype.insert=Wb.prototype.ba;Wb.prototype.changeLocale=Wb.prototype.Me;Wb.prototype.release=Wb.prototype.release;var Yb=1;Wb.ConflictResolution={USE_OLD:0,USE_NEW:Yb};Wb.UNKNOWN_LOCALES="unknown-locales";Wb.UNKNOWN_LOCALIZATION="unknown-localization";Wb.MISSING_LOCALIZATIONS="missing-localizations";Wb.LOCALE_CHANGED="locale-changed";Wb.LOCALE_UPDATED="locale-updated";var $b={Qh:"REPLAY",Hh:"NOT_APPLICABLE",vh:"FAST_FORWARD",jh:"CAPTIONS",Wh:"SKIP_TO_LIVE",wh:"FULL_SCREEN",nh:"ENTER_PICTURE_IN_PICTURE",xh:"LANGUAGE",Jh:"ON",ah:"AD_DURATION",rh:"EXIT_PICTURE_IN_PICTURE",Vh:"SKIP_AD",ki:"VOLUME",Oh:"PLAY",Uh:"SEEK",BACK:"BACK",Ph:"PLAYBACK_RATE",dh:"AIRPLAY",yh:"LOOP",Sh:"REWIND",Dh:"MORE_SETTINGS",mh:"ENTER_LOOP_MODE",bh:"AD_TIME",ei:"UNDETERMINED_LANGUAGE",qh:"EXIT_LOOP_MODE",Mh:"PAUSE",Ie:"LIVE",Ih:"OFF",Nh:"PICTURE_IN_PICTURE",kh:"CAST",gi:"UNMUTE",ii:"UNRECOGNIZED_LANGUAGE",
98
+ Rh:"RESOLUTION",AD_PROGRESS:"AD_PROGRESS",ph:"EXIT_FULL_SCREEN",Eh:"MULTIPLE_LANGUAGES",fh:"AUTO_QUALITY",Fh:"MUTE",Af:"SUBTITLE_FORCED"};function ac(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}ac.prototype.sample=function(a,b){var c=Math.pow(this.i,a);c=b*(1-c)+c*this.g;isNaN(c)||(this.g=c,this.h+=a)};function bc(a){return a.g/(1-Math.pow(a.i,a.h))};function cc(){this.h=new ac(2);this.i=new ac(5);this.g=0}cc.prototype.sample=function(a,b){if(!(16E3>b)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.i.sample(d,c)}};cc.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(bc(this.h),bc(this.i))};function dc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ec(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={xd:d.xd},e=a.next()){d.xd=e.value;e=b.findIndex(function(f){return function(g){return c(f.xd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
99
+ function gc(a,b,c){c||(c=dc);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 hc(a,b,c){this.startTime=a;this.direction=ic;this.endTime=b;this.payload=c;this.region=new jc;this.position=null;this.positionAlign=kc;this.size=0;this.textAlign=lc;this.writingMode=mc;this.lineInterpretation=nc;this.line=null;this.lineHeight="";this.lineAlign=oc;this.displayAlign=pc;this.fontSize=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=qc;this.fontStyle=rc;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
100
100
  [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}hc.prototype.clone=function(){var a=new hc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
101
101
  function sc(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(!gc(a.nestedCues,b.nestedCues,sc))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(!gc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}K("shaka.text.Cue",hc);var kc="auto";
102
102
  hc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:kc};var lc="center",tc={LEFT:"left",RIGHT:"right",CENTER:lc,START:"start",END:"end"};hc.textAlign=tc;var pc="after",uc={BEFORE:"before",CENTER:"center",AFTER:pc};hc.displayAlign=uc;var ic="ltr";hc.direction={HORIZONTAL_LEFT_TO_RIGHT:ic,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var mc="horizontal-tb";hc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:mc,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var nc=0;
@@ -129,8 +129,8 @@ function Pd(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Rd
129
129
  function Vd(a){var b="",c=Infinity;bb(a,function(d,e){for(var f=0,g=0,h=t(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Qd(a){var b="";a.video&&(b=xd(a.video.codecs));var c="";a.audio&&(c=xd(a.audio.codecs));return b+"-"+c}function Wd(a,b,c){a.variants=a.variants.filter(function(d){return Xd(d,b,c)})}
130
130
  function Xd(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}
131
131
  function Yd(a,b){return I(function(c){if(1==c.g)return u(c,Zd(b,0<b.offlineSessionIds.length),2);$d(a,b);ae(b);be(b);z(c)})}
132
- function Zd(a,b){return I(function(c){if(1==c.g)return u(c,ce(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=de(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Ib("video",g);f=de(f);g=Ib("audio",g);g=ee(g);g=wd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=wd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=ee(f.codecs),f=wd(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;
133
- if(Tc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Wa(fe(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Wa(fe(d));return e});z(c)})}
132
+ function Zd(a,b){return I(function(c){if(1==c.g)return u(c,ce(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=de(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Ib("video",g);f=de(f);g=Ib("audio",g);g=ee(g);var h=wd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(h))return!1;f=[f,g].join()}g=wd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(g))return!1;e.codecs=f}if(f=d.audio){g=ee(f.codecs);h=wd(f.mimeType,g,"audio");if(!MediaSource.isTypeSupported(h))return!1;
133
+ f.codecs=g}if(Tc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Wa(fe(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||Wa(fe(d));return e});z(c)})}
134
134
  function ce(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return I(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,x){var w;return I(function(C){if(1==C.g)return A(C,2),u(C,e.decodingInfo(x),4);if(2!=C.g)return w=C.h,y.decodingInfos.push(w),ua(C,0);F(C);JSON.stringify(x);z(C)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=ge(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,f.push(g(l,r));return u(v,Promise.all(f),
135
135
  0)})}
136
136
  function ge(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Ib("video",g);f=de(f);g=Ib("audio",g);g=wd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=de(f);f=wd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
@@ -163,20 +163,20 @@ Ee.prototype.create=function(a){var b=[];b=Fe(a,this.i);var c=a.filter(function(
163
163
  function Ge(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function He(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Ie(){this.g=Je;this.h=(new Map).set(Je,2).set(Ke,1)}function Le(a,b,c){a.h.set(Je,c).set(Ke,b)}var Ke=0,Je=1;function Me(a,b){var c=Ne();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.v=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}
164
164
  function Oe(a){var b,c;return I(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new N(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.v);return u(d,new Promise(function(e){(new P(e)).P(c/1E3)}),2)}a.h*=a.m;z(d)})}function Ne(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Pe(a,b){this.promise=a;this.i=b;this.g=!1}function Qe(a){return new Pe(Promise.reject(a),function(){return Promise.resolve()})}function Re(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new Pe(a,function(){return Promise.resolve()})}function Se(a){return new Pe(Promise.resolve(a),function(){return Promise.resolve()})}function Te(a){return new Pe(a,function(){return a["catch"](function(){})})}Pe.prototype.abort=function(){this.g=!0;return this.i()};
165
165
  function Ue(a){return new Pe(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Pe.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
166
- Pe.prototype.ma=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ve(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Lc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Pe(f,function(){return d()})};
167
- function Ve(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()}}}K("shaka.util.AbortableOperation",Pe);Pe.prototype.chain=Pe.prototype.ma;Pe.prototype["finally"]=Pe.prototype["finally"];Pe.all=Ue;Pe.prototype.abort=Pe.prototype.abort;Pe.notAbortable=Te;Pe.completed=Se;Pe.aborted=Re;Pe.failed=Qe;function We(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 Xe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ye(){this.g=[]}function Ze(a,b){a.g.push(b["finally"](function(){ec(a.g,b)}))}Ye.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function $e(a){cb.call(this);this.i=!1;this.l=new Ye;this.g=new Set;this.h=new Set;this.j=a||null;this.m=!1}pa($e,cb);q=$e.prototype;q.re=function(a){this.m=a};function af(a,b,c,d){c=c||bf;var e=cf[a];if(!e||c>=e.priority)cf[a]={priority:c,Gg:b,Hg:void 0===d?!1:d}}q.Ig=function(a){this.g.add(a)};q.Xg=function(a){this.g["delete"](a)};q.If=function(){this.g.clear()};q.Jg=function(a){this.h.add(a)};q.Yg=function(a){this.h["delete"](a)};q.Jf=function(){this.h.clear()};
166
+ Pe.prototype.na=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ve(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Lc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Pe(f,function(){return d()})};
167
+ function Ve(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()}}}K("shaka.util.AbortableOperation",Pe);Pe.prototype.chain=Pe.prototype.na;Pe.prototype["finally"]=Pe.prototype["finally"];Pe.all=Ue;Pe.prototype.abort=Pe.prototype.abort;Pe.notAbortable=Te;Pe.completed=Se;Pe.aborted=Re;Pe.failed=Qe;function We(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 Xe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ye(){this.g=[]}function Ze(a,b){a.g.push(b["finally"](function(){ec(a.g,b)}))}Ye.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function $e(a){cb.call(this);this.i=!1;this.l=new Ye;this.g=new Set;this.h=new Set;this.j=a||null;this.m=!1}pa($e,cb);q=$e.prototype;q.se=function(a){this.m=a};function af(a,b,c,d){c=c||bf;var e=cf[a];if(!e||c>=e.priority)cf[a]={priority:c,Gg:b,Hg:void 0===d?!1:d}}q.Ig=function(a){this.g.add(a)};q.Xg=function(a){this.g["delete"](a)};q.If=function(){this.g.clear()};q.Jg=function(a){this.h.add(a)};q.Yg=function(a){this.h["delete"](a)};q.Jf=function(){this.h.clear()};
168
168
  function df(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.l.destroy()};
169
- q.request=function(a,b){var c=this,d=new ef;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new ff(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?We(b.retryParameters):Ne();b.uris=We(b.uris);e=gf(this,a,b);var f=e.ma(function(){return hf(c,a,b,new Me(b.retryParameters,!1),0,null,d)}),g=f.ma(function(n){return jf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
170
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.ma(function(n){var p=Date.now()-l,r=n.response;r.timeMs+=k;r.timeMs+=p;n.vg||!c.j||r.fromCache||a!=kf||c.j(r.timeMs,r.data.byteLength);return r},function(n){n&&(n.severity=2);throw n;});e=new ff(m.promise,function(){return m.abort()},d);Ze(this.l,e);return e};
171
- function gf(a,b,c){var d=Se(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={Ed:e.Ed},f=a.next())e.Ed=f.value,d=d.ma(function(g){return function(){c.body&&(c.body=Fc(c.body));return g.Ed(b,c)}}(e));return d.ma(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
172
- function hf(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new ib(c.uris[e]),k=h.Ua,l=!1;k||(k=location.protocol,k=k.slice(0,-1),jb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=cf[k])?k.Gg:null;if(!m)return Qe(new N(2,1,1E3,h));var n=k.Hg,p=null,r=null,v=!1,y;return Te(Oe(d)).ma(function(){if(a.i)return Re();y=Date.now();var x=m(c.uris[e],c,b,function(B,D,E){p&&p.stop();r&&r.P(C/1E3);a.j&&b==kf&&(a.j(B,D),l=!0,g.g=E)});if(!n)return x;var w=c.retryParameters.connectionTimeout;
173
- w&&(p=new P(function(){v=!0;x.abort()}),p.P(w/1E3));var C=c.retryParameters.stallTimeout;C&&(r=new P(function(){v=!0;x.abort()}));return x}).ma(function(x){p&&p.stop();r&&r.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);return{response:x,vg:l}},function(x){p&&p.stop();r&&r.stop();if(a.i)return Re();v&&(x=new N(1,1,1003,c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity){var w=(new Map).set("error",x);w=new M("retry",w);a.dispatchEvent(w);e=(e+1)%c.uris.length;
174
- return hf(a,b,c,d,e,x,g)}}throw x;})}function jf(a,b,c){var d=Se(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={Fd:e.Fd},f=a.next())e.Fd=f.value,d=d.ma(function(g){return function(){var h=c.response;h.data&&(h.data=Fc(h.data));return g.Fd(b,h)}}(e));return d.ma(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}K("shaka.net.NetworkingEngine",$e);$e.prototype.request=$e.prototype.request;$e.prototype.destroy=$e.prototype.destroy;
175
- $e.makeRequest=df;$e.defaultRetryParameters=function(){return Ne()};$e.prototype.clearAllResponseFilters=$e.prototype.Jf;$e.prototype.unregisterResponseFilter=$e.prototype.Yg;$e.prototype.registerResponseFilter=$e.prototype.Jg;$e.prototype.clearAllRequestFilters=$e.prototype.If;$e.prototype.unregisterRequestFilter=$e.prototype.Xg;$e.prototype.registerRequestFilter=$e.prototype.Ig;$e.unregisterScheme=function(a){delete cf[a]};$e.registerScheme=af;$e.prototype.setForceHTTPS=$e.prototype.re;
169
+ q.request=function(a,b){var c=this,d=new ef;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new ff(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?We(b.retryParameters):Ne();b.uris=We(b.uris);e=gf(this,a,b);var f=e.na(function(){return hf(c,a,b,new Me(b.retryParameters,!1),0,null,d)}),g=f.na(function(n){return jf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
170
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.na(function(n){var p=Date.now()-l,r=n.response;r.timeMs+=k;r.timeMs+=p;n.vg||!c.j||r.fromCache||a!=kf||c.j(r.timeMs,r.data.byteLength);return r},function(n){n&&(n.severity=2);throw n;});e=new ff(m.promise,function(){return m.abort()},d);Ze(this.l,e);return e};
171
+ function gf(a,b,c){var d=Se(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={Ed:e.Ed},f=a.next())e.Ed=f.value,d=d.na(function(g){return function(){c.body&&(c.body=Fc(c.body));return g.Ed(b,c)}}(e));return d.na(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
172
+ function hf(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new ib(c.uris[e]),k=h.Ua,l=!1;k||(k=location.protocol,k=k.slice(0,-1),jb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=cf[k])?k.Gg:null;if(!m)return Qe(new N(2,1,1E3,h));var n=k.Hg,p=null,r=null,v=!1,y;return Te(Oe(d)).na(function(){if(a.i)return Re();y=Date.now();var x=m(c.uris[e],c,b,function(B,D,E){p&&p.stop();r&&r.P(C/1E3);a.j&&b==kf&&(a.j(B,D),l=!0,g.g=E)});if(!n)return x;var w=c.retryParameters.connectionTimeout;
173
+ w&&(p=new P(function(){v=!0;x.abort()}),p.P(w/1E3));var C=c.retryParameters.stallTimeout;C&&(r=new P(function(){v=!0;x.abort()}));return x}).na(function(x){p&&p.stop();r&&r.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);return{response:x,vg:l}},function(x){p&&p.stop();r&&r.stop();if(a.i)return Re();v&&(x=new N(1,1,1003,c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity){var w=(new Map).set("error",x);w=new M("retry",w);a.dispatchEvent(w);e=(e+1)%c.uris.length;
174
+ return hf(a,b,c,d,e,x,g)}}throw x;})}function jf(a,b,c){var d=Se(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={Fd:e.Fd},f=a.next())e.Fd=f.value,d=d.na(function(g){return function(){var h=c.response;h.data&&(h.data=Fc(h.data));return g.Fd(b,h)}}(e));return d.na(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}K("shaka.net.NetworkingEngine",$e);$e.prototype.request=$e.prototype.request;$e.prototype.destroy=$e.prototype.destroy;
175
+ $e.makeRequest=df;$e.defaultRetryParameters=function(){return Ne()};$e.prototype.clearAllResponseFilters=$e.prototype.Jf;$e.prototype.unregisterResponseFilter=$e.prototype.Yg;$e.prototype.registerResponseFilter=$e.prototype.Jg;$e.prototype.clearAllRequestFilters=$e.prototype.If;$e.prototype.unregisterRequestFilter=$e.prototype.Xg;$e.prototype.registerRequestFilter=$e.prototype.Ig;$e.unregisterScheme=function(a){delete cf[a]};$e.registerScheme=af;$e.prototype.setForceHTTPS=$e.prototype.se;
176
176
  function ef(){this.g=0}$e.NumBytesRemainingClass=ef;function ff(a,b,c){Pe.call(this,a,b);this.h=c}pa(ff,Pe);$e.PendingRequest=ff;var kf=1;$e.RequestType={MANIFEST:0,SEGMENT:kf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var bf=3;$e.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:bf};var cf={};function lf(a){this.g=!1;this.h=new Lc;this.i=a}lf.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 mf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function nf(){this.g=new ab}q=nf.prototype;q.release=function(){this.ob();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new of(a,b,c,d),this.g.push(b,a))};q.Ga=function(a,b,c,d){function e(g){f.fc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.fc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.fc(),this.g.remove(b,e))}};
177
177
  q.ob=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ha(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.fc();this.g.g={}}};K("shaka.util.EventManager",nf);nf.prototype.removeAll=nf.prototype.ob;nf.prototype.unlisten=nf.prototype.fc;nf.prototype.listenOnce=nf.prototype.Ga;nf.prototype.listen=nf.prototype.o;nf.prototype.release=nf.prototype.release;function of(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=pf(a,d);this.target.addEventListener(b,c,this.g)}
178
178
  of.prototype.fc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function pf(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 qf(a)?b:b.capture||!1}
179
- function qf(a){var b=rf;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}rf=b}return b||!1}var rf=void 0;function sf(){}function tf(a){a=gd(a);return(new ib(a)).Va}function uf(a,b,c){function d(h){Hc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ec(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=id(b,!0):e=b;a=gd(a);a=id(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}K("shaka.util.FairPlayUtils",sf);sf.initDataTransform=uf;sf.defaultGetContentId=tf;function vf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function wf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function xf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function yf(a,b){var c=zf(a,b);return 1!=c.length?null:c[0]}function Af(a,b,c){a=Bf(a,b,c);return 1!=a.length?null:a[0]}function zf(a,b){for(var c=[],d=t(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function Cf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
179
+ function qf(a){var b=rf;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}rf=b}return b||!1}var rf=void 0;function sf(){}function tf(a){a=gd(a);return(new ib(a)).Wa}function uf(a,b,c){function d(h){Hc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ec(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=id(b,!0):e=b;a=gd(a);a=id(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}K("shaka.util.FairPlayUtils",sf);sf.initDataTransform=uf;sf.defaultGetContentId=tf;function vf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function wf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function xf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function yf(a,b){var c=zf(a,b);return 1!=c.length?null:c[0]}function Af(a,b,c){a=Bf(a,b,c);return 1!=a.length?null:a[0]}function zf(a,b){for(var c=[],d=t(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function Cf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
180
180
  function Bf(a,b,c){var d=[];a=t(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function Df(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Ef(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function Ff(a){return Array.from(a.childNodes).every(Gf)?a.textContent.trim():null}
181
181
  function Gf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Hf(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 If(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)}
182
182
  function Jf(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}
@@ -190,7 +190,7 @@ ce(b,a.J,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Y=!0,x["ret
190
190
  q.qc=function(a){var b=this,c,d;return I(function(e){if(1==e.g){if(!b.A)return b.v.Ga(a,"encrypted",function(){b.m(new N(2,6,6010))}),e["return"]();b.l=a;b.v.Ga(b.l,"play",function(){for(var f=t(b.I),g=f.next();!g.done;g=f.next())hg(b,g.value);b.M=!0;b.I=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.v.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Xf(b)});c=b.l.setMediaKeys(b.A);c=c["catch"](function(f){return Promise.reject(new N(2,6,6003,f.message))});return u(e,
191
191
  c,2)}mf(b.j);ig(b);b.g.initData.length||b.D.length||(d=function(f){return jg(b,f.initDataType,Ec(f.initData))},b.v.o(b.l,"encrypted",d));z(e)})};
192
192
  function kg(a){var b,c,d,e,f;return I(function(g){switch(g.g){case 1:if(!a.A||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.C(2);break}b=df([a.g.serverCertificateUri],a.h.retryParameters);A(g,3);c=a.F.Kb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ec(d.data);ua(g,4);break;case 3:throw e=F(g),new N(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
193
- A(g,6);return u(g,a.A.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function lg(a,b){var c,d,e;return I(function(f){if(1==f.g)return u(f,mg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Za=new Lc,d.push(e.Za);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
193
+ A(g,6);return u(g,a.A.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function lg(a,b){var c,d,e;return I(function(f){if(1==f.g)return u(f,mg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.$a=new Lc,d.push(e.$a);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
194
194
  function ig(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,jg(a,d.initDataType,d.initData);c=t(a.D);for(d=c.next();!d.done;d=c.next())mg(a,d.value);b.length||a.D.length||a.B.resolve();return a.B}function jg(a,b,c){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Cc(c,e.value.initData)&&!Uc("Tizen 2"))return;ng(a,b,c,a.g.sessionType)}function og(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
195
195
  function pg(a){a=a.i.keys();a=db(a,function(b){return b.sessionId});return Array.from(a)}q.uc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Zc=function(){return wf(this.ua)};
196
196
  function bg(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y;return I(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=qg(a,c,d);x.C(2);break}return u(x,rg(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new N(2,6,6001);mf(a.j);A(x,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.G.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())r=m.value,a.G.add(r.contentType.toLowerCase());if(c.length){var w=
@@ -203,14 +203,14 @@ function rg(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x;return I(function(w){switch(w
203
203
  w.h,w["return"](c);case 6:F(w);case 7:mf(a.j);case 3:h=g.next();w.C(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){w.C(11);break}p=n.value;r=t(b.keys());h=r.next();case 12:if(h.done){n=m.next();w.C(9);break}v=h.value;y=b.get(v);x=y.drmInfos.some(function(C){return!!C.licenseServerUri});if(x!=p){w.C(13);break}A(w,15);return u(w,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=w.h,w["return"](c);case 15:F(w);case 16:mf(a.j);case 13:h=r.next();w.C(12);break;case 11:return w["return"](c)}})}
204
204
  function dg(a){a=vf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=nd(f),h=nd(e);g={kty:"oct",kid:ld(g,!1),k:ld(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Ec(hd(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
205
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
206
- function mg(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:try{c=a.A.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.v.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.M?a.I.push(k):hg(a,k)});a.v.o(c,"keystatuseschange",function(k){return tg(a,k)});e={initData:null,loaded:!1,be:Infinity,Za:null,type:"persistent-license"};a.i.set(c,e);A(h,2);return u(h,c.load(b),4);case 4:f=h.h;mf(a.j);
206
+ function mg(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:try{c=a.A.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.v.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.M?a.I.push(k):hg(a,k)});a.v.o(c,"keystatuseschange",function(k){return tg(a,k)});e={initData:null,loaded:!1,ce:Infinity,$a:null,type:"persistent-license"};a.i.set(c,e);A(h,2);return u(h,c.load(b),4);case 4:f=h.h;mf(a.j);
207
207
  if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;ug(a)&&a.B.resolve();return h["return"](c);case 2:g=F(h),mf(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
208
- function ng(a,b,c,d){try{var e=a.A.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.v.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.M?a.I.push(f):hg(a,f)});a.v.o(e,"keystatuseschange",function(f){return tg(a,f)});a.i.set(e,{initData:c,loaded:!1,be:Infinity,Za:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&ld(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
208
+ function ng(a,b,c,d){try{var e=a.A.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.v.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.M?a.I.push(f):hg(a,f)});a.v.o(e,"keystatuseschange",function(f){return tg(a,f)});a.i.set(e,{initData:c,loaded:!1,ce:Infinity,$a:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&ld(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
209
209
  var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new N(2,6,6006,f.message,f,h))}})}function vg(a,b,c){"skd"==b&&(b=c.serverCertificate,c=tf(a),a=uf(a,c,b));return a}
210
210
  function hg(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;I(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&ld(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=df([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,og(a.g.keySystem)&&wg(g),h=Date.now(),A(x,2),l=a.F.Kb.request(2,g),u(x,
211
- l.promise,4);case 4:k=x.h;ua(x,3);break;case 2:return m=F(x),n=new N(2,6,6007,m),a.m(n),d&&d.Za&&d.Za.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&ld(k.data);A(x,5);return u(x,c.update(k.data),7);case 7:ua(x,6);break;case 5:return p=F(x),r=new N(2,6,6008,p.message),a.m(r),d&&d.Za&&d.Za.reject(r),x["return"]();case 6:if(a.j.g)return x["return"]();v=new M("drmsessionupdate");a.F.onEvent(v);d&&(d.Za&&d.Za.resolve(),y=new P(function(){d.loaded=
211
+ l.promise,4);case 4:k=x.h;ua(x,3);break;case 2:return m=F(x),n=new N(2,6,6007,m),a.m(n),d&&d.$a&&d.$a.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&ld(k.data);A(x,5);return u(x,c.update(k.data),7);case 7:ua(x,6);break;case 5:return p=F(x),r=new N(2,6,6008,p.message),a.m(r),d&&d.$a&&d.$a.reject(r),x["return"]();case 6:if(a.j.g)return x["return"]();v=new M("drmsessionupdate");a.F.onEvent(v);d&&(d.$a&&d.$a.resolve(),y=new P(function(){d.loaded=
212
212
  !0;ug(a)&&a.B.resolve()}),y.P(xg));z(x)}})}function wg(a){var b=ed(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=Qf(b,"PlayReadyKeyMessage");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=md(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
213
- function tg(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(og(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||Zc())){k=Hc(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=od(h).slice(0,32);a.aa.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Za&&(a.i["delete"](c),
213
+ function tg(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(og(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||Zc())){k=Hc(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=od(h).slice(0,32);a.aa.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.$a&&(a.i["delete"](c),
214
214
  c.close()["catch"](function(){}));ug(a)&&(a.B.resolve(),a.R.P(yg))}function Uf(a){var b=a.aa,c=a.ua;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new N(2,6,6014));a.F.jd(wf(c))}
215
215
  function zg(){var a,b,c,d,e,f,g,h;return I(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,
216
216
  c],f=new Map,g=function(l){var m,n,p;return I(function(r){switch(r.g){case 1:return A(r,2),u(r,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=r.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Uc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(r,m.createMediaKeys(),5);case 5:ua(r,0);break;case 2:F(r),f.set(l,null),z(r)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](wf(f))})}
@@ -218,7 +218,7 @@ function Ag(a){var b;return I(function(c){if(1==c.g)return b=new Promise(functio
218
218
  function Xf(a){var b;return I(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return I(function(g){if(1==g.g)return A(g,2),a.$||a.D.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Ag(e),5):u(g,e.remove(),5);if(2!=g.g)return ua(g,0);F(g);z(g)})})),0)})}
219
219
  function Cg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Sa:f.Sa},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Sa=[];f.Sa=f.Sa.concat(e.initData||[]);f.Sa=f.Sa.concat(h.initData||[]);f.Sa=f.Sa.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Sa.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ha(e.keyIds),ha(h.keyIds))):
220
220
  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,
221
- initData:f.Sa,keyIds:g});break}}return c}function fg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Vf(a){a.i.forEach(function(b,c){var d=b.be,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.F.onExpirationUpdated(c.sessionId,e),b.be=e)})}function ug(a){a=a.i.values();return eb(a,function(b){return b.loaded})}
221
+ initData:f.Sa,keyIds:g});break}}return c}function fg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Vf(a){a.i.forEach(function(b,c){var d=b.ce,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.F.onExpirationUpdated(c.sessionId,e),b.ce=e)})}function ug(a){a=a.i.values();return eb(a,function(b){return b.loaded})}
222
222
  function eg(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
223
223
  function sg(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={Ia:g.Ia},h=a.next()){g.Ia=h.value;b.includes(g.Ia.licenseServerUri)||b.push(g.Ia.licenseServerUri);d.includes(g.Ia.serverCertificateUri)||d.push(g.Ia.serverCertificateUri);g.Ia.serverCertificate&&(c.some(function(m){return function(n){return Cc(n,m.Ia.serverCertificate)}}(g))||c.push(g.Ia.serverCertificate));if(g.Ia.initData){h={};for(var k=t(g.Ia.initData),l=k.next();!l.done;h={Kc:h.Kc},l=k.next())h.Kc=l.value,e.some(function(m){return function(n){var p=
224
224
  m.Kc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Cc(n.initData,p.initData)}}(h))||e.push(h.Kc)}if(g.Ia.keyIds)for(h=t(g.Ia.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
@@ -226,11 +226,11 @@ function gg(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseSe
226
226
  (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var Bg=1,xg=5,yg=.5,Dg=new Mc(function(){return Fc(new Uint8Array([0]))});function Eg(){}function Fg(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g){if(d&&(e=Gg[d.toLowerCase()]))return k["return"](e);if(f=Hg(a))if(g=Ig[f])return k["return"](g);return d?k.C(2):u(k,Jg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Gg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
227
227
  function Jg(a,b,c){var d,e,f;return I(function(g){if(1==g.g)return d=df([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function Hg(a){a=(new ib(a)).Na.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}K("shaka.media.ManifestParser",Eg);Eg.unregisterParserByMime=function(a){delete Gg[a]};Eg.registerParserByMime=function(a,b){Gg[a]=b};
228
228
  Eg.registerParserByExtension=function(a,b){Ig[a]=b};var Gg={},Ig={};function Kg(a,b){this.S=Hc(a);this.h=b==Lg;this.g=0}q=Kg.prototype;q.Fa=function(){return this.g<this.S.byteLength};q.ea=function(){return this.g};q.$f=function(){return this.S.byteLength};q.ha=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw Mg();}};q.cc=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Mg();}};q.O=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Mg();}};
229
- q.jf=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Mg();}};q.dc=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw Mg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.ub=function(a){if(this.g+a>this.S.byteLength)throw Mg();var b=Ec(this.S,this.g,a);this.g+=a;return b};
229
+ q.jf=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Mg();}};q.dc=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw Mg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.wb=function(a){if(this.g+a>this.S.byteLength)throw Mg();var b=Ec(this.S,this.g,a);this.g+=a;return b};
230
230
  q.skip=function(a){if(this.g+a>this.S.byteLength)throw Mg();this.g+=a};q.lf=function(a){if(this.g<a)throw Mg();this.g-=a};q.seek=function(a){if(0>a||a>this.S.byteLength)throw Mg();this.g=a};q.Dc=function(){for(var a=this.g;this.Fa()&&0!=this.S.getUint8(this.g);)this.g+=1;a=Ec(this.S,a,this.g-a);this.g+=1;return dd(a)};function Mg(){return new N(2,3,3E3)}K("shaka.util.DataViewReader",Kg);Kg.prototype.readTerminatedString=Kg.prototype.Dc;Kg.prototype.seek=Kg.prototype.seek;Kg.prototype.rewind=Kg.prototype.lf;
231
- Kg.prototype.skip=Kg.prototype.skip;Kg.prototype.readBytes=Kg.prototype.ub;Kg.prototype.readUint64=Kg.prototype.dc;Kg.prototype.readInt32=Kg.prototype.jf;Kg.prototype.readUint32=Kg.prototype.O;Kg.prototype.readUint16=Kg.prototype.cc;Kg.prototype.readUint8=Kg.prototype.ha;Kg.prototype.getLength=Kg.prototype.$f;Kg.prototype.getPosition=Kg.prototype.ea;Kg.prototype.hasMoreData=Kg.prototype.Fa;var Lg=1;Kg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Lg};function Ng(){this.i=[];this.h=[];this.g=!1}q=Ng.prototype;q.box=function(a,b){var c=Og(a);this.i[c]=Pg;this.h[c]=b;return this};q.T=function(a,b){var c=Og(a);this.i[c]=Qg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Kg(a,0);for(this.g=!1;a.Fa()&&!this.g;)this.ld(0,a,b,c)};
232
- q.ld=function(a,b,c,d){var e=b.ea();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.O(),g=b.O(),h=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.ea()+8>b.S.byteLength){this.g=!0;return}f=b.dc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Qg){if(d&&b.ea()+4>b.S.byteLength){this.g=!0;return}m=b.O();l=m>>>24;m&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.ea(),b=0<d?b.ub(d):new Uint8Array(0),b=new Kg(b,0),k({parser:this,partialOkay:c||
233
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.ea(),b.S.byteLength-b.ea()))}};function Rg(a){for(var b=Sg(a);a.reader.Fa()&&!a.parser.g;)a.parser.ld(a.start+b,a.reader,a.partialOkay)}function Tg(a){for(var b=Sg(a),c=a.reader.O(),d=0;d<c&&(a.parser.ld(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Ug(a){return function(b){a(b.reader.ub(b.reader.S.byteLength-b.reader.ea()))}}
231
+ Kg.prototype.skip=Kg.prototype.skip;Kg.prototype.readBytes=Kg.prototype.wb;Kg.prototype.readUint64=Kg.prototype.dc;Kg.prototype.readInt32=Kg.prototype.jf;Kg.prototype.readUint32=Kg.prototype.O;Kg.prototype.readUint16=Kg.prototype.cc;Kg.prototype.readUint8=Kg.prototype.ha;Kg.prototype.getLength=Kg.prototype.$f;Kg.prototype.getPosition=Kg.prototype.ea;Kg.prototype.hasMoreData=Kg.prototype.Fa;var Lg=1;Kg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Lg};function Ng(){this.i=[];this.h=[];this.g=!1}q=Ng.prototype;q.box=function(a,b){var c=Og(a);this.i[c]=Pg;this.h[c]=b;return this};q.T=function(a,b){var c=Og(a);this.i[c]=Qg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Kg(a,0);for(this.g=!1;a.Fa()&&!this.g;)this.ld(0,a,b,c)};
232
+ q.ld=function(a,b,c,d){var e=b.ea();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.O(),g=b.O(),h=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.ea()+8>b.S.byteLength){this.g=!0;return}f=b.dc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Qg){if(d&&b.ea()+4>b.S.byteLength){this.g=!0;return}m=b.O();l=m>>>24;m&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.ea(),b=0<d?b.wb(d):new Uint8Array(0),b=new Kg(b,0),k({parser:this,partialOkay:c||
233
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.ea(),b.S.byteLength-b.ea()))}};function Rg(a){for(var b=Sg(a);a.reader.Fa()&&!a.parser.g;)a.parser.ld(a.start+b,a.reader,a.partialOkay)}function Tg(a){for(var b=Sg(a),c=a.reader.O(),d=0;d<c&&(a.parser.ld(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Ug(a){return function(b){a(b.reader.wb(b.reader.S.byteLength-b.reader.ea()))}}
234
234
  function Og(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Vg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Sg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}K("shaka.util.Mp4Parser",Ng);Ng.headerSize=Sg;Ng.typeToString=Vg;Ng.allData=Ug;Ng.sampleDescription=Tg;Ng.children=Rg;Ng.prototype.parseNext=Ng.prototype.ld;Ng.prototype.parse=Ng.prototype.parse;Ng.prototype.stop=Ng.prototype.stop;
235
235
  Ng.prototype.fullBox=Ng.prototype.T;Ng.prototype.box=Ng.prototype.box;var Pg=0,Qg=1;function Wg(a){function b(){d=!0}function c(l){f.push(l);Rg(l)}a=Ec(a);var d=!1,e,f=[],g=[];(new Ng).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).T("stsd",function(l){e=l;f.push(l);Tg(l)}).T("encv",b).T("enca",b).T("hev1",function(l){g.push({box:l,Lb:1701733238})}).T("hvc1",function(l){g.push({box:l,Lb:1701733238})}).T("avc1",function(l){g.push({box:l,Lb:1701733238})}).T("avc3",function(l){g.push({box:l,Lb:1701733238})}).T("ac-3",function(l){g.push({box:l,Lb:1701733217})}).T("ec-3",
236
236
  function(l){g.push({box:l,Lb:1701733217})}).T("mp4a",function(l){g.push({box:l,Lb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw Ya(od(a)),new N(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=Xg(a,e,k.box,f,k.Lb);return a}
@@ -256,101 +256,102 @@ d=1===(d&1);if(c.h!==vh){f=c.g;if(c.h===uh&&e!==f.g){var k=1+e-f.h;qh(f,k,1+f.g-
256
256
  0,h-1),gh(e,e.g,15-e.g),c.j=d,e=g);break;case 46:gh(c.l,0,15);break;case 47:e=null,c.h!==vh&&(e=fh(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,wh(c),c.j=d}d=e;break a}d=null}else e=b.hb,hh(c.g,ih,b.Qa),hh(c.g,ih,e);return d}
257
257
  function $h(a,b){var c=[];try{for(;b.Fa();){var d=Nh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Nh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Oh(e));for(var g=a.j.get(e),h=b.ea();b.ea()-h<f;){e=b;var k=Nh(e),l=k.value,m=k.pts;if(16===l){var n=Nh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var r=g.g;e=null;switch(l){case 8:!Gh(r)||0>=r.g&&0>=r.h||(0>=r.g?(r.g=r.D-1,r.h--):r.g--,r.i[r.h][r.g]=null);break;case 13:r.isVisible()&&(e=Hh(r,p,g.i));if(r.h+1>=r.G){p=r;for(var v=0,y=1;16>y;y++,
258
258
  v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=Eh()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=Hh(r,p,g.i));r.i[r.h]=Eh();r.g=0;break;case 12:r.isVisible()&&(e=Hh(r,p,g.i)),Dh(r),p=r,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Ph(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Fh(g.g,"\u266a"):Fh(g.g,
259
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Fh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Vh.has(e)){var w=Vh.get(e);Fh(g.g,w)}else Fh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Fh(g.g,"_"):Fh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(C){if(C instanceof N&&3E3===C.code)Qa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function ai(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function bi(a,b){var c=null,d=null,e=a.O();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:e,Pe:c,Lf:d}}function ci(a,b){return{Md:1==b?a.dc():a.O()}}function di(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.O()}}
260
- function ei(a,b,c){var d=a.O(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={ke:null,sampleSize:null,od:null};c&256&&(g.ke=a.O());c&512&&(g.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(g.od=0==b?a.O():a.jf());e.push(g)}return{pi:d,mf:e}};function fi(){this.i=new Map;this.h=this.g=0}
259
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Fh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Vh.has(e)){var w=Vh.get(e);Fh(g.g,w)}else Fh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Fh(g.g,"_"):Fh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(C){if(C instanceof N&&3E3===C.code)Qa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function ai(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function bi(a,b){var c=null,d=null,e=a.O();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:e,Qe:c,Lf:d}}function ci(a,b){return{Md:1==b?a.dc():a.O()}}function di(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.O()}}
260
+ function ei(a,b,c){var d=a.O(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={le:null,sampleSize:null,od:null};c&256&&(g.le=a.O());c&512&&(g.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(g.od=0==b?a.O():a.jf());e.push(g)}return{pi:d,mf:e}};function fi(){this.i=new Map;this.h=this.g=0}
261
261
  fi.prototype.init=function(a){var b=this,c=[],d=[];(new Ng).box("moov",Rg).box("mvex",Rg).T("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.O();f=f.O();b.g=e;b.h=f}).box("trak",Rg).T("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.O();c.push(e)}).box("mdia",Rg).T("mdhd",function(e){e=di(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
262
- fi.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Ng).box("moof",Rg).box("traf",Rg).T("trun",function(k){f=ei(k.reader,k.version,k.flags).mf}).T("tfhd",function(k){k=bi(k.reader,k.flags);d=k.Pe||b.g;e=k.Lf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).T("tfdt",function(k){g=ci(k.reader,k.version).Md}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,r=f,v=0,y=p;for(r.length&&(y=r[0].sampleSize||p);k.Fa();){var x=k.O();if(6==
263
- (k.ha()&31)){var w=0;r.length>v&&(w=r[v].od||0);w=(l+w)/m;for(var C=[],B,D=k.ub(x-1),E=B=0;E<D.length;)2==B&&3==D[E]?(B=0,D=[].concat(ha(D)),D.splice(E,1),D=new Uint8Array(D)):0==D[E]?B++:B=0,E++;B=D;for(E=0;E<B.length;){for(D=0;255==B[E];)D+=255,E++;D+=B[E++];for(var G=0;255==B[E];)G+=255,E++;G+=B[E++];4==D&&C.push(B.subarray(E,E+G));E+=G}C=t(C);for(B=C.next();!B.done;B=C.next())c.push({Fg:B.value,pts:w})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=r.length>v?l+(r[v].ke||n):l+n,v++,y=r.length>
262
+ fi.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Ng).box("moof",Rg).box("traf",Rg).T("trun",function(k){f=ei(k.reader,k.version,k.flags).mf}).T("tfhd",function(k){k=bi(k.reader,k.flags);d=k.Qe||b.g;e=k.Lf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).T("tfdt",function(k){g=ci(k.reader,k.version).Md}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,r=f,v=0,y=p;for(r.length&&(y=r[0].sampleSize||p);k.Fa();){var x=k.O();if(6==
263
+ (k.ha()&31)){var w=0;r.length>v&&(w=r[v].od||0);w=(l+w)/m;for(var C=[],B,D=k.wb(x-1),E=B=0;E<D.length;)2==B&&3==D[E]?(B=0,D=[].concat(ha(D)),D.splice(E,1),D=new Uint8Array(D)):0==D[E]?B++:B=0,E++;B=D;for(E=0;E<B.length;){for(D=0;255==B[E];)D+=255,E++;D+=B[E++];for(var G=0;255==B[E];)G+=255,E++;G+=B[E++];4==D&&C.push(B.subarray(E,E+G));E+=G}C=t(C);for(B=C.next();!B.done;B=C.next())c.push({Fg:B.value,pts:w})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=r.length>v?l+(r[v].le||n):l+n,v++,y=r.length>
264
264
  v?r[v].sampleSize||p:p)}}).parse(a,!1);return c};function gi(){this.h=new fi;this.g=new Wh}gi.prototype.init=function(a){this.h.init(a)};
265
265
  function hi(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Ec(e.Fg);if(0<f.length&&(d=a.g,e=e.pts,f=new Kg(f,0),181===f.ha()&&49===f.cc()&&1195456820===f.O()&&3===f.ha())){var g=f.ha();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.ha(),l=(k&4)>>2,m=f.ha(),n=f.ha();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Qa:m,hb:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Yh(a.g)}
266
266
  ;function ii(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ji(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 ki(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(li(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}
267
267
  function mi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=li(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function li(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 ni(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.I={};this.H={};this.g=null;this.J=d||function(){};this.i={};this.v=new nf;this.A={};this.B=b;this.F=new Lc;this.m=oi(this,this.F);this.D=new lf(function(){return pi(e)});this.G=""}function oi(a,b){var c=new MediaSource;a.v.Ga(c,"sourceopen",function(){URL.revokeObjectURL(a.G);b.resolve()});a.G=qi(c);a.j.src=a.G;return c}q=ni.prototype;q.destroy=function(){return this.D.destroy()};
268
268
  function pi(a){var b,c,d,e,f,g,h,k;return I(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"](Db)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.A)b.push(a.A[k].destroy());return u(l,Promise.all(b),2)}a.v&&(a.v.release(),a.v=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.A={};a.B=null;a.i=
269
269
  {};z(l)})}
270
- q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){if(1==m.g)return d=Mb,u(m,c.F,2);e={};f=t(a.keys());for(g=f.next();!g.done;e={Ha:e.Ha},g=f.next())e.Ha=g.value,h=a.get(e.Ha),k=vd(h.mimeType,h.codecs),e.Ha==d.ka?ri(c,k):(!b&&MediaSource.isTypeSupported(k)||!rd(k,e.Ha)||(c.A[e.Ha]=new qd,k=td(e.Ha,k)),l=c.m.addSourceBuffer(k),c.v.o(l,"error",function(n){return function(){c.i[n.Ha][0].p.reject(new N(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.v.o(l,"updateend",function(n){return function(){return si(c,n.Ha)}}(e)),
270
+ q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){if(1==m.g)return d=Mb,u(m,c.F,2);e={};f=t(a.keys());for(g=f.next();!g.done;e={Ha:e.Ha},g=f.next())e.Ha=g.value,h=a.get(e.Ha),k=vd(h.mimeType,h.codecs),e.Ha==d.ma?ri(c,k):(!b&&MediaSource.isTypeSupported(k)||!rd(k,e.Ha)||(c.A[e.Ha]=new qd,k=td(e.Ha,k)),l=c.m.addSourceBuffer(k),c.v.o(l,"error",function(n){return function(){c.i[n.Ha][0].p.reject(new N(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.v.o(l,"updateend",function(n){return function(){return si(c,n.Ha)}}(e)),
271
271
  c.h[e.Ha]=l,c.I[e.Ha]=k,c.i[e.Ha]=[],c.H[e.Ha]=!!h.drmInfos.length);z(m)})};function ri(a,b){a.g||(a.g=new Ad(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Fb(Cd[b]))}function ti(a){return a.m?"ended"==a.m.readyState:!0}function ui(a,b){if(b==Lb)var c=a.g.g;else c=vi(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 wi(a,b){return b==Lb?a.g.h:ii(vi(a,b))}
272
272
  function xi(a,b,c){if(b==Lb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=vi(a,b);return ki(a,c)}q.Xc=function(){var a={total:li(this.j.buffered),audio:li(vi(this,"audio")),video:li(vi(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 vi(a,b){try{return a.h[b].buffered}catch(c){return null}}
273
- function yi(a,b,c,d,e,f){var g,h,k,l,m,n,p,r;return I(function(v){if(1==v.g){g=Mb;if(b==g.ka)return u(v,Ed(a.g,c,d,e),0);if(a.A[b])return u(v,ud(a.A[b],c),10);if(f)return a.g||ri(a,"text/vtt"),null==d&&null==e?a.B.init(c):(h=hi(a.B,c),h.length&&(k=a.h[g.bb].timestampOffset,Jd(a.g,h,d,e,k))),c=zi(a,c,d,b),u(v,Ai(a,b,function(){a.h[b].appendBuffer(c)}),0);c=zi(a,c,d,b);return u(v,Ai(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||ri(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.J(l.metadata,
274
- m,e));l.captions&&l.captions.length&&(n=a.h[g.bb].timestampOffset,p=Hd(l.captions),Jd(a.g,p,d,e,n));r=l.data;r=zi(a,r,d,b);return u(v,Ai(a,b,function(){a.h[b].appendBuffer(r)}),0)})}function Bi(a,b){var c=wi(a,"video")||0;Gd(a.g,b,c)}function Ci(a){a.g&&Gd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return I(function(f){e=Mb;return a==e.ka?u(f,d.g.remove(b,c),0):u(f,Ai(d,a,function(){c<=b?si(d,a):d.h[a].remove(b,c)}),0)})};
275
- function Fi(a,b){var c;return I(function(d){c=Mb;return b==c.ka?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,Ai(a,b,function(){var e=a.m.duration;0>=e?si(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return I(function(d){c=Mb;return a==c.ka?d["return"]():u(d,Ai(b,a,function(){b.j.currentTime-=.001;si(b,a)}),0)})};
276
- function Gi(a,b,c,d,e){var f;return I(function(g){f=Mb;return b==f.ka?(a.g.B=c,Fd(a.g,d,e),g["return"]()):u(g,Promise.all([Ai(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;si(a,b)}),Ai(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;si(a,b)}),Ai(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;si(a,b)})]),0)})}
277
- q.endOfStream=function(a){var b=this;return I(function(c){return u(c,Hi(b,function(){ti(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.Ya=function(a){var b=this;return I(function(c){return u(c,Hi(b,function(){b.m.duration=a}),0)})};q.getDuration=function(){return this.m.duration};function si(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Ii(a,b))}function Ai(a,b,c){mf(a.D);c={start:c,p:new Lc};a.i[b].push(c);1==a.i[b].length&&Ji(a,b);return c.p}
273
+ function yi(a,b,c,d,e,f){var g,h,k,l,m,n,p,r;return I(function(v){if(1==v.g){g=Mb;if(b==g.ma)return u(v,Ed(a.g,c,d,e),0);if(a.A[b])return u(v,ud(a.A[b],c),10);if(f)return a.g||ri(a,"text/vtt"),null==d&&null==e?a.B.init(c):(h=hi(a.B,c),h.length&&(k=a.h[g.cb].timestampOffset,Jd(a.g,h,d,e,k))),c=zi(a,c,d,b),u(v,Ai(a,b,function(){a.h[b].appendBuffer(c)}),0);c=zi(a,c,d,b);return u(v,Ai(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||ri(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.J(l.metadata,
274
+ m,e));l.captions&&l.captions.length&&(n=a.h[g.cb].timestampOffset,p=Hd(l.captions),Jd(a.g,p,d,e,n));r=l.data;r=zi(a,r,d,b);return u(v,Ai(a,b,function(){a.h[b].appendBuffer(r)}),0)})}function Bi(a,b){var c=wi(a,"video")||0;Gd(a.g,b,c)}function Ci(a){a.g&&Gd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return I(function(f){e=Mb;return a==e.ma?u(f,d.g.remove(b,c),0):u(f,Ai(d,a,function(){c<=b?si(d,a):d.h[a].remove(b,c)}),0)})};
275
+ function Fi(a,b){var c;return I(function(d){c=Mb;return b==c.ma?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,Ai(a,b,function(){var e=a.m.duration;0>=e?si(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return I(function(d){c=Mb;return a==c.ma?d["return"]():u(d,Ai(b,a,function(){b.j.currentTime-=.001;si(b,a)}),0)})};
276
+ function Gi(a,b,c,d,e){var f;return I(function(g){f=Mb;return b==f.ma?(a.g.B=c,Fd(a.g,d,e),g["return"]()):u(g,Promise.all([Ai(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;si(a,b)}),Ai(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;si(a,b)}),Ai(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;si(a,b)})]),0)})}
277
+ q.endOfStream=function(a){var b=this;return I(function(c){return u(c,Hi(b,function(){ti(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.Za=function(a){var b=this;return I(function(c){return u(c,Hi(b,function(){b.m.duration=a}),0)})};q.getDuration=function(){return this.m.duration};function si(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Ii(a,b))}function Ai(a,b,c){mf(a.D);c={start:c,p:new Lc};a.i[b].push(c);1==a.i[b].length&&Ji(a,b);return c.p}
278
278
  function Hi(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:mf(a.D);c=[];d={};for(e in a.h)d.lc=new Lc,f={start:function(l){return function(){return l.lc.resolve()}}(d),p:d.lc},a.i[e].push(f),c.push(d.lc),1==a.i[e].length&&f.start(),d={lc:d.lc};A(k,2);return u(k,Promise.all(c),4);case 4:ua(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)Ii(a,h)}z(k)}})}function Ii(a,b){a.i[b].shift();Ji(a,b)}
279
279
  function Ji(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),Ii(a,b)}}function zi(a,b,c,d){var e=a.H[d];null==c&&e&&(Vc()||Tc())&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=Wg(b));return b}var qi=window.URL.createObjectURL;function Ki(a,b,c){this.Ea=a;this.za=b;this.ra=c}Ki.prototype.yc=function(){return this.za};Ki.prototype.tc=function(){return this.ra};function Li(a,b){return a&&b?a.yc()==b.yc()&&a.tc()==b.tc()&&gc(a.Ea(),b.Ea()):a==b}K("shaka.media.InitSegmentReference",Ki);Ki.prototype.getEndByte=Ki.prototype.tc;Ki.prototype.getStartByte=Ki.prototype.yc;
280
280
  function Mi(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.za=d;this.ra=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=Mi.prototype;q.Ea=function(){return this.j()};q.getStartTime=function(){return this.startTime};q.Yf=function(){return this.endTime};q.yc=function(){return this.za};q.tc=function(){return this.ra};q.rg=function(){return this.tilesLayout};
281
- q.qg=function(){return this.i};K("shaka.media.SegmentReference",Mi);Mi.prototype.getTileDuration=Mi.prototype.qg;Mi.prototype.getTilesLayout=Mi.prototype.rg;Mi.prototype.getEndByte=Mi.prototype.tc;Mi.prototype.getStartByte=Mi.prototype.yc;Mi.prototype.getEndTime=Mi.prototype.Yf;Mi.prototype.getStartTime=Mi.prototype.getStartTime;Mi.prototype.getUris=Mi.prototype.Ea;function Q(a,b,c){this.l=a;this.md=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.v=0;this.A=!0;this.B=0;this.D=void 0===c?!0:c;this.F=0;this.G=!1}q=Q.prototype;q.getDuration=function(){return this.i};q.gg=function(){return this.g};q.Ya=function(a){this.i=a};q.kg=function(){return this.l};q.qf=function(a){this.v=a};q.Hc=function(a){this.A=a};q.we=function(a){this.m=a};q.Vg=function(a){this.md=a};q.Xf=function(){return this.md};
282
- q.$b=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Zd(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.D&&!this.G&&(this.l=(Date.now()+this.v)/1E3-this.h-this.g)}};q.Td=function(){this.G=!0};q.Zd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.Yd=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)};
281
+ q.qg=function(){return this.i};K("shaka.media.SegmentReference",Mi);Mi.prototype.getTileDuration=Mi.prototype.qg;Mi.prototype.getTilesLayout=Mi.prototype.rg;Mi.prototype.getEndByte=Mi.prototype.tc;Mi.prototype.getStartByte=Mi.prototype.yc;Mi.prototype.getEndTime=Mi.prototype.Yf;Mi.prototype.getStartTime=Mi.prototype.getStartTime;Mi.prototype.getUris=Mi.prototype.Ea;function Q(a,b,c){this.l=a;this.md=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.v=0;this.A=!0;this.B=0;this.D=void 0===c?!0:c;this.F=0;this.G=!1}q=Q.prototype;q.getDuration=function(){return this.i};q.gg=function(){return this.g};q.Za=function(a){this.i=a};q.kg=function(){return this.l};q.qf=function(a){this.v=a};q.Hc=function(a){this.A=a};q.xe=function(a){this.m=a};q.Vg=function(a){this.md=a};q.Xf=function(){return this.md};
282
+ q.$b=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.$d(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.D&&!this.G&&(this.l=(Date.now()+this.v)/1E3-this.h-this.g)}};q.Ud=function(){this.G=!0};q.$d=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.Zd=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)};
283
283
  q.V=function(){return Infinity==this.i&&!this.A};q.Hb=function(){return Infinity!=this.i&&!this.A};q.jb=function(){return Math.max(this.B,this.Db()-this.m)};q.tf=function(a){this.B=a};q.Db=function(){return this.V()||this.Hb()?Math.min(Math.max(0,(Date.now()+this.v)/1E3-this.g-this.l)+this.F,this.i):this.h?Math.min(this.h,this.i):this.i};q.xc=function(a){var b=Math.max(this.j,this.B);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Db()-this.m+a,this.ib()))};q.Xb=function(){return this.xc(0)};
284
284
  q.ib=function(){return Math.max(0,this.Db()-(this.V()||this.Hb()?this.md:0))};q.xf=function(){return null==this.l||null!=this.h&&this.D?!1:!0};q.pf=function(a){this.F=a};K("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.pf;Q.prototype.usingPresentationStartTime=Q.prototype.xf;Q.prototype.getSeekRangeEnd=Q.prototype.ib;Q.prototype.getSeekRangeStart=Q.prototype.Xb;Q.prototype.getSafeSeekRangeStart=Q.prototype.xc;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Db;
285
- Q.prototype.setUserSeekStart=Q.prototype.tf;Q.prototype.getSegmentAvailabilityStart=Q.prototype.jb;Q.prototype.isInProgress=Q.prototype.Hb;Q.prototype.isLive=Q.prototype.V;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.Yd;Q.prototype.notifyMinSegmentStartTime=Q.prototype.Zd;Q.prototype.lockStartTime=Q.prototype.Td;Q.prototype.notifySegments=Q.prototype.$b;Q.prototype.getDelay=Q.prototype.Xf;Q.prototype.setDelay=Q.prototype.Vg;
286
- Q.prototype.setSegmentAvailabilityDuration=Q.prototype.we;Q.prototype.setStatic=Q.prototype.Hc;Q.prototype.setClockOffset=Q.prototype.qf;Q.prototype.getPresentationStartTime=Q.prototype.kg;Q.prototype.setDuration=Q.prototype.Ya;Q.prototype.getMaxSegmentDuration=Q.prototype.gg;Q.prototype.getDuration=Q.prototype.getDuration;function Ni(a,b){this.j=a;this.m=Oi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.v=b;this.i=function(){}}Ni.prototype.release=function(){this.j=null;this.i=function(){}};function Pi(a,b){a.i=b}function Qi(a){this.g=a}function Oi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(li(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Ri(a,b,c,d,e){var f=this;this.g=a;this.D=b;this.l=c;this.B=e;this.i=new nf;this.A=!1;this.F=a.readyState;this.j=!1;this.h=d;this.v=!1;this.i.o(a,"waiting",function(){return Si(f)});this.m=(new P(function(){Si(f)})).ia(.25)}Ri.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.D=this.B=null};Ri.prototype.ce=function(){this.v=!0;Si(this)};
285
+ Q.prototype.setUserSeekStart=Q.prototype.tf;Q.prototype.getSegmentAvailabilityStart=Q.prototype.jb;Q.prototype.isInProgress=Q.prototype.Hb;Q.prototype.isLive=Q.prototype.V;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.Zd;Q.prototype.notifyMinSegmentStartTime=Q.prototype.$d;Q.prototype.lockStartTime=Q.prototype.Ud;Q.prototype.notifySegments=Q.prototype.$b;Q.prototype.getDelay=Q.prototype.Xf;Q.prototype.setDelay=Q.prototype.Vg;
286
+ Q.prototype.setSegmentAvailabilityDuration=Q.prototype.xe;Q.prototype.setStatic=Q.prototype.Hc;Q.prototype.setClockOffset=Q.prototype.qf;Q.prototype.getPresentationStartTime=Q.prototype.kg;Q.prototype.setDuration=Q.prototype.Za;Q.prototype.getMaxSegmentDuration=Q.prototype.gg;Q.prototype.getDuration=Q.prototype.getDuration;function Ni(a,b){this.j=a;this.m=Oi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.v=b;this.i=function(){}}Ni.prototype.release=function(){this.j=null;this.i=function(){}};function Pi(a,b){a.i=b}function Qi(a){this.g=a}function Oi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(li(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Ri(a,b,c,d,e){var f=this;this.g=a;this.D=b;this.l=c;this.B=e;this.i=new nf;this.A=!1;this.F=a.readyState;this.j=!1;this.h=d;this.v=!1;this.i.o(a,"waiting",function(){return Si(f)});this.m=(new P(function(){Si(f)})).ia(.25)}Ri.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.D=this.B=null};Ri.prototype.ee=function(){this.v=!0;Si(this)};
287
287
  function Si(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.A)return}else a.A=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.F&&(a.j=!1,a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Oi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.v&&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=mi(b,g,a.l.gapDetectionThreshold);if(!(null==
288
288
  c||0==c&&!a.v||(d=b.start(c),d>=a.D.ib()))){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 M("largegap",g),g.cancelable=!0,a.B(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Ti(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ui.value().get(b),c.Ga(a,b,d))}var Ui=new Mc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Vi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new nf;this.i=new Wi(a);Ti(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Xi(d,d.j)})}Vi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Yi(a){return a.m?a.g.currentTime:a.j}function Zi(a,b){0<a.g.readyState?$i(a.i,b):Ti(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Xi(a,a.j)})}
289
289
  function Xi(a,b){.001>Math.abs(a.g.currentTime-b)?aj(a):(a.h.Ga(a.g,"seeking",function(){aj(a)}),$i(a.i,0==a.g.currentTime?b:a.g.currentTime))}function aj(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Wi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new P(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Wi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
290
290
  function $i(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ia(.1)};function bj(a){this.g=a;this.j=!1;this.h=null;this.i=new nf}q=bj.prototype;q.Kd=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;Ti(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.Ld=function(a){this.h=this.j?this.h:a};q.Oc=function(){return(this.j?this.g.currentTime:this.h)||0};q.gf=function(){};
291
291
  function cj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.v=null;this.j=new Ri(a,b.presentationTimeline,c,dj(a,c),f);this.h=new Vi(a,function(){a:{var h=g.j;h.A=!0;h.v=!1;h.j=!1;var k=Yi(g.h);h=ej(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.v||g.v<k-1)){g.v=k;Zi(g.h,h);h=void 0;break a}g.A();h=void 0}return h},fj(this,d));this.m=new P(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Yi(g.h),k=g.g.Xb(),l=g.g.ib();3>l-k&&(k=l-
292
292
  3);h<k&&(h=ej(g,h),g.i.currentTime=h)}})}q=cj.prototype;q.Kd=function(){this.m.ia(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};q.Ld=function(a){Zi(this.h,a)};q.Oc=function(){var a=Yi(this.h);return 0<this.i.readyState&&!this.i.paused?gj(this,a):a};
293
- function fj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Xb():a.g.ib():0>b&&(b=a.g.ib()+b);return hj(a,gj(a,b))}q.gf=function(){this.j.ce()};function hj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function ej(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Xb(),f=a.g.ib(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.xc(c),k=a.g.xc(d);c=a.g.xc(c+d);return b>=g?hj(a,b):b>f?f:b<e?ji(a.i.buffered,k)?k:c:b>=h||ji(a.i.buffered,b)?b:c}
293
+ function fj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Xb():a.g.ib():0>b&&(b=a.g.ib()+b);return hj(a,gj(a,b))}q.gf=function(){this.j.ee()};function hj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function ej(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Xb(),f=a.g.ib(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.xc(c),k=a.g.xc(d);c=a.g.xc(c+d);return b>=g?hj(a,b):b>f?f:b<e?ji(a.i.buffered,k)?k:c:b>=h||ji(a.i.buffered,b)?b:c}
294
294
  function gj(a,b){var c=a.g.Xb();if(b<c)return c;c=a.g.ib();return b>c?c:b}function dj(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new Ni(new Qi(a),b.stallThreshold);Pi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function ij(a){this.N=a;this.g=null;this.h=0;this.i=!1}q=ij.prototype;q.destroy=function(){yb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.N=[],this.g&&this.g.stop(),this.g=null)};q.Ag=function(){this.i=!0};
295
295
  q.find=function(a){for(var b=this.N.length-1,c=b;0<=c;--c){var d=this.N[c],e=c<b?this.N[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.N.length&&a<this.N[0].startTime?this.h:null};q.get=function(a){if(0==this.N.length)return null;a-=this.h;return 0>a||a>=this.N.length?null:this.N[a]};q.offset=function(a){if(!this.i)for(var b=t(this.N),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
296
296
  q.gd=function(a){!this.i&&a.length&&(this.N=this.N.filter(function(b){return b.startTime<a[0].startTime}),this.N.push.apply(this.N,ha(a)))};q.Zb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.N.length||d.endTime>c.N[0].startTime)});this.gd(a);this.Ab(b)};q.Ab=function(a){if(!this.i){var b=this.N.length;this.N=this.N.filter(function(c){return c.endTime>a});this.h+=b-this.N.length}};
297
- q.sb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.N.length;)if(this.N[this.N.length-1].startTime>=b)this.N.pop();else break;for(;this.N.length;)if(this.N[0].endTime<=a)this.N.shift(),c||this.h++;else break;0!=this.N.length&&(a=this.N[this.N.length-1],this.N[this.N.length-1]=new Mi(a.startTime,b,a.j,a.za,a.ra,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.i))}};
297
+ q.ub=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.N.length;)if(this.N[this.N.length-1].startTime>=b)this.N.pop();else break;for(;this.N.length;)if(this.N[0].endTime<=a)this.N.shift(),c||this.h++;else break;0!=this.N.length&&(a=this.N[this.N.length-1],this.N[this.N.length-1]=new Mi(a.startTime,b,a.j,a.za,a.ra,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.i))}};
298
298
  q.qd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new P(function(){var d=b();d?c.N.push.apply(c.N,ha(d)):(c.g.stop(),c.g=null)}),this.g.ia(a))};ij.prototype[Symbol.iterator]=function(){return this.Cb(0)};ij.prototype.Cb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new jj(this,b,d)};
299
- function kj(a,b,c){return new ij([new Mi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}K("shaka.media.SegmentIndex",ij);ij.forSingleSegment=kj;ij.prototype.getIteratorForTime=ij.prototype.Cb;ij.prototype.updateEvery=ij.prototype.qd;ij.prototype.fit=ij.prototype.sb;ij.prototype.evict=ij.prototype.Ab;ij.prototype.mergeAndEvict=ij.prototype.Zb;ij.prototype.merge=ij.prototype.gd;ij.prototype.offset=ij.prototype.offset;ij.prototype.get=ij.prototype.get;ij.prototype.find=ij.prototype.find;
299
+ function kj(a,b,c){return new ij([new Mi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}K("shaka.media.SegmentIndex",ij);ij.forSingleSegment=kj;ij.prototype.getIteratorForTime=ij.prototype.Cb;ij.prototype.updateEvery=ij.prototype.qd;ij.prototype.fit=ij.prototype.ub;ij.prototype.evict=ij.prototype.Ab;ij.prototype.mergeAndEvict=ij.prototype.Zb;ij.prototype.merge=ij.prototype.gd;ij.prototype.offset=ij.prototype.offset;ij.prototype.get=ij.prototype.get;ij.prototype.find=ij.prototype.find;
300
300
  ij.prototype.markImmutable=ij.prototype.Ag;ij.prototype.release=ij.prototype.release;ij.prototype.destroy=ij.prototype.destroy;function jj(a,b,c){this.i=a;this.h=b;this.g=c}jj.prototype.seek=function(a){yb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.Cb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
301
301
  jj.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.Ea().length&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};jj.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.g.length?(this.g++,a.Ea().length&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};K("shaka.media.SegmentIterator",jj);jj.prototype.next=jj.prototype.next;jj.prototype.current=jj.prototype.current;
302
302
  jj.prototype.seek=jj.prototype.seek;function lj(){ij.call(this,[]);this.j=[]}pa(lj,ij);q=lj.prototype;q.clone=function(){var a=new lj;a.j=this.j.slice();return a};q.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.N.length}return null};
303
- q.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.N.length}return null};q.offset=function(){};q.gd=function(){};q.Ab=function(){};q.Zb=function(){};q.sb=function(){};q.qd=function(){};K("shaka.media.MetaSegmentIndex",lj);lj.prototype.updateEvery=lj.prototype.qd;lj.prototype.fit=lj.prototype.sb;lj.prototype.mergeAndEvict=lj.prototype.Zb;lj.prototype.evict=lj.prototype.Ab;lj.prototype.merge=lj.prototype.gd;
304
- lj.prototype.offset=lj.prototype.offset;lj.prototype.get=lj.prototype.get;lj.prototype.find=lj.prototype.find;lj.prototype.release=lj.prototype.release;function mj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.bd();this.h=new P(function(){b.g.ef(.25*b.i)})}mj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};mj.prototype.set=function(a){this.i=a;nj(this)};mj.prototype.Yc=function(){return this.g.Yc()};function nj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.bd()!=b&&a.g.ue(b);return}catch(c){}a.h.ia(.25);0!=a.g.bd()&&a.g.ue(0)};function oj(a){var b=this;this.h=a;this.g=new Set;this.i=(new P(function(){pj(b,!1)})).ia(.25)}oj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};
303
+ q.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.N.length}return null};q.offset=function(){};q.gd=function(){};q.Ab=function(){};q.Zb=function(){};q.ub=function(){};q.qd=function(){};K("shaka.media.MetaSegmentIndex",lj);lj.prototype.updateEvery=lj.prototype.qd;lj.prototype.fit=lj.prototype.ub;lj.prototype.mergeAndEvict=lj.prototype.Zb;lj.prototype.evict=lj.prototype.Ab;lj.prototype.merge=lj.prototype.gd;
304
+ lj.prototype.offset=lj.prototype.offset;lj.prototype.get=lj.prototype.get;lj.prototype.find=lj.prototype.find;lj.prototype.release=lj.prototype.release;function mj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.bd();this.h=new P(function(){b.g.ef(.25*b.i)})}mj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};mj.prototype.set=function(a){this.i=a;nj(this)};mj.prototype.Yc=function(){return this.g.Yc()};function nj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.bd()!=b&&a.g.ve(b);return}catch(c){}a.h.ia(.25);0!=a.g.bd()&&a.g.ve(0)};function oj(a){var b=this;this.h=a;this.g=new Set;this.i=(new P(function(){pj(b,!1)})).ia(.25)}oj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};
305
305
  function pj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=t(d.i.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.g.get(h),l=e<h.startTime?qj:e>h.endTime?rj:sj;d.g.set(h,l);for(var m=t(d.j),n=m.next();!n.done;n=m.next())n=n.value,n.Qb==k&&n.Pb==l&&n.Gb(h,f)}}};function tj(a){cb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new P(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new M("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ia(2)}pa(tj,cb);tj.prototype.release=function(){this.g.clear();this.h.stop();cb.prototype.release.call(this)};function uj(a){cb.call(this);var b=this;this.i=a;this.g=new Map;this.j=[{Qb:null,Pb:sj,Gb:function(c,d){return vj(b,"enter",c,d)}},{Qb:qj,Pb:sj,Gb:function(c,d){return vj(b,"enter",c,d)}},{Qb:rj,Pb:sj,Gb:function(c,d){return vj(b,"enter",c,d)}},{Qb:sj,Pb:qj,Gb:function(c,d){return vj(b,"exit",c,d)}},{Qb:sj,Pb:rj,Gb:function(c,d){return vj(b,"exit",c,d)}},{Qb:qj,Pb:rj,Gb:function(c,d){return vj(b,"skip",c,d)}},{Qb:rj,Pb:qj,Gb:function(c,d){return vj(b,"skip",c,d)}}];this.h=new nf;this.h.o(this.i,"regionremove",
306
306
  function(c){b.g["delete"](c.region)})}pa(uj,cb);uj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;cb.prototype.release.call(this)};function vj(a,b,c,d){b=new M(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var qj=1,sj=2,rj=3;function wj(a,b,c,d,e){a=df(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function xj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.B=1;this.v=this.l=null;this.i=new Map;this.D=!1;this.F=null;this.A=!1;this.h=new lf(function(){return yj(c)})}xj.prototype.destroy=function(){return this.h.destroy()};function yj(a){var b,c,d,e;return I(function(f){if(1==f.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,zj(e),b.push(Aj(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;z(f)})}
307
307
  xj.prototype.configure=function(a){this.j=a;this.F=new Me({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)};xj.prototype.start=function(){var a=this;return I(function(b){if(1==b.g)return u(b,Bj(a),2);mf(a.h);a.D=!0;z(b)})};
308
- function Cj(a,b){var c,d,e,f,g,h;I(function(k){switch(k.g){case 1:return c=Mb,A(k,2),u(k,Fi(a.g.U,c.ka),4);case 4:ua(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=vd(b.mimeType,b.codecs);ri(a.g.U,e);f=a.g.U.l;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=Dj(b),a.i.set(c.ka,h),Ej(a,h,0);z(k)}})}function Fj(a){var b=a.i.get(Lb);b&&(zj(b),Aj(b)["catch"](function(){}),a.i["delete"](Lb));a.v=null}
308
+ function Cj(a,b){var c,d,e,f,g,h;I(function(k){switch(k.g){case 1:return c=Mb,A(k,2),u(k,Fi(a.g.U,c.ma),4);case 4:ua(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=vd(b.mimeType,b.codecs);ri(a.g.U,e);f=a.g.U.l;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=Dj(b),a.i.set(c.ma,h),Ej(a,h,0);z(k)}})}function Fj(a){var b=a.i.get(Lb);b&&(zj(b),Aj(b)["catch"](function(){}),a.i["delete"](Lb));a.v=null}
309
309
  function Gj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Nb&&(Hj(a,e,!1,0,!1),c.Nb=d)}else if(d=c.Nb)c.Nb=null,Hj(a,d,!0,0,!1)}}function Ij(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.D&&(b.video&&Hj(a,b.video,c,d,e),b.audio&&Hj(a,b.audio,c,d,e))}function Jj(a,b){a.v=b;a.D&&Hj(a,b,!0,0,!1)}
310
- function Hj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=Lb?f&&(f.Nb&&(b.trickModeVideo?(f.Nb=b,b=b.trickModeVideo):f.Nb=null),f.stream!=b||e)&&(b.type==Lb&&ri(a.g.U,vd(b.mimeType,b.codecs)),f.stream=b,f.oa=null,c&&(f.rc?f.td=!0:f.Ja?(f.wb=!0,f.Tc=d,f.td=!0):(zj(f),Kj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Lj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):Cj(a,b)}
310
+ function Hj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=Lb?f&&(f.Nb&&(b.trickModeVideo?(f.Nb=b,b=b.trickModeVideo):f.Nb=null),f.stream!=b||e)&&(b.type==Lb&&ri(a.g.U,vd(b.mimeType,b.codecs)),f.stream=b,f.qa=null,c&&(f.rc?f.td=!0:f.Ja?(f.yb=!0,f.Tc=d,f.td=!0):(zj(f),Kj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Lj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):Cj(a,b)}
311
311
  function Lj(a,b){var c,d;return I(function(e){if(1==e.g){if(!b.Ma)return e["return"]();c=b.stream;d=b.Ma;return c.segmentIndex?e.C(2):u(e,c.createSegmentIndex(),2)}if(b.Ma!=d||b.stream!=c)return e["return"]();var f=a.g.$c();var g=wi(a.g.U,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.ra?k.ra-k.za:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ra?k.ra-k.za:null)||0),k=a.g.getBandwidthEstimate(),
312
- f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.Ma.h.g>h?!0:!1):f=!1;f&&b.Ma.abort();z(e)})}function Mj(a,b){b.rc||b.wb||(b.Ja?(b.wb=!0,b.Tc=0):null==ui(a.g.U,b.type)?null==b.$a&&Ej(a,b,0):(zj(b),Kj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
313
- function Bj(a){var b,c,d,e,f,g,h,k,l,m;return I(function(n){if(1==n.g){b=Mb;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.xb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.bb,a.l.video),d.add(a.l.video));a.v&&(c.set(b.ka,a.v),d.add(a.v));e=a.g.U;f=a.j.forceTransmuxTS;return u(n,e.init(c,f),2)}mf(a.h);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.U.Ya(p):a.g.U.Ya(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||
314
- (m=Dj(l),a.i.set(k,m),Ej(a,m,0));z(n)})}function Dj(a){return{stream:a,type:a.type,oa:null,Ra:null,fd:null,Sd:null,Rd:null,Qd:null,Nb:null,endOfStream:!1,Ja:!1,$a:null,wb:!1,Tc:0,td:!1,rc:!1,ge:!1,zc:!1,Ma:null}}
315
- function Nj(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:mf(a.h);if(b.Ja||null==b.$a||b.rc)return h["return"]();b.$a=null;if(!b.wb){h.C(2);break}return u(h,Kj(a,b,b.td,b.Tc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.C(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return b.Ja||b.$a||Ej(a,b,0),h["return"]();case 4:A(h,6);d=Oj(a,b);null!=d&&(Ej(a,b,d),b.zc=!1);ua(h,7);break;case 6:return e=F(h),u(h,Pj(a,e),8);case 8:return h["return"]();
316
- case 7:f=Array.from(a.i.values());if(!a.D||!f.every(function(k){return k.endOfStream})){h.C(0);break}return u(h,a.g.U.endOfStream(),10);case 10:mf(a.h),g=a.g.U.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ya(g),z(h)}})}
312
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.Ma.h.g>h?!0:!1):f=!1;f&&b.Ma.abort();z(e)})}function Mj(a,b){b.rc||b.yb||(b.Ja?(b.yb=!0,b.Tc=0):null==ui(a.g.U,b.type)?null==b.ab&&Ej(a,b,0):(zj(b),Kj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
313
+ function Bj(a){var b,c,d,e,f,g,h,k,l,m;return I(function(n){if(1==n.g){b=Mb;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.zb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.cb,a.l.video),d.add(a.l.video));a.v&&(c.set(b.ma,a.v),d.add(a.v));e=a.g.U;f=a.j.forceTransmuxTS;return u(n,e.init(c,f),2)}mf(a.h);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.U.Za(p):a.g.U.Za(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||
314
+ (m=Dj(l),a.i.set(k,m),Ej(a,m,0));z(n)})}function Dj(a){return{stream:a,type:a.type,qa:null,Ra:null,fd:null,Td:null,Sd:null,Rd:null,Nb:null,endOfStream:!1,Ja:!1,ab:null,yb:!1,Tc:0,td:!1,rc:!1,ie:!1,zc:!1,Ma:null}}
315
+ function Nj(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:mf(a.h);if(b.Ja||null==b.ab||b.rc)return h["return"]();b.ab=null;if(!b.yb){h.C(2);break}return u(h,Kj(a,b,b.td,b.Tc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.C(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return b.Ja||b.ab||Ej(a,b,0),h["return"]();case 4:A(h,6);d=Oj(a,b);null!=d&&(Ej(a,b,d),b.zc=!1);ua(h,7);break;case 6:return e=F(h),u(h,Pj(a,e),8);case 8:return h["return"]();
316
+ case 7:f=Array.from(a.i.values());if(!a.D||!f.every(function(k){return k.endOfStream})){h.C(0);break}return u(h,a.g.U.endOfStream(),10);case 10:mf(a.h),g=a.g.U.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Za(g),z(h)}})}
317
317
  function Oj(a,b){if(Qj(b))return Bi(a.g.U,b.stream.originalId||""),null;b.type==Lb&&Ci(a.g.U);var c=a.g.$c(),d=b.Ra?b.Ra.endTime:c,e=xi(a.g.U,b.type,c),f=Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal,a.j.bufferingGoal)*a.B,g=a.m.presentationTimeline.getDuration()-d,h=wi(a.g.U,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(Lb))&&Qj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=Rj(a,b,c,h);if(!e)return a.j.updateIntervalSeconds;
318
- f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Qj(h)||h.oa&&!h.oa.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;Sj(a,b,c,e)["catch"](function(){});return null}
319
- function Rj(a,b,c,d){if(b.oa)return b.oa.current();if(b.Ra||d)return b.oa=b.stream.segmentIndex.Cb(b.Ra?b.Ra.endTime:d),b.oa&&b.oa.next().value;a=a.j.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.oa=b.stream.segmentIndex.Cb(d),e=b.oa&&b.oa.next().value);e||(b.oa=b.stream.segmentIndex.Cb(c),e=b.oa&&b.oa.next().value);return e}
320
- function Sj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,v,y,x,w,C;return I(function(B){switch(B.g){case 1:return e=Mb,f=b.stream,g=b.oa,b.Ja=!0,A(B,2),u(B,Tj(a,b,d),4);case 4:mf(a.h);if(a.A)return B["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h)return n=new Uint8Array(0),r=p=!1,v=function(D){var E,G,H;return I(function(L){if(p)return L["return"]();r=!0;mf(a.h);if(a.A)return L["return"]();n=Uj(n,D);E=!1;G=0;(new Ng).box("mdat",function(J){G=
321
- J.size+J.start;E=!0}).parse(n,!1,!0);if(!E)return L.C(0);H=n.subarray(0,G);n=n.subarray(G);return u(L,Vj(a,b,c,f,d,H),0)})},u(B,Wj(a,b,d,v),9);l=Wj(a,b,d);return u(B,l,7);case 7:return m=B.h,mf(a.h),a.A?B["return"]():b.wb?(b.Ja=!1,Ej(a,b,0),B["return"]()):u(B,Vj(a,b,c,f,d,m),6);case 9:y=B.h;if(r){B.C(6);break}p=!0;mf(a.h);return a.A?B["return"]():b.wb?(b.Ja=!1,Ej(a,b,0),B["return"]()):u(B,Vj(a,b,c,f,d,y),6);case 6:mf(a.h);if(a.A)return B["return"]();b.Ra=d;g.next();b.Ja=!1;b.ge=!1;x=a.g.U.Xc();w=
322
- x[b.type];Xa(JSON.stringify(w));b.wb||a.g.ce();Ej(a,b,0);ua(B,0);break;case 2:C=F(B);mf(a.h,C);if(a.A)return B["return"]();b.Ja=!1;if(7001==C.code)b.Ja=!1,zj(b),Ej(a,b,0),B.C(0);else if(b.type==e.ka&&a.j.ignoreTextStreamFailures)a.i["delete"](e.ka),B.C(0);else if(3017==C.code)Xj(a,b,C),B.C(0);else return b.zc=!0,C.severity=2,u(B,Pj(a,C),0)}})}function Uj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
323
- function Xj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.ge})){var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.zc=!0;a.A=!0;a.g.onError(c);return}b.ge=!0}Ej(a,b,4)}
324
- function Tj(a,b,c){var d,e,f,g,h,k,l;return I(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Sd||e!=b.Rd||f!=b.Qd)h=function(){var n;return I(function(p){if(1==p.g)return A(p,2),b.Rd=e,b.Qd=f,b.Sd=g,u(p,Gi(a.g.U,b.type,g,e,f),4);if(2!=p.g)return ua(p,0);n=F(p);b.Rd=null;b.Qd=null;b.Sd=null;throw n;})},d.push(h());!Li(c.h,b.fd)&&(b.fd=c.h)&&(k=Wj(a,b,c.h),l=function(){var n,p,r;return I(function(v){switch(v.g){case 1:return A(v,2),u(v,k,4);
318
+ f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Qj(h)||h.qa&&!h.qa.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;Sj(a,b,c,e)["catch"](function(){});return null}
319
+ function Rj(a,b,c,d){if(b.qa)return b.qa.current();if(b.Ra||d)return b.qa=b.stream.segmentIndex.Cb(b.Ra?b.Ra.endTime:d),b.qa&&b.qa.next().value;a=a.j.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.qa=b.stream.segmentIndex.Cb(d),e=b.qa&&b.qa.next().value);e||(b.qa=b.stream.segmentIndex.Cb(c),e=b.qa&&b.qa.next().value);return e}
320
+ function Sj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,v,y,x,w,C;return I(function(B){switch(B.g){case 1:return e=Mb,f=b.stream,g=b.qa,b.Ja=!0,A(B,2),u(B,Tj(a,b,d),4);case 4:mf(a.h);if(a.A)return B["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h)return n=new Uint8Array(0),r=p=!1,v=function(D){var E,G,H;return I(function(L){if(p)return L["return"]();r=!0;mf(a.h);if(a.A)return L["return"]();n=Uj(n,D);E=!1;G=0;(new Ng).box("mdat",function(J){G=
321
+ J.size+J.start;E=!0}).parse(n,!1,!0);if(!E)return L.C(0);H=n.subarray(0,G);n=n.subarray(G);return u(L,Vj(a,b,c,f,d,H),0)})},u(B,Wj(a,b,d,v),9);l=Wj(a,b,d);return u(B,l,7);case 7:return m=B.h,mf(a.h),a.A?B["return"]():b.yb?(b.Ja=!1,Ej(a,b,0),B["return"]()):u(B,Vj(a,b,c,f,d,m),6);case 9:y=B.h;if(r){B.C(6);break}p=!0;mf(a.h);return a.A?B["return"]():b.yb?(b.Ja=!1,Ej(a,b,0),B["return"]()):u(B,Vj(a,b,c,f,d,y),6);case 6:mf(a.h);if(a.A)return B["return"]();b.Ra=d;g.next();b.Ja=!1;b.ie=!1;x=a.g.U.Xc();w=
322
+ x[b.type];Xa(JSON.stringify(w));b.yb||a.g.ee();Ej(a,b,0);ua(B,0);break;case 2:C=F(B);mf(a.h,C);if(a.A)return B["return"]();b.Ja=!1;if(7001==C.code)b.Ja=!1,zj(b),Ej(a,b,0),B.C(0);else if(b.type==e.ma&&a.j.ignoreTextStreamFailures)a.i["delete"](e.ma),B.C(0);else if(3017==C.code)Xj(a,b,C),B.C(0);else return b.zc=!0,C.severity=2,u(B,Pj(a,C),0)}})}function Uj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
323
+ function Xj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.ie})){var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.zc=!0;a.A=!0;a.g.onError(c);return}b.ie=!0}Ej(a,b,4)}
324
+ function Tj(a,b,c){var d,e,f,g,h,k,l;return I(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Td||e!=b.Sd||f!=b.Rd)h=function(){var n;return I(function(p){if(1==p.g)return A(p,2),b.Sd=e,b.Rd=f,b.Td=g,u(p,Gi(a.g.U,b.type,g,e,f),4);if(2!=p.g)return ua(p,0);n=F(p);b.Sd=null;b.Rd=null;b.Td=null;throw n;})},d.push(h());!Li(c.h,b.fd)&&(b.fd=c.h)&&(k=Wj(a,b,c.h),l=function(){var n,p,r;return I(function(v){switch(v.g){case 1:return A(v,2),u(v,k,4);
325
325
  case 4:return n=v.h,mf(a.h),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,yi(a.g.U,b.type,n,null,null,p),5);case 5:ua(v,0);break;case 2:throw r=F(v),b.fd=null,r;}})},d.push(l()));return u(m,Promise.all(d),0)})}
326
326
  function Vj(a,b,c,d,e,f){var g;return I(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new Ng).T("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Dc();var n=k.reader.Dc();var p=k.reader.O();var r=k.reader.O();var v=k.reader.O();var y=k.reader.O();var x=e.startTime+r/p}else p=k.reader.O(),x=k.reader.dc()/p+e.timestampOffset,r=x-e.startTime,v=k.reader.O(),y=k.reader.O(),m=k.reader.Dc(),n=k.reader.Dc();
327
- k=k.reader.ub(k.reader.S.byteLength-k.reader.ea());l&&l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.g.Eg():(l=(new Map).set("detail",{startTime:x,endTime:x+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:r,eventDuration:v,id:y,messageData:k}),l=new M(Yj,l),a.g.onEvent(l)))}).parse(f),u(h,Zj(a,b,c),2);if(3!=h.g)return mf(a.h),u(h,yi(a.g.U,b.type,f,e.startTime,e.endTime,g),3);mf(a.h);z(h)})}
327
+ k=k.reader.wb(k.reader.S.byteLength-k.reader.ea());l&&l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.g.Eg():(l=(new Map).set("detail",{startTime:x,endTime:x+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:r,eventDuration:v,id:y,messageData:k}),l=new M(Yj,l),a.g.onEvent(l)))}).parse(f),u(h,Zj(a,b,c),2);if(3!=h.g)return mf(a.h),u(h,yi(a.g.U,b.type,f,e.startTime,e.endTime,g),3);mf(a.h);z(h)})}
328
328
  function Zj(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=ui(a.g.U,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.U.remove(b.type,e,e+g),2)}mf(a.h);z(h)})}function Qj(a){return a&&a.type==Lb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
329
329
  function Wj(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g)return e=kf,f=wj(c.Ea(),c.za,c.ra,a.j.retryParameters,d),g=a.g.Kb.request(e,f),b.Ma=g,u(k,g.promise,2);h=k.h;b.Ma=null;return k["return"](h.data)})}
330
- function Kj(a,b,c,d){var e,f;return I(function(g){if(1==g.g)return b.wb=!1,b.td=!1,b.Tc=0,b.rc=!0,b.Ra=null,b.fd=null,b.oa=null,d?(e=a.g.$c(),f=a.g.U.getDuration(),u(g,a.g.U.remove(b.type,e+d,f),3)):u(g,Fi(a.g.U,b.type),4);if(3!=g.g)return mf(a.h),c?u(g,a.g.U.flush(b.type),3):g.C(3);mf(a.h);b.rc=!1;b.endOfStream=!1;b.Ja||b.$a||Ej(a,b,0);z(g)})}
331
- function Ej(a,b,c){var d=b.type;if(d!=Lb||a.i.has(d))b.$a=(new Nc(function(){var e;return I(function(f){if(1==f.g)return A(f,2),u(f,Nj(a,b),4);if(2!=f.g)return ua(f,0);e=F(f);if(a.g)a.g.onError(e);z(f)})})).P(c)}function zj(a){null!=a.$a&&(a.$a.stop(),a.$a=null)}function Aj(a){return I(function(b){return a.Ma?u(b,a.Ma.abort(),0):b.C(0)})}function Pj(a,b){return I(function(c){if(1==c.g)return u(c,Oe(a.F),2);mf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);z(c)})};function ak(a,b){var c=bk(),d=this;this.j=b;this.i=a;this.l=c;this.v=null;this.m=[];this.h=this.g=null;this.B=Promise.resolve().then(function(){return ck(d)});this.A=new lf(function(){return dk(d)})}ak.prototype.destroy=function(){return this.A.destroy()};function dk(a){var b,c,d;return I(function(e){if(1==e.g)return a.h&&a.h.abort(),ek(a),u(e,a.B,2);a.g&&a.g.Wa.Mb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Wa.Mb();a.g=null;a.m=[];a.j=null;z(e)})}
332
- function fk(a,b){var c={ac:function(){},hd:function(){},Mb:function(){},onError:function(){},kd:function(){},oi:function(){}};a.m.push({create:b,Wa:c});a.h&&a.h.abort();ek(a);return c}
333
- function ck(a){return I(function(b){if(a.A.g)b=b.C(0);else{if(0==a.m.length||a.g&&!a.g.Fb)var c=!1;else{a.g&&(a.g.Wa.Mb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Wa.ac(),a.g={node:d.node,payload:d.payload,Fb:d.Fb,Wa:c.Wa}):c.Wa.kd();c=!0}c?c=Promise.resolve():a.g?c=gk(a):(a.j.Dg(a.i),a.v=new Lc,c=a.v);b=u(b,c,1)}return b})}
334
- function gk(a){var b,c;return I(function(d){switch(d.g){case 1:return a.i=a.j.ig(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.Nf(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Wa.hd(),a.g=null);ua(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Wa.Mb();else a.g.Wa.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function ek(a){a.v&&(a.v.resolve(),a.v=null)};function hk(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=hk.prototype;q.remove=function(a,b){if(!this.g)return!1;ik(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
330
+ function Kj(a,b,c,d){var e,f;return I(function(g){if(1==g.g)return b.yb=!1,b.td=!1,b.Tc=0,b.rc=!0,b.Ra=null,b.fd=null,b.qa=null,d?(e=a.g.$c(),f=a.g.U.getDuration(),u(g,a.g.U.remove(b.type,e+d,f),3)):u(g,Fi(a.g.U,b.type),4);if(3!=g.g)return mf(a.h),c?u(g,a.g.U.flush(b.type),3):g.C(3);mf(a.h);b.rc=!1;b.endOfStream=!1;b.Ja||b.ab||Ej(a,b,0);z(g)})}
331
+ function Ej(a,b,c){var d=b.type;if(d!=Lb||a.i.has(d))b.ab=(new Nc(function(){var e;return I(function(f){if(1==f.g)return A(f,2),u(f,Nj(a,b),4);if(2!=f.g)return ua(f,0);e=F(f);if(a.g)a.g.onError(e);z(f)})})).P(c)}function zj(a){null!=a.ab&&(a.ab.stop(),a.ab=null)}function Aj(a){return I(function(b){return a.Ma?u(b,a.Ma.abort(),0):b.C(0)})}function Pj(a,b){return I(function(c){if(1==c.g)return u(c,Oe(a.F),2);mf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);z(c)})};function ak(a,b){var c=bk(),d=this;this.j=b;this.i=a;this.l=c;this.v=null;this.m=[];this.h=this.g=null;this.B=Promise.resolve().then(function(){return ck(d)});this.A=new lf(function(){return dk(d)})}ak.prototype.destroy=function(){return this.A.destroy()};function dk(a){var b,c,d;return I(function(e){if(1==e.g)return a.h&&a.h.abort(),ek(a),u(e,a.B,2);a.g&&a.g.Xa.Mb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Xa.Mb();a.g=null;a.m=[];a.j=null;z(e)})}
332
+ function fk(a,b){var c={ac:function(){},hd:function(){},Mb:function(){},onError:function(){},kd:function(){},oi:function(){}};a.m.push({create:b,Xa:c});a.h&&a.h.abort();ek(a);return c}
333
+ function ck(a){return I(function(b){if(a.A.g)b=b.C(0);else{if(0==a.m.length||a.g&&!a.g.Fb)var c=!1;else{a.g&&(a.g.Xa.Mb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Xa.ac(),a.g={node:d.node,payload:d.payload,Fb:d.Fb,Xa:c.Xa}):c.Xa.kd();c=!0}c?c=Promise.resolve():a.g?c=gk(a):(a.j.Dg(a.i),a.v=new Lc,c=a.v);b=u(b,c,1)}return b})}
334
+ function gk(a){var b,c;return I(function(d){switch(d.g){case 1:return a.i=a.j.ig(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.Nf(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Xa.hd(),a.g=null);ua(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Xa.Mb();else a.g.Xa.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function ek(a){a.v&&(a.v.resolve(),a.v=null)};function hk(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=hk.prototype;q.remove=function(a,b){if(!this.g)return!1;ik(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
335
335
  q.append=function(a){function b(h,k){for(var l=t(h),m=l.next();!m.done;m=l.next())if(m=m.value,m.isContainer)b(m.nestedCues,k);else{var n=m.clone();n.nestedCues=[];n.payload=c(m);k.push(n)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,r){return p+"<"+r+">"},"");k=k.reduceRight(function(p,r){return p+"</"+r+">"},"");return h.lineBreak||h.spacer?(h.spacer&&yb("shaka.extern.Cue",
336
336
  "Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(c).join(""):l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=t(d);for(var g=d.next();!g.done;f={Rb:f.Rb},g=d.next())f.Rb=g.value,a.some(function(h){return function(k){return k.startTime==h.Rb.startTime&&k.endTime==h.Rb.endTime&&k.text==h.Rb.payload?!0:!1}}(f))||(g=jk(f.Rb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=
337
337
  k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-e.indexOf(k)});a=t(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};q.destroy=function(){this.g&&(ik(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"};
338
338
  function jk(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}
339
- function ik(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}K("shaka.text.SimpleTextDisplayer",hk);hk.prototype.setTextVisibility=hk.prototype.setTextVisibility;hk.prototype.isTextVisible=hk.prototype.isTextVisible;hk.prototype.destroy=hk.prototype.destroy;hk.prototype.append=hk.prototype.append;hk.prototype.remove=hk.prototype.remove;function kk(){}function R(a){return document.createElement(a)}function lk(){return document.createElement("button")}function mk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}K("shaka.util.Dom",kk);kk.removeAllChildren=mk;function nk(a,b){var c=this;this.j=!1;this.i=[];this.D=a;this.m=b;this.g=R("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.B=(new P(function(){ok(c)})).ia(.25);this.h=new Map;this.A=new nf;this.A.o(document,"fullscreenchange",function(){ok(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){ok(c,
339
+ function ik(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}K("shaka.text.SimpleTextDisplayer",hk);hk.prototype.setTextVisibility=hk.prototype.setTextVisibility;hk.prototype.isTextVisible=hk.prototype.isTextVisible;hk.prototype.destroy=hk.prototype.destroy;hk.prototype.append=hk.prototype.append;hk.prototype.remove=hk.prototype.remove;function kk(){}function R(a){return document.createElement(a)}function lk(){var a=document.createElement("button");a.setAttribute("type","button");return a}function mk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}K("shaka.util.Dom",kk);kk.removeAllChildren=mk;function nk(a,b){var c=this;this.j=!1;this.i=[];this.D=a;this.m=b;this.g=R("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.B=(new P(function(){ok(c)})).ia(.25);this.h=new Map;this.A=new nf;this.A.o(document,"fullscreenchange",function(){ok(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){ok(c,
340
340
  !0)}),this.l.observe(this.g));this.v=new Map}q=nk.prototype;q.append=function(a){var b=[].concat(ha(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={Ic:c.Ic},d=a.next())c.Ic=d.value,b.some(function(e){return function(f){return sc(f,e.Ic)}}(c))||this.i.push(c.Ic);ok(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.B&&this.B.stop();this.h.clear();this.A&&(this.A.release(),this.A=null);this.l&&(this.l.disconnect(),this.l=null)};
341
341
  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});ok(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};function pk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
342
342
  function qk(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.zf:null;l&&(g.push(l.Nd),l.Ec&&g.push(l.Ec),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l?pk(a,n)||(f=!0):(rk(a,k,e),l=a.h.get(k),n=l.zf,f=!0));0<k.nestedCues.length&&n&&qk(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=
343
343
  r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Ec?(c.appendChild(d.Ec),d.Ec.appendChild(d.Nd)):c.appendChild(d.Nd)}}function ok(a,b){if(a.g){var c=a.D.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=t(a.v.values()),e=d.next();!e.done;e=d.next())mk(e.value);mk(a.g);a.h.clear();a.v.clear()}if(a.j){d=new Map;e=t(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));qk(a,a.i,a.g,c,[])}}}
344
- function rk(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&yb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=R(e);"br"!=e&&sk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.v.has(c.id))c=a.v.get(c.id);else{e=R("span");var g=c.heightUnits==zc?"%":"px",h=c.widthUnits==zc?"%":"px",k=c.viewportAnchorUnits==zc?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+
345
- 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.v.set(c.id,e);c=e}e=f;d&&(e=R("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{Nd:f,zf:e,Ec:c})}
346
- function sk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.backgroundColor=c.backgroundColor;f.border=c.border;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=tk(c.linePadding,c,a.m);f.paddingRight=tk(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition=
347
- "center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=R("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=uk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");
348
- g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=tk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==mc?(f.width="100%",c.lineAlign==oc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==oc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=100-c.line+"%")):(f.height=
349
- "100%",c.lineAlign==oc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%")));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==mc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);
350
- c.size&&(c.writingMode==mc?f.width=c.size+"%":f.height=c.size+"%")}function tk(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 uk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}K("shaka.text.UITextDisplayer",nk);
351
- nk.prototype.setTextVisibility=nk.prototype.setTextVisibility;nk.prototype.isTextVisible=nk.prototype.isTextVisible;nk.prototype.remove=nk.prototype.remove;nk.prototype.destroy=nk.prototype.destroy;nk.prototype.append=nk.prototype.append;function vk(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,r){return p+"<"+r+">"},
352
- "");k=k.reduceRight(function(p,r){return p+"</"+r+">"},"");return h.lineBreak||h.spacer?(h.spacer&&yb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=t(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");
353
- break;case "right":k.push("align:right");break;case lc: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}K("shaka.text.WebVttGenerator",function(){});function wk(){}
344
+ function rk(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&yb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=R(e);"br"!=e&&sk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==zc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==zc?"%":"px"),a.v.has(e))c=a.v.get(e);else{var g=R("span"),h=c.heightUnits==zc?"%":"px",k=c.widthUnits==zc?
345
+ "%":"px",l=c.viewportAnchorUnits==zc?"%":"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.v.set(e,g);c=g}e=f;d&&(e=R("span"),e.classList.add("shaka-text-wrapper"),
346
+ e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{Nd:f,zf:e,Ec:c})}
347
+ function sk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.backgroundColor=c.backgroundColor;f.border=c.border;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=tk(c.linePadding,c,a.m);f.paddingRight=tk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
348
+ "contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=R("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=uk(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"==
349
+ 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=tk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",c.writingMode==mc?(f.width="100%",c.lineAlign==oc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==oc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=100-c.line+
350
+ "%")):(f.height="100%",c.lineAlign==oc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%")));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==mc?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=
351
+ c.writingMode);c.size&&(c.writingMode==mc?f.width=c.size+"%":f.height=c.size+"%")}function tk(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 uk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}
352
+ K("shaka.text.UITextDisplayer",nk);nk.prototype.setTextVisibility=nk.prototype.setTextVisibility;nk.prototype.isTextVisible=nk.prototype.isTextVisible;nk.prototype.remove=nk.prototype.remove;nk.prototype.destroy=nk.prototype.destroy;nk.prototype.append=nk.prototype.append;function vk(a,b){function c(k,l){for(var m=t(k),n=m.next();!n.done;n=m.next())if(n=n.value,n.isContainer)c(n.nestedCues,l);else{var p=n.clone();p.nestedCues=[];p.payload=e(n);l.push(p)}return l}function d(k){for(var l=k,m=t(b),n=m.next();!n.done;n=m.next())n=n.value,n.end&&n.start<k&&(l+=n.end-n.start);k=Math.floor(l/3600);m=Math.floor(l/60%60);n=Math.floor(l%60);l=Math.floor(1E3*l%1E3);return(10>k?"0":"")+k+":"+(10>m?"0":"")+m+":"+(10>n?"0":"")+n+"."+(100>l?10>l?"00":"0":"")+l}function e(k){var l=
353
+ [],m=700<=k.fontWeight,n="italic"==k.fontStyle,p=k.textDecoration.includes("underline");m&&l.push("b");n&&l.push("i");p&&l.push("u");m=l.reduce(function(r,v){return r+"<"+v+">"},"");l=l.reduceRight(function(r,v){return r+"</"+v+">"},"");return k.lineBreak||k.spacer?(k.spacer&&yb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):k.nestedCues.length?k.nestedCues.map(e).join(""):m+k.payload+l}var f=c(a,[]),g="WEBVTT\n\n";f=t(f);for(var h=f.next();!h.done;h=f.next())h=h.value,g+=d(h.startTime)+
354
+ " --\x3e "+d(h.endTime)+function(k){var l=[];switch(k.textAlign){case "left":l.push("align:left");break;case "right":l.push("align:right");break;case lc:l.push("align:middle");break;case "start":l.push("align:start");break;case "end":l.push("align:end")}switch(k.writingMode){case "vertical-lr":l.push("vertical:lr");break;case "vertical-rl":l.push("vertical:rl")}return l.length?" "+l.join(" "):""}(h)+"\n",g+=h.payload+"\n\n";return g}K("shaka.text.WebVttGenerator",function(){});function wk(){}
354
355
  function xk(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]=We(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=We(l)),k=xk(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?(Oa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Pa("Unexpected number of arguments for "+k),a[h]=b[h]):(Oa("Invalid config, unrecognized key "+
355
356
  k),g=!1)}return g}function yk(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 zk(a,b){return a&&b}K("shaka.util.ConfigUtils",wk);wk.convertToConfigObject=yk;wk.mergeConfigObjects=xk;function Ak(){}
356
357
  function Bk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ne(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:vg,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Ne(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
@@ -362,121 +363,121 @@ minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLa
362
363
  e.trackSelectionCallback=function(g){return I(function(h){return h["return"](Ck(g,f.preferredAudioLanguage))})};return f}function Dk(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 xk(a,b,c||Bk(),d,"")}
363
364
  function Ck(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Vb(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Ob(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/
364
365
  2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Lb&&"image"!=g.type||c.push(g);return c}K("shaka.util.PlayerConfiguration",Ak);Ak.mergeConfigObjects=Dk;function Ek(){this.g=null;this.h=[]}function Fk(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 Gk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
365
- function Hk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Ik(){this.i=this.h=null;this.g=[]}function Jk(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 Kk(){this.B=this.D=this.H=this.F=this.A=this.j=this.G=this.m=this.i=this.I=this.J=this.M=this.l=this.v=NaN;this.g=new Ek;this.h=new Ik};function S(a,b){cb.call(this);var c=this;this.l=Lk;this.yb=this.g=null;this.$=!1;this.cd=new nf;this.eb=new nf;this.v=new nf;this.Ud=this.B=this.cb=this.i=this.dd=this.I=this.j=this.ed=this.J=this.Rc=this.H=this.Ca=this.D=this.M=this.m=this.G=null;this.je=1E9;this.h=Mk(this);this.fe={width:Infinity,height:Infinity};this.A=null;this.qa=new Ee(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.va=this.h.preferredTextLanguage;this.ab=this.h.preferredTextRole;
366
- this.gb=this.h.preferForcedSubs;this.fb=[];b&&b(this);this.G=Nk(this);this.G.re(this.h.streaming.forceHTTPS);this.F=null;Ok&&(this.F=Fb(Ok));this.cd.o(window,"online",function(){c.ie()});this.R={name:"detach"};this.W={name:"attach"};this.Z={name:"unload"};this.De={name:"manifest-parser"};this.ee={name:"manifest"};this.Ba={name:"media-source"};this.Xd={name:"drm-engine"};this.Y={name:"load"};this.Ge={name:"src-equals-drm-engine"};this.Oa={name:"src-equals"};var d=new Map;d.set(this.W,function(e,f){return Te(Pk(c,
367
- e,f))});d.set(this.R,function(e){e.K&&(c.eb.ob(),e.K=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return Te(e)});d.set(this.Z,function(e){return Te(Qk(c,e))});d.set(this.Ba,function(e){e=Rk(c,e);return Te(e)});d.set(this.De,function(e,f){var g=Sk(c,e,f);return Te(g)});d.set(this.ee,function(e){return Tk(c,e)});d.set(this.Xd,function(e){e=Uk(c,e);return Te(e)});d.set(this.Y,function(e,f){return Te(Vk(c,e,f))});d.set(this.Ge,function(e,f){var g=Wk(c,e,f);return Te(g)});d.set(this.Oa,function(e,
368
- f){return Xk(c,e,f)});this.aa=new ak(this.R,{ig:function(e,f,g,h){var k=null;e==c.R&&(k=g==c.R?c.R:c.W);e==c.W&&(k=g==c.R||f.K!=h.K?c.R:g==c.W?c.W:g==c.Ba||g==c.Y?c.Ba:g==c.Oa?c.Ge:null);e==c.Ba&&(k=g==c.Y&&f.K==h.K?c.De:c.Z);e==c.De&&(k=Yk(c.Y,c.ee,c.Z,g,f,h));e==c.ee&&(k=Yk(c.Y,c.Xd,c.Z,g,f,h));e==c.Xd&&(k=Yk(c.Y,c.Y,c.Z,g,f,h));e==c.Ge&&(k=g==c.Oa&&f.K==h.K?c.Oa:c.Z);if(e==c.Y||e==c.Oa)k=c.Z;e==c.Z&&(k=h.K&&f.K==h.K?c.W:c.R);return k},Nf:function(e,f,g){c.dispatchEvent(Zk($k,(new Map).set("state",
366
+ function Hk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Ik(){this.i=this.h=null;this.g=[]}function Jk(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 Kk(){this.B=this.D=this.H=this.F=this.A=this.j=this.G=this.m=this.i=this.I=this.J=this.M=this.l=this.v=NaN;this.g=new Ek;this.h=new Ik};function S(a,b){cb.call(this);var c=this;this.l=Lk;this.Rc=this.g=null;this.$=!1;this.dd=new nf;this.fb=new nf;this.v=new nf;this.Vd=this.B=this.eb=this.i=this.ed=this.I=this.j=this.aa=this.J=this.Vc=this.H=this.Oa=this.D=this.M=this.m=this.G=null;this.ke=1E9;this.h=Mk(this);this.ge={width:Infinity,height:Infinity};this.A=null;this.va=new Ee(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ba=this.h.preferredTextLanguage;this.sb=this.h.preferredTextRole;
367
+ this.bb=this.h.preferForcedSubs;this.gb=[];b&&b(this);this.G=Nk(this);this.G.se(this.h.streaming.forceHTTPS);this.F=null;Ok&&(this.F=Fb(Ok));this.dd.o(window,"online",function(){c.je()});this.R={name:"detach"};this.W={name:"attach"};this.Z={name:"unload"};this.Ee={name:"manifest-parser"};this.fe={name:"manifest"};this.Ca={name:"media-source"};this.Yd={name:"drm-engine"};this.Y={name:"load"};this.He={name:"src-equals-drm-engine"};this.Va={name:"src-equals"};var d=new Map;d.set(this.W,function(e,f){return Te(Pk(c,
368
+ e,f))});d.set(this.R,function(e){e.K&&(c.fb.ob(),e.K=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return Te(e)});d.set(this.Z,function(e){return Te(Qk(c,e))});d.set(this.Ca,function(e){e=Rk(c,e);return Te(e)});d.set(this.Ee,function(e,f){var g=Sk(c,e,f);return Te(g)});d.set(this.fe,function(e){return Tk(c,e)});d.set(this.Yd,function(e){e=Uk(c,e);return Te(e)});d.set(this.Y,function(e,f){return Te(Vk(c,e,f))});d.set(this.He,function(e,f){var g=Wk(c,e,f);return Te(g)});d.set(this.Va,function(e,
369
+ f){return Xk(c,e,f)});this.ka=new ak(this.R,{ig:function(e,f,g,h){var k=null;e==c.R&&(k=g==c.R?c.R:c.W);e==c.W&&(k=g==c.R||f.K!=h.K?c.R:g==c.W?c.W:g==c.Ca||g==c.Y?c.Ca:g==c.Va?c.He:null);e==c.Ca&&(k=g==c.Y&&f.K==h.K?c.Ee:c.Z);e==c.Ee&&(k=Yk(c.Y,c.fe,c.Z,g,f,h));e==c.fe&&(k=Yk(c.Y,c.Yd,c.Z,g,f,h));e==c.Yd&&(k=Yk(c.Y,c.Y,c.Z,g,f,h));e==c.He&&(k=g==c.Va&&f.K==h.K?c.Va:c.Z);if(e==c.Y||e==c.Va)k=c.Z;e==c.Z&&(k=h.K&&f.K==h.K?c.W:c.R);return k},Nf:function(e,f,g){c.dispatchEvent(Zk($k,(new Map).set("state",
369
370
  e.name)));return d.get(e)(f,g)},handleError:function(e){return I(function(f){return 1==f.g?u(f,Qk(c,e),2):f["return"](e.K?c.W:c.R)})},Dg:function(e){c.dispatchEvent(Zk(al,(new Map).set("state",e.name)))}});a&&this.qc(a,!0)}pa(S,cb);function Zk(a,b){return new M(a,b)}q=S.prototype;
370
- q.destroy=function(){var a=this,b;return I(function(c){switch(c.g){case 1:if(a.l==bl)return c["return"]();a.l=bl;b=fk(a.aa,function(){return{node:a.R,payload:bk(),Fb:!1}});return u(c,new Promise(function(d){b.ac=function(){};b.hd=function(){d()};b.Mb=function(){d()};b.onError=function(){d()};b.kd=function(){d()}}),2);case 2:return u(c,a.aa.destroy(),3);case 3:a.cd&&(a.cd.release(),a.cd=null);a.eb&&(a.eb.release(),a.eb=null);a.v&&(a.v.release(),a.v=null);a.Ud=null;a.B=null;a.h=null;a.A=null;a.yb=null;
371
+ q.destroy=function(){var a=this,b;return I(function(c){switch(c.g){case 1:if(a.l==bl)return c["return"]();a.l=bl;b=fk(a.ka,function(){return{node:a.R,payload:bk(),Fb:!1}});return u(c,new Promise(function(d){b.ac=function(){};b.hd=function(){d()};b.Mb=function(){d()};b.onError=function(){d()};b.kd=function(){d()}}),2);case 2:return u(c,a.ka.destroy(),3);case 3:a.dd&&(a.dd.release(),a.dd=null);a.fb&&(a.fb.release(),a.fb=null);a.v&&(a.v.release(),a.v=null);a.Vd=null;a.B=null;a.h=null;a.A=null;a.Rc=null;
371
372
  if(!a.G){c.C(4);break}return u(c,a.G.destroy(),5);case 5:a.G=null;case 4:cb.prototype.release.call(a),z(c)}})};
372
373
  function cl(){window.Promise||Pa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Uc("Trident/"))return!1;var a=$c();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Oc()?!0:Pc("application/x-mpegurl")}
373
- q.qc=function(a,b){b=void 0===b?!0:b;if(this.l==bl)return Promise.reject(dl());var c=bk();c.K=a;Oc()||(b=!1);var d=b?this.Ba:this.W,e=fk(this.aa,function(){return{node:d,payload:c,Fb:!1}});e.ac=function(){};return el(e)};q.detach=function(){var a=this;if(this.l==bl)return Promise.reject(dl());var b=fk(this.aa,function(){return{node:a.R,payload:bk(),Fb:!1}});b.ac=function(){};return el(b)};
374
- q.Ee=function(a){var b=this;a=void 0===a?!0:a;if(this.l==bl)return Promise.reject(dl());Oc()||(a=!1);var c=bk(),d=fk(this.aa,function(e){var f=e.K&&a?b.Ba:e.K?b.W:b.R;c.K=e.K;return{node:f,payload:c,Fb:!1}});d.ac=function(){};return el(d)};
375
- q.load=function(a,b,c){var d=this;if(this.l==bl)return Promise.reject(dl());this.dispatchEvent(Zk(fl));var e=bk();e.uri=a;e.ze=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=gl(this,e)?this.Oa:this.Y,g=fk(this.aa,function(h){if(null==h.K)return null;e.K=h.K;return{node:f,payload:e,Fb:!0}});this.A=new Kk;g.ac=function(){};return new Promise(function(h,k){g.kd=function(){return k(new N(2,7,7002))};g.hd=function(){h();d.dispatchEvent(Zk(hl))};g.Mb=function(){return k(dl())};g.onError=
376
- function(l){return k(l)}})};function gl(a,b){if(!Oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Hg(d),c=il[c]);if(c){if(""==(b.K||Sc()).canPlayType(c))return!1;if(!Oc()||!(c in Gg||Hg(d)in Ig)||a.h.streaming.preferNativeHls)return!0;if(Yc())return a.h.streaming.useNativeHlsOnSafari}return!1}function Pk(a,b,c){null==b.K&&(b.K=c.K,a.eb.o(b.K,"error",function(){var d=jl(a);d&&kl(a,d)}));a.g=b.K;return Promise.resolve()}
377
- function Qk(a,b){var c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return a.l!=bl&&(a.l=Lk),c=a.fb.map(function(p){return p()}),a.fb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Zk(ll));b.mimeType=null;b.startTime=null;b.uri=null;b.K&&a.v.ob();a.Ca&&(a.Ca.release(),a.Ca=null);a.Rc&&(a.Rc.stop(),a.Rc=null);if(!a.I){n.C(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.dd=null;case 3:if(!a.B){n.C(5);break}return u(n,a.B.stop(),5);case 5:if(!a.j){n.C(7);break}return u(n,a.j.destroy(),
378
- 8);case 8:a.j=null;case 7:a.H&&(a.H.release(),a.H=null);a.D&&(a.D.release(),a.D=null);if(!a.M){n.C(9);break}return u(n,a.M.destroy(),10);case 10:a.M=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.K||!b.K.src){n.C(11);break}return u(n,new Promise(function(p){return(new P(p)).P(.1)}),12);case 12:for(b.K.removeAttribute("src"),b.K.load();b.K.lastChild;)b.K.removeChild(b.K.firstChild);case 11:if(!a.m){n.C(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.cb=null;a.J=null;if(a.i){d=t(a.i.variants);
379
- for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.A=new Kk;a.ae=null;ml(a);z(n)}})}
380
- function Rk(a,b){var c,d,e,f;return I(function(g){if(1==g.g)return c=new gi,d=a.h.textDisplayFactory,e=Fb(d),a.ae=d,f=nl(b.K,c,e,function(h,k,l){h=t(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,r=t(m.frames),v=r.next();!v.done;v=r.next())ol(a,n,p,"ID3",v.value);if(a.F)a.F.onHlsTimedMetadata(m,n)}}),u(g,f.F,2);a.M=f;z(g)})}
381
- function Sk(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.G,a.cb=d,f=a,u(h,Fg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.dd=h.h;a.I=Fb(a.dd);g=We(a.h.manifest);c.K&&"AUDIO"===c.K.nodeName&&(g.disableVideo=!0);a.I.configure(g);z(h)})}
382
- function Tk(a,b){var c=b.uri,d=a.G;a.ed=new tj(function(){return a.Ka()});a.ed.addEventListener("regionadd",function(g){g=g.region;pl(a,ql,g);if(a.F)a.F.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return rl(a,g)},makeTextStreamsForClosedCaptions:function(g){return sl(a,g)},onTimelineRegionAdded:function(g){var h=a.ed;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=
374
+ q.qc=function(a,b){b=void 0===b?!0:b;if(this.l==bl)return Promise.reject(dl());var c=bk();c.K=a;Oc()||(b=!1);var d=b?this.Ca:this.W,e=fk(this.ka,function(){return{node:d,payload:c,Fb:!1}});e.ac=function(){};return el(e)};q.detach=function(){var a=this;if(this.l==bl)return Promise.reject(dl());var b=fk(this.ka,function(){return{node:a.R,payload:bk(),Fb:!1}});b.ac=function(){};return el(b)};
375
+ q.Fe=function(a){var b=this;a=void 0===a?!0:a;if(this.l==bl)return Promise.reject(dl());Oc()||(a=!1);var c=bk(),d=fk(this.ka,function(e){var f=e.K&&a?b.Ca:e.K?b.W:b.R;c.K=e.K;return{node:f,payload:c,Fb:!1}});d.ac=function(){};return el(d)};
376
+ q.load=function(a,b,c){var d=this;if(this.l==bl)return Promise.reject(dl());this.dispatchEvent(Zk(fl));var e=bk();e.uri=a;e.Ae=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=gl(this,e)?this.Va:this.Y,g=fk(this.ka,function(h){if(null==h.K)return null;e.K=h.K;return{node:f,payload:e,Fb:!0}});this.A=new Kk;g.ac=function(){};return new Promise(function(h,k){g.kd=function(){return k(new N(2,7,7002))};g.hd=function(){h();d.dispatchEvent(Zk(hl))};g.Mb=function(){return k(dl())};g.onError=
377
+ function(l){return k(l)}})};function gl(a,b){if(!Oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Hg(d),c=il[c]);if(c){if(""==(b.K||Sc()).canPlayType(c))return!1;if(!Oc()||!(c in Gg||Hg(d)in Ig)||a.h.streaming.preferNativeHls)return!0;if(Yc())return a.h.streaming.useNativeHlsOnSafari}return!1}function Pk(a,b,c){null==b.K&&(b.K=c.K,a.fb.o(b.K,"error",function(){var d=jl(a);d&&kl(a,d)}));a.g=b.K;return Promise.resolve()}
378
+ function Qk(a,b){var c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return a.l!=bl&&(a.l=Lk),c=a.gb.map(function(p){return p()}),a.gb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Zk(ll));b.mimeType=null;b.startTime=null;b.uri=null;a.aa&&(a.aa.release(),a.aa=null);b.K&&a.v.ob();a.Oa&&(a.Oa.release(),a.Oa=null);a.Vc&&(a.Vc.stop(),a.Vc=null);if(!a.I){n.C(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.ed=null;case 3:if(!a.B){n.C(5);break}return u(n,a.B.stop(),5);case 5:if(!a.j){n.C(7);
379
+ break}return u(n,a.j.destroy(),8);case 8:a.j=null;case 7:a.H&&(a.H.release(),a.H=null);a.D&&(a.D.release(),a.D=null);if(!a.M){n.C(9);break}return u(n,a.M.destroy(),10);case 10:a.M=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.K||!b.K.src){n.C(11);break}return u(n,new Promise(function(p){return(new P(p)).P(.1)}),12);case 12:for(b.K.removeAttribute("src"),b.K.load();b.K.lastChild;)b.K.removeChild(b.K.firstChild);case 11:if(!a.m){n.C(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.eb=
380
+ null;a.J=null;if(a.i){d=t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.A=new Kk;a.be=null;ml(a);z(n)}})}
381
+ function Rk(a,b){var c,d,e,f;return I(function(g){if(1==g.g)return c=new gi,d=a.h.textDisplayFactory,e=Fb(d),a.be=d,f=nl(b.K,c,e,function(h,k,l){h=t(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,r=t(m.frames),v=r.next();!v.done;v=r.next())ol(a,n,p,"ID3",v.value);if(a.F)a.F.onHlsTimedMetadata(m,n)}}),u(g,f.F,2);a.M=f;z(g)})}
382
+ function Sk(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.G,a.eb=d,f=a,u(h,Fg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.ed=h.h;a.I=Fb(a.ed);g=We(a.h.manifest);c.K&&"AUDIO"===c.K.nodeName&&(g.disableVideo=!0);a.I.configure(g);z(h)})}
383
+ function Tk(a,b){var c=b.uri,d=a.G;a.aa=new tj(function(){return a.Ka()});a.aa.addEventListener("regionadd",function(g){g=g.region;pl(a,ql,g);if(a.F)a.F.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return rl(a,g)},makeTextStreamsForClosedCaptions:function(g){return sl(a,g)},onTimelineRegionAdded:function(g){var h=a.aa;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=
383
384
  l;break a}k=null}null==k&&(h.g.add(g),g=new M("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return kl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Pe(function(){var g,h,k,l;return I(function(m){if(1==m.g)return g=a,u(m,
384
385
  a.I.start(c,e),2);g.i=m.h;h=Zk(tl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);ul(a.i);k=Date.now()/1E3;l=k-f;a.A.G=l;z(m)})}(),function(){return a.I.stop()})}
385
386
  function Uk(a,b){var c,d;return I(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=vl(a,{Kb:a.G,onError:function(f){kl(a,f)},jd:function(f){wl(a,f)},onExpirationUpdated:function(f,g){xl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==yl&&d&&(d=!1,a.A.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,$f(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.qc(b.K),3):u(e,rl(a,a.i),0)})}
386
- function Vk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v;return I(function(y){switch(y.g){case 1:b.startTime=c.startTime;d=b.K;e=b.uri;a.cb=e;a.H=new mj({bd:function(){return d.playbackRate},Yc:function(){return d.defaultPlaybackRate},ue:function(x){d.playbackRate=x},ef:function(x){d.currentTime+=x}});f=function(){return zl(a)};g=function(){return Al(a)};a.v.o(d,"playing",f);a.v.o(d,"pause",f);a.v.o(d,"ended",f);a.v.o(d,"ratechange",g);h=a.h.abrFactory;a.B&&a.Ud==h||(a.Ud=h,a.B=Fb(h),"function"!=typeof a.B.playbackRateChanged&&
387
- (yb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.h.abr));a.qa=new Ee(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.va=a.h.preferredTextLanguage;a.ab=a.h.preferredTextRole;a.gb=a.h.preferForcedSubs;Bl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(x,w,C){a.j&&x!=a.j.l&&Cl(a,x,!0,void 0===w?!1:w,void 0===C?0:C)});a.D=Dl(a,b.startTime);a.Ca=El(a);
387
+ function Vk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v;return I(function(y){switch(y.g){case 1:b.startTime=c.startTime;d=b.K;e=b.uri;a.eb=e;a.H=new mj({bd:function(){return d.playbackRate},Yc:function(){return d.defaultPlaybackRate},ve:function(x){d.playbackRate=x},ef:function(x){d.currentTime+=x}});f=function(){return zl(a)};g=function(){return Al(a)};a.v.o(d,"playing",f);a.v.o(d,"pause",f);a.v.o(d,"ended",f);a.v.o(d,"ratechange",g);h=a.h.abrFactory;a.B&&a.Vd==h||(a.Vd=h,a.B=Fb(h),"function"!=typeof a.B.playbackRateChanged&&
388
+ (yb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.h.abr));a.va=new Ee(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ba=a.h.preferredTextLanguage;a.sb=a.h.preferredTextRole;a.bb=a.h.preferForcedSubs;Bl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(x,w,C){a.j&&x!=a.j.l&&Cl(a,x,!0,void 0===w?!1:w,void 0===C?0:C)});a.D=Dl(a,b.startTime);a.Oa=El(a);
388
389
  k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Fl(a,k);Kd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Gl(a);a.j.configure(a.h.streaming);a.l=Hl;d.textTracks&&a.v.o(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":Il(a,x)}});a.dispatchEvent(Zk(Jl));l=null;if(m=a.Eb().find(function(x){return x.active})){y.C(2);break}l=Kl(a)?a.B.chooseVariant():null;Cl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.C(3);
389
- break}n=a.D.Oc();return u(y,Ll(l,n),4);case 4:p=y.h,a.D.Ld(p);case 3:Ml(a,null,ie(l));case 2:return a.D.Kd(),r=a.kb().find(function(x){return x.active}),r||((v=se(a.i.textStreams,a.va,a.ab,a.gb)[0]||null)&&Jk(a.A.h,v,!0),l&&(v?(l.audio&&Nl(a,l.audio,v)&&(a.$=!0),a.$&&a.M.l.setTextVisibility(!0),Ol(a)):a.$=!1),v&&(a.h.streaming.alwaysStreamText||a.Jb())&&Jj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.B.enable(),Pl(a)),$d(a.j?a.j.l:null,a.i),Ql(a.i),Rl(a),Kl(a),a.i.variants.some(function(x){return x.primary}),
390
- a.v.Ga(d,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.ze}),z(y)}})}
390
+ break}n=a.D.Oc();return u(y,Ll(l,n),4);case 4:p=y.h,a.D.Ld(p);case 3:Ml(a,null,ie(l));case 2:return a.D.Kd(),r=a.kb().find(function(x){return x.active}),r||((v=se(a.i.textStreams,a.Ba,a.sb,a.bb)[0]||null)&&Jk(a.A.h,v,!0),l&&(v?(l.audio&&Nl(a,l.audio,v)&&(a.$=!0),a.$&&a.M.l.setTextVisibility(!0),Ol(a)):a.$=!1),v&&(a.h.streaming.alwaysStreamText||a.Jb())&&Jj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.B.enable(),Pl(a)),$d(a.j?a.j.l:null,a.i),Ql(a.i),Rl(a),Kl(a),a.i.variants.some(function(x){return x.primary}),
391
+ a.v.Ga(d,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.Ae}),z(y)}})}
391
392
  function Wk(a,b,c){var d,e,f,g,h,k,l;return I(function(m){return 1==m.g?(d=Mb,e=Date.now()/1E3,f=!0,a.m=vl(a,{Kb:a.G,onError:function(n){kl(a,n)},jd:function(n){wl(a,n)},onExpirationUpdated:function(n,p){xl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==yl&&f&&(f=!1,a.A.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Hg(g),k=il[h],"application/x-mpegurl"==k&&Yc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
392
- createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?zd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.bb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,u(m,$f(a.m,[l],[]),2)):u(m,a.m.qc(b.K),
393
+ createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?zd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.cb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,u(m,$f(a.m,[l],[]),2)):u(m,a.m.qc(b.K),
393
394
  0)})}
394
- function Xk(a,b,c){function d(){return zl(a)}b.uri=c.uri;b.startTime=c.startTime;a.cb=b.uri;var e=b.K;a.D=new bj(e);var f=!1;a.fb.push(function(){f=!0});null!=b.startTime&&a.D.Ld(b.startTime);a.H=new mj({bd:function(){return e.playbackRate},Yc:function(){return e.defaultPlaybackRate},ue:function(h){e.playbackRate=h},ef:function(h){e.currentTime+=h}});Fl(a,a.h.streaming.rebufferingGoal);a.v.o(e,"playing",d);a.v.o(e,"pause",d);a.v.o(e,"ended",d);a.v.o(e,"ratechange",function(){return Al(a)});"none"!=e.preload&&
395
- a.v.Ga(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.ze});e.audioTracks&&(a.v.o(e.audioTracks,"addtrack",function(){return Rl(a)}),a.v.o(e.audioTracks,"removetrack",function(){return Rl(a)}),a.v.o(e.audioTracks,"change",function(){return Rl(a)}));e.textTracks&&(a.v.o(e.textTracks,"addtrack",function(h){if(h.track)switch(h=h.track,h.kind){case "metadata":Sl(a,h);break;case "chapters":Il(a,h);break;default:Rl(a)}}),a.v.o(e.textTracks,"removetrack",function(){return Rl(a)}),a.v.o(e.textTracks,
395
+ function Xk(a,b,c){function d(){return zl(a)}b.uri=c.uri;b.startTime=c.startTime;a.eb=b.uri;var e=b.K;a.D=new bj(e);var f=!1;a.gb.push(function(){f=!0});null!=b.startTime&&a.D.Ld(b.startTime);a.H=new mj({bd:function(){return e.playbackRate},Yc:function(){return e.defaultPlaybackRate},ve:function(h){e.playbackRate=h},ef:function(h){e.currentTime+=h}});Fl(a,a.h.streaming.rebufferingGoal);a.v.o(e,"playing",d);a.v.o(e,"pause",d);a.v.o(e,"ended",d);a.v.o(e,"ratechange",function(){return Al(a)});"none"!=e.preload&&
396
+ a.v.Ga(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.Ae});e.audioTracks&&(a.v.o(e.audioTracks,"addtrack",function(){return Rl(a)}),a.v.o(e.audioTracks,"removetrack",function(){return Rl(a)}),a.v.o(e.audioTracks,"change",function(){return Rl(a)}));e.textTracks&&(a.v.o(e.textTracks,"addtrack",function(h){if(h.track)switch(h=h.track,h.kind){case "metadata":Sl(a,h);break;case "chapters":Il(a,h);break;default:Rl(a)}}),a.v.o(e.textTracks,"removetrack",function(){return Rl(a)}),a.v.o(e.textTracks,
396
397
  "change",function(){return Rl(a)}));e.src=b.uri;(Vc()||Wc())&&e.load();a.l=Tl;a.dispatchEvent(Zk(Jl));var g=new Lc;Ti(e,HTMLMediaElement.HAVE_METADATA,a.v,function(){a.D.Kd();g.resolve()});Ti(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.v,function(){var h;return I(function(k){if(1==k.g)return Ul(a),h=Vl(a),h.find(function(l){return"disabled"!=l.mode})?k.C(2):u(k,new Promise(function(l){a.v.Ga(e.textTracks,"change",l);(new P(l)).P(1)}),2);if(f)return k["return"]();Wl(a);z(k)})});e.error?g.reject(jl(a)):
397
398
  "none"==e.preload&&(Pa('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.'),g.resolve());a.v.Ga(e,"error",function(){g.reject(jl(a))});return new Pe(g,function(){g.reject(new N(2,7,7001));return Promise.resolve()})}
398
- function Ul(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.pd(b);var c=a.h.preferredVariantRole;""!=c&&a.pd(b,c)}}function Wl(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.le(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.le(b,d,c)}}
399
- function Sl(a,b){if("metadata"==b.kind){b.mode="hidden";a.v.o(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,ol(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new P(function(){var d=Xl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Aa().P(.5);a.fb.push(function(){c.stop()})}}
400
- function ol(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Zk(Yl,b))}function Il(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new P(function(){b.mode="hidden"})).Aa().P(.5);a.fb.push(function(){c.stop()})}}function ul(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 vl(a,b){return new Tf(b,a.h.drm.updateExpirationTime)}
399
+ function Ul(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.pd(b);var c=a.h.preferredVariantRole;""!=c&&a.pd(b,c)}}function Wl(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.me(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.me(b,d,c)}}
400
+ function Sl(a,b){if("metadata"==b.kind){b.mode="hidden";a.v.o(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,ol(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new P(function(){var d=Xl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Aa().P(.5);a.gb.push(function(){c.stop()})}}
401
+ function ol(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Zk(Yl,b))}function Il(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new P(function(){b.mode="hidden"})).Aa().P(.5);a.gb.push(function(){c.stop()})}}function ul(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 vl(a,b){return new Tf(b,a.h.drm.updateExpirationTime)}
401
402
  function Nk(a){return new $e(function(b,c){a.B&&a.B.segmentDownloaded(b,c)})}
402
- function Dl(a,b){return new cj(a.g,a.i,a.h.streaming,b,function(){a.Ca&&pj(a.Ca,!0);if(a.j){var c=a.j;if(c.g)for(var d=c.g.$c(),e=c.j.smallGapLimit,f=t(c.i.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.i.get(g);h.oa=null;var k=c.g.U;g==Lb?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=vi(k,g),k=ji(k,d,e));if(!k&&((null!=wi(c.g.U,g)||h.Ja)&&Mj(c,h),h.Ma&&(h.Ma.abort(),h.Ma=null),g===Lb))for(g=c.g.U.B.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Xh(g),g=t(g.j.values()),h=g.next();!h.done;h=
403
- g.next())Sh(h.value)}}a.J&&Zl(a)},function(c){return a.dispatchEvent(c)})}function El(a){var b=new uj(a.ed);b.addEventListener("enter",function(d){pl(a,$l,d.region)});b.addEventListener("exit",function(d){pl(a,am,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(pl(a,$l,e),pl(a,am,e))});var c=new oj(a.g);c.g.add(b);return c}function Fl(a,b){a.J=new Ie;a.J.g=Ke;Le(a.J,b,Math.min(.5,b/2));ml(a);a.Rc=(new P(function(){Zl(a)})).ia(.25)}
403
+ function Dl(a,b){return new cj(a.g,a.i,a.h.streaming,b,function(){a.Oa&&pj(a.Oa,!0);if(a.j){var c=a.j;if(c.g)for(var d=c.g.$c(),e=c.j.smallGapLimit,f=t(c.i.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.i.get(g);h.qa=null;var k=c.g.U;g==Lb?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=vi(k,g),k=ji(k,d,e));if(!k&&((null!=wi(c.g.U,g)||h.Ja)&&Mj(c,h),h.Ma&&(h.Ma.abort(),h.Ma=null),g===Lb))for(g=c.g.U.B.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Xh(g),g=t(g.j.values()),h=g.next();!h.done;h=
404
+ g.next())Sh(h.value)}}a.J&&Zl(a)},function(c){return a.dispatchEvent(c)})}function El(a){var b=new uj(a.aa);b.addEventListener("enter",function(d){pl(a,$l,d.region)});b.addEventListener("exit",function(d){pl(a,am,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(pl(a,$l,e),pl(a,am,e))});var c=new oj(a.g);c.g.add(b);return c}function Fl(a,b){a.J=new Ie;a.J.g=Ke;Le(a.J,b,Math.min(.5,b/2));ml(a);a.Vc=(new P(function(){Zl(a)})).ia(.25)}
404
405
  function Zl(a){switch(a.l){case Tl:if(a.g.ended)var b=!0;else{var c=ii(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Hl:a:if(a.g.ended||ti(a.M))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.Db();var d=ii(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=ki(a.g.buffered,a.g.currentTime);c=a.J;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Je:Ke;c.g=d;b!=d&&ml(a)}function nl(a,b,c,d){return new ni(a,b,c,d)}
405
- function Gl(a){return new xj(a.i,{$c:function(){return a.D.Oc()},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},U:a.M,Kb:a.G,onError:function(b){return kl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Eg:function(){a.I&&a.I.update&&a.I.update()},ce:function(){a.D&&a.D.gf();Zl(a)}})}
406
+ function Gl(a){return new xj(a.i,{$c:function(){return a.D.Oc()},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},U:a.M,Kb:a.G,onError:function(b){return kl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Eg:function(){a.I&&a.I.update&&a.I.update()},ee:function(){a.D&&a.D.gf();Zl(a)}})}
406
407
  q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=yk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(yb("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=
407
408
  0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Dk(this.h,a,Mk(this));bm(this);return c};
408
- function bm(a){if(a.I){var b=We(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{cm(a,a.i)}catch(f){kl(a,f)}a.B&&Kl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||dm(a)}a.G&&a.G.re(a.h.streaming.forceHTTPS);if(a.M&&(b=a.h.textDisplayFactory,a.ae!=b)){var c=Fb(b),d=a.M,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.ae=b;a.j&&(b=a.j,(c=b.i.get(Lb))&&
409
+ function bm(a){if(a.I){var b=We(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{cm(a,a.i)}catch(f){kl(a,f)}a.B&&Kl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||dm(a)}a.G&&a.G.se(a.h.streaming.forceHTTPS);if(a.M&&(b=a.h.textDisplayFactory,a.be!=b)){var c=Fb(b),d=a.M,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.be=b;a.j&&(b=a.j,(c=b.i.get(Lb))&&
409
410
  Hj(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.h.abr),a.h.abr.enabled?a.B.enable():a.B.disable(),Pl(a));a.J&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Le(a.J,b,Math.min(.5,b/2)));a.i&&Bl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Mk(this);Dk(a,this.h,Mk(this));return a};
410
- q.Qf=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.Ka().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.Og=function(){for(var a in this.h)delete this.h[a];Dk(this.h,Mk(this),Mk(this));bm(this)};q.Ve=function(){return this.l};q.hg=function(){return this.g};q.vc=function(){return this.G};q.Od=function(){return this.cb};
411
- q.Wc=function(){return this.F?this.F:null};q.V=function(){return this.i?this.i.presentationTimeline.V():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Hb=function(){return this.i?this.i.presentationTimeline.Hb():!1};q.$e=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
411
+ q.Qf=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.Ka().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.Og=function(){for(var a in this.h)delete this.h[a];Dk(this.h,Mk(this),Mk(this));bm(this)};q.We=function(){return this.l};q.hg=function(){return this.g};q.vc=function(){return this.G};q.Od=function(){return this.eb};
412
+ q.Wc=function(){return this.F?this.F:null};q.V=function(){return this.i?this.i.presentationTimeline.V():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Hb=function(){return this.i?this.i.presentationTimeline.Hb():!1};q.bf=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};
412
413
  q.Ka=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Xb(),end:a.ib()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.ug=function(){this.V()&&(this.g.currentTime=this.Ka().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.uc=function(){return this.m?this.m.uc():Infinity};q.Zc=function(){return this.m?this.m.Zc():{}};
413
- q.Cc=function(){return this.J?this.J.g==Ke:!1};q.wc=function(){return this.g?this.H?this.H.i:1:0};q.Ce=function(a){0==a?Pa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.l==Hl&&(this.B.playbackRateChanged(a),Gj(this.j,1<Math.abs(a))))};q.Je=function(){var a=this.H.Yc();this.l==Tl&&this.H.set(a);this.l==Hl&&(this.H.set(a),this.B.playbackRateChanged(a),Gj(this.j,!1))};
414
+ q.Cc=function(){return this.J?this.J.g==Ke:!1};q.wc=function(){return this.g?this.H?this.H.i:1:0};q.De=function(a){0==a?Pa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.l==Hl&&(this.B.playbackRateChanged(a),Gj(this.j,1<Math.abs(a))))};q.Ke=function(){var a=this.H.Yc();this.l==Tl&&this.H.set(a);this.l==Hl&&(this.H.set(a),this.B.playbackRateChanged(a),Gj(this.j,!1))};
414
415
  q.Eb=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,qe(e)){var f=ie(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 pe(g)}):[]};
415
416
  q.kb=function(){if(this.i){for(var a=this.j?this.j.v:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=je(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Vl(this).map(function(f){return ne(f)}):[]};q.Zf=function(){return this.i?this.i.imageStreams.map(function(a){return ke(a)}):[]};
416
417
  q.pg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,B,D;return I(function(E){if(1==E.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?E.C(3):u(E,d.createSegmentIndex(),3):E["return"](null):E.C(2);if(2!=E.g){e=d.segmentIndex.find(b);if(null==e)return E["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return E["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;r=l/n;
417
418
  v=m*n;y=f.l-f.startTime;x=f.i||y/v;w=f.startTime;B=C=0;1<v&&(D=Math.floor((b-f.startTime)/x),w=f.startTime+D*x,C=D%m*p,B=Math.floor(D/m)*r);return E["return"]({imageHeight:l,imageWidth:k,height:r,positionX:C,positionY:B,startTime:w,duration:x,uris:f.Ea(),width:p})}return E["return"](null)})};
418
- q.me=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.v&&(Jk(this.A.h,b,!1),Jj(this.j,b),em(this),this.va=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Vl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,le(c)==a.id?c.mode=this.$?"showing":"hidden":c.mode="disabled";em(this)}};
419
- q.oe=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&&Pa("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&&qe(d)&&(Cl(this,d,!1,b,c),this.qa=new Ce(d),Kl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
419
+ q.oe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.v&&(Jk(this.A.h,b,!1),Jj(this.j,b),em(this),this.Ba=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Vl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,le(c)==a.id?c.mode=this.$?"showing":"hidden":c.mode="disabled";em(this)}};
420
+ q.pe=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&&Pa("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&&qe(d)&&(Cl(this,d,!1,b,c),this.va=new Ce(d),Kl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
420
421
  le(c)==a.id){fm(this,c);break}};q.Pf=function(){return gm(this.Eb())};q.og=function(){return gm(this.kb())};q.Of=function(){return Array.from(hm(this.Eb()))};q.ng=function(){return Array.from(hm(this.kb()))};
421
- q.pd=function(a,b){if(this.i&&this.D){this.qa=new Ee(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.qa.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=ie(f),this.oe(c,!0)):dm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Ob(a);f=d=null;e=
422
+ q.pd=function(a,b){if(this.i&&this.D){this.va=new Ee(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.va.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=ie(f),this.pe(c,!0)):dm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Ob(a);f=d=null;e=
422
423
  t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=pe(g);Ob(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?fm(this,f):d&&fm(this,d)}};
423
- q.le=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.D){if(this.va=a,this.ab=b||"",this.gb=c,(a=se(this.i.textStreams,this.va,this.ab,this.gb)[0]||null)&&a!=this.j.v&&(Jk(this.A.h,a,!1),this.h.streaming.alwaysStreamText||this.Jb()))Jj(this.j,a),em(this)}else{var d=Ob(a);(a=this.kb().find(function(e){return Ob(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.me(a)}};
424
- q.Qg=function(a){if(this.i&&this.D){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.qa=new Ee(b.language,"",0,a),dm(this))}};q.Jb=function(){var a=this.$;return this.M?this.M.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Vl(this).some(function(b){return"showing"==b.mode}):a};q.Te=function(){return this.g&&this.g.src&&this.g.textTracks?im(this).map(function(a){return ne(a)}):[]};
424
+ q.me=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.D){if(this.Ba=a,this.sb=b||"",this.bb=c,(a=se(this.i.textStreams,this.Ba,this.sb,this.bb)[0]||null)&&a!=this.j.v&&(Jk(this.A.h,a,!1),this.h.streaming.alwaysStreamText||this.Jb()))Jj(this.j,a),em(this)}else{var d=Ob(a);(a=this.kb().find(function(e){return Ob(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.oe(a)}};
425
+ q.Qg=function(a){if(this.i&&this.D){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.va=new Ee(b.language,"",0,a),dm(this))}};q.Jb=function(){var a=this.$;return this.M?this.M.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Vl(this).some(function(b){return"showing"==b.mode}):a};q.Ue=function(){return this.g&&this.g.src&&this.g.textTracks?im(this).map(function(a){return ne(a)}):[]};
425
426
  q.Sf=function(a){var b=Ob(a),c=im(this).filter(function(h){return Ob(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
426
427
  function Vl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Xl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function im(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
427
- q.xe=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==Hl)this.M.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.v||(a=se(this.i.textStreams,this.va,this.ab,this.gb),0<a.length&&(Jj(this.j,a[0]),em(this))):Fj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Vl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Ol(this)}};
428
- q.jg=function(){if(!this.V())return null;var a=this.aa.l,b=0;if(this.D)b=this.D.Oc();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};
429
- q.We=function(){if(!this.V())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.Xc=function(){if(this.l==Hl)return this.M.Xc();var a={total:[],audio:[],video:[],text:[]};this.l==Tl&&(a.total=li(this.g.buffered));return a};
428
+ q.ye=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==Hl)this.M.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.v||(a=se(this.i.textStreams,this.Ba,this.sb,this.bb),0<a.length&&(Jj(this.j,a[0]),em(this))):Fj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Vl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Ol(this)}};
429
+ q.jg=function(){if(!this.V())return null;var a=this.ka.l,b=0;if(this.D)b=this.D.Oc();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};
430
+ q.Xe=function(){if(!this.V())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.Xc=function(){if(this.l==Hl)return this.M.Xc();var a={total:[],audio:[],video:[],text:[]};this.l==Tl&&(a.total=li(this.g.buffered));return a};
430
431
  q.getStats=function(){if(this.l!=Hl&&this.l!=Tl)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:[]};zl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.A;b=Math.round(100*b);c.i=isNaN(c.i)?
431
- b:Math.max(c.i,b)}if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.A;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.J=d;this.A.I=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.H?c.H:NaN):c=NaN;this.A.A=c;if(this.l==Hl){if(c=this.j.l)this.A.D=(this.H?this.H.i:1)*c.bandwidth;c&&c.video&&(b=this.A,d=c.video.height||NaN,b.v=c.video.width||NaN,b.l=d);this.V()&&(c=this.We().valueOf()+1E3*this.Ka().end,this.A.F=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&
432
+ b:Math.max(c.i,b)}if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.A;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.J=d;this.A.I=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.H?c.H:NaN):c=NaN;this.A.A=c;if(this.l==Hl){if(c=this.j.l)this.A.D=(this.H?this.H.i:1)*c.bandwidth;c&&c.video&&(b=this.A,d=c.video.height||NaN,b.v=c.video.width||NaN,b.l=d);this.V()&&(c=this.Xe().valueOf()+1E3*this.Ka().end,this.A.F=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&
432
433
  (this.A.H=this.i.presentationTimeline.g);c=this.B.getBandwidthEstimate();this.A.B=c}this.l==Tl&&(c=this.A,b=a.videoHeight||NaN,c.v=a.videoWidth||NaN,c.l=b);var e=this.A;a=e.v;c=e.l;b=e.D;d=e.J;var f=e.M,g=e.I,h=e.B,k=e.i,l=e.m,m=e.G,n=e.j,p=Gk(e.g,"playing"),r=Gk(e.g,"paused"),v=Gk(e.g,"buffering"),y=e.A,x=e.F,w=e.H,C=Hk(e.g),B=[];e=t(e.h.g);for(var D=e.next();!D.done;D=e.next())D=D.value,B.push({timestamp:D.timestamp,id:D.id,type:D.type,fromAdaptation:D.fromAdaptation,bandwidth:D.bandwidth});return{width:a,
433
434
  height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:r,bufferingTime:v,licenseTime:y,liveLatency:x,maxSegmentDuration:w,stateHistory:C,switchHistory:B}};
434
435
  q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;yb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=Hl&&this.l!=Tl)throw new N(1,7,7004);if(!d){var h=Hg(a);d=jm[h];if(!d)throw new N(1,2,2011,h);}if(this.l==Tl){if("text/vtt"!=d)throw new N(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=a;d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.kb().find(function(k){return k.language==
435
- b&&k.label==(f||"")&&k.kind==c}))return Rl(this),a;throw new N(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new N(1,4,4033);a={id:this.je++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:kj(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:Lb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
436
+ b&&k.label==(f||"")&&k.kind==c}))return Rl(this),a;throw new N(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new N(1,4,4033);a={id:this.ke++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:kj(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:Lb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
436
437
  closedCaptions:null};if(!Bd(vd(a.mimeType,a.codecs)))throw new N(2,2,2014,d);this.i.textStreams.push(a);Rl(this);return je(a)};
437
438
  q.Ef=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,v,y,x,w,C;return I(function(B){switch(B.g){case 1:if(h.l!=Hl&&h.l!=Tl)throw new N(1,7,7004);if(d){B.C(2);break}return u(B,km(h,a),3);case 3:d=B.h;case 2:k=[];if(h.F)try{k=h.F.getServerSideCuePoints()}catch(D){}if(h.l!=Tl){B.C(4);break}g&&(c="forced");return u(B,lm(h,a,b,c,d,f||"",k),5);case 5:l=h.kb();if(m=l.find(function(D){return D.language==b&&D.label==(f||"")&&D.kind==c}))return Rl(h),B["return"](m);throw new N(1,2,2012);case 4:n=
438
- Mb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){B.C(6);break}return u(B,mm(a,h.G,h.h.streaming.retryParameters),7);case 7:r=B.h,v=nm(h,r,d,k),y=new Blob([v],{type:"text/vtt"}),a=qi(y),d="text/vtt";case 6:x={id:h.je++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:kj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.ka,primary:!1,trickModeVideo:null,
439
+ Mb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){B.C(6);break}return u(B,mm(a,h.G,h.h.streaming.retryParameters),7);case 7:r=B.h,v=nm(h,r,d,k),y=new Blob([v],{type:"text/vtt"}),a=qi(y),d="text/vtt";case 6:x={id:h.ke++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:kj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.ma,primary:!1,trickModeVideo:null,
439
440
  emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=vd(x.mimeType,x.codecs);C=Bd(w);if(!C)throw new N(2,2,2014,d);h.i.textStreams.push(x);Rl(h);return B["return"](je(x))}})};
440
- q.Df=function(a,b,c){var d=this,e,f,g,h;return I(function(k){switch(k.g){case 1:if(d.l!=Hl&&d.l!=Tl)throw new N(1,7,7004);if(c){k.C(2);break}return u(k,km(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return u(k,lm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Te();h=g.find(function(l){return l.language==b});if(!h){k.C(5);break}return u(k,new Promise(function(l,m){d.v.Ga(f,"load",l);d.v.Ga(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
441
+ q.Df=function(a,b,c){var d=this,e,f,g,h;return I(function(k){switch(k.g){case 1:if(d.l!=Hl&&d.l!=Tl)throw new N(1,7,7004);if(c){k.C(2);break}return u(k,km(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return u(k,lm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Ue();h=g.find(function(l){return l.language==b});if(!h){k.C(5);break}return u(k,new Promise(function(l,m){d.v.Ga(f,"load",l);d.v.Ga(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
441
442
  case 5:throw new N(1,2,2012);}})};function km(a,b){var c,d;return I(function(e){switch(e.g){case 1:c=Hg(b);if(d=jm[c])return e["return"](d);A(e,2);return u(e,Jg(b,a.G,a.h.streaming.retryParameters),4);case 4:d=e.h;ua(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
442
443
  function lm(a,b,c,d,e,f,g){var h,k,l,m;return I(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,mm(b,a.G,a.h.streaming.retryParameters),3):n.C(2);2!=n.g&&(h=n.h,k=nm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=qi(l),e="text/vtt");m=document.createElement("track");m.src=b;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
443
- function mm(a,b,c){var d,e,f;return I(function(g){if(1==g.g)return d=kf,e=df([a],c),e.method="GET",u(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function nm(a,b,c,d){var e=Cd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Ec(b),b=c.parseMedia(b,a),vk(b,d);throw new N(2,2,2014,c);}q.se=function(a,b){this.fe.width=a;this.fe.height=b};
444
- q.ie=function(a){if(this.l==Hl){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.zc||d.Ja||d.$a||(d.zc=!1,Ej(b,d,a));b=!0}}else b=!1;return b};q.eg=function(){Pa("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.fg=function(){return this.dd};
445
- function Mk(a){var b=Bk();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.ie(d))}};b.textDisplayFactory=function(){return a.yb?new nk(a.g,a.yb):new hk(a.g)};return b}q.ye=function(a){this.yb=a};
446
- function sl(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new lj;h={id:a.je++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
444
+ function mm(a,b,c){var d,e,f;return I(function(g){if(1==g.g)return d=kf,e=df([a],c),e.method="GET",u(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function nm(a,b,c,d){var e=Cd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Ec(b),b=c.parseMedia(b,a),vk(b,d);throw new N(2,2,2014,c);}q.ue=function(a,b){this.ge.width=a;this.ge.height=b};
445
+ q.je=function(a){if(this.l==Hl){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.zc||d.Ja||d.ab||(d.zc=!1,Ej(b,d,a));b=!0}}else b=!1;return b};q.eg=function(){Pa("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.fg=function(){return this.ed};
446
+ function Mk(a){var b=Bk();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.je(d))}};b.textDisplayFactory=function(){return a.Rc?new nk(a.g,a.Rc):new hk(a.g)};return b}q.ze=function(a){this.Rc=a};
447
+ function sl(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new lj;h={id:a.ke++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
447
448
  segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Lb,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 rl(a,b){return I(function(c){if(1==c.g)return u(c,om(a,b),2);cm(a,b);z(c)})}
448
449
  function om(a,b){var c;return I(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Yd(c,b),2);Ql(b);z(d)})}
449
- function cm(a,b){if(a.l!=bl){for(var c=a.h.restrictions,d=a.fe,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Xd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Rl(a);if((c=a.m?a.m.g:null)&&a.m.A)for(d=t(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=t(f.initData||[]),g=f.next();!g.done;g=
450
+ function cm(a,b){if(a.l!=bl){for(var c=a.h.restrictions,d=a.ge,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Xd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Rl(a);if((c=a.m?a.m.g:null)&&a.m.A)for(d=t(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=t(f.initData||[]),g=f.next();!g.done;g=
450
451
  f.next())g=g.value,jg(a.m,g.initDataType,g.initData);pm(a,b)}}
451
452
  function Ll(a,b){var c,d,e,f,g;return I(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return I(function(r){if(1==r.g)return k?u(r,k.createSegmentIndex(),2):r["return"](null);n=(m=k.segmentIndex.Cb(l))?m.next().value:null;if(!n)return r["return"](null);p=n.startTime;return r["return"](p)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
452
453
  function ml(a){var b=a.Cc();if(a.A&&a.J&&a.D){var c=a.H;c.j=b;nj(c);zl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Zk(qm,b))}function Al(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Zk(rm),a.dispatchEvent(b))}function zl(a){if(a.A&&a.J){var b=a.A.g;a.J.g==Ke?Fk(b,"buffering"):a.g.paused?Fk(b,"paused"):a.g.ended?Fk(b,"ended"):Fk(b,"playing")}}
453
- function Kl(a){try{pm(a,a.i)}catch(c){return kl(a,c),!1}var b=a.i.variants.filter(function(c){return qe(c)});b=a.qa.create(b);a.B.setVariants(Array.from(b.values()));return!0}function dm(a){var b;(b=Kl(a)?a.B.chooseVariant():null)&&Cl(a,b,!0,!0,0)}
454
+ function Kl(a){try{pm(a,a.i)}catch(c){return kl(a,c),!1}var b=a.i.variants.filter(function(c){return qe(c)});b=a.va.create(b);a.B.setVariants(Array.from(b.values()));return!0}function dm(a){var b;(b=Kl(a)?a.B.chooseVariant():null)&&Cl(a,b,!0,!0,0)}
454
455
  function Cl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Ij(a.j,b,d,e,!0);else{var g=a.A.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Ij(a.j,b,d,e);d=null;f&&(d=ie(f));b=ie(b);c?Ml(a,d,b):sm(a,d,b)}}function fm(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=pe(c);var d=pe(b);sm(a,c,d)}
455
456
  function Nl(a,b,c){a=Ob(a.h.preferredTextLanguage);b=Ob(b.language);c=Ob(c.language);return Nb(c,a)&&!Nb(b,c)}function Ml(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Zk(tm,b);um(a,b)}function Rl(a){var b=Zk(vm);um(a,b)}function sm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Zk(wm,b);um(a,b)}function em(a){var b=Zk(xm);um(a,b)}function Ol(a){var b=Zk(ym);um(a,b)}function Pl(a){var b=(new Map).set("newStatus",a.h.abr.enabled);um(a,Zk(zm,b))}
456
457
  function kl(a,b){if(a.l!=bl){var c=Zk(Am,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function pl(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(Zk(b,c))}
457
458
  function jl(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.g.error.message)}
458
459
  function wl(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Bm.includes(l)}h!=f.allowedByKeySystem&&
459
- (e=!0)}}}if(!e||Kl(a))(d=a.j.l)&&!d.allowedByKeySystem&&dm(a),e&&Rl(a)}}function xl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Zk(Cm);a.dispatchEvent(b)}function Bl(a,b,c){0<b&&(a.V()||a.tf(b));b=a.getDuration();c<b&&(a.V()||a.Ya(c))}
460
+ (e=!0)}}}if(!e||Kl(a))(d=a.j.l)&&!d.allowedByKeySystem&&dm(a),e&&Rl(a)}}function xl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Zk(Cm);a.dispatchEvent(b)}function Bl(a,b,c){0<b&&(a.V()||a.tf(b));b=a.getDuration();c<b&&(a.V()||a.Za(c))}
460
461
  function pm(a,b){var c=a.m?a.m.Zc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var r=c[d?"00":p];r?Bm.includes(r)&&h.add(r):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
461
462
  missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function Ql(a){if(!a.variants.some(qe))throw new N(2,4,4032);}function um(a,b){I(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=bl&&a.dispatchEvent(b);z(c)})}function hm(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Ob(c.language)):b.add("und");return b}
462
463
  function gm(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Ob(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=t(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
463
- h.push({language:l,role:n,label:p})}});return h}function dl(){return new N(2,7,7E3)}function Yk(a,b,c,d,e,f){return d==a&&e.K==f.K&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function bk(){return{K:null,mimeType:null,startTime:null,ze:NaN,uri:null}}function el(a){return new Promise(function(b,c){a.Mb=function(){return c(dl())};a.hd=function(){return b()};a.onError=function(d){return c(d)};a.kd=function(){return c(dl())}})}K("shaka.Player",S);S.prototype.setVideoContainer=S.prototype.ye;
464
- S.prototype.getManifestParserFactory=S.prototype.fg;S.prototype.getManifest=S.prototype.eg;S.prototype.retryStreaming=S.prototype.ie;S.prototype.setMaxHardwareResolution=S.prototype.se;S.prototype.addChaptersTrack=S.prototype.Df;S.prototype.addTextTrackAsync=S.prototype.Ef;S.prototype.addTextTrack=S.prototype.addTextTrack;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.Xc;S.prototype.getPresentationStartTimeAsDate=S.prototype.We;
465
- S.prototype.getPlayheadTimeAsDate=S.prototype.jg;S.prototype.setTextTrackVisibility=S.prototype.xe;S.prototype.getChapters=S.prototype.Sf;S.prototype.getChaptersTracks=S.prototype.Te;S.prototype.isTextTrackVisible=S.prototype.Jb;S.prototype.selectVariantsByLabel=S.prototype.Qg;S.prototype.selectTextLanguage=S.prototype.le;S.prototype.selectAudioLanguage=S.prototype.pd;S.prototype.getTextLanguages=S.prototype.ng;S.prototype.getAudioLanguages=S.prototype.Of;S.prototype.getTextLanguagesAndRoles=S.prototype.og;
466
- S.prototype.getAudioLanguagesAndRoles=S.prototype.Pf;S.prototype.selectVariantTrack=S.prototype.oe;S.prototype.selectTextTrack=S.prototype.me;S.prototype.getThumbnails=S.prototype.pg;S.prototype.getImageTracks=S.prototype.Zf;S.prototype.getTextTracks=S.prototype.kb;S.prototype.getVariantTracks=S.prototype.Eb;S.prototype.cancelTrickPlay=S.prototype.Je;S.prototype.trickPlay=S.prototype.Ce;S.prototype.getPlaybackRate=S.prototype.wc;S.prototype.isBuffering=S.prototype.Cc;S.prototype.getKeyStatuses=S.prototype.Zc;
467
- S.prototype.getExpiration=S.prototype.uc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.ug;S.prototype.seekRange=S.prototype.Ka;S.prototype.isAudioOnly=S.prototype.$e;S.prototype.isInProgress=S.prototype.Hb;S.prototype.isLive=S.prototype.V;S.prototype.getAdManager=S.prototype.Wc;S.prototype.getAssetUri=S.prototype.Od;S.prototype.getNetworkingEngine=S.prototype.vc;S.prototype.getMediaElement=S.prototype.hg;
468
- S.prototype.getLoadMode=S.prototype.Ve;S.prototype.resetConfiguration=S.prototype.Og;S.prototype.getBufferFullness=S.prototype.Qf;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.unload=S.prototype.Ee;S.prototype.detach=S.prototype.detach;S.prototype.attach=S.prototype.qc;
464
+ h.push({language:l,role:n,label:p})}});return h}function dl(){return new N(2,7,7E3)}function Yk(a,b,c,d,e,f){return d==a&&e.K==f.K&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function bk(){return{K:null,mimeType:null,startTime:null,Ae:NaN,uri:null}}function el(a){return new Promise(function(b,c){a.Mb=function(){return c(dl())};a.hd=function(){return b()};a.onError=function(d){return c(d)};a.kd=function(){return c(dl())}})}K("shaka.Player",S);S.prototype.setVideoContainer=S.prototype.ze;
465
+ S.prototype.getManifestParserFactory=S.prototype.fg;S.prototype.getManifest=S.prototype.eg;S.prototype.retryStreaming=S.prototype.je;S.prototype.setMaxHardwareResolution=S.prototype.ue;S.prototype.addChaptersTrack=S.prototype.Df;S.prototype.addTextTrackAsync=S.prototype.Ef;S.prototype.addTextTrack=S.prototype.addTextTrack;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.Xc;S.prototype.getPresentationStartTimeAsDate=S.prototype.Xe;
466
+ S.prototype.getPlayheadTimeAsDate=S.prototype.jg;S.prototype.setTextTrackVisibility=S.prototype.ye;S.prototype.getChapters=S.prototype.Sf;S.prototype.getChaptersTracks=S.prototype.Ue;S.prototype.isTextTrackVisible=S.prototype.Jb;S.prototype.selectVariantsByLabel=S.prototype.Qg;S.prototype.selectTextLanguage=S.prototype.me;S.prototype.selectAudioLanguage=S.prototype.pd;S.prototype.getTextLanguages=S.prototype.ng;S.prototype.getAudioLanguages=S.prototype.Of;S.prototype.getTextLanguagesAndRoles=S.prototype.og;
467
+ S.prototype.getAudioLanguagesAndRoles=S.prototype.Pf;S.prototype.selectVariantTrack=S.prototype.pe;S.prototype.selectTextTrack=S.prototype.oe;S.prototype.getThumbnails=S.prototype.pg;S.prototype.getImageTracks=S.prototype.Zf;S.prototype.getTextTracks=S.prototype.kb;S.prototype.getVariantTracks=S.prototype.Eb;S.prototype.cancelTrickPlay=S.prototype.Ke;S.prototype.trickPlay=S.prototype.De;S.prototype.getPlaybackRate=S.prototype.wc;S.prototype.isBuffering=S.prototype.Cc;S.prototype.getKeyStatuses=S.prototype.Zc;
468
+ S.prototype.getExpiration=S.prototype.uc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.ug;S.prototype.seekRange=S.prototype.Ka;S.prototype.isAudioOnly=S.prototype.bf;S.prototype.isInProgress=S.prototype.Hb;S.prototype.isLive=S.prototype.V;S.prototype.getAdManager=S.prototype.Wc;S.prototype.getAssetUri=S.prototype.Od;S.prototype.getNetworkingEngine=S.prototype.vc;S.prototype.getMediaElement=S.prototype.hg;
469
+ S.prototype.getLoadMode=S.prototype.We;S.prototype.resetConfiguration=S.prototype.Og;S.prototype.getBufferFullness=S.prototype.Qf;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.unload=S.prototype.Fe;S.prototype.detach=S.prototype.detach;S.prototype.attach=S.prototype.qc;
469
470
  S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return I(function(h){if(1==h.g)return b={},a?u(h,zg(),3):h.C(2);2!=h.g&&(b=h.h);var k={};if(Oc()){for(var l in Gg)k[l]=!0;for(var m in Ig)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=Oc()?!!Gg[n]:Pc(n);for(var p in l)k[p]=
470
471
  Oc()?!!Ig[p]:Pc(l[p]);c=k;k={};p=t('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
471
472
  for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Oc()?Bd(l)?!0:MediaSource.isTypeSupported(l)||rd(l):Pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Dm;for(g in f)e[g]=f[g]();return h["return"](e)})};S.isBrowserSupported=cl;S.setAdManagerFactory=function(a){Ok=a};S.registerSupportPlugin=function(a,b){Dm[a]=b};S.prototype.destroy=S.prototype.destroy;
472
473
  var zm="abrstatuschanged",tm="adaptation",qm="buffering",yl="drmsessionupdate",Yj="emsg",Am="error",Cm="expirationupdated",hl="loaded",fl="loading",tl="manifestparsed",Yl="metadata",$k="onstatechange",al="onstateidle",rm="ratechange",Jl="streaming",xm="textchanged",ym="texttrackvisibility",ql="timelineregionadded",$l="timelineregionenter",am="timelineregionexit",vm="trackschanged",ll="unloading",wm="variantchanged",Em={gh:zm,hh:tm,ih:qm,lh:yl,sh:Yj,Error:Am,uh:Cm,Ah:"largegap",Bh:hl,Ch:fl,Gh:tl,Metadata:Yl,
473
- Kh:$k,Lh:al,Th:rm,Xh:"sessiondata",Yh:Jl,Zh:xm,$h:ym,ai:ql,bi:$l,ci:am,di:vm,ji:ll,li:wm},bl=0,Lk=1,Hl=2,Tl=3;S.LoadMode={DESTROYED:bl,NOT_LOADED:Lk,MEDIA_SOURCE:Hl,SRC_EQUALS:Tl};S.version="v3.2.17";var Fm=["3","2"];zb=new function(a){this.g=a;this.i=Ab;this.h=Bb}(new xb(Number(Fm[0]),Number(Fm[1])));
474
+ Kh:$k,Lh:al,Th:rm,Xh:"sessiondata",Yh:Jl,Zh:xm,$h:ym,ai:ql,bi:$l,ci:am,di:vm,ji:ll,li:wm},bl=0,Lk=1,Hl=2,Tl=3;S.LoadMode={DESTROYED:bl,NOT_LOADED:Lk,MEDIA_SOURCE:Hl,SRC_EQUALS:Tl};S.version="v3.2.19";var Fm=["3","2"];zb=new function(a){this.g=a;this.i=Ab;this.h=Bb}(new xb(Number(Fm[0]),Number(Fm[1])));
474
475
  var Bm=["output-restricted","internal-error"],Dm={},Ok=null,il={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"},jm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
475
476
  ssa:"text/x-ssa",ass:"text/x-ssa"};function Gm(){this.h=[];this.j=this.i=this.g=0};function Hm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new nf;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=Hm.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};
476
477
  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()};
477
478
  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};K("shaka.ads.ClientSideAd",Hm);
478
479
  Hm.prototype.release=Hm.prototype.release;Hm.prototype.getPositionInSequence=Hm.prototype.getPositionInSequence;Hm.prototype.getSequenceLength=Hm.prototype.getSequenceLength;Hm.prototype.setMuted=Hm.prototype.setMuted;Hm.prototype.resize=Hm.prototype.resize;Hm.prototype.isMuted=Hm.prototype.isMuted;Hm.prototype.setVolume=Hm.prototype.setVolume;Hm.prototype.getVolume=Hm.prototype.getVolume;Hm.prototype.play=Hm.prototype.play;Hm.prototype.pause=Hm.prototype.pause;Hm.prototype.skip=Hm.prototype.skip;
479
- Hm.prototype.canSkipNow=Hm.prototype.canSkipNow;Hm.prototype.getTimeUntilSkippable=Hm.prototype.getTimeUntilSkippable;Hm.prototype.isSkippable=Hm.prototype.isSkippable;Hm.prototype.isPaused=Hm.prototype.isPaused;Hm.prototype.getRemainingTime=Hm.prototype.getRemainingTime;Hm.prototype.getMinSuggestedDuration=Hm.prototype.getMinSuggestedDuration;Hm.prototype.getDuration=Hm.prototype.getDuration;function Im(a,b,c,d){var e=this;this.m=a;this.i=b;this.A=null;this.B=NaN;this.j=d;this.v=null;this.h=new nf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.17");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Jm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
480
+ Hm.prototype.canSkipNow=Hm.prototype.canSkipNow;Hm.prototype.getTimeUntilSkippable=Hm.prototype.getTimeUntilSkippable;Hm.prototype.isSkippable=Hm.prototype.isSkippable;Hm.prototype.isPaused=Hm.prototype.isPaused;Hm.prototype.getRemainingTime=Hm.prototype.getRemainingTime;Hm.prototype.getMinSuggestedDuration=Hm.prototype.getMinSuggestedDuration;Hm.prototype.getDuration=Hm.prototype.getDuration;function Im(a,b,c,d){var e=this;this.m=a;this.i=b;this.A=null;this.B=NaN;this.j=d;this.v=null;this.h=new nf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.19");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Jm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
480
481
  function(f){Km(e,f)});this.i.onended=function(){e.l.contentComplete()}}Im.prototype.stop=function(){this.g&&this.g.stop();this.m&&mk(this.m)};Im.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Km(a,b){b.getError();Lm(a,null);a.j(new M("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
481
482
  function Jm(a,b){a.j(new M("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.B)));a.g=b.getAdsManager(a.i);a.j(new M("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new M("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Mm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
482
483
  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.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)),a.i.addEventListener("play",function(){a.g.start()},{once:!0})}catch(f){Lm(a,null)}}
@@ -497,8 +498,8 @@ f;e.i(new M("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Pm.prototyp
497
498
  function Qm(a,b){a.i(new M("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.G||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.v=d,a.l.currentTime=e.start)}})};function T(){cb.call(this);this.g=this.i=null;this.h=new Gm;this.j=navigator.language}pa(T,cb);q=T.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new Im(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
498
499
  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 M("ad-stopped"));this.h=new Gm};q.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.B=Date.now()/1E3;b.l.requestAds(a)};
499
500
  q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new Pm(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)})};
500
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Pa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.2.17";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
501
- (c.G=!0),c.j=new Lc,c.g.requestStream(a),c.D=d||"",c.H=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Pa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.2.17";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.F};
501
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Pa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.2.19";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
502
+ (c.G=!0),c.j=new Lc,c.g.requestStream(a),c.D=d||"",c.H=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Pa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.2.19";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.F};
502
503
  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)};K("shaka.ads.AdManager",T);
503
504
  T.prototype.onCueMetadataChange=T.prototype.onCueMetadataChange;T.prototype.onHlsTimedMetadata=T.prototype.onHlsTimedMetadata;T.prototype.onDashTimedMetadata=T.prototype.onDashTimedMetadata;T.prototype.getStats=T.prototype.getStats;T.prototype.getServerSideCuePoints=T.prototype.getServerSideCuePoints;T.prototype.replaceServerSideAdTagParameters=T.prototype.replaceServerSideAdTagParameters;T.prototype.requestServerSideStream=T.prototype.requestServerSideStream;T.prototype.initServerSide=T.prototype.initServerSide;
504
505
  T.prototype.requestClientSideAds=T.prototype.requestClientSideAds;T.prototype.onAssetUnload=T.prototype.onAssetUnload;T.prototype.release=T.prototype.release;T.prototype.initClientSide=T.prototype.initClientSide;T.prototype.setLocale=T.prototype.setLocale;T.ADS_LOADED="ads-loaded";T.AD_STARTED="ad-started";T.AD_FIRST_QUARTILE="ad-first-quartile";T.AD_MIDPOINT="ad-midpoint";T.AD_THIRD_QUARTILE="ad-third-quartile";T.AD_COMPLETE="ad-complete";T.AD_STOPPED="ad-stopped";T.AD_SKIPPED="ad-skipped";
@@ -510,34 +511,34 @@ function Tm(a){return{length:a.length,start:function(b){return a.start[b]},end:f
510
511
  var Um="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Vm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Wm=["loop","playbackRate"],Xm=["pause","play"],Ym={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
511
512
  isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Zm={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},$m={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},an=[["getConfiguration","configure"]],bn=[["isTextTrackVisible","setTextTrackVisibility"]],cn="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay goToLive".split(" "),
512
513
  dn=["attach","detach","load","unload"];function en(a,b,c,d,e,f){var g=this;this.H=a;this.j=new P(b);this.R=c;this.B=!1;this.A=d;this.G=e;this.J=f;this.h=this.m=!1;this.M="";this.v=null;this.D=function(){return fn(g)};this.F=function(h,k){var l=Sm(k);switch(l.type){case "event":var m=l.targetName;l=Ma(l.event);g.A(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.B&&(g.R(),g.B=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new N(l.severity,l.category,l.code);
513
- for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;gn.add(this)}q=en.prototype;q.destroy=function(){gn["delete"](this);hn(this);jn&&kn(this);this.j&&(this.j.stop(),this.j=null);this.G=this.A=null;this.h=this.m=!1;this.F=this.D=this.l=this.i=this.g=this.v=null;return Promise.resolve()};q.na=function(){return this.h};q.nd=function(){return this.M};
514
+ for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;gn.add(this)}q=en.prototype;q.destroy=function(){gn["delete"](this);hn(this);jn&&kn(this);this.j&&(this.j.stop(),this.j=null);this.G=this.A=null;this.h=this.m=!1;this.F=this.D=this.l=this.i=this.g=this.v=null;return Promise.resolve()};q.oa=function(){return this.h};q.nd=function(){return this.M};
514
515
  q.init=function(){if(this.H.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Aa();var a=new chrome.cast.SessionRequest(this.H);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(gn),d=c.next();!d.done;d=c.next())ln(d.value,b)},function(b){for(var c=t(gn),d=c.next();!d.done;d=c.next())d=d.value,mn="available"==b,d.j.Aa()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});mn&&this.j.P(nn);(a=jn)&&a.status!=chrome.cast.SessionStatus.STOPPED?ln(this,
515
- a):jn=null}else window.__onGCastApiAvailable!==on&&(pn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=on)};q.pe=function(a){this.v=a;this.h&&qn(this,{type:"appData",appData:this.v})};q.cast=function(a){var b=this;return I(function(c){if(!b.m)throw new N(1,8,8E3);if(!mn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new Lc;chrome.cast.requestSession(function(d){return rn(b,a,d)},function(d){return sn(b,d)});return u(c,b.l,0)})};
516
+ a):jn=null}else window.__onGCastApiAvailable!==on&&(pn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=on)};q.qe=function(a){this.v=a;this.h&&qn(this,{type:"appData",appData:this.v})};q.cast=function(a){var b=this;return I(function(c){if(!b.m)throw new N(1,8,8E3);if(!mn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new Lc;chrome.cast.requestSession(function(d){return rn(b,a,d)},function(d){return sn(b,d)});return u(c,b.l,0)})};
516
517
  function tn(a){if(a.h){var b=a.J();chrome.cast.requestSession(function(c){return rn(a,b,c)},function(c){return sn(a,c)})}}q.Ub=function(){if(this.h){hn(this);if(jn){kn(this);try{jn.stop(function(){},function(){})}catch(a){}jn=null}fn(this)}};
517
518
  q.get=function(a,b){var c=this;if("video"==a){if(Xm.includes(b))return function(){return c.kf.apply(c,[a,b].concat(ha(Ea.apply(0,arguments))))}}else if("player"==a){if($m[b]&&!this.get("player","isLive")())return function(){};if(cn.includes(b))return function(){return c.kf.apply(c,[a,b].concat(ha(Ea.apply(0,arguments))))};if(dn.includes(b))return function(){return c.Lg.apply(c,[a,b].concat(ha(Ea.apply(0,arguments))))};if(Ym[b]||Zm[b])return function(){return c.g[a][b]}}return this.g[a][b]};
518
519
  q.set=function(a,b,c){this.g[a][b]=c;qn(this,{type:"set",targetName:a,property:b,value:c})};function rn(a,b,c){jn=c;c.addUpdateListener(a.D);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.F);fn(a);qn(a,{type:"init",initState:b,appData:a.v});a.l.resolve()}function sn(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}
519
520
  q.kf=function(a,b){qn(this,{type:"call",targetName:a,methodName:b,args:Ea.apply(2,arguments)})};q.Lg=function(a,b){var c=Ea.apply(2,arguments),d=new Lc,e=this.I.toString();this.I++;this.i[e]=d;try{qn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function ln(a,b){var c=a.J();a.l=new Lc;a.B=!0;rn(a,c,b)}function kn(a){var b=jn;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.F)}
520
521
  function fn(a){var b=jn?"connected"==jn.status:!1;if(a.h&&!b){a.G();for(var c in a.g)a.g[c]={};hn(a)}a.h=b;a.M=b?jn.receiver.friendlyName:"";a.j.Aa()}function hn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function qn(a,b){var c=Rm(b),d=jn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Ta)}catch(e){throw c=new N(2,8,8005,e),d=new M("error",(new Map).set("detail",c)),a.A("player",d),a.Ub(),c;}}var nn=.02,mn=!1,jn=null,pn=null,gn=new Set;
521
522
  function on(a){pn?window.__onGCastApiAvailable=pn:delete window.__onGCastApiAvailable;pn=null;if(a)for(var b=t(gn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function un(a,b,c){cb.call(this);var d=this;this.i=a;this.h=b;this.m=this.v=this.j=this.A=this.l=null;this.D=c;this.B=new Map;this.g=new en(c,function(){return vn(d)},function(){return wn(d)},function(e,f){return xn(d,e,f)},function(){return yn(d)},function(){return zn(d)});An(this)}pa(un,cb);q=un.prototype;
522
- q.destroy=function(a){a&&this.g.Ub();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.A=this.l=this.i=null;cb.prototype.release.call(this);return Promise.all(a)};q.tb=function(){return this.l};q.Wb=function(){return this.A};q.Ie=function(){return this.g.m&&mn};q.na=function(){return this.g.na()};q.nd=function(){return this.g.nd()};
523
- q.cast=function(){var a=this,b;return I(function(c){return 1==c.g?(b=zn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Ee(),0):c["return"]()})};q.pe=function(a){this.g.pe(a)};q.vf=function(){tn(this.g)};q.Ub=function(){this.g.Ub()};
524
- q.Me=function(a){var b=this;return I(function(c){if(1==c.g){if(a==b.D)return c["return"]();b.D=a;b.g.Ub();return u(c,b.g.destroy(),2)}b.g=null;b.g=new en(a,function(){return vn(b)},function(){return wn(b)},function(d,e){return xn(b,d,e)},function(){return yn(b)},function(){return zn(b)});b.g.init();z(c)})};
525
- function An(a){a.g.init();a.m=new nf;for(var b=t(Um),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.na()||(f=Ma(f),a.j.dispatchEvent(f))});for(var d in Em)a.m.o(a.h,Em[d],function(f){a.g.na()||a.v.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.hc=e,Object.defineProperty(a.l,b.hc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Bn(a,f.hc)}}(b),set:function(f){return function(g){var h=f.hc;a.g.na()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={hc:b.hc};a.A={};Cn(a,
526
- function(f){Object.defineProperty(a.A,f,{configurable:!1,enumerable:!0,get:function(){return Dn(a,f)}})});En(a);a.j=new cb;a.j.Vc=a.l;a.v=new cb;a.v.Vc=a.A}function En(a){var b=new Map;Cn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.B.set(c,e):a.B.set(e,c)}else b.set(d,c)})}
523
+ q.destroy=function(a){a&&this.g.Ub();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.A=this.l=this.i=null;cb.prototype.release.call(this);return Promise.all(a)};q.vb=function(){return this.l};q.Wb=function(){return this.A};q.Je=function(){return this.g.m&&mn};q.oa=function(){return this.g.oa()};q.nd=function(){return this.g.nd()};
524
+ q.cast=function(){var a=this,b;return I(function(c){return 1==c.g?(b=zn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Fe(),0):c["return"]()})};q.qe=function(a){this.g.qe(a)};q.vf=function(){tn(this.g)};q.Ub=function(){this.g.Ub()};
525
+ q.Ne=function(a){var b=this;return I(function(c){if(1==c.g){if(a==b.D)return c["return"]();b.D=a;b.g.Ub();return u(c,b.g.destroy(),2)}b.g=null;b.g=new en(a,function(){return vn(b)},function(){return wn(b)},function(d,e){return xn(b,d,e)},function(){return yn(b)},function(){return zn(b)});b.g.init();z(c)})};
526
+ function An(a){a.g.init();a.m=new nf;for(var b=t(Um),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.oa()||(f=Ma(f),a.j.dispatchEvent(f))});for(var d in Em)a.m.o(a.h,Em[d],function(f){a.g.oa()||a.v.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.hc=e,Object.defineProperty(a.l,b.hc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Bn(a,f.hc)}}(b),set:function(f){return function(g){var h=f.hc;a.g.oa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={hc:b.hc};a.A={};Cn(a,
527
+ function(f){Object.defineProperty(a.A,f,{configurable:!1,enumerable:!0,get:function(){return Dn(a,f)}})});En(a);a.j=new cb;a.j.cd=a.l;a.v=new cb;a.v.cd=a.A}function En(a){var b=new Map;Cn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.B.set(c,e):a.B.set(e,c)}else b.set(d,c)})}
527
528
  function Cn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
528
529
  function zn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Od(),startTime:null};a.i.pause();for(var c=t(Wm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(an);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(bn);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 vn(a){var b=new M("caststatuschanged");a.dispatchEvent(b)}
529
530
  function wn(a){var b=new M(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
530
531
  function yn(a){for(var b=t(an),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=t(Wm);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=t(Wm),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(bn);for(k=
531
532
  h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new M(Am,h);a.h.dispatchEvent(h)})}
532
- function Bn(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.na()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.na()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
533
+ function Bn(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.oa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.oa()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
533
534
  function Dn(a,b){a.B.has(b)&&(b=a.B.get(b));if("addEventListener"==b)return function(c,d,e){return a.v.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.v.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.vc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.Wc()};
534
- if("setVideoContainer"==b)return function(c){return a.h.ye(c)};if(a.g.na()){if("getManifest"==b||"drmInfo"==b)return function(){Pa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Pa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.na()&&0==Object.keys(a.g.g.video).length&&(Ym[b]||Zm[b])||!a.g.na()?a.h[b].bind(a.h):a.g.get("player",b)}
535
- function xn(a,b,c){a.g.na()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.v.dispatchEvent(c))}K("shaka.cast.CastProxy",un);un.prototype.changeReceiverId=un.prototype.Me;un.prototype.forceDisconnect=un.prototype.Ub;un.prototype.suggestDisconnect=un.prototype.vf;un.prototype.setAppData=un.prototype.pe;un.prototype.cast=un.prototype.cast;un.prototype.receiverName=un.prototype.nd;un.prototype.isCasting=un.prototype.na;un.prototype.canCast=un.prototype.Ie;un.prototype.getPlayer=un.prototype.Wb;
536
- un.prototype.getVideo=un.prototype.tb;un.prototype.destroy=un.prototype.destroy;function Fn(a,b,c,d){cb.call(this);var e=this;this.g=a;this.h=b;this.j=new nf;this.I={video:a,player:b};this.F=c||function(){};this.J=d||function(f){return f};this.i=null;this.G=!1;this.v=!0;this.m=0;this.D=!1;this.B=!0;this.A=this.l=null;this.H=new P(function(){Gn(e)});Hn(this)}pa(Fn,cb);q=Fn.prototype;q.isConnected=function(){return this.G};q.xg=function(){return this.v};q.Tg=function(a){this.i=a};q.Kf=function(){this.i=null};
535
+ if("setVideoContainer"==b)return function(c){return a.h.ze(c)};if(a.g.oa()){if("getManifest"==b||"drmInfo"==b)return function(){Pa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Pa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.oa()&&0==Object.keys(a.g.g.video).length&&(Ym[b]||Zm[b])||!a.g.oa()?a.h[b].bind(a.h):a.g.get("player",b)}
536
+ function xn(a,b,c){a.g.oa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.v.dispatchEvent(c))}K("shaka.cast.CastProxy",un);un.prototype.changeReceiverId=un.prototype.Ne;un.prototype.forceDisconnect=un.prototype.Ub;un.prototype.suggestDisconnect=un.prototype.vf;un.prototype.setAppData=un.prototype.qe;un.prototype.cast=un.prototype.cast;un.prototype.receiverName=un.prototype.nd;un.prototype.isCasting=un.prototype.oa;un.prototype.canCast=un.prototype.Je;un.prototype.getPlayer=un.prototype.Wb;
537
+ un.prototype.getVideo=un.prototype.vb;un.prototype.destroy=un.prototype.destroy;function Fn(a,b,c,d){cb.call(this);var e=this;this.g=a;this.h=b;this.j=new nf;this.I={video:a,player:b};this.F=c||function(){};this.J=d||function(f){return f};this.i=null;this.G=!1;this.v=!0;this.m=0;this.D=!1;this.B=!0;this.A=this.l=null;this.H=new P(function(){Gn(e)});Hn(this)}pa(Fn,cb);q=Fn.prototype;q.isConnected=function(){return this.G};q.xg=function(){return this.v};q.Tg=function(a){this.i=a};q.Kf=function(){this.i=null};
537
538
  q.Ug=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Sg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Rg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
538
539
  q.destroy=function(){var a=this,b,c;return I(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.H&&(a.H.stop(),a.H=null),a.g=null,a.I=null,a.F=null,a.G=!1,a.v=!0,a.l=null,a.A=null,cb.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
539
540
  function Hn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return In(a)};b.onSenderDisconnected=function(){return In(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Jn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Jn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.A=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.A.onMessage=function(e){return Kn(a,
540
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Ln(a,e)};b.start();b=t(Um);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Mn(a,"video",e)});for(var d in Em)a.j.o(a.h,Em[d],function(e){return Mn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.se(3840,2160):a.h.se(1920,1080);a.j.o(a.g,"loadeddata",function(){a.D=!0});a.j.o(a.h,"loading",function(){a.v=
541
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Ln(a,e)};b.start();b=t(Um);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Mn(a,"video",e)});for(var d in Em)a.j.o(a.h,Em[d],function(e){return Mn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.ue(3840,2160):a.h.ue(1920,1080);a.j.o(a.g,"loadeddata",function(){a.D=!0});a.j.o(a.h,"loading",function(){a.v=
541
542
  !1;Nn(a)});a.j.o(a.g,"playing",function(){a.v=!1;Nn(a)});a.j.o(a.g,"pause",function(){Nn(a)});a.j.o(a.h,"unloading",function(){a.v=!0;Nn(a)});a.j.o(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.v=!0,Nn(a))})).P(On)})}function In(a){a.m=0;a.B=!0;a.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Nn(a)}
542
543
  function Nn(a){var b;I(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new M("caststatuschanged");a.dispatchEvent(b);Pn(a)||Qn(a);z(c)})}
543
544
  function Rn(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;I(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.F(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,A(v,5),u(v,a.h.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:ua(v,3);break;case 5:return g=F(v),h=Am,k=(new Map).set("detail",g),l=new M(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)r=b.playerAfterLoad[p],
@@ -546,12 +547,12 @@ function Gn(a){a.H.P(Sn);for(var b={video:{},player:{}},c=t(Vm),d=c.next();!d.do
546
547
  1);Pn(a)}function Pn(a){return a.B&&(a.g.duration||a.h.V())?(Tn(a),a.B=!1,!0):!1}function Tn(a,b){var c={contentId:a.h.Od(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Qn(a,void 0===b?0:b,c)}
547
548
  function Ln(a,b){var c=Sm(b.data);switch(c.type){case "init":a.m=0;a.D=!1;a.B=!0;Rn(a,c.initState,c.appData);Gn(a);break;case "appData":a.F(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.I[d][e]=c;break;case "call":d=a.I[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
548
549
  c.methodName;"player"==d&&"load"==e&&(a.m=0,a.D=!1);var g=c.id,h=b.senderId;f=a.I[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.B=!0}));c.then(function(){return Un(a,h,g,null)},function(k){return Un(a,h,g,k)})}}
549
- function Kn(a,b){var c=Sm(b.data);switch(c.type){case "PLAY":a.g.play();Qn(a);break;case "PAUSE":a.g.pause();Qn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),Qn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Qn(a));break;case "STOP":a.h.Ee().then(function(){a.h&&Qn(a)});break;case "GET_STATUS":Tn(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
550
+ function Kn(a,b){var c=Sm(b.data);switch(c.type){case "PLAY":a.g.play();Qn(a);break;case "PAUSE":a.g.pause();Qn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),Qn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Qn(a));break;case "STOP":a.h.Fe().then(function(){a.h&&Qn(a)});break;case "GET_STATUS":Tn(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
550
551
  null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||Qn(a);break;case "LOAD":a.m=0;a.D=!1;a.B=!1;d=c.media;e=c.currentTime;f=a.J(d.contentId);g=c.autoplay||!0;a.F(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&Tn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Jn(a,{requestId:Number(c.requestId),type:k},a.A)});break;default:Jn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.A)}}
551
552
  function Un(a,b,c,d){a.h&&Jn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Jn(a,b,c,d){a.G&&(a=Rm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Qn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.v?Vn:a.h.Cc()?Wn:a.g.paused?Xn:Yn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Jn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.A)}
552
- K("shaka.cast.CastReceiver",Fn);Fn.prototype.destroy=Fn.prototype.destroy;Fn.prototype.setContentArtist=Fn.prototype.Rg;Fn.prototype.setContentImage=Fn.prototype.Sg;Fn.prototype.setContentTitle=Fn.prototype.Ug;Fn.prototype.clearContentMetadata=Fn.prototype.Kf;Fn.prototype.setContentMetadata=Fn.prototype.Tg;Fn.prototype.isIdle=Fn.prototype.xg;Fn.prototype.isConnected=Fn.prototype.isConnected;var Sn=.5,On=5,Vn="IDLE",Yn="PLAYING",Wn="BUFFERING",Xn="PAUSED";function Zn(a){var b=this;this.g=[];this.h=[];this.data=[];(new Ng).box("moov",Rg).T("pssh",function(c){if(!(1<c.version)){var d=Ec(c.reader.S,-12,c.size);b.data.push(d);b.g.push(od(c.reader.ub(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=od(c.reader.ub(16));b.h.push(f)}}}}).parse(a)}
553
+ K("shaka.cast.CastReceiver",Fn);Fn.prototype.destroy=Fn.prototype.destroy;Fn.prototype.setContentArtist=Fn.prototype.Rg;Fn.prototype.setContentImage=Fn.prototype.Sg;Fn.prototype.setContentTitle=Fn.prototype.Ug;Fn.prototype.clearContentMetadata=Fn.prototype.Kf;Fn.prototype.setContentMetadata=Fn.prototype.Tg;Fn.prototype.isIdle=Fn.prototype.xg;Fn.prototype.isConnected=Fn.prototype.isConnected;var Sn=.5,On=5,Vn="IDLE",Yn="PLAYING",Wn="BUFFERING",Xn="PAUSED";function Zn(a){var b=this;this.g=[];this.h=[];this.data=[];(new Ng).box("moov",Rg).T("pssh",function(c){if(!(1<c.version)){var d=Ec(c.reader.S,-12,c.size);b.data.push(d);b.g.push(od(c.reader.wb(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=od(c.reader.wb(16));b.h.push(f)}}}}).parse(a)}
553
554
  function $n(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Hc(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 ao(a){if(!a)return a;var b=new Zn(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={Jc:c.Jc},d=b.next())c.Jc=d.value,a.some(function(e){return function(f){return Cc(f,e.Jc)}}(c))||a.push(c.Jc);return pd.apply(jd,ha(a))};function bo(a,b,c){var d=co(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.nf?(e=h.init||e,!1):!0}),f.length&&(a=eo(e,f,c),0==a.length&&(a=[Hb("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Hb(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
554
- t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Oe:g,mi:e,drmInfos:a,Se:!0}}function fo(a,b,c,d){var e=bo(a,c,d);if(b.Se){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.Se=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.Oe||b.Oe}
555
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Pe:g,mi:e,drmInfos:a,Te:!0}}function fo(a,b,c,d){var e=bo(a,c,d);if(b.Te){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.Te=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.Pe||b.Pe}
555
556
  function go(a){var b=0,c=Hc(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=Ec(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
556
557
  function ho(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function io(a){a=Af(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=md(a.textContent);a=go(a).filter(function(b){return b.type===jo})[0];if(!a)return"";a=ed(a.value,!0);return(a=Qf(a,"WRMHEADER"))?ho(a):""}
557
558
  function eo(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.nf];if(f){var g;if(g=Af(e.node,"urn:microsoft:playready","pro")){g=md(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:$n(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Hb(f,e.init||a||g);if(f=ko.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
@@ -560,41 +561,41 @@ function lo(a){var b=a.getAttribute("schemeIdUri"),c=Df(a,"urn:mpeg:cenc:2013","
560
561
  var jo=1,ko=(new Map).set("com.widevine.alpha",function(a){return(a=Af(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",io).set("com.microsoft.playready.recommendation",io).set("com.microsoft.playready.software",io).set("com.microsoft.playready.hardware",io);function mo(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=
561
562
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
562
563
  function no(a,b){var c=oo(a,b,"timescale"),d=1;c&&(d=Mf(c)||1);var e=oo(a,b,"duration");c=Mf(e||"");"image"==a.L.contentType&&(c=Of(e||""));c&&(c/=d);var f=oo(a,b,"startNumber");e=Number(oo(a,b,"presentationTimeOffset"))||0;var g=Nf(f||"");if(null==f||null==g)g=1;var h=po(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.X.duration||Infinity;h=zf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],r=h[n+1],v=Hf(p,"t",Nf),y=Hf(p,"d",Nf);p=Hf(p,"r",Lf);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
563
- p||0;if(0>p)if(r){r=Hf(r,"t",Nf);if(null==r)break;else if(v>=r)break;p=Math.ceil((r-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(r=0;r<=p;++r)m=v+y,l.push({start:v/f,end:m/f,Zg:v}),v=m}f=l}return{timescale:d,ya:c,ec:g,pb:e/d||0,Fe:e,timeline:f}}function oo(a,b,c){return[b(a.L),b(a.wa),b(a.sa)].filter(Eb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
564
+ p||0;if(0>p)if(r){r=Hf(r,"t",Nf);if(null==r)break;else if(v>=r)break;p=Math.ceil((r-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(r=0;r<=p;++r)m=v+y,l.push({start:v/f,end:m/f,Zg:v}),v=m}f=l}return{timescale:d,ya:c,ec:g,pb:e/d||0,Ge:e,timeline:f}}function oo(a,b,c){return[b(a.L),b(a.wa),b(a.sa)].filter(Eb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
564
565
  function po(a,b,c){return[b(a.L),b(a.wa),b(a.sa)].filter(Eb).map(function(d){return yf(d,c)}).reduce(function(d,e){return d||e})}
565
- function qo(a,b,c,d,e,f){for(var g=Df(a,"http://www.w3.org/1999/xlink","href"),h=Df(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Qe(new N(2,4,4028));if("onLoad"!=h)return Qe(new N(2,4,4027));var m=Gb([d],[g]);return e.request(0,df(m,b)).ma(function(n){n=Sf(n.data,a.tagName);if(!n)return Qe(new N(2,4,4001,g));
566
+ function qo(a,b,c,d,e,f){for(var g=Df(a,"http://www.w3.org/1999/xlink","href"),h=Df(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Qe(new N(2,4,4028));if("onLoad"!=h)return Qe(new N(2,4,4027));var m=Gb([d],[g]);return e.request(0,df(m,b)).na(function(n){n=Sf(n.data,a.tagName);if(!n)return Qe(new N(2,4,4001,g));
566
567
  for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return ro(a,b,c,m[0],e,f+1)})}
567
- function ro(a,b,c,d,e,f){f=void 0===f?0:f;if(Df(a,"http://www.w3.org/1999/xlink","href")){var g=qo(a,b,c,d,e,f);c&&(g=g.ma(void 0,function(){return ro(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Df(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(ro(k,b,c,d,e,f)));return Ue(g).ma(function(){return a})};function so(a,b,c,d,e,f,g){var h,k=(new Ng).T("sidx",function(l){h=to(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
568
+ function ro(a,b,c,d,e,f){f=void 0===f?0:f;if(Df(a,"http://www.w3.org/1999/xlink","href")){var g=qo(a,b,c,d,e,f);c&&(g=g.na(void 0,function(){return ro(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Df(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(ro(k,b,c,d,e,f)));return Ue(g).na(function(){return a})};function so(a,b,c,d,e,f,g){var h,k=(new Ng).T("sidx",function(l){h=to(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
568
569
  function to(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.dc(),m=g.reader.dc();g.reader.skip(2);var n=g.reader.cc();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.O(),r=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.O();g.reader.skip(4);if(1==r)throw new N(2,3,3006);h.push(new Mi(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function uo(a){this.h=Hc(a);this.g=new Kg(this.h,0)}uo.prototype.Fa=function(){return this.g.Fa()};
569
570
  function vo(a){var b=wo(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=wo(a);a:{d=t(xo);for(var e=d.next();!e.done;e=d.next())if(Cc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ea();else{if(8==b.length&&b[1]&224)throw new N(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.ea()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ea();d=Hc(a.h,a.g.ea(),b);a.g.skip(b);return new yo(c,
570
571
  d)}function wo(a){var b=a.g.ea(),c=a.g.ha();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ec(a.h,b,c)}var xo=[[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 yo(a,b){this.id=a;this.g=b}
571
572
  function zo(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Ao(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new uo(a.g);for(var n=null,p=null;a.Fa();){var r=vo(a);if(187==r.id){var v=Bo(r);v&&(r=c*v.$g,v=b+v.Kg,null!=n&&m.push(new Mi(n+g,r+g,l,p,v-1,f,g,h,k)),n=r,p=v)}}null!=n&&m.push(new Mi(n+g,d+g,l,p,null,f,g,h,k));return m}
572
573
  function Bo(a){var b=new uo(a.g);a=vo(b);if(179!=a.id)throw new N(2,3,3013);a=zo(a);b=vo(b);if(183!=b.id)throw new N(2,3,3012);b=new uo(b.g);for(var c=0;b.Fa();){var d=vo(b);if(241==d.id){c=zo(d);break}}return{$g:a,Kg:c}};function Co(a,b){var c=po(a,b,"Initialization");if(!c)return null;var d=a.L.Pa,e=c.getAttribute("sourceURL");e&&(d=Gb(a.L.Pa,[e]));e=0;var f=null;if(c=Hf(c,"range",Kf))e=c.start,f=c.end;return new Ki(function(){return d},e,f)}
573
574
  function Do(a,b){var c=Number(oo(a,Eo,"presentationTimeOffset"))||0,d=oo(a,Eo,"timescale"),e=1;d&&(e=Mf(d)||1);var f=c/e||0,g=Co(a,Eo);Fo(a,g);var h=Xe(a);return{Vb:function(){var k=po(h,Eo,"RepresentationIndex"),l=h.L.Pa;k&&(k=k.getAttribute("sourceURL"))&&(l=Gb(h.L.Pa,[k]));k=Go(h);return Ho(h,b,g,l,k.start,k.end,f)}}}
574
- function Ho(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,v,y,x,w,C,B,D,E;return I(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.zb||!a.X.cf,l=a.X.start,m=a.X.duration,n=a.L.mimeType.split("/")[1],p=b,r=null,v=[p(d,e,f),"webm"==n?p(c.Ea(),c.za,c.ra):null],p=null,u(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;C=null;B=l-g;D=l;E=m?l+m:Infinity;if("mp4"==n)var H=so(x,e,d,c,B,D,E);else{H=new uo(w);if(440786851!=vo(H).id)throw new N(2,3,3008);var L=vo(H);if(408125543!=L.id)throw new N(2,3,3009);H=L.g.byteOffset;
575
- L=new uo(L.g);for(var J=null;L.Fa();){var O=vo(L);if(357149030==O.id){J=O;break}}if(!J)throw new N(2,3,3010);J=new uo(J.g);O=1E6;for(L=null;J.Fa();){var V=vo(J);if(2807729==V.id)O=zo(V);else if(17545==V.id)if(4==V.g.byteLength)L=V.g.getFloat32(0);else if(8==V.g.byteLength)L=V.g.getFloat64(0);else throw new N(2,3,3003);}if(null==L)throw new N(2,3,3011);J=O/1E9;L*=J;O=vo(new uo(x));if(475249515!=O.id)throw new N(2,3,3007);H=Ao(O,H,J,L,d,c,B,D,E)}C=H;h.$b(C);r=new ij(C);k&&r.sb(D,E,!0);return G["return"](r)})}
576
- function Eo(a){return a.Fc}function Go(a){var b=po(a,Eo,"RepresentationIndex");a=oo(a,Eo,"indexRange");a=Kf(a||"");b&&(a=Hf(b,"range",Kf,a));return a}function Fo(a,b){Io(a,b);if(!Go(a))throw new N(2,4,4002);}function Io(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Lb&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);};function Jo(a,b){var c=Co(a,Ko),d=Lo(a);if(!d.ya&&!d.timeline&&1<d.Yb.length)throw new N(2,4,4002);if(!d.ya&&!a.X.duration&&!d.timeline&&1==d.Yb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.sa.id&&a.L.id&&(f=a.sa.id+","+a.L.id,e=b[f]);c=Mo(a.X.start,a.X.duration,a.L.Pa,d,c);d=!e;e?e.Zb(c,a.presentationTimeline.jb()):(e=new ij(c),f&&a.zb&&(b[f]=e));a.presentationTimeline.$b(c);a.zb&&a.X.cf||e.sb(a.X.start,a.X.duration?a.X.start+a.X.duration:
577
- Infinity,d);return{Vb:function(){return Promise.resolve(e)}}}function Ko(a){return a.vb}function Lo(a){var b=Vo(a);a=no(a,Ko);var c=a.ec;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,ec:c,pb:a.pb,timeline:a.timeline,Yb:b}}
575
+ function Ho(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,v,y,x,w,C,B,D,E;return I(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.tb||!a.X.Pd,l=a.X.start,m=a.X.duration,n=a.L.mimeType.split("/")[1],p=b,r=null,v=[p(d,e,f),"webm"==n?p(c.Ea(),c.za,c.ra):null],p=null,u(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;C=null;B=l-g;D=l;E=m?l+m:Infinity;if("mp4"==n)var H=so(x,e,d,c,B,D,E);else{H=new uo(w);if(440786851!=vo(H).id)throw new N(2,3,3008);var L=vo(H);if(408125543!=L.id)throw new N(2,3,3009);H=L.g.byteOffset;
576
+ L=new uo(L.g);for(var J=null;L.Fa();){var O=vo(L);if(357149030==O.id){J=O;break}}if(!J)throw new N(2,3,3010);J=new uo(J.g);O=1E6;for(L=null;J.Fa();){var V=vo(J);if(2807729==V.id)O=zo(V);else if(17545==V.id)if(4==V.g.byteLength)L=V.g.getFloat32(0);else if(8==V.g.byteLength)L=V.g.getFloat64(0);else throw new N(2,3,3003);}if(null==L)throw new N(2,3,3011);J=O/1E9;L*=J;O=vo(new uo(x));if(475249515!=O.id)throw new N(2,3,3007);H=Ao(O,H,J,L,d,c,B,D,E)}C=H;h.$b(C);r=new ij(C);k&&r.ub(D,E,!0);return G["return"](r)})}
577
+ function Eo(a){return a.Fc}function Go(a){var b=po(a,Eo,"RepresentationIndex");a=oo(a,Eo,"indexRange");a=Kf(a||"");b&&(a=Hf(b,"range",Kf,a));return a}function Fo(a,b){Io(a,b);if(!Go(a))throw new N(2,4,4002);}function Io(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Lb&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);};function Jo(a,b){var c=Co(a,Ko),d=Lo(a);if(!d.ya&&!d.timeline&&1<d.Yb.length)throw new N(2,4,4002);if(!d.ya&&!a.X.duration&&!d.timeline&&1==d.Yb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.sa.id&&a.L.id&&(f=a.sa.id+","+a.L.id,e=b[f]);c=Mo(a.X.start,a.X.duration,a.L.Pa,d,c);d=!e;e?e.Zb(c,a.presentationTimeline.jb()):(e=new ij(c),f&&a.tb&&(b[f]=e));a.presentationTimeline.$b(c);a.tb&&a.X.Pd||e.ub(a.X.start,a.X.duration?a.X.start+a.X.duration:
578
+ Infinity,d);return{Vb:function(){return Promise.resolve(e)}}}function Ko(a){return a.xb}function Lo(a){var b=Vo(a);a=no(a,Ko);var c=a.ec;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,ec:c,pb:a.pb,timeline:a.timeline,Yb:b}}
578
579
  function Mo(a,b,c,d,e){var f=d.Yb.length;d.timeline&&d.timeline.length!=d.Yb.length&&(f=Math.min(d.timeline.length,d.Yb.length));for(var g=a-d.pb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={zd:m.zd},n++){var p=d.Yb[n];m.zd=Gb(c,[p.Cg]);var r=void 0;r=null!=d.ya?l+d.ya:d.timeline?d.timeline[n].end:l+b;k.push(new Mi(a+l,a+r,function(v){return function(){return v.zd}}(m),p.start,p.end,e,g,a,h));l=r}return k}
579
- function Vo(a){return[a.L.vb,a.wa.vb,a.sa.vb].filter(Eb).map(function(b){return zf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ze&&(a.Ze=!0);var c=b.getAttribute("media");b=Hf(b,"mediaRange",Kf,{start:0,end:null});return{Cg:c,start:b.start,end:b.end}})};function Wo(a,b,c,d,e,f){var g=Xo(a),h=Yo(a);Zo(h);var k=Xe(a);if(h.Bc)return Io(a,g),{Vb:function(){var v=mo(h.Bc,k.L.id,null,k.bandwidth||null,null);v=Gb(k.L.Pa,[v]);return Ho(k,b,g,v,0,null,h.pb)}};if(h.ya)return d||"image"===a.wa.contentType||(a.presentationTimeline.Yd(h.ya),a.presentationTimeline.Zd(a.X.start)),{Vb:function(){return $o(k,h,e,g,f)}};var l=null;d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,l=c[d]);var m=ap(k,h,g),n=a.X.start,p=a.X.duration?a.X.start+a.X.duration:Infinity,r=Infinity!=
580
- p;l?(r&&(new ij(m)).sb(n,p,!0),l.Zb(m,a.presentationTimeline.jb())):(l=new ij(m),d&&a.zb&&(c[d]=l));a.presentationTimeline.$b(m);r&&l.sb(n,p);return{Vb:function(){return Promise.resolve(l)}}}function bp(a){return a.Gc}function Yo(a){var b=no(a,bp),c=oo(a,bp,"media");a=oo(a,bp,"index");return{ya:b.ya,timescale:b.timescale,ec:b.ec,pb:b.pb,Fe:b.Fe,timeline:b.timeline,Wd:c,Bc:a}}
581
- function Zo(a){var b=a.Bc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.Bc&&(a.timeline=null),a.ya=null);if(!a.Bc&&!a.Wd)throw new N(2,4,4002);}
580
+ function Vo(a){return[a.L.xb,a.wa.xb,a.sa.xb].filter(Eb).map(function(b){return zf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.$e&&(a.$e=!0);var c=b.getAttribute("media");b=Hf(b,"mediaRange",Kf,{start:0,end:null});return{Cg:c,start:b.start,end:b.end}})};function Wo(a,b,c,d,e,f){var g=Xo(a),h=Yo(a);Zo(h);var k=Xe(a);if(h.Bc)return Io(a,g),{Vb:function(){var v=mo(h.Bc,k.L.id,null,k.bandwidth||null,null);v=Gb(k.L.Pa,[v]);return Ho(k,b,g,v,0,null,h.pb)}};if(h.ya)return d||"image"===a.wa.contentType||(a.presentationTimeline.Zd(h.ya),a.presentationTimeline.$d(a.X.start)),{Vb:function(){return $o(k,h,e,g,f)}};var l=null;d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,l=c[d]);var m=ap(k,h,g),n=a.X.start,p=a.X.duration?a.X.start+a.X.duration:Infinity,r=!(a.tb&&
581
+ a.X.Pd);l?(r&&(new ij(m)).ub(n,p,!0),l.Zb(m,a.presentationTimeline.jb())):(l=new ij(m),d&&a.tb&&(c[d]=l));a.presentationTimeline.$b(m);r&&l.ub(n,p);return{Vb:function(){return Promise.resolve(l)}}}function bp(a){return a.Gc}function Yo(a){var b=no(a,bp),c=oo(a,bp,"media");a=oo(a,bp,"index");return{ya:b.ya,timescale:b.timescale,ec:b.ec,pb:b.pb,Ge:b.Ge,timeline:b.timeline,Xd:c,Bc:a}}
582
+ function Zo(a){var b=a.Bc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.Bc&&(a.timeline=null),a.ya=null);if(!a.Bc&&!a.Xd)throw new N(2,4,4002);}
582
583
  function $o(a,b,c,d,e){function f(J){var O=(J-r)*p,V=O+b.pb,Z=O+l;O=Z+p;var W=Math.min(O,h());Z=new Mi(Z,W,function(){var ma=mo(y,w,J,x,V*v);return Gb(C,[ma])},0,null,d,B,l,h());Z.l=O;return Z}function g(){var J=[Math.max(k.jb(),l),Math.min(k.Db(),h())].map(function(O){return O-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(O){return O+r})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.X.start,m=a.sa.id,n=a.X.duration,p=b.ya,r=b.ec,v=b.timescale,
583
- y=b.Wd,x=a.bandwidth||null,w=a.L.id,C=a.L.Pa,B=l-b.pb,D=g();a=a.zb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var E=a;E<=D;++E){var G=f(E);c.push(G)}var H=new ij(c);c=k.Db()<h();E=k.V();if(c||E){var L=Math.max(a,D+1);H.qd(p,function(){var J=k.jb();H.Ab(J);var O=t(g());O.next();O=O.next().value;for(var V=[];L<=O;){var Z=f(L);V.push(Z);L++}return J>h()&&!V.length?null:V})}return Promise.resolve(H)}
584
- function ap(a,b,c){var d=a.X.start,e=a.X.duration,f=d-b.pb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={yd:h.yd,Dd:h.Dd,Gd:h.Gd,vd:h.vd,Id:h.Id,wd:h.wd},k++){var l=b.timeline[k],m=l.start,n=l.Zg;l=l.end;h.Gd=k+b.ec;h.Id=n+b.Fe;h.Dd=a.L.id;h.vd=a.bandwidth||null;h.yd=b.Wd;h.wd=a.L.Pa;g.push(new Mi(d+m,d+l,function(p){return function(){var r=mo(p.yd,p.Dd,p.Gd,p.vd||null,p.Id);return Gb(p.wd,[r]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
584
+ y=b.Xd,x=a.bandwidth||null,w=a.L.id,C=a.L.Pa,B=l-b.pb,D=g();a=a.tb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var E=a;E<=D;++E){var G=f(E);c.push(G)}var H=new ij(c);c=k.Db()<h();E=k.V();if(c||E){var L=Math.max(a,D+1);H.qd(p,function(){var J=k.jb();H.Ab(J);var O=t(g());O.next();O=O.next().value;for(var V=[];L<=O;){var Z=f(L);V.push(Z);L++}return J>h()&&!V.length?null:V})}return Promise.resolve(H)}
585
+ function ap(a,b,c){var d=a.X.start,e=a.X.duration,f=d-b.pb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={yd:h.yd,Dd:h.Dd,Gd:h.Gd,vd:h.vd,Id:h.Id,wd:h.wd},k++){var l=b.timeline[k],m=l.start,n=l.Zg;l=l.end;h.Gd=k+b.ec;h.Id=n+b.Ge;h.Dd=a.L.id;h.vd=a.bandwidth||null;h.yd=b.Xd;h.wd=a.L.Pa;g.push(new Mi(d+m,d+l,function(p){return function(){var r=mo(p.yd,p.Dd,p.Gd,p.vd||null,p.Id);return Gb(p.wd,[r]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
585
586
  function Xo(a){var b=oo(a,bp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Pa;return new Ki(function(){var f=mo(b,c,null,d,null);return Gb(e,[f])},0,null)};function cp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}cp.prototype.release=function(){for(var a=t(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
586
587
  function dp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,B,D,E,G,H,L,J,O,V,Z,W,ma,ya,Ua;return I(function(Ra){switch(Ra.g){case 1:d=Mb;ep(b);fp(b);gp(b);hp(b);if(!c&&1==b.length){e=b[0];a.g=e.Qc;a.h=e.sd;a.j=e.textStreams;a.i=e.imageStreams;Ra.C(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 Ra["return"]();k=b.map(function(Fa){return Fa.Qc});l=b.map(function(Fa){return Fa.sd});m=b.map(function(Fa){return Fa.textStreams});n=b.map(function(Fa){return Fa.imageStreams});
587
- p=t(m);for(r=p.next();!r.done;r=p.next())v=r.value,v.push(ip(d.ka));y=t(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(ip(d.pc));return u(Ra,jp(a.g,k,f,kp,lp),3);case 3:return u(Ra,jp(a.h,l,f,kp,lp),4);case 4:return u(Ra,jp(a.j,m,f,kp,lp),5);case 5:return u(Ra,jp(a.i,n,f,kp,lp),2);case 2:C=0;B=[];if(a.h.length&&a.g.length)for(J=t(a.g),O=J.next();!O.done;O=J.next())for(V=O.value,Z=t(a.h),W=Z.next();!W.done;W=Z.next())ma=W.value,ya=Cg(V.drmInfos,ma.drmInfos),V.drmInfos.length&&ma.drmInfos.length&&
588
- !ya.length||(Ua=C++,B.push({id:Ua,language:V.language,primary:V.primary,audio:V,video:ma,bandwidth:(V.bandwidth||0)+(ma.bandwidth||0),drmInfos:ya,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(D=a.h.concat(a.g),E=t(D),G=E.next();!G.done;G=E.next())H=G.value,L=C++,B.push({id:L,language:H.language,primary:H.primary,audio:H.type==d.xb?H:null,video:H.type==d.bb?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
588
+ p=t(m);for(r=p.next();!r.done;r=p.next())v=r.value,v.push(ip(d.ma));y=t(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(ip(d.pc));return u(Ra,jp(a.g,k,f,kp,lp),3);case 3:return u(Ra,jp(a.h,l,f,kp,lp),4);case 4:return u(Ra,jp(a.j,m,f,kp,lp),5);case 5:return u(Ra,jp(a.i,n,f,kp,lp),2);case 2:C=0;B=[];if(a.h.length&&a.g.length)for(J=t(a.g),O=J.next();!O.done;O=J.next())for(V=O.value,Z=t(a.h),W=Z.next();!W.done;W=Z.next())ma=W.value,ya=Cg(V.drmInfos,ma.drmInfos),V.drmInfos.length&&ma.drmInfos.length&&
589
+ !ya.length||(Ua=C++,B.push({id:Ua,language:V.language,primary:V.primary,audio:V,video:ma,bandwidth:(V.bandwidth||0)+(ma.bandwidth||0),drmInfos:ya,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(D=a.h.concat(a.g),E=t(D),G=E.next();!G.done;G=E.next())H=G.value,L=C++,B.push({id:L,language:H.language,primary:H.primary,audio:H.type==d.zb?H:null,video:H.type==d.cb?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
589
590
  a.l=B;z(Ra)}})}function ep(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Qc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&fc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Qc=c}}
590
591
  function gp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&fc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
591
592
  function fp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.sd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&fc(e.roles,h.roles)&&xf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.sd=c}}
592
593
  function hp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
593
- function mp(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,B,D,E,G,H,L,J,O,V;return I(function(Z){switch(Z.g){case 1:b=Mb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(W){return W.filter(function(ma){return ma.type==b.xb})});d=a.map(function(W){return W.filter(function(ma){return ma.type==b.bb})});e=a.map(function(W){return W.filter(function(ma){return ma.type==b.ka})});f=a.map(function(W){return W.filter(function(ma){return ma.type==b.pc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
594
- k.push(np(b.ka));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(np(b.pc));return u(Z,jp([],c,0,op,pp),2);case 2:return p=Z.h,u(Z,jp([],d,0,op,pp),3);case 3:return r=Z.h,u(Z,jp([],e,0,op,pp),4);case 4:return v=Z.h,u(Z,jp([],f,0,op,pp),5);case 5:y=Z.h;x=0;if(r.length&&p.length)for(E=t(p),G=E.next();!G.done;G=E.next())for(H=G.value,L=t(r),J=L.next();!J.done;J=L.next())O=J.value,V=x++,O.variantIds.push(V),H.variantIds.push(V);else for(w=r.concat(p),C=t(w),B=C.next();!B.done;B=C.next())D=B.value,
594
+ function mp(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,B,D,E,G,H,L,J,O,V;return I(function(Z){switch(Z.g){case 1:b=Mb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(W){return W.filter(function(ma){return ma.type==b.zb})});d=a.map(function(W){return W.filter(function(ma){return ma.type==b.cb})});e=a.map(function(W){return W.filter(function(ma){return ma.type==b.ma})});f=a.map(function(W){return W.filter(function(ma){return ma.type==b.pc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
595
+ k.push(np(b.ma));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(np(b.pc));return u(Z,jp([],c,0,op,pp),2);case 2:return p=Z.h,u(Z,jp([],d,0,op,pp),3);case 3:return r=Z.h,u(Z,jp([],e,0,op,pp),4);case 4:return v=Z.h,u(Z,jp([],f,0,op,pp),5);case 5:y=Z.h;x=0;if(r.length&&p.length)for(E=t(p),G=E.next();!G.done;G=E.next())for(H=G.value,L=t(r),J=L.next();!J.done;J=L.next())O=J.value,V=x++,O.variantIds.push(V),H.variantIds.push(V);else for(w=r.concat(p),C=t(w),B=C.next();!B.done;B=C.next())D=B.value,
595
596
  D.variantIds=[x++];return Z["return"](r.concat(p).concat(v).concat(y))}})}
596
597
  function jp(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y,x,w,C,B,D,E,G,H,L,J;return I(function(O){switch(O.g){case 1:f=Mb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){O.C(4);break}m=l.value;return u(O,qp(m,b,c,e,g),5);case 5:n=O.h;if(!n)throw new N(2,4,4037);l=k.next();O.C(2);break;case 4:p=t(g),r=p.next();case 6:if(r.done){O.C(8);break}v=r.value;y=t(v);x=y.next();case 9:if(x.done){r=p.next();O.C(6);break}w=x.value;return u(O,rp(w,b,d,e,g),12);
597
- case 12:(C=O.h)&&a.push(C);x=y.next();O.C(9);break;case 8:B=t(g);for(r=B.next();!r.done;r=B.next())for(D=r.value,E={},G=t(D),x=G.next();!x.done;E={rb:E.rb},x=G.next())if(E.rb=x.value,H=E.rb.type==f.ka&&!E.rb.language,L=E.rb.type==f.pc&&!E.rb.tilesLayout,!H&&!L&&(J=a.some(function(V){return function(Z){return Z.mimeType==V.rb.mimeType&&xd(Z.codecs)==xd(V.rb.codecs)}}(E))))throw new N(2,4,4037);return O["return"](a)}})}
598
+ case 12:(C=O.h)&&a.push(C);x=y.next();O.C(9);break;case 8:B=t(g);for(r=B.next();!r.done;r=B.next())for(D=r.value,E={},G=t(D),x=G.next();!x.done;E={rb:E.rb},x=G.next())if(E.rb=x.value,H=E.rb.type==f.ma&&!E.rb.language,L=E.rb.type==f.pc&&!E.rb.tilesLayout,!H&&!L&&(J=a.some(function(V){return function(Z){return Z.mimeType==V.rb.mimeType&&xd(Z.codecs)==xd(V.rb.codecs)}}(E))))throw new N(2,4,4037);return O["return"](a)}})}
598
599
  function qp(a,b,c,d,e){var f;return I(function(g){if(1==g.g)return(f=sp(b,a))?u(g,tp(f),2):g["return"](!1);up(a,f,c,d,e);return g["return"](!0)})}function tp(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
599
600
  function rp(a,b,c,d,e){var f,g;return I(function(h){if(1==h.g)return f=c(a),(g=sp(b,f))?f.createSegmentIndex?u(h,tp(g),2):h.C(2):h["return"](null);up(f,g,0,d,e);return h["return"](f)})}function up(a,b,c,d,e){for(var f=0;f<b.length;f++)if(f>=c){var g=b[f];d(a,g);var h=!0;"audio"==a.type&&0==Sb(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}
600
601
  function kp(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new lj;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function op(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
@@ -615,12 +616,12 @@ function Jp(a){var b,c,d,e,f,g,h;return I(function(k){if(1==k.g)return b=df(a.l,
615
616
  function Lp(a,b,c){var d,e,f,g,h;return I(function(k){if(1==k.g){d=Sf(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Mp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=ro(d,a.g.retryParameters,f,c,a.h.networkingEngine);Ze(a.m,g);return u(k,g.promise,2)}h=k.h;return k["return"](Mp(a,h,c))})}
616
617
  function Mp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,B,D,E,G,H,L,J,O,V,Z,W,ma,ya,Ua,Ra,Fa;return I(function(Va){switch(Va.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=zf(b,"Location").map(Ff).filter(Eb);0<f.length&&(g=Gb(e,f),e=a.l=g);h=zf(b,"BaseURL");k=h.map(Ff);l=Gb(e,k);m=0;h&&h.length&&(m=Hf(h[0],"availabilityTimeOffset",Of)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Hf(b,"minBufferTime",Jf)||0);a.G=Hf(b,"minimumUpdatePeriod",Jf,-1);r=Hf(b,"availabilityStartTime",If);v=Hf(b,
617
618
  "timeShiftBufferDepth",Jf);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Hf(b,"suggestedPresentationDelay",Jf));w=a.g.dash.ignoreMaxSegmentDuration;C=null;w||(C=Hf(b,"maxSegmentDuration",Jf));B=b.getAttribute("type")||"static";if(a.i)for(D=a.i.presentationTimeline,E=t(Object.values(a.B)),G=E.next();!G.done;G=E.next())H=G.value,H.Ab(D.jb());else L=a.g.defaultPresentationDelay||1.5*p,J=null!=x?x:L,D=new Q(r,J,a.g.dash.autoCorrectDrift);D.Hc("static"==B);(O=D.V())&&!isNaN(a.g.availabilityWindowOverride)&&
618
- (v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);D.we(v);V=b.getAttribute("profiles")||"";Z={zb:"static"!=B,presentationTimeline:D,sa:null,X:null,wa:null,L:null,bandwidth:0,Ze:!1,Tb:m,profiles:V.split(",")};W=Np(a,Z,l,b);ma=W.duration;ya=W.periods;"static"!=B&&W.Qe||D.Ya(ma||Infinity);a.A&&!a.D&&(Ua=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.D=a.h.isLowLatencyMode());a.D?D.pf(a.A):a.A&&Pa("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.");
619
- D.Yd(C||1);return u(Va,dp(a.j,ya,Z.zb),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);Va.C(3);break}a.i={presentationTimeline:D,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!D.xf()){Va.C(4);break}Ra=zf(b,"UTCTiming");return u(Va,Op(a,l,Ra),5);case 5:Fa=Va.h;if(!a.h)return Va["return"]();D.qf(Fa);case 4:D.Td();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Va)}})}
620
- function Np(a,b,c,d){var e=Hf(d,"mediaPresentationDuration",Jf),f=[],g=0;d=zf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Hf(k,"start",Jf,g),n=k.id,p=Hf(k,"duration",Jf),r=null;if(l){var v=Hf(l,"start",Jf);null!=v&&(r=v-m)}else null!=e&&(r=e-m);null==r&&(r=p);if(!(null!==a.v&&null!==n&&null!==m&&m<a.v)||a.J.includes(n)||h+1==d.length){null!==m&&(null===a.v||m>a.v)&&(a.v=m);g=Pp(a,b,c,{start:m,duration:r,node:k,cf:null==r||!l});f.push(g);b.sa.id&&r&&(a.M[b.sa.id]=r);if(null==r){g=
621
- null;break}g=m+r}}a.J=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Qe:!1}:{periods:f,duration:g,Qe:!0}}
622
- function Pp(a,b,c,d){b.sa=Qp(d.node,null,c);b.X=d;b.sa.Tb=b.Tb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=zf(d.node,"EventStream");c=b.presentationTimeline.jb();e=t(e);for(var f=e.next();!f.done;f=e.next())Rp(a,d.start,d.duration,f.value,c);c=zf(d.node,"AdaptationSet").map(function(m){return Sp(a,b,m)}).filter(Eb);if(b.zb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Ng);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
623
- }d=c.filter(function(m){return!m.Be});c=c.filter(function(m){return m.Be});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Be.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Nc:h.Nc},l=k.next())h.Nc=l.value,h.Nc.trickModeVideo=e.streams.find(function(m){return function(n){return xd(m.Nc.codecs)==xd(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Tp(d,"audio");g=a.g.disableVideo?[]:Tp(d,"video");f=a.g.disableText?
619
+ (v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);D.xe(v);V=b.getAttribute("profiles")||"";Z={tb:"static"!=B,presentationTimeline:D,sa:null,X:null,wa:null,L:null,bandwidth:0,$e:!1,Tb:m,profiles:V.split(",")};W=Np(a,Z,l,b);ma=W.duration;ya=W.periods;"static"!=B&&W.Re||D.Za(ma||Infinity);a.A&&!a.D&&(Ua=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.D=a.h.isLowLatencyMode());a.D?D.pf(a.A):a.A&&Pa("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.");
620
+ D.Zd(C||1);return u(Va,dp(a.j,ya,Z.tb),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);Va.C(3);break}a.i={presentationTimeline:D,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!D.xf()){Va.C(4);break}Ra=zf(b,"UTCTiming");return u(Va,Op(a,l,Ra),5);case 5:Fa=Va.h;if(!a.h)return Va["return"]();D.qf(Fa);case 4:D.Ud();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Va)}})}
621
+ function Np(a,b,c,d){var e=Hf(d,"mediaPresentationDuration",Jf),f=[],g=0;d=zf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Hf(k,"start",Jf,g),n=k.id,p=Hf(k,"duration",Jf),r=null;if(l){var v=Hf(l,"start",Jf);null!=v&&(r=v-m)}else null!=e&&(r=e-m);null==r&&(r=p);if(!(null!==a.v&&null!==n&&null!==m&&m<a.v)||a.J.includes(n)||h+1==d.length){null!==m&&(null===a.v||m>a.v)&&(a.v=m);g=Pp(a,b,c,{start:m,duration:r,node:k,Pd:null==r||!l});f.push(g);b.sa.id&&r&&(a.M[b.sa.id]=r);if(null==r){g=
622
+ null;break}g=m+r}}a.J=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Re:!1}:{periods:f,duration:g,Re:!0}}
623
+ function Pp(a,b,c,d){b.sa=Qp(d.node,null,c);b.X=d;b.sa.Tb=b.Tb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=zf(d.node,"EventStream");c=b.presentationTimeline.jb();e=t(e);for(var f=e.next();!f.done;f=e.next())Rp(a,d.start,d.duration,f.value,c);c=zf(d.node,"AdaptationSet").map(function(m){return Sp(a,b,m)}).filter(Eb);if(b.tb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Ng);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
624
+ }d=c.filter(function(m){return!m.Ce});c=c.filter(function(m){return m.Ce});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ce.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Nc:h.Nc},l=k.next())h.Nc=l.value,h.Nc.trickModeVideo=e.streams.find(function(m){return function(n){return xd(m.Nc.codecs)==xd(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Tp(d,"audio");g=a.g.disableVideo?[]:Tp(d,"video");f=a.g.disableText?
624
625
  []:Tp(d,Lb);c=a.g.disableThumbnails?[]:Tp(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ha(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ha(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ha(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ha(h.value.streams));return{id:b.sa.id,Qc:d,sd:e,textStreams:g,imageStreams:f}}
625
626
  function Tp(a,b){return a.filter(function(c){return c.contentType==b})}
626
627
  function Sp(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.wa=Qp(c,b.sa,null);var e=!1,f=zf(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Eb),h=void 0,k=b.wa.contentType==Lb;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
@@ -628,17 +629,17 @@ l}}var n;m=zf(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.do
628
629
  10)));m=zf(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(r=p.value,p=r.getAttribute("schemeIdUri"),r=r.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=r){r=r.split(";");for(var y=t(r),x=y.next();!x.done;x=y.next()){var w=x.value,C=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],C=w[1]||"und"):(x="CC"+p,2==r.length?p+=2:p++,C=w);v.set(x,Ob(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
629
630
  1,null!=r)for(r=t(r.split(";")),x=r.next();!x.done;x=r.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,w=x),v.set(y,Ob(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=r&&(g.push(r),"captions"==r&&(h="caption"));if(l)return null;l=zf(c,"ContentProtection");var B=bo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),D=Ob(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=zf(c,"Label"))&&l.length&&
630
631
  (l=l[0],l.textContent&&(E=l.textContent));l=zf(c,"Representation");c=l.map(function(G){if(G=Up(a,b,B,h,D,E,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.wa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.wa.contentType||"application"==b.wa.contentType)for(b.wa.contentType=Vp(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.wa.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
631
- m.value,p=t(B.drmInfos),r=p.next();!r.done;r=p.next())r=r.value,r.keyIds=r.keyIds&&m.keyIds?new Set([].concat(ha(r.keyIds),ha(m.keyIds))):r.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Eb);return{id:b.wa.id||"__fake__"+a.H++,contentType:b.wa.contentType,language:D,ni:e,streams:c,drmInfos:B.drmInfos,Be:f,Ng:k}}
632
- function Up(a,b,c,d,e,f,g,h,k,l){b.L=Qp(l,b.wa,null);a.A=Math.min(a.A,b.L.Tb);if(!Wp(b.L))return null;var m=b.X.start;b.bandwidth=Hf(l,"bandwidth",Mf)||0;var n=b.L.contentType,p=n==Lb||"application"==n;n="image"==n;try{var r=function(G,H,L){return Xp(a,G,H,L)};if(b.L.Fc)var v=Do(b,r);else if(b.L.vb)v=Jo(b,a.B);else if(b.L.Gc)v=Wo(b,r,a.B,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.L.Pa,x=b.X.duration||0;v={Vb:function(){return Promise.resolve(kj(m,x,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
632
+ m.value,p=t(B.drmInfos),r=p.next();!r.done;r=p.next())r=r.value,r.keyIds=r.keyIds&&m.keyIds?new Set([].concat(ha(r.keyIds),ha(m.keyIds))):r.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Eb);return{id:b.wa.id||"__fake__"+a.H++,contentType:b.wa.contentType,language:D,ni:e,streams:c,drmInfos:B.drmInfos,Ce:f,Ng:k}}
633
+ function Up(a,b,c,d,e,f,g,h,k,l){b.L=Qp(l,b.wa,null);a.A=Math.min(a.A,b.L.Tb);if(!Wp(b.L))return null;var m=b.X.start;b.bandwidth=Hf(l,"bandwidth",Mf)||0;var n=b.L.contentType,p=n==Lb||"application"==n;n="image"==n;try{var r=function(G,H,L){return Xp(a,G,H,L)};if(b.L.Fc)var v=Do(b,r);else if(b.L.xb)v=Jo(b,a.B);else if(b.L.Gc)v=Wo(b,r,a.B,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.L.Pa,x=b.X.duration||0;v={Vb:function(){return Promise.resolve(kj(m,x,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
633
634
  throw G;}r=zf(l,"ContentProtection");r=fo(r,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);r=new Set(r?[r]:[]);var w=!1;zf(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(w=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(n&&((l=zf(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
634
635
  (B=l.getAttribute("value")),!B))return null;var D;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(D="PQ");var E={id:a.H++,originalId:b.L.id,createSegmentIndex:function(){var G;return I(function(H){if(1==H.g){if(E.segmentIndex)return H.C(0);G=E;return u(H,v.Vb(),3)}G.segmentIndex=H.h;z(H)})},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,
635
- bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:r,language:e,label:f,type:b.wa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.L.$d,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:D,tilesLayout:B};return E}
636
+ bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:r,language:e,label:f,type:b.wa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.L.ae,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:D,tilesLayout:B};return E}
636
637
  function Ip(a){var b,c;I(function(d){switch(d.g){case 1:return b=0,A(d,2),u(d,Jp(a),4);case 4:b=d.h;ua(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();Kp(a,b);z(d)}})}function Kp(a,b){0>a.G||a.F.P(Math.max(3,a.G-b,bc(a.I)))}
637
- function Qp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,$d:null,audioSamplingRate:null,Tb:0};c=c||b.Pa;var d=zf(a,"BaseURL"),e=d.map(Ff),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Hf(a,"frameRate",Pf)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=zf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
638
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=zf(a,"AudioChannelConfiguration");m=Yp(m)||b.$d;p=Hf(a,"audioSamplingRate",Nf)||b.audioSamplingRate;f||(f=Vp(g,h));var r=yf(a,"SegmentBase"),v=yf(a,"SegmentTemplate"),y=r?Hf(r,"availabilityTimeOffset",Of)||0:0,x=v?Hf(v,"availabilityTimeOffset",Of)||0:0;d=d&&d.length?Hf(d[0],"availabilityTimeOffset",Of)||0:0;d=b.Tb+d+y+x;return{Pa:Gb(c,e),Fc:r||b.Fc,vb:yf(a,"SegmentList")||b.vb,Gc:v||b.Gc,width:Hf(a,"width",Nf)||b.width,height:Hf(a,
639
- "height",Nf)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),$d:m,audioSamplingRate:p,Tb:d}}
638
+ function Qp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ae:null,audioSamplingRate:null,Tb:0};c=c||b.Pa;var d=zf(a,"BaseURL"),e=d.map(Ff),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Hf(a,"frameRate",Pf)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=zf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
639
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=zf(a,"AudioChannelConfiguration");m=Yp(m)||b.ae;p=Hf(a,"audioSamplingRate",Nf)||b.audioSamplingRate;f||(f=Vp(g,h));var r=yf(a,"SegmentBase"),v=yf(a,"SegmentTemplate"),y=r?Hf(r,"availabilityTimeOffset",Of)||0:0,x=v?Hf(v,"availabilityTimeOffset",Of)||0:0;d=d&&d.length?Hf(d[0],"availabilityTimeOffset",Of)||0:0;d=b.Tb+d+y+x;return{Pa:Gb(c,e),Fc:r||b.Fc,xb:yf(a,"SegmentList")||b.xb,Gc:v||b.Gc,width:Hf(a,"width",Nf)||b.width,height:Hf(a,
640
+ "height",Nf)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),ae:m,audioSamplingRate:p,Tb:d}}
640
641
  function Yp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
641
- 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 Wp(a){var b=a.Fc?1:0;b+=a.vb?1:0;b+=a.Gc?1:0;if(0==b)return a.contentType==Lb||"application"==a.contentType?!0:!1;1!=b&&(a.Fc&&(a.vb=null),a.Gc=null);return!0}
642
+ 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 Wp(a){var b=a.Fc?1:0;b+=a.xb?1:0;b+=a.Gc?1:0;if(0==b)return a.contentType==Lb||"application"==a.contentType?!0:!1;1!=b&&(a.Fc&&(a.xb=null),a.Gc=null);return!0}
642
643
  function Zp(a,b,c,d){var e,f,g,h,k,l;return I(function(m){if(1==m.g)return e=Gb(b,[c]),f=df(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Ze(a.m,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=dd(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
643
644
  function Op(a,b,c){var d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.C(4);break}h=g.value;A(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.C(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.C(8);
644
645
  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":Pa("NTP UTCTiming scheme is not supported");break;default:Pa("Unrecognized scheme in UTCTiming element",k)}n.C(9);break;case 7:return u(n,Zp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,Zp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
@@ -650,15 +651,15 @@ function nq(a,b,c){b=dd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d
650
651
  var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=oq(a,m),pq.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"==U(m,"TYPE")?k.push(m):"MAP"==U(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Gb([d],[m.trim()])[0],h&&g.push(h),e.push(new cq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new cq("",g,k)));return new $p(c,b,f,e)}f.push(h);
651
652
  "EXT-X-STREAM-INF"==h.name&&(h.g.push(new dq("URI",k)),e=!0)}}return new $p(c,b,f)}function oq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new N(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new iq(f);var h;(h=kq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=kq(f,k);)d.push(new dq(h[1],h[2]||h[3])),jq(f)}return new aq(c,e,d,g)}
652
653
  var pq="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(" "),qq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function rq(){}function sq(a){try{var b=tq(a);return Se({uri:a,hf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Qe(c)}}function tq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=md(a):e=hd(a);return{data:e,contentType:c}}
653
- K("shaka.net.DataUriPlugin",rq);rq.parse=sq;af("data",sq);function uq(){var a=this;this.g=this.j=null;this.Ba=1;this.v=new Map;this.B=new Map;this.va=new Set;this.h=new Map;this.i=null;this.M="";this.ua=new mq;this.qa=0;this.D=new P(function(){vq(a)});this.m=wq;this.F=null;this.$=0;this.H=Infinity;this.Y=this.aa=0;this.G=new Ye;this.W=[];this.J=new Map;this.Ca=!1;this.A=new Map;this.R=null;this.Z=new Map;this.I=new Map;this.l=!1}q=uq.prototype;q.configure=function(a){this.g=a};
654
- q.start=function(a,b){var c=this,d,e;return I(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,xq(c,df([a],c.g.retryParameters),0),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,yq(c,d.data),3);e=c.qa;0<e&&c.D.P(e);return f["return"](c.F)})};q.stop=function(){this.D&&(this.D.stop(),this.D=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.g=this.j=null;this.va.clear();this.F=null;this.h.clear();this.B.clear();this.A.clear();this.v.clear();return Promise.all(a)};
654
+ K("shaka.net.DataUriPlugin",rq);rq.parse=sq;af("data",sq);function uq(){var a=this;this.g=this.j=null;this.Ba=1;this.v=new Map;this.B=new Map;this.va=new Set;this.h=new Map;this.i=null;this.M="";this.ua=new mq;this.ka=0;this.D=new P(function(){vq(a)});this.m=wq;this.F=null;this.$=0;this.H=Infinity;this.Y=this.aa=0;this.G=new Ye;this.W=[];this.J=new Map;this.Ca=!1;this.A=new Map;this.R=null;this.Z=new Map;this.I=new Map;this.l=!1}q=uq.prototype;q.configure=function(a){this.g=a};
655
+ q.start=function(a,b){var c=this,d,e;return I(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,xq(c,df([a],c.g.retryParameters),0),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,yq(c,d.data),3);e=c.ka;0<e&&c.D.P(e);return f["return"](c.F)})};q.stop=function(){this.D&&(this.D.stop(),this.D=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.g=this.j=null;this.va.clear();this.F=null;this.h.clear();this.B.clear();this.A.clear();this.v.clear();return Promise.all(a)};
655
656
  q.update=function(){var a=this,b,c,d;return I(function(e){if(1==e.g){if(a.m==wq)return e["return"]();b=[];a.R=null;c=Array.from(a.h.values());return c.length?u(e,zq(a,c[0]),2):e.C(2)}for(d=1;d<c.length;d++)b.push(zq(a,c[d]));return u(e,Promise.all(b),0)})};
656
- function zq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v;return I(function(y){if(1==y.g)return c=Aq,d=b.Cf,e=new ib(d),a.l&&b.Hf&&nb(e,new pb("_HLS_skip=YES")),u(y,xq(a,df([e.toString()],a.g.retryParameters),0),2);if(3!=y.g){f=y.h;g=nq(a.ua,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=eq(g.g,"EXT-X-DEFINE");k=Bq(a,h);l=b.stream;return u(y,Cq(a,b.rd,g,l.type,l.mimeType,b.Vd,k,b.Mf),3)}m=y.h;l.segmentIndex.Zb(m,a.i.jb());m.length&&(n=hq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.Vd.get(n),l.segmentIndex.Ab(p));
657
- r=m[m.length-1];if(v=gq(g.g,"EXT-X-ENDLIST"))Dq(a,c.Bf),a.i.Ya(r.endTime);z(y)})}q.onExpirationUpdated=function(){};
657
+ function zq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v;return I(function(y){if(1==y.g)return c=Aq,d=b.Cf,e=new ib(d),a.l&&b.Hf&&nb(e,new pb("_HLS_skip=YES")),u(y,xq(a,df([e.toString()],a.g.retryParameters),0),2);if(3!=y.g){f=y.h;g=nq(a.ua,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=eq(g.g,"EXT-X-DEFINE");k=Bq(a,h);l=b.stream;return u(y,Cq(a,b.rd,g,l.type,l.mimeType,b.Wd,k,b.Mf),3)}m=y.h;l.segmentIndex.Zb(m,a.i.jb());m.length&&(n=hq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.Wd.get(n),l.segmentIndex.Ab(p));
658
+ r=m[m.length-1];if(v=gq(g.g,"EXT-X-ENDLIST"))Dq(a,c.Bf),a.i.Za(r.endTime);z(y)})}q.onExpirationUpdated=function(){};
658
659
  function yq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,B,D,E,G,H,L,J,O,V,Z,W,ma,ya,Ua,Ra,Fa,Va,Qc,Dd;return I(function(kb){switch(kb.g){case 1:c=nq(a.ua,b,a.M);if(0!=c.type)throw new N(2,4,4022);d=eq(c.g,"EXT-X-DEFINE");Eq(a,d);e=eq(c.g,"EXT-X-MEDIA");f=eq(c.g,"EXT-X-STREAM-INF");g=eq(c.g,"EXT-X-IMAGE-STREAM-INF");Fq(a,f);h=eq(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=U(m,"DATA-ID"),p=U(m,"URI"),r=U(m,"LANGUAGE"),v=U(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
659
660
  Gb([a.M],[p])[0]),r&&y.set("language",r),v&&y.set("value",v),x=new M("sessiondata",y),a.j)a.j.onEvent(x);return u(kb,Gq(a,e),2);case 2:return Hq(a,e),u(kb,Iq(a,f),3);case 3:return w=kb.h,u(kb,Jq(a,e),4);case 4:return C=kb.h,u(kb,Kq(a,g),5);case 5:B=kb.h;if(!a.j)throw new N(2,7,7001);if(a.Ca&&0==w.length)throw new N(2,4,4034);E=D=Infinity;G=t(a.h.values());for(H=G.next();!H.done;H=G.next())L=H.value,D=Math.min(D,L.df),"text"!=L.stream.type&&(E=Math.min(E,L.Bg-L.df));a.m!=wq?(a.i=new Q(0,a.g.defaultPresentationDelay?
660
- a.g.defaultPresentationDelay:a.Y?a.Y:3*a.$),a.i.Hc(!1)):(a.i=new Q(null,0),a.i.Hc(!0));if(a.m!=wq)a.qa=a.H,J=Aq,a.m==J.He&&(O=a.i.md,isNaN(a.g.availabilityWindowOverride)||(O=a.g.availabilityWindowOverride),a.i.we(O));else for(a.i.Ya(E),a.i.offset(-D),V=t(a.h.values()),H=V.next();!H.done;H=V.next())Z=H.value,Z.stream.segmentIndex.offset(-D),Z.stream.segmentIndex.sb(0,E);a.W=[];W=[];ma=t(w);for(ya=ma.next();!ya.done;ya=ma.next())for(Ua=ya.value,Ra=t([Ua.video,Ua.audio]),Fa=Ra.next();!Fa.done;Fa=Ra.next())(Va=
661
- Fa.value)&&W.push(Va);return u(kb,Promise.all(W.map(function(Rc){return I(function(De){return u(De,Rc.createSegmentIndex(),0)})})),6);case 6:Qc=t(W);for(Fa=Qc.next();!Fa.done;Fa=Qc.next())Dd=Fa.value,a.W.push(Dd.segmentIndex.N);Lq(a);a.i.Td();a.F={presentationTimeline:a.i,variants:w,textStreams:C,imageStreams:B,offlineSessionIds:[],minBufferTime:0};a.j.makeTextStreamsForClosedCaptions(a.F);z(kb)}})}
661
+ a.g.defaultPresentationDelay:a.Y?a.Y:3*a.$),a.i.Hc(!1)):(a.i=new Q(null,0),a.i.Hc(!0));if(a.m!=wq)a.ka=a.H,J=Aq,a.m==J.Ie&&(O=a.i.md,isNaN(a.g.availabilityWindowOverride)||(O=a.g.availabilityWindowOverride),a.i.xe(O));else for(a.i.Za(E),a.i.offset(-D),V=t(a.h.values()),H=V.next();!H.done;H=V.next())Z=H.value,Z.stream.segmentIndex.offset(-D),Z.stream.segmentIndex.ub(0,E);a.W=[];W=[];ma=t(w);for(ya=ma.next();!ya.done;ya=ma.next())for(Ua=ya.value,Ra=t([Ua.video,Ua.audio]),Fa=Ra.next();!Fa.done;Fa=Ra.next())(Va=
662
+ Fa.value)&&W.push(Va);return u(kb,Promise.all(W.map(function(Rc){return I(function(De){return u(De,Rc.createSegmentIndex(),0)})})),6);case 6:Qc=t(W);for(Fa=Qc.next();!Fa.done;Fa=Qc.next())Dd=Fa.value,a.W.push(Dd.segmentIndex.N);Lq(a);a.i.Ud();a.F={presentationTimeline:a.i,variants:w,textStreams:C,imageStreams:B,offlineSessionIds:[],minBufferTime:0};a.j.makeTextStreamsForClosedCaptions(a.F);z(kb)}})}
662
663
  function Eq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=U(e,"NAME");e=U(e,"VALUE");d&&e&&(a.v.has(d)||a.v.set(d,e))}}function Bq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=U(f,"NAME");var g=U(f,"VALUE");f=U(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.v.get(f))&&c.set(f,e)}return c}
663
664
  function Fq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=U(e,"AUDIO");d=U(e,"VIDEO");var g=U(e,"SUBTITLES");e=Mq(a,e);if(g){var h=Jb(Lb,e);a.A.set(g,h);ec(e,h)}f&&(g=Ib("audio",e),a.A.set(f,g));d&&(f=Ib("video",e),a.A.set(d,f))}}
664
665
  function Jq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r;return I(function(v){if(1==v.g)return c=fq(b,"SUBTITLES"),d=c.map(function(y){var x,w,C;return I(function(B){if(1==B.g){if(x=a.g.disableText)return B["return"](null);A(B,2);return u(B,Nq(a,y),4)}if(2!=B.g)return w=B.h,B["return"](w.stream);C=F(B);if(a.g.hls.ignoreTextStreamFailures)return B["return"](null);throw C;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=bq(h,"GROUP-ID"),l=a.A.get(k))if(m=a.B.get(k))for(n=
@@ -668,7 +669,7 @@ function Gq(a,b){var c;return I(function(d){if(1==d.g)return b=b.filter(function
668
669
  function Iq(a,b){var c,d,e;return I(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,r,v;return I(function(y){if(1==y.g)return h=U(g,"FRAME-RATE"),k=Number(U(g,"AVERAGE-BANDWIDTH"))||Number(bq(g,"BANDWIDTH")),l=U(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,r=U(g,"VIDEO-RANGE"),u(y,Pq(a,g),2);if(v=y.h){for(var x=y["return"],w=v.audio,C=v.video,B=t(C),D=B.next();!D.done;D=B.next())if(D=D.value.stream)D.width=Number(n)||void 0,D.height=Number(p)||
669
670
  void 0,D.frameRate=Number(h)||void 0,D.hdr=r||void 0;B=a.g.disableAudio;if(!w.length||B)w=[null];B=a.g.disableVideo;if(!C.length||B)C=[null];B=[];w=t(w);for(D=w.next();!D.done;D=w.next()){D=D.value;for(var E=t(C),G=E.next();!G.done;G=E.next()){var H=G.value;G=D?D.stream:null;var L=H?H.stream:null,J=D?D.stream.drmInfos:null,O=H?H.stream.drmInfos:null;H=(H?H.rd:"")+" - "+(D?D.rd:"");G&&L&&J.length&&O.length&&!(0<Cg(J,O).length)||a.va.has(H)||(G={id:a.Ba++,language:G?G.language:"und",primary:!!G&&G.primary||
670
671
  !!L&&L.primary,audio:G,video:L,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},B.push(G),a.va.add(H))}}y=x.call(y,B)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Cb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
671
- function Pq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return I(function(x){if(1==x.g)return c=Mb,d=Mq(a,b),e=U(b,"AUDIO"),f=U(b,"VIDEO"),h=(g=e||f)&&a.B.has(g)?a.B.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=bq(b,"URI"),p=k.audio.find(function(w){return w&&w.rd==n}),r=Jb(c.bb,d),(v=Jb(c.xb,d))&&!r?l=c.xb:!h.length&&v&&r?(l=c.bb,d=[[r,v].join()]):k.audio.length&&p?(l=c.xb,m=!0):l=k.video.length&&!k.audio.length?c.xb:c.bb,m?x.C(2):u(x,Qq(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===
672
+ function Pq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return I(function(x){if(1==x.g)return c=Mb,d=Mq(a,b),e=U(b,"AUDIO"),f=U(b,"VIDEO"),h=(g=e||f)&&a.B.has(g)?a.B.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=bq(b,"URI"),p=k.audio.find(function(w){return w&&w.rd==n}),r=Jb(c.cb,d),(v=Jb(c.zb,d))&&!r?l=c.zb:!h.length&&v&&r?(l=c.cb,d=[[r,v].join()]):k.audio.length&&p?(l=c.zb,m=!0):l=k.video.length&&!k.audio.length?c.zb:c.cb,m?x.C(2):u(x,Qq(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===
672
673
  y)return x["return"](null);Rq(k);return x["return"](k)})}function Mq(a,b){var c=[];a.g.disableVideo||c.push("avc1.42E01E");a.g.disableAudio||c.push("mp4a.40.2");var d=U(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=yd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function Sq(a){a=U(a,"LANGUAGE")||"und";return Ob(a)}
673
674
  function Rq(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Hq(a,b){var c=fq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Sq(e);var f=bq(e,"GROUP-ID");e=bq(e,"INSTREAM-ID");a.J.get(f)||a.J.set(f,new Map);a.J.get(f).set(e,d)}}
674
675
  function Nq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return I(function(x){if(1==x.g){c=bq(b,"GROUP-ID");d="";var w=bq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Lb);e=w;e!=Lb&&c&&a.A.has(c)&&(d=a.A.get(c));f=Tq(bq(b,"URI"),a.v);if(a.h.has(f))return x["return"](a.h.get(f));g=Sq(b);h=U(b,"NAME");k=U(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=U(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=U(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=U(b,"CHARACTERISTICS");r=U(b,"FORCED");
@@ -679,7 +680,7 @@ function Qq(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g){e=Tq(bq(b,"URI"
679
680
  function Uq(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,v,y,x,w,C,B,D,E,G,H,L,J,O,V,Z,W,ma,ya,Ua,Ra,Fa,Va,Qc,Dd,kb,Rc,De,No,Oo,Po,Qo,Di,Ei,cg,Ro,So,To,Uo;return I(function(lb){switch(lb.g){case 1:return p=Gb([a.M],[b])[0],u(lb,xq(a,df([p],a.g.retryParameters),0),2);case 2:r=lb.h;p=r.uri;v=nq(a.ua,r.data,p);if(1!=v.type)throw new N(2,4,4017);y=[];if(v.segments)for(x=t(v.segments),w=x.next();!w.done;w=x.next())C=w.value,B=eq(C.g,"EXT-X-KEY"),y.push.apply(y,ha(B));D=!1;E=[];G=new Set;H=t(y);for(L=H.next();!L.done;L=
680
681
  H.next())if(J=L.value,O=bq(J,"METHOD"),"NONE"!=O){D=!0;if("AES-128"==O)return a.Ca=!0,lb["return"](null);V=bq(J,"KEYFORMAT");if(W=(Z=Vq[V])?Z(J):null){if(W.keyIds)for(ma=t(W.keyIds),ya=ma.next();!ya.done;ya=ma.next())Ua=ya.value,G.add(Ua);E.push(W)}}if(D&&!E.length)throw new N(2,4,4026);Ra=eq(v.g,"EXT-X-DEFINE");Fa=Bq(a,Ra);Wq(a,v);return u(lb,Xq(a,d,c,v,Fa),3);case 3:return Va=lb.h,Yq.includes(Va)&&(c=""),Qc=new Map,Dd=new Map,kb=a.l,A(lb,4),u(lb,Cq(a,b,v,d,Va,Qc,Fa,Dd),6);case 6:Rc=lb.h;ua(lb,5);
681
682
  break;case 4:De=F(lb);if(4035==De.code)return Pa("Skipping unsupported HLS stream",Va,b),lb["return"](null);throw De;case 5:kb!=a.l&&Wq(a,v);No=Rc[0].startTime;Oo=Rc[Rc.length-1].endTime;Po=new ij(Rc);Qo=d==Lb?"subtitle":void 0;Di=[];if(l)for(Ei=t(l.split(",")),cg=Ei.next();!cg.done;cg=Ei.next())Ro=cg.value,Di.push(Ro);To=(So=gq(v.g,"EXT-X-SERVER-CONTROL"))?null!=So.getAttribute("CAN-SKIP-UNTIL"):!1;Uo={id:a.Ba++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Po,
682
- mimeType:Va,codecs:c,kind:Qo,encrypted:D,drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Di,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return lb["return"]({stream:Uo,rd:b,Cf:p,df:No,Bg:Oo,Vd:Qc,Mf:Dd,Hf:To})}})}
683
+ mimeType:Va,codecs:c,kind:Qo,encrypted:D,drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Di,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return lb["return"]({stream:Uo,rd:b,Cf:p,df:No,Bg:Oo,Wd:Qc,Mf:Dd,Hf:To})}})}
683
684
  function Wq(a,b){var c=gq(b.g,"EXT-X-PLAYLIST-TYPE"),d=gq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Dq(a,wq);else{c?Dq(a,Zq):Dq(a,$q);d=gq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=gq(b.g,"EXT-X-PART-INF");a.l&&c?(a.aa=Number(bq(c,"PART-TARGET")),a.H=Math.min(a.aa,a.H),c=gq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(bq(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.$=Math.max(d,a.$)}}
684
685
  function ar(a,b,c,d){c=gq(c,"EXT-X-MAP");if(!c)return null;var e=bq(c,"URI");d=Tq(Gb([b],[e])[0],d);b=[d,U(c,"BYTERANGE","")].join("-");a.Z.has(b)||(c=br(d,c),a.Z.set(b,c));return a.Z.get(b)}function br(a,b){var c=0,d=null,e=U(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Ki(function(){return[a]},c,d)}
685
686
  function cr(a,b,c,d,e,f,g,h,k){var l=d.g,m=Tq(d.h,g),n=gq(l,"EXTINF"),p=g=0,r=null;if(!n){if(0==d.i.length)throw new N(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},x=0;x<d.i.length;y={Bd:y.Bd},x++){var w=d.i[x],C=0==x?c:v[v.length-1],B=0==x?e:C.endTime,D=Number(U(w,"DURATION"))||a.aa;if(D){D=B+D;var E=0,G=null;"EXT-X-PRELOAD-HINT"==w.name?E=(C=U(w,"BYTERANGE-START"))?Number(C):0:(E=U(w,"BYTERANGE"),C=t(dr(C,E)),E=C.next().value,G=C.next().value);if(w=U(w,"URI"))y.Bd=Gb([h],
@@ -690,38 +691,38 @@ p))for(C=h;C.has(w+1)&&C.get(w+1)<r;)w++;B=a.I.get(w)||0;D=[];E=0;case 5:if(!(E<
690
691
  E++;W.C(5);break;case 7:return W["return"](D)}})}function fr(a,b,c,d,e,f,g,h,k,l){var m,n;return I(function(p){if(1==p.g)return m=0,a.I.has(b)?(m=a.I.get(b),p.C(2)):u(p,er(a,c,d,e,f,!0,g,h,l),3);2!=p.g&&(n=p.h,m=k-n,a.I.set(b,m));return p["return"](m)})}
691
692
  function gr(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:c=kf;d=wj(b.Ea(),b.za,b.ra,a.g.retryParameters);if(a.g.hls.useFullSegmentsForStartTime)return k["return"](xq(a,d,c));e=wj(b.Ea(),b.za,b.za+2048-1,a.g.retryParameters);A(k,2);return u(k,xq(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=F(k);if(7001==g.code)throw g;Pa("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.",
692
693
  e.uris[0]);return u(k,xq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
693
- function er(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,v,y,x;return I(function(w){switch(w.g){case 1:l=cr(a,c,null,g,0,0,h,"",k);if(a.F&&!f&&(m=a.h.get(b),n=m.Vd.get(e),void 0!=n))return w["return"](n);d=d.toLowerCase();if(Yq.includes(d))throw Pa("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Pa("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.C(2);break}p=[gr(a,l)];c&&p.push(gr(a,c));return u(w,Promise.all(p),
694
+ function er(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,v,y,x;return I(function(w){switch(w.g){case 1:l=cr(a,c,null,g,0,0,h,"",k);if(a.F&&!f&&(m=a.h.get(b),n=m.Wd.get(e),void 0!=n))return w["return"](n);d=d.toLowerCase();if(Yq.includes(d))throw Pa("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Pa("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.C(2);break}p=[gr(a,l)];c&&p.push(gr(a,c));return u(w,Promise.all(p),
694
695
  3);case 3:return r=w.h,v=r[0],y=r[1]||r[0],w["return"](hr(b,v.uri,v.data,y.data));case 2:if("video/mp2t"!=d){w.C(4);break}return u(w,gr(a,l),5);case 5:return x=w.h,w["return"](ir(b,x.uri,x.data));case 4:throw new N(2,4,4030,b);}})}
695
696
  function hr(a,b,c,d){var e=0;(new Ng).box("moov",Rg).box("trak",Rg).box("mdia",Rg).T("mdhd",function(h){e=di(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new N(2,4,4030,a,b);var f=0,g=!1;(new Ng).box("moof",Rg).box("traf",Rg).T("tfdt",function(h){f=ci(h.reader,h.version).Md/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
696
697
  function ir(a,b,c){function d(){f.seek(g+188);h=f.ha();71!=h&&(f.seek(g+192),h=f.ha());71!=h&&(f.seek(g+204),h=f.ha());71!=h&&e();f.lf(1)}function e(){throw new N(2,4,4030,a,b);}var f=new Kg(c,0),g=0,h=0;for(c=Math.min(f.S.byteLength-188,940);;){g=f.ea();h=f.ha();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.cc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.ha()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.ha(),f.skip(k)),1!=f.O()>>8)d();else{f.skip(3);c=f.ha()>>6;0!=c&&1!=c||e();0==f.ha()&&e();c=f.ha();k=
697
698
  f.cc();var l=f.cc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Tq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
698
- function Xq(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y,x;return I(function(w){if(1==w.g){f=Mb;g=kf;h=Math.trunc((d.segments.length-1)/2);k=Tq(d.segments[h].h,e);l=new ib(k);m=l.Na.split(".").pop();n=jr[b];if(p=n[m])return w["return"](p);if(b==f.ka)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.pc&&(!c||"jpeg"==c))return w["return"]("image/jpeg");r=df([k],a.g.retryParameters);r.method="HEAD";return u(w,xq(a,r,g),2)}v=w.h;y=v.headers["content-type"];return y?
699
- w["return"](y.split(";")[0]):(x=n.mp4,w["return"](x))})}function vq(a){var b,c;I(function(d){if(1==d.g){if(!a.j)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.qa,a.D.P(b),ua(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.D.P(.1);z(d)})}function Dq(a,b){a.m=b;a.i&&a.i.Hc(a.m==wq);a.m!=wq||a.D.stop()}function xq(a,b,c){if(!a.G)throw new N(2,7,7001);b=a.j.networkingEngine.request(c,b);Ze(a.G,b);return b.promise}K("shaka.hls.HlsParser",uq);
699
+ function Xq(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y,x;return I(function(w){if(1==w.g){f=Mb;g=kf;h=Math.trunc((d.segments.length-1)/2);k=Tq(d.segments[h].h,e);l=new ib(k);m=l.Na.split(".").pop();n=jr[b];if(p=n[m])return w["return"](p);if(b==f.ma)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.pc&&(!c||"jpeg"==c))return w["return"]("image/jpeg");r=df([k],a.g.retryParameters);r.method="HEAD";return u(w,xq(a,r,g),2)}v=w.h;y=v.headers["content-type"];return y?
700
+ w["return"](y.split(";")[0]):(x=n.mp4,w["return"](x))})}function vq(a){var b,c;I(function(d){if(1==d.g){if(!a.j)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ka,a.D.P(b),ua(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.D.P(.1);z(d)})}function Dq(a,b){a.m=b;a.i&&a.i.Hc(a.m==wq);a.m!=wq||a.D.stop()}function xq(a,b,c){if(!a.G)throw new N(2,7,7001);b=a.j.networkingEngine.request(c,b);Ze(a.G,b);return b.promise}K("shaka.hls.HlsParser",uq);
700
701
  var Yq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],jr={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",
701
- 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"}},Vq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=bq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=bq(a,"URI");b=tq(b);b=Ec(b.data);b=Hb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=U(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
702
- bq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=bq(a,"URI");a=tq(a);a=Ec(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=$n(a,b);return Hb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},wq="VOD",$q="EVENT",Zq="LIVE",Aq={Bf:wq,oh:$q,He:Zq};Ig.m3u8=function(){return new uq};Gg["application/x-mpegurl"]=function(){return new uq};Gg["application/vnd.apple.mpegurl"]=function(){return new uq};function kr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,hf:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=gd(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function lr(){}function mr(a,b,c,d){var e=new nr;vf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new or,g={Ke:!1,wf:!1};a=pr(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Pe(a,function(){g.Ke=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new P(function(){g.wf=!0;f.abort()});h.P(b/1E3);a["finally"](function(){h.stop()})}return a}
702
+ vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Vq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=bq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=bq(a,"URI");b=tq(b);b=Ec(b.data);b=Hb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=U(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
703
+ bq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=bq(a,"URI");a=tq(a);a=Ec(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=$n(a,b);return Hb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},wq="VOD",$q="EVENT",Zq="LIVE",Aq={Bf:wq,oh:$q,Ie:Zq};Ig.m3u8=function(){return new uq};Gg["application/x-mpegurl"]=function(){return new uq};Gg["application/vnd.apple.mpegurl"]=function(){return new uq};function kr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,hf:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=gd(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function lr(){}function mr(a,b,c,d){var e=new nr;vf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new or,g={Le:!1,wf:!1};a=pr(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Pe(a,function(){g.Le=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new P(function(){g.wf=!0;f.abort()});h.P(b/1E3);a["finally"](function(){h.stop()})}return a}
703
704
  function pr(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,y,x,w,C,B;return I(function(D){switch(D.g){case 1:return g=qr,h=rr,n=m=0,p=Date.now(),A(D,2),u(D,g(a,c),4);case 4:return k=D.h,r=k.clone().body.getReader(),y=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,x=function(E){function G(){var H,L;return I(function(J){switch(J.g){case 1:return A(J,2),u(J,r.read(),4);case 4:H=J.h;ua(J,3);break;case 2:return F(J),J["return"]();case 3:if(H.done){J.C(5);break}m+=H.value.byteLength;if(!f){J.C(5);break}return u(J,
704
- f(H.value),5);case 5:L=Date.now();if(100<L-p||H.done)e(L-p,m-n,y-m),n=m,p=L;H.done?E.close():(E.enqueue(H.value),G());z(J)}})}G()},new h({start:x}),u(D,k.arrayBuffer(),5);case 5:l=D.h;ua(D,3);break;case 2:w=F(D);if(d.Ke)throw new N(1,1,7001,a,b);if(d.wf)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,w,b);case 3:return C={},B=k.headers,B.forEach(function(E,G){C[G.trim()]=E}),D["return"](kr(C,l,k.status,a,k.url,b))}})}
705
+ f(H.value),5);case 5:L=Date.now();if(100<L-p||H.done)e(L-p,m-n,y-m),n=m,p=L;H.done?E.close():(E.enqueue(H.value),G());z(J)}})}G()},new h({start:x}),u(D,k.arrayBuffer(),5);case 5:l=D.h;ua(D,3);break;case 2:w=F(D);if(d.Le)throw new N(1,1,7001,a,b);if(d.wf)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,w,b);case 3:return C={},B=k.headers,B.forEach(function(E,G){C[G.trim()]=E}),D["return"](kr(C,l,k.status,a,k.url,b))}})}
705
706
  function sr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}K("shaka.net.HttpFetchPlugin",lr);lr.isSupported=sr;lr.parse=mr;var qr=window.fetch,or=window.AbortController,rr=window.ReadableStream,nr=window.Headers;sr()&&(af("http",mr,2,!0),af("https",mr,2,!0));function tr(){}
706
707
  function ur(a,b,c,d){var e=new vr,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new N(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),r={};p=t(p);for(var v=p.next();!v.done;v=p.next())v=v.value.split(": "),r[v[0].toLowerCase()]=v.slice(1).join(": ");try{var y=kr(r,n.response,n.status,a,n.responseURL,
707
708
  c);k(y)}catch(x){l(x)}};e.onerror=function(n){l(new N(1,1,1002,a,n,c))};e.ontimeout=function(){l(new N(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new Pe(h,function(){e.abort();return Promise.resolve()})}K("shaka.net.HttpXHRPlugin",tr);tr.parse=ur;var vr=window.XMLHttpRequest;
708
709
  af("http",ur,1,!0);af("https",ur,1,!0);function wr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function xr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}wr.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 yr(a){var b=this;this.v=a;this.h=new Map;this.i=new lf(function(){return zr(b)["catch"](function(){})});this.j=[];this.m=function(){};this.l=function(){};this.g=new wr}yr.prototype.destroy=function(){return this.i.destroy()};function Ar(a,b,c){a.m=b;a.l=c}function zr(a){var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
709
710
  function Br(a,b,c,d,e,f){mf(a.i);var g=xr(a.g,d);d=(a.h.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return I(function(v){if(1==v.g)return u(v,Cr(a,c),2);h=v.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=Ec(h),l=new Zn(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(g,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v["return"](f(h))})});a.h.set(b,d);return d}
710
711
  function Dr(a,b,c){mf(a.i);var d=(a.h.get(b)||Promise.resolve()).then(function(){return I(function(e){return u(e,c(),0)})});a.h.set(b,d)}function Er(a){return I(function(b){return 1==b.g?u(b,Promise.all(a.h.values()),2):b["return"](a.g.h)})}function Cr(a,b){var c,d,e,f;return I(function(g){if(1==g.g)return c=kf,d=a.v.request(c,b),e=function(){return d.abort()},a.j.push(e),u(g,d.promise,2);f=g.h;ec(a.j,e);return g["return"](f.data)})};function Fr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Lc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Fr.prototype.abort=function(){var a=this;return I(function(b){if(1==b.g){try{a.i.abort()}catch(c){}A(b,2);return u(b,a.g,4)}if(2!=b.g)return ua(b,0);F(b);z(b)})};
711
- function Gr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return I(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}Fr.prototype.store=function(){return this.h};Fr.prototype.promise=function(){return this.g};function Hr(a){this.h=a;this.g=[]}Hr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Ir(a,b){return Jr(a,b,"readwrite")}function Jr(a,b,c){c=a.h.transaction([b],c);var d=new Fr(c,b);a.g.push(d);d.promise().then(function(){ec(a.g,d)},function(){ec(a.g,d)});return d};function Kr(a,b,c){this.g=new Hr(a);this.i=b;this.h=c}q=Kr.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Lr(this.i)};q.removeSegments=function(a,b){return Mr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,Nr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Ne(e)}))})};q.addManifests=function(){return Lr(this.h)};
712
+ function Gr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return I(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}Fr.prototype.store=function(){return this.h};Fr.prototype.promise=function(){return this.g};function Hr(a){this.h=a;this.g=[]}Hr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Ir(a,b){return Jr(a,b,"readwrite")}function Jr(a,b,c){c=a.h.transaction([b],c);var d=new Fr(c,b);a.g.push(d);d.promise().then(function(){ec(a.g,d)},function(){ec(a.g,d)});return d};function Kr(a,b,c){this.g=new Hr(a);this.i=b;this.h=c}q=Kr.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Lr(this.i)};q.removeSegments=function(a,b){return Mr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,Nr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Oe(e)}))})};q.addManifests=function(){return Lr(this.h)};
712
713
  q.updateManifestExpiration=function(a,b){var c=Ir(this.g,this.h),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return Mr(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,Nr(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.sc(e)})))})};
713
- q.getAllManifests=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=Jr(a.g,a.h,"readonly"),c=new Map,u(d,Gr(b,function(e,f){var g;return I(function(h){if(1==h.g)return u(h,a.sc(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};q.Ne=function(a){return a};q.sc=function(a){return Promise.resolve(a)};function Lr(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}
714
+ q.getAllManifests=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=Jr(a.g,a.h,"readonly"),c=new Map,u(d,Gr(b,function(e,f){var g;return I(function(h){if(1==h.g)return u(h,a.sc(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};q.Oe=function(a){return a};q.sc=function(a){return Promise.resolve(a)};function Lr(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}
714
715
  q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){if(1==m.g){d=Ir(c.g,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Mc:g.Mc},k=h.next())l=k.value,g.Mc=e.add(l),g.Mc.onsuccess=function(n){return function(){f.push(n.Mc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
715
716
  function Mr(a,b,c,d){a=Ir(a.g,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Lc:e.Lc},f=c.next())e.Lc=f.value,b["delete"](e.Lc).onsuccess=function(g){return function(){return d(g.Lc)}}(e);return a.promise()}
716
717
  function Nr(a,b,c){var d,e,f,g,h,k,l;return I(function(m){if(1==m.g){d=Jr(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={mc:h.mc,ic:h.ic},l=k.next())h.ic=l.value,h.mc=e.get(h.ic),h.mc.onsuccess=function(n){return function(){void 0==n.mc.result&&g.push(n.ic);f[n.ic]=n.mc.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function Or(a){this.g=new Hr(a)}Or.prototype.destroy=function(){return this.g.destroy()};Or.prototype.getAll=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=Jr(a.g,"session-ids","readonly"),c=[],u(d,Gr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};Or.prototype.add=function(a){var b=Ir(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
717
718
  Or.prototype.remove=function(a){var b=this,c;return I(function(d){return 1==d.g?(c=Ir(b.g,"session-ids"),u(d,Gr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Pr(){this.g=new Map}Pr.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Pr.prototype.init=function(){var a=this;Qr.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
718
- function Rr(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Xa:d,Da:f},Da:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function Sr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Xa:d,Da:f},e)})})}
719
+ function Rr(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ya:d,Da:f},Da:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function Sr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ya:d,Da:f},e)})})}
719
720
  function Tr(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function Ur(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Vr(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
720
721
  function Wr(a){var b,c,d;return I(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Qr,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.C(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Xr(a,b){Qr.set(a,b)}K("shaka.offline.StorageMuxer",Pr);Pr.unregister=function(a){Qr["delete"](a)};Pr.register=Xr;Pr.prototype.destroy=Pr.prototype.destroy;var Qr=new Map;function Yr(){Kr.apply(this,arguments)}pa(Yr,Kr);Yr.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return I(function(g){d=Ir(c.g,c.h);e=d.store();f=new Lc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
721
722
  Yr.prototype.sc=function(a){var b,c,d,e,f,g;return I(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=Zr(a.periods[c],e),b.push(f);return u(h,mp(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})})};
722
723
  function Zr(a,b){$r(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return as(e,a.startTime,b)})}
723
724
  function as(a,b,c){var d=a.initSegmentUri?bs(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=bs(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
724
- 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}}Yr.prototype.Ne=function(a){return{data:a.data}};function bs(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new N(2,9,9004,"Could not parse uri "+a);}
725
+ 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}}Yr.prototype.Oe=function(a){return{data:a.data}};function bs(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new N(2,9,9004,"Could not parse uri "+a);}
725
726
  function $r(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
726
727
  f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function cs(){Kr.apply(this,arguments)}pa(cs,Kr);
727
728
  cs.prototype.sc=function(a){var b,c,d,e,f,g;return I(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(ds(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,mp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
@@ -733,39 +734,39 @@ new cs(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contain
733
734
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.C(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.C(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.C(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.C(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.C(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
734
735
  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};
735
736
  q.erase=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.C(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.C(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.C(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.C(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,gs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
736
- function gs(){var a=new Lc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}Xr("idb",function(){return Xc()||Tc()||!window.indexedDB?null:new fs});function hs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}hs.prototype.Xa=function(){return this.i};hs.prototype.Da=function(){return this.h};hs.prototype.key=function(){return this.l};hs.prototype.toString=function(){return this.j};
737
+ function gs(){var a=new Lc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}Xr("idb",function(){return Xc()||Tc()||!window.indexedDB?null:new fs});function hs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}hs.prototype.Ya=function(){return this.i};hs.prototype.Da=function(){return this.h};hs.prototype.key=function(){return this.l};hs.prototype.toString=function(){return this.j};
737
738
  function is(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 hs(b,c,d,Number(a[4])):null};function js(a,b){this.h=a;this.g=b}
738
- function ks(a,b){var c=new Q(null,0);c.Ya(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=ls(a,d,e,c);e=b.streams.filter(function(l){return l.type==Lb}).map(function(l){return ms(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ms(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
739
+ function ks(a,b){var c=new Q(null,0);c.Za(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=ls(a,d,e,c);e=b.streams.filter(function(l){return l.type==Lb}).map(function(l){return ms(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ms(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
739
740
  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}}
740
741
  function ls(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=b.next())for(e=
741
742
  e.value,g=ms(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=ms(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
742
743
  function ms(a,b,c){var d=b.segments.map(function(e){return ns(a,e)});c.$b(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ij(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,
743
744
  roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function ns(a,b){var c=new hs("segment",a.h,a.g,b.dataKey);return new Mi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?os(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
744
745
  function os(a,b){var c=new hs("segment",a.h,a.g,b);return new Ki(function(){return[c.toString()]},0,null)};function ps(){this.g=null}q=ps.prototype;q.configure=function(){};
745
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:d=is(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new Pr;ta(m);return u(m,e.init(),4);case 4:return u(m,Tr(e,d.Xa(),d.Da()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new js(d.Xa(),d.Da()),l=ks(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return va(m),u(m,e.destroy(),7);case 7:wa(m,0)}})};q.stop=function(){return Promise.resolve()};
746
- q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:return d=c.g,e=new Pr,A(m,2,3),u(m,e.init(),5);case 5:return u(m,Tr(e,d.Xa(),d.Da()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.C(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return va(m),u(m,e.destroy(),10);case 10:wa(m,0);break;case 2:F(m),m.C(3)}})};
746
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:d=is(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new Pr;ta(m);return u(m,e.init(),4);case 4:return u(m,Tr(e,d.Ya(),d.Da()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new js(d.Ya(),d.Da()),l=ks(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return va(m),u(m,e.destroy(),7);case 7:wa(m,0)}})};q.stop=function(){return Promise.resolve()};
747
+ q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:return d=c.g,e=new Pr,A(m,2,3),u(m,e.init(),5);case 5:return u(m,Tr(e,d.Ya(),d.Da()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.C(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return va(m),u(m,e.destroy(),10);case 10:wa(m,0);break;case 2:F(m),m.C(3)}})};
747
748
  Gg["application/x-offline-manifest"]=function(){return new ps};function qs(){}function rs(a){var b=is(a);b&&"manifest"==b.g?(a={uri:a,hf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Se(a)):a=b&&"segment"==b.g?ss(b.key(),b):Qe(new N(2,1,9004,a));return a}
748
- function ss(a,b){var c=new Pr;return Se(void 0).ma(function(){return c.init()}).ma(function(){return Tr(c,b.Xa(),b.Da())}).ma(function(d){return d.getSegments([b.key()])}).ma(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}K("shaka.offline.OfflineScheme",qs);qs.plugin=rs;af("offline",rs);function ts(a,b,c){var d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,us(y.info,p)){y.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.C(4);break}g=f.value;h=vs(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.C(2);break;case 4:return l["return"](d)}})}
749
+ function ss(a,b){var c=new Pr;return Se(void 0).na(function(){return c.init()}).na(function(){return Tr(c,b.Ya(),b.Da())}).na(function(d){return d.getSegments([b.key()])}).na(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}K("shaka.offline.OfflineScheme",qs);qs.plugin=rs;af("offline",rs);function ts(a,b,c){var d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,us(y.info,p)){y.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.C(4);break}g=f.value;h=vs(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.C(2);break;case 4:return l["return"](d)}})}
749
750
  function vs(a,b,c){var d,e;return I(function(f){switch(f.g){case 1:return d=new Tf({Kb:b,onError:function(){},jd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(f,2),d.configure(a),u(f,ag(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ua(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return A(f,6),u(f,kg(d),8);case 8:ua(f,7);break;case 6:return F(f),u(f,d.destroy(),
750
751
  9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return I(function(h){if(1==h.g)return A(h,2),u(h,lg(d,g),4);if(2!=h.g)return e.push(g),ua(h,0);F(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
751
- function us(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fc(a.audioCapabilities,b.audioCapabilities,c)&&fc(a.videoCapabilities,b.videoCapabilities,c)};function ws(a,b,c){var d=b.presentationTimeline.getDuration();b=xs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function ys(a,b){var c=ks(new js(a.Xa(),a.Da()),b),d=b.appMetadata||{};c=xs(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
752
+ function us(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fc(a.audioCapabilities,b.audioCapabilities,c)&&fc(a.videoCapabilities,b.videoCapabilities,c)};function ws(a,b,c){var d=b.presentationTimeline.getDuration();b=xs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function ys(a,b){var c=ks(new js(a.Ya(),a.Da()),b),d=b.appMetadata||{};c=xs(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
752
753
  function xs(a){var b=[],c=re(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(ie(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(je(c.value));return b};function zs(){this.g={}}function As(a,b,c){c=c.endTime-c.startTime;return Bs(a,b)*c}function Bs(a,b){var c=a.g[b];null==c&&(c=0);return c};function Cs(a){var b=this;if(a&&a.constructor!=S)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.vc()):(this.h=Bk(),this.g=new $e);this.j=[];this.i=[];this.l=[];var c=!a;this.m=new lf(function(){var d,e,f,g,h;return I(function(k){switch(k.g){case 1:return u(k,Promise.all(b.l.map(function(l){return zr(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.C(4);break}return u(k,b.g.destroy(),
753
754
  4);case 4:b.h=null,b.g=null,z(k)}})})}function Ds(){if(Oc())a:{var a=t(Qr.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=Cs.prototype;q.destroy=function(){return this.m.destroy()};
754
755
  q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=yk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(yb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return Dk(this.h,a)};q.getConfiguration=function(){var a=Bk();Dk(a,this.h,Bk());return a};q.vc=function(){return this.g};
755
756
  q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new yr(this.g);this.l.push(f);b=Es(this,a,b||{},function(){var h;return I(function(k){if(1==k.g)return u(k,Fg(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Fb(h))})},e,f);var g=new Pe(b,function(){return zr(f)});g["finally"](function(){ec(d.l,f)});g.then=function(h){yb("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.");
756
757
  return g.promise.then(h)};return Fs(this,g)};q.mg=function(){yb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
757
758
  function Es(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,y,x;return I(function(w){switch(w.g){case 1:return Gs(),h=g=null,k=new Pr,m=l=null,A(w,2,3),u(w,d(),5);case 5:return g=w.h,u(w,Hs(a,b,g,e),6);case 6:n=w.h;Is(a);p=!n.presentationTimeline.V()&&!n.presentationTimeline.Hb();if(!p)throw new N(2,9,9005,b);return u(w,Js(a,n,function(C){m=m||C},e),7);case 7:h=w.h;Is(a);if(m)throw m;return u(w,Ks(n,e),8);case 8:return u(w,k.init(),9);case 9:return Is(a),u(w,Rr(k),10);case 10:return l=w.h,Is(a),u(w,Ls(a,l.Da,
758
- h,n,b,c,e,f),11);case 11:r=w.h;Is(a);if(m)throw m;return u(w,l.Da.addManifests([r]),12);case 12:return v=w.h,Is(a),y=new hs("manifest",l.path.Xa,l.path.Da,v[0]),w["return"](ys(y,r));case 3:return va(w),a.j=[],u(w,k.destroy(),13);case 13:if(!g){w.C(14);break}return u(w,g.stop(),14);case 14:if(!h){w.C(16);break}return u(w,h.destroy(),16);case 16:wa(w,0);break;case 2:x=F(w);if(!l){w.C(18);break}return u(w,l.Da.removeSegments(a.j,function(){}),18);case 18:throw m||x;}})}
759
+ h,n,b,c,e,f),11);case 11:r=w.h;Is(a);if(m)throw m;return u(w,l.Da.addManifests([r]),12);case 12:return v=w.h,Is(a),y=new hs("manifest",l.path.Ya,l.path.Da,v[0]),w["return"](ys(y,r));case 3:return va(w),a.j=[],u(w,k.destroy(),13);case 13:if(!g){w.C(14);break}return u(w,g.stop(),14);case 14:if(!h){w.C(16);break}return u(w,h.destroy(),16);case 16:wa(w,0);break;case 2:x=F(w);if(!l){w.C(18);break}return u(w,l.Da.removeSegments(a.j,function(){}),18);case 18:throw m||x;}})}
759
760
  function Ks(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,B,D,E,G,H,L,J,O,V,Z,W,ma;return I(function(ya){switch(ya.g){case 1:return c={width:Infinity,height:Infinity},Wd(a,b.restrictions,c),u(ya,Zd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Kd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(ie(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,
760
761
  d.push(je(r));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(ke(x));return u(ya,b.offline.trackSelectionCallback(d),3);case 3:w=ya.h;C=a.presentationTimeline.getDuration();B=0;D=t(w);for(E=D.next();!E.done;E=D.next())G=E.value,H=G.bandwidth*C/8,B+=H;A(ya,4);return u(ya,b.offline.downloadSizeCallback(B),6);case 6:L=ya.h;if(!L)throw new N(2,9,9014);ua(ya,5);break;case 4:J=F(ya);if(J instanceof N)throw J;throw new N(2,9,9015);case 5:O=new Set;V=new Set;Z=new Set;W=t(w);for(E=
761
762
  W.next();!E.done;E=W.next())ma=E.value,"variant"==ma.type&&O.add(ma.id),"text"==ma.type&&V.add(ma.id),"image"==ma.type&&Z.add(ma.id);a.variants=a.variants.filter(function(Ua){return O.has(Ua.id)});a.textStreams=a.textStreams.filter(function(Ua){return V.has(Ua.id)});a.imageStreams=a.imageStreams.filter(function(Ua){return Z.has(Ua.id)});Ms(a);z(ya)}})}
762
763
  function Ls(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,v,y,x,w,C,B;return I(function(D){switch(D.g){case 1:return k=ws(e,d,f),l=g.offline.progressCallback,m=function(E,G){k.size=G;l(k,E)},n=function(E,G){v&&g.offline.usePersistentLicense&&y==G&&jg(c,"cenc",E)},Ar(h,m,n),p=d.variants.some(function(E){var G=E.audio&&E.audio.encrypted;return E.video&&E.video.encrypted||G}),r=d.variants.some(function(E){return(E.video?E.video.drmInfos:[]).concat(E.audio?E.audio.drmInfos:[]).some(function(G){return G.initData&&
763
764
  G.initData.length})}),v=p&&!r,y=null,v&&(x=c.g,y=Ns.get(x.keySystem)),ta(D),C=w=Os(a,h,b,c,d,e,f,g),u(D,Er(h),4);case 4:C.size=D.h;w.expiration=c.uc();B=pg(c);w.sessionIds=g.offline.usePersistentLicense?B:[];if(p&&g.offline.usePersistentLicense&&!B.length)throw new N(2,9,9007);return D["return"](w);case 2:return va(D),u(D,h.destroy(),5);case 5:wa(D,0)}})}q.remove=function(a){return Ps(this,Qs(this,a))};
764
- function Qs(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:Gs();c=is(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new Pr;ta(k);return u(k,e.init(),4);case 4:return u(k,Tr(e,d.Xa(),d.Da()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([Rs(a,h,e),Ss(f,d,h)]),2);case 2:return va(k),u(k,e.destroy(),8);case 8:wa(k,0)}})}
765
+ function Qs(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:Gs();c=is(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new Pr;ta(k);return u(k,e.init(),4);case 4:return u(k,Tr(e,d.Ya(),d.Da()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([Rs(a,h,e),Ss(f,d,h)]),2);case 2:return va(k),u(k,e.destroy(),8);case 8:wa(k,0)}})}
765
766
  function Ts(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:vd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:vd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Rs(a,b,c){return I(function(d){return u(d,Us(a.g,a.h.drm,c,b),0)})}
766
767
  function Ss(a,b,c){function d(){}var e=Vs(c);ys(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Mg=function(){return Ps(this,Ws(this))};
767
768
  function Ws(a){var b,c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return Gs(),b=a.g,c=a.h.drm,d=new Pr,e=!1,ta(n),u(n,d.init(),4);case 4:f=[],Ur(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.C(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,ts(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.C(5);break;case 2:return va(n),u(n,d.destroy(),11);case 11:wa(n,3);break;case 3:return n["return"](!e)}})}
768
- q.list=function(){return Ps(this,Xs())};function Xs(){var a,b,c;return I(function(d){switch(d.g){case 1:return Gs(),a=[],b=new Pr,ta(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Sr(b,function(e,f){c=c.then(function(){var g;return I(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=ys(new hs("manifest",e.Xa,e.Da,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return va(d),u(d,b.destroy(),6);case 6:wa(d,3);break;case 3:return d["return"](a)}})}
769
+ q.list=function(){return Ps(this,Xs())};function Xs(){var a,b,c;return I(function(d){switch(d.g){case 1:return Gs(),a=[],b=new Pr,ta(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Sr(b,function(e,f){c=c.then(function(){var g;return I(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=ys(new hs("manifest",e.Ya,e.Da,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return va(d),u(d,b.destroy(),6);case 6:wa(d,3);break;case 3:return d["return"](a)}})}
769
770
  function Hs(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),Is(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Is(a),k=Ys(h),u(l,Promise.all(db(k,
770
771
  function(m){return m.createSegmentIndex()})),3);Is(a);if(e)throw e;return l["return"](h)})}function Js(a,b,c,d){var e;return I(function(f){switch(f.g){case 1:return e=new Tf({Kb:a.g,onError:c,jd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,Yf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,kg(e),3);case 3:return u(f,ig(e),4);case 4:return f["return"](e)}})}
771
772
  function Os(a,b,c,d,e,f,g,h){for(var k=new zs,l=t(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,r=m.video;p&&!r&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&r&&(n.g[r.id]=r.bandwidth||m.bandwidth);if(p&&r){var v=p.bandwidth||393216,y=r.bandwidth||m.bandwidth-v;0>=y&&(y=m.bandwidth);n.g[p.id]=v;n.g[r.id]=y}}l=t(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;l=t(e.imageStreams);for(n=l.next();!n.done;n=l.next())n=n.value,k.g[n.id]=n.bandwidth||2048;n=new Map;
@@ -785,7 +786,7 @@ var Ns=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("
785
786
  Dm.offline=Ds;function ct(){}function dt(){for(var a=t(et),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Gf()}catch(c){Pa("Error installing polyfill!",c)}}}function ft(a,b){for(var c={priority:b||0,Gf:a},d=0;d<et.length;d++)if(et[d].priority<c.priority){et.splice(d,0,c);return}et.push(c)}K("shaka.polyfill",ct);ct.register=ft;ct.installAll=dt;var et=[];function gt(){}function ht(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())it(b.value)}function it(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}ct.Aria=gt;gt.install=ht;ft(ht);function jt(){}function kt(){lt()}ct.EncryptionScheme=jt;jt.install=kt;ft(kt,-2);function mt(){}
786
787
  function nt(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
787
788
  Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",ot);document.addEventListener("webkitfullscreenerror",ot);document.addEventListener("mozfullscreenchange",ot);document.addEventListener("mozfullscreenerror",ot);document.addEventListener("MSFullscreenChange",ot);document.addEventListener("MSFullscreenError",ot)}}
788
- function ot(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}ct.Fullscreen=mt;mt.install=nt;ft(nt);function pt(){}function qt(){}ct.MathRound=pt;pt.install=qt;ft(qt);function rt(){}function st(){if(Xc()||Yc()||Zc()||Uc("PlayStation 5")||Wc()||Vc()||Uc("PC=EOS")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),tt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=ut}
789
+ function ot(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}ct.Fullscreen=mt;mt.install=nt;ft(nt);function pt(){}function qt(){}ct.MathRound=pt;pt.install=qt;ft(qt);function rt(){}function st(){if(Xc()||Yc()||Zc()||Uc("PlayStation 5")||Wc()||Vc()||Uc("PC=EOS")||Uc("Hisense")||Uc("VIDAA")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),tt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=ut}
789
790
  function ut(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w;return I(function(C){switch(C.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return C["return"](b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Oc())return C["return"](b);if(c){if(Xc()){if(!window.cast)throw new N(2,8,8E3);if(cast.__platform__&&cast.__platform__.canDisplayType){var B=c.contentType;c.width&&c.height&&(B+="; width="+c.width+"; height="+c.height);c.framerate&&(B+="; framerate="+
790
791
  c.framerate);"pq"===c.transferFunction&&(B+="; eotf=smpte2084");B=cast.__platform__.canDisplayType(B)}else B=MediaSource.isTypeSupported(c.contentType)}else B=MediaSource.isTypeSupported(c.contentType);e=B;if(!e)return C["return"](b)}if(d&&(f=d.contentType,g=MediaSource.isTypeSupported(f),!g))return C["return"](b)}else if("file"==a.type){if(c&&(h=c.contentType,k=Pc(h),!k)||d&&(l=d.contentType,m=Pc(l),!m))return C["return"](b)}else return C["return"](b);if(!a.keySystemConfiguration)return b.supported=
791
792
  !0,C["return"](Promise.resolve(b));n=a.keySystemConfiguration;p=[];r=[];n.audio&&(v={robustness:n.audio.robustness||"",contentType:a.audio.contentType},p.push(v));n.video&&(y={robustness:n.video.robustness||"",contentType:a.video.contentType},r.push(y));x={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes};p.length&&(x.audioCapabilities=p);r.length&&(x.videoCapabilities=r);A(C,3);return u(C,navigator.requestMediaKeySystemAccess(n.keySystem,
@@ -857,20 +858,23 @@ end:"end"},gv={left:"line-left",center:"center",right:"line-right"},Uu=["http://
857
858
  vv.prototype.parseInit=vv.prototype.parseInit;Cd['application/mp4; codecs="stpp"']=function(){return new vv};Cd['application/mp4; codecs="stpp.ttml"']=function(){return new vv};Cd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new vv};Cd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new vv};function wv(){}wv.prototype.parseInit=function(){};
858
859
  wv.prototype.parseMedia=function(a,b){var c=dd(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new N(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=xv(new iq(e[1]));if(null==c)throw new N(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
859
860
  [];e=t(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new iq(g);var h=new jc;lq(g);jq(g);for(var k=lq(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))?
860
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");jq(g);k=lq(g)}f.push(h)}e=new Map;yv(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new hc(0,0,"");for(var n=!1,p=0;p<k.length;p++){var r=
861
- /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(r){var v=r[2].trim().replace(";","");switch(r[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=rc;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
862
- !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 iq(h[0]);m=xv(k);r=kq(k,/[ \t]+--\x3e[ \t]+/g);n=xv(k);if(null==m||null==r||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
863
- ""):h=new hc(m,n,"");zv(p,h,e);jq(k);for(m=lq(k);m;)Av(h,m,f),jq(k),m=lq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function yv(a){for(var b=t(Object.entries(wc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new hc(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(xc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new hc(0,0,""),e.backgroundColor=d,a.set(c,e)}
864
- function zv(a,b,c){0===c.size&&yv(c);a=Bv(a);var d=Qf("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=t(d);for(d=a.next();!d.done;d=a.next())Cv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
865
- function Bv(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 Dv(a,b){return a&&0<a.length?a:b}
866
- function Cv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=Dv(h.backgroundColor,e.backgroundColor),e.color=Dv(h.color,e.color),e.fontFamily=Dv(h.fontFamily,e.fontFamily),e.fontSize=Dv(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=
867
- "italic";break;case "u":e.textDecoration.push("underline")}}if(Gf(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())Cv(a.value,e,c,d)}
868
- function Av(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=lc:a.textAlign=tc[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"==
861
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");jq(g);k=lq(g)}f.push(h)}e=new Map;yv(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]){l=[];k=-1;for(m=1;m<h.length;m++)h[m].includes("::cue")&&(l.push([]),k=l.length-1),-1!=k&&(l[k].push(h[m]),h[m].includes("}")&&(k=-1));l=t(l);for(k=l.next();!k.done;k=l.next()){var n=k.value;k="global";(m=n[0].match(/\((.*)\)/))&&
862
+ (k=m.pop());m=n.slice(1,-1);n[0].includes("}")&&(n=/\{(.*?)\}/.exec(n[0]))&&(m=n[1].split(";"));(n=e.get(k))||(n=new hc(0,0,""));for(var p=!1,r=0;r<m.length;r++){var v=/^\s*([^:]+):\s*(.*)/.exec(m[r]);if(v){var y=v[2].trim().replace(";","");switch(v[1].trim()){case "background-color":case "background":p=!0;n.backgroundColor=y;break;case "color":p=!0;n.color=y;break;case "font-family":p=!0;n.fontFamily=y;break;case "font-size":p=!0;n.fontSize=y;break;case "font-weight":if(700<=parseInt(y,10)||"bold"==
863
+ y)p=!0,n.fontWeight=700;break;case "font-style":switch(y){case "normal":p=!0;n.fontStyle=rc;break;case "italic":p=!0;n.fontStyle="italic";break;case "oblique":p=!0,n.fontStyle="oblique"}break;case "opacity":p=!0;n.opacity=parseFloat(y);break;case "text-shadow":p=!0;n.textShadow=y;break;case "white-space":p=!0,n.wrapLine="noWrap"!=y}}}p&&e.set(k,n)}}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0]||"REGION"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));
864
+ k=new iq(h[0]);m=xv(k);r=kq(k,/[ \t]+--\x3e[ \t]+/g);n=xv(k);if(null==m||null==r||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=zv(h.slice(1).join("\n").trim());e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=""):h=new hc(m,n,"");Av(p,h,e);jq(k);for(m=lq(k);m;)Bv(h,m,f),jq(k),m=lq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};
865
+ function yv(a){for(var b=t(Object.entries(wc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new hc(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(xc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new hc(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
866
+ function Av(a,b,c){0===c.size&&yv(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",
867
+ h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=
868
+ Qf("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=a;return}a=t(e);for(e=a.next();!e.done;e=a.next())Cv(e.value,b,d,c);b.nestedCues=d}else b.payload=a}function Dv(a,b){return a&&0<a.length?a:b}
869
+ function Cv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=Dv(h.backgroundColor,e.backgroundColor),e.color=Dv(h.color,e.color),e.fontFamily=Dv(h.fontFamily,e.fontFamily),e.fontSize=Dv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=
870
+ h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline")}}if(Gf(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())Cv(a.value,e,c,d)}
871
+ function Bv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=lc:a.textAlign=tc[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"==
869
872
  b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Ev(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=vc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=nc,a.line=Number(c[1]),c[2]&&(a.lineAlign=vc[c[2].toUpperCase()])}function Ev(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
870
- function xv(a){a=kq(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)}K("shaka.text.VttTextParser",wv);wv.prototype.parseMedia=wv.prototype.parseMedia;wv.prototype.parseInit=wv.prototype.parseInit;Cd["text/vtt"]=function(){return new wv};Cd['text/vtt; codecs="vtt"']=function(){return new wv};Cd['text/vtt; codecs="wvtt"']=function(){return new wv};function Fv(){this.g=null}Fv.prototype.parseInit=function(a){var b=this,c=!1;(new Ng).box("moov",Rg).box("trak",Rg).box("mdia",Rg).T("mdhd",function(d){d=di(d.reader,d.version);b.g=d.timescale}).box("minf",Rg).box("stbl",Rg).T("stsd",Tg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
871
- Fv.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Ng).box("moof",Rg).box("traf",Rg).T("tfdt",function(D){g=!0;c=ci(D.reader,D.version).Md}).T("tfhd",function(D){l=bi(D.reader,D.flags).Pe}).T("trun",function(D){h=!0;d=ei(D.reader,D.version,D.flags).mf}).box("mdat",Ug(function(D){k=!0;e=D})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new Kg(e,0),p=t(d),r=p.next();!r.done;r=p.next()){r=r.value;var v=r.ke||l,y=r.od?
872
- c+r.od:m;m=y+(v||0);var x=0;do{var w=n.O();x+=w;var C=n.O(),B=null;"vttc"==Vg(C)?8<w&&(B=n.ub(w-8)):n.skip(w-8);v&&B&&(w=Gv(B,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(r.sampleSize&&x<r.sampleSize)}return f.filter(Eb)};function Gv(a,b,c){var d,e,f;(new Ng).box("payl",Ug(function(g){d=dd(g)})).box("iden",Ug(function(g){e=dd(g)})).box("sttg",Ug(function(g){f=dd(g)})).parse(a);return d?Hv(d,e,f,b,c):null}
873
- function Hv(a,b,c,d,e){d=new hc(d,e,"");zv(a,d,new Map);b&&(d.id=b);if(c)for(a=new iq(c),b=lq(a);b;)Av(d,b,[]),jq(a),b=lq(a);return d}K("shaka.text.Mp4VttParser",Fv);Fv.prototype.parseMedia=Fv.prototype.parseMedia;Fv.prototype.parseInit=Fv.prototype.parseInit;Cd['application/mp4; codecs="wvtt"']=function(){return new Fv};function Iv(){}Iv.prototype.parseInit=function(){};Iv.prototype.parseMedia=function(a){var b=dd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new iq(c[0]),e=Jv(d),f=kq(d,/,/g);d=Jv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new hc(e,d,c.slice(1).join("\n").trim()))}return a};
873
+ function xv(a){a=kq(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)}function zv(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}K("shaka.text.VttTextParser",wv);
874
+ wv.prototype.parseMedia=wv.prototype.parseMedia;wv.prototype.parseInit=wv.prototype.parseInit;Cd["text/vtt"]=function(){return new wv};Cd['text/vtt; codecs="vtt"']=function(){return new wv};Cd['text/vtt; codecs="wvtt"']=function(){return new wv};function Fv(){this.g=null}Fv.prototype.parseInit=function(a){var b=this,c=!1;(new Ng).box("moov",Rg).box("trak",Rg).box("mdia",Rg).T("mdhd",function(d){d=di(d.reader,d.version);b.g=d.timescale}).box("minf",Rg).box("stbl",Rg).T("stsd",Tg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
875
+ Fv.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Ng).box("moof",Rg).box("traf",Rg).T("tfdt",function(D){g=!0;c=ci(D.reader,D.version).Md}).T("tfhd",function(D){l=bi(D.reader,D.flags).Qe}).T("trun",function(D){h=!0;d=ei(D.reader,D.version,D.flags).mf}).box("mdat",Ug(function(D){k=!0;e=D})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new Kg(e,0),p=t(d),r=p.next();!r.done;r=p.next()){r=r.value;var v=r.le||l,y=r.od?
876
+ c+r.od:m;m=y+(v||0);var x=0;do{var w=n.O();x+=w;var C=n.O(),B=null;"vttc"==Vg(C)?8<w&&(B=n.wb(w-8)):n.skip(w-8);v&&B&&(w=Gv(B,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(r.sampleSize&&x<r.sampleSize)}return f.filter(Eb)};function Gv(a,b,c){var d,e,f;(new Ng).box("payl",Ug(function(g){d=dd(g)})).box("iden",Ug(function(g){e=dd(g)})).box("sttg",Ug(function(g){f=dd(g)})).parse(a);return d?Hv(d,e,f,b,c):null}
877
+ function Hv(a,b,c,d,e){d=new hc(d,e,"");Av(a,d,new Map);b&&(d.id=b);if(c)for(a=new iq(c),b=lq(a);b;)Bv(d,b,[]),jq(a),b=lq(a);return d}K("shaka.text.Mp4VttParser",Fv);Fv.prototype.parseMedia=Fv.prototype.parseMedia;Fv.prototype.parseInit=Fv.prototype.parseInit;Cd['application/mp4; codecs="wvtt"']=function(){return new Fv};function Iv(){}Iv.prototype.parseInit=function(){};Iv.prototype.parseMedia=function(a){var b=dd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new iq(c[0]),e=Jv(d),f=kq(d,/,/g);d=Jv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new hc(e,d,c.slice(1).join("\n").trim()))}return a};
874
878
  function Jv(a){a=kq(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)}K("shaka.text.SbvTextParser",Iv);Iv.prototype.parseMedia=Iv.prototype.parseMedia;Iv.prototype.parseInit=Iv.prototype.parseInit;Cd["text/x-subviewer"]=function(){return new Iv};function Kv(){this.g=new wv}Kv.prototype.parseInit=function(){};Kv.prototype.parseMedia=function(a,b){var c=dd(a);c=Lv(c);c=Ec(hd(c));return this.g.parseMedia(c,b)};function Lv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}K("shaka.text.SrtTextParser",Kv);Kv.srt2webvtt=Lv;Kv.prototype.parseMedia=Kv.prototype.parseMedia;
875
879
  Kv.prototype.parseInit=Kv.prototype.parseInit;Cd["text/srt"]=function(){return new Kv};function Mv(){}Mv.prototype.parseInit=function(){};
876
880
  Mv.prototype.parseMedia=function(a){var b="",c="";a=dd(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Nv.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Ov.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Pv);else if("Style"==e){e=f.split(Pv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
@@ -944,7 +948,7 @@ sw:{s:"Kiswahili",u:"Swahili"},"sw-KE":{s:"Kiswahili",u:"Swahili (Kenya)"},ta:{s
944
948
  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",
945
949
  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",
946
950
  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"}},kw=t(Object.keys(jw)),lw=kw.next();!lw.done;lw=
947
- kw.next()){var mw=lw.value;jw[mw.toLowerCase()]=jw[mw]};function nw(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new nf;this.localization=this.controls.Ca;this.player=this.controls.Wb();this.video=this.controls.tb();this.adManager=this.player.Wc();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})}
951
+ kw.next()){var mw=lw.value;jw[mw.toLowerCase()]=jw[mw]};function nw(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new nf;this.localization=this.controls.Ca;this.player=this.controls.Wb();this.video=this.controls.vb();this.adManager=this.player.Wc();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})}
948
952
  nw.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};K("shaka.ui.Element",nw);nw.prototype.release=nw.prototype.release;function ow(a){return pw(a,"shaka-back-to-overflow-button")}function pw(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function qw(a){a&&(a=pw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function rw(){var a=R("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
949
953
  function sw(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 tw(a,b){nw.call(this,a,b);var c=this;this.i=R("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=R("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new P(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=sw(e-d,!1)+" / "+sw(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=
950
954
  ""))});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.Aa();c.g.ia(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Aa(),this.g.ia(.5))}pa(tw,nw);tw.prototype.release=function(){this.g.stop();this.g=null;nw.prototype.release.call(this)};K("shaka.ui.AdCounter",tw);function uw(a,b){nw.call(this,a,b);var c=this;this.g=R("div");this.g.classList.add("shaka-ad-position");X(this.g,!1);this.parent.appendChild(this.g);this.h=R("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&vw(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&vw(c)});this.eventManager.o(this.adManager,"ad-started",function(){vw(c)});this.eventManager.o(this.adManager,
@@ -955,22 +959,22 @@ this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown"
955
959
  q.setValue=function(a){this.g||(this.bar.value=a)};function Bw(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}K("shaka.ui.RangeElement",Aw);Aw.prototype.setValue=Aw.prototype.setValue;Aw.prototype.getValue=Aw.prototype.getValue;Aw.prototype.changeTo=Aw.prototype.changeTo;Aw.prototype.onChangeEnd=Aw.prototype.onChangeEnd;Aw.prototype.onChange=Aw.prototype.onChange;
956
960
  Aw.prototype.onChangeStart=Aw.prototype.onChangeStart;Aw.prototype.setRange=Aw.prototype.setRange;function Cw(a,b){Aw.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=R("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.j;this.h=new P(function(){c.video.currentTime=c.getValue()});this.v=new P(function(){Dw(c)});this.A=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Ew(c)});this.eventManager.o(this.localization,
957
961
  "locale-changed",function(){return Ew(c)});this.eventManager.o(this.adManager,"ad-started",function(){X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Fw(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Gw(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Gw(c)});this.setValue(this.video.currentTime);this.update();Ew(this);this.ad&&X(this.container,!1)}pa(Cw,Aw);q=Cw.prototype;
958
- q.release=function(){this.h&&(this.h.stop(),this.h=null,this.v.stop(),this.v=null);Aw.prototype.release.call(this)};q.onChangeStart=function(){this.A=!this.video.paused;this.controls.ve(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.P(.125))};q.onChangeEnd=function(){this.h.Aa();this.controls.ve(!1);this.A&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
962
+ q.release=function(){this.h&&(this.h.stop(),this.h=null,this.v.stop(),this.v=null);Aw.prototype.release.call(this)};q.onChangeStart=function(){this.A=!this.video.paused;this.controls.we(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.P(.125))};q.onChangeEnd=function(){this.h.Aa();this.controls.we(!1);this.A&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
959
963
  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.Ka(),g=f.end-f.start;this.setRange(f.start,f.end);Fw(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?
960
964
  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)};
961
965
  function Dw(a){if(a.i.length){for(var b=a.player.Ka(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=t(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=t(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 "+
962
966
  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 Gw(a){Dw(a);var b=a.player.Ka();b=b.end-b.start;a.player.V()&&5<b&&a.v.ia(1)}function Fw(a){var b=a.player.Ka();b=b.end-b.start;return a.player.V()&&5>b?!1:null==a.ad}function Ew(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}K("shaka.ui.SeekBar",Cw);function Hw(){}Hw.prototype.create=function(a,b){return new Cw(a,b)};
963
- Cw.Factory=Hw;function Y(a,b,c,d){cb.call(this);var e=this;this.R=!0;this.j=d;this.A=new un(c,a,this.j.castReceiverAppId);this.eb=!0;this.v=this.A.tb();this.B=c;this.D=this.A.Wb();this.va=a;this.i=b;this.cb=this.D.Wc();this.l=this.m=null;this.Y=!1;this.F=[];this.yb=[];this.ab=!1;this.Z=new P(function(){e.i.style.cursor="none";e.ab=!1;Iw(e)});this.aa=new P(function(){e.g.removeAttribute("shown");e.G.P(2)});this.G=new P(function(){for(var f=t(e.F),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.Oa=new P(function(){e.Ib()&&
964
- Jw(e)});this.H=null;this.M=[];this.Ca=Kw();this.h=new nf;this.configure(this.j);Lw(this);this.qa=new Set;Mw(this);this.Oa.ia(.125);this.h.o(this.Ca,"locale-changed",function(f){e.cb.setLocale(f.locales[0])})}pa(Y,cb);q=Y.prototype;
967
+ Cw.Factory=Hw;function Y(a,b,c,d){cb.call(this);var e=this;this.R=!0;this.j=d;this.A=new un(c,a,this.j.castReceiverAppId);this.eb=!0;this.v=this.A.vb();this.B=c;this.D=this.A.Wb();this.va=a;this.i=b;this.Va=this.D.Wc();this.l=this.m=null;this.Y=!1;this.F=[];this.sb=[];this.bb=!1;this.Z=new P(function(){e.i.style.cursor="none";e.bb=!1;Iw(e)});this.aa=new P(function(){e.g.removeAttribute("shown");e.G.P(2)});this.G=new P(function(){for(var f=t(e.F),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.Oa=new P(function(){e.Ib()&&
968
+ Jw(e)});this.H=null;this.M=[];this.Ca=Kw();this.h=new nf;this.configure(this.j);Lw(this);this.ka=new Set;Mw(this);this.Oa.ia(.125);this.h.o(this.Ca,"locale-changed",function(f){e.Va.setLocale(f.locales[0])})}pa(Y,cb);q=Y.prototype;
965
969
  q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.C(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.Z&&(a.Z.stop(),a.Z=null);a.aa&&(a.aa.stop(),a.aa=null);a.G&&(a.G.stop(),a.G=null);a.Oa&&(a.Oa.stop(),a.Oa=null);Nw(a);a.g&&(a.i.removeChild(a.g),a.g=null);if(!a.A){b.C(4);break}return u(b,a.A.destroy(),5);case 5:a.A=null;case 4:if(!a.va){b.C(6);break}return u(b,a.va.destroy(),7);case 7:a.va=
966
- null;case 6:a.D=null,a.B=null,a.v=null,a.Ca=null,a.qa.clear(),cb.prototype.release.call(a),z(b)}})};function Nw(a){for(var b=t(a.M),c=b.next();!c.done;c=b.next())c.value.release();a.M=[]}function Ow(a,b){Pw.set(a,b)}q.Ff=function(a){this.eb=a;Mw(this)};q.zg=function(){Iw(this)};
967
- q.configure=function(a){this.j=a;this.A.Me(a.castReceiverAppId);this.l&&(this.l=null);this.gb&&(this.gb=null);this.g?(mk(this.g),Nw(this)):(Qw(this),this.W=R("div"),this.W.classList.add("shaka-client-side-ad-container"),X(this.W,!1),this.i.appendChild(this.W));this.i.classList.add("shaka-video-container");this.B.classList.add("shaka-video");Rw(this);this.j.addBigPlayButton&&Sw(this);this.$||Tw(this);this.fb=R("div");this.fb.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.fb);
968
- Uw(this);this.F=Array.from(this.i.getElementsByClassName("shaka-settings-menu"));this.F.push.apply(this.F,ha(Array.from(this.i.getElementsByClassName("shaka-overflow-menu"))));Vw(this);this.yb=Array.from(this.i.getElementsByClassName("shaka-show-controls-on-mouse-over"));Iw(this);a=t(this.i.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)}};
969
- q.qe=function(a){(this.R=a)?(this.i.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.i.removeAttribute("shaka-controls");Iw(this)};q.rf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.qe(!1)};q.getAd=function(){return this.m};q.Rf=function(){return this.A};q.dg=function(){return this.Ca};q.sg=function(){return this.i};q.tb=function(){return this.v};q.cg=function(){return this.B};q.Wb=function(){return this.D};q.ag=function(){return this.va};q.Wf=function(){return this.g};
970
- q.lg=function(){return this.fb};q.Tf=function(){return this.W};q.Uf=function(){return this.j};q.yg=function(){return this.Y};q.ve=function(a){this.Y=a};q.wg=function(){return this.eb};q.Ue=function(){return this.l?this.l.getValue():this.v.currentTime};q.sf=function(a){this.H=a};q.Pc=function(){return this.F.some(function(a){return!a.classList.contains("shaka-hidden")})};q.Ac=function(){this.G.Aa()};
971
- q.Ae=function(){var a=this,b;return I(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),u(c,document.exitFullscreen(),0);A(c,4);if(!document.pictureInPictureElement){c.C(6);break}return u(c,document.exitPictureInPicture(),6);case 6:return u(c,a.i.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.j.forceLandscapeOnFullscreen||!screen.orientation){c.C(9);break}A(c,10);return u(c,screen.orientation.lock("landscape"),12);case 12:ua(c,
972
- 9,4);break;case 10:F(c,4);case 9:ua(c,0);break;case 4:b=F(c),a.dispatchEvent(new M("error",(new Map).set("detail",b))),c.C(0)}})};q.uf=function(){X(this.I,!0);X(this.W,!0);this.g.setAttribute("ad-active","true")};q.Xe=function(){X(this.I,!1);X(this.W,!1);this.g.removeAttribute("ad-active")};function yw(a){a.R&&a.v.duration&&(a.D.Je(),a.v.paused&&!a.Y?a.v.play():a.v.pause())}function xw(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
973
- function Qw(a){a.g=R("div");a.g.classList.add("shaka-controls-container");a.i.appendChild(a.g);a.i.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.v.duration&&(a.Ib()?a.H=Date.now():(Ww(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){a.R&&(a.Pc()?a.G.Aa():a.m?xw(a):yw(a))});a.h.o(a.g,"dblclick",function(){a.j.doubleClickForFullscreen&&document.fullscreenEnabled&&a.Ae()})}
970
+ null;case 6:a.D=null,a.B=null,a.v=null,a.Ca=null,a.ka.clear(),cb.prototype.release.call(a),z(b)}})};function Nw(a){for(var b=t(a.M),c=b.next();!c.done;c=b.next())c.value.release();a.M=[]}function Ow(a,b){Pw.set(a,b)}q.Ff=function(a){this.eb=a;Mw(this)};q.zg=function(){Iw(this)};
971
+ q.configure=function(a){this.j=a;this.A.Ne(a.castReceiverAppId);this.l&&(this.l=null);this.gb&&(this.gb=null);this.g?(mk(this.g),Nw(this)):(Qw(this),this.W=R("div"),this.W.classList.add("shaka-client-side-ad-container"),X(this.W,!1),this.i.appendChild(this.W));this.i.classList.add("shaka-video-container");this.B.classList.add("shaka-video");Rw(this);this.j.addBigPlayButton&&Sw(this);this.$||Tw(this);this.fb=R("div");this.fb.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.fb);
972
+ Uw(this);this.F=Array.from(this.i.getElementsByClassName("shaka-settings-menu"));this.F.push.apply(this.F,ha(Array.from(this.i.getElementsByClassName("shaka-overflow-menu"))));Vw(this);this.sb=Array.from(this.i.getElementsByClassName("shaka-show-controls-on-mouse-over"));Iw(this);a=t(this.i.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)}};
973
+ q.re=function(a){(this.R=a)?(this.i.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.i.removeAttribute("shaka-controls");Iw(this)};q.rf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.re(!1)};q.getAd=function(){return this.m};q.Rf=function(){return this.A};q.dg=function(){return this.Ca};q.sg=function(){return this.i};q.vb=function(){return this.v};q.cg=function(){return this.B};q.Wb=function(){return this.D};q.ag=function(){return this.va};q.Wf=function(){return this.g};
974
+ q.lg=function(){return this.fb};q.Tf=function(){return this.W};q.Uf=function(){return this.j};q.yg=function(){return this.Y};q.we=function(a){this.Y=a};q.wg=function(){return this.eb};q.Ve=function(){return this.l?this.l.getValue():this.v.currentTime};q.sf=function(a){this.H=a};q.Pc=function(){return this.F.some(function(a){return!a.classList.contains("shaka-hidden")})};q.Ac=function(){this.G.Aa()};
975
+ q.Be=function(){var a=this,b;return I(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),u(c,document.exitFullscreen(),0);A(c,4);if(!document.pictureInPictureElement){c.C(6);break}return u(c,document.exitPictureInPicture(),6);case 6:return u(c,a.i.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.j.forceLandscapeOnFullscreen||!screen.orientation){c.C(9);break}A(c,10);return u(c,screen.orientation.lock("landscape"),12);case 12:ua(c,
976
+ 9,4);break;case 10:F(c,4);case 9:ua(c,0);break;case 4:b=F(c),a.dispatchEvent(new M("error",(new Map).set("detail",b))),c.C(0)}})};q.uf=function(){X(this.I,!0);X(this.W,!0);this.g.setAttribute("ad-active","true")};q.Ye=function(){X(this.I,!1);X(this.W,!1);this.g.removeAttribute("ad-active")};function yw(a){a.R&&a.v.duration&&(a.D.Ke(),a.v.paused&&!a.Y?a.v.play():a.v.pause())}function xw(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
977
+ function Qw(a){a.g=R("div");a.g.classList.add("shaka-controls-container");a.i.appendChild(a.g);a.i.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.v.duration&&(a.Ib()?a.H=Date.now():(Ww(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){a.R&&(a.Pc()?a.G.Aa():a.m?xw(a):yw(a))});a.h.o(a.g,"dblclick",function(){a.j.doubleClickForFullscreen&&document.fullscreenEnabled&&a.Be()})}
974
978
  function Sw(a){var b=R("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.gb=new zw(b,a);a.M.push(a.gb)}function Rw(a){var b=R("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Xw(a){a.I=R("div");a.I.classList.add("shaka-ad-controls");X(a.I,null!=a.m);a.J.appendChild(a.I);var b=new uw(a.I,a);a.M.push(b);b=new tw(a.I,a);a.M.push(b)}
975
979
  function Tw(a){a.$=R("div");a.$.classList.add("shaka-spinner-container");a.i.appendChild(a.$);var b=R("div");b.classList.add("shaka-spinner");a.$.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");b.setAttribute("fill",
976
980
  "none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
@@ -978,13 +982,13 @@ function Uw(a){a.J=R("div");a.J.classList.add("shaka-bottom-controls");a.J.class
978
982
  "Please update UI elements to have a release() method."),b.jc=d,b.jc.release=function(e){return function(){e.jc.destroy&&e.jc.destroy()}}(b)),a.M.push(d)):Pa("Unrecognized control panel element requested:",d)}function Vw(a){if(a.j.addSeekBar)a.l=Yw.create(a.J,a),a.M.push(a.l);else{a=t(a.F);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
979
983
  function Lw(a){a.h.o(a.D,"buffering",function(){a.R&&X(a.$,a.D.Cc())});a.R&&X(a.$,a.D.Cc());a.h.o(window,"keydown",function(b){Zw(a,b)});a.h.o(window,"click",function(){return a.Ac()});a.h.o(a.v,"play",function(){Iw(a)});a.h.o(a.v,"pause",function(){Iw(a)});a.h.o(a.i,"mousemove",function(b){Ww(a,b)});a.h.o(a.i,"touchmove",function(b){Ww(a,b)},{passive:!0});a.h.o(a.i,"touchend",function(b){Ww(a,b)},{passive:!0});a.h.o(a.i,"mouseleave",function(){a.H||a.Z.Aa()});a.h.o(a.A,"caststatuschanged",function(){Mw(a)});
980
984
  a.h.o(a.i,"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)&&Ww(a,b);if(a.j.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.l&&!d&&(b.preventDefault(),$w(a,a.l.getValue()-5));break;case "ArrowRight":a.l&&!d&&(b.preventDefault(),$w(a,a.l.getValue()+5));break;case "Home":a.l&&$w(a,a.D.Ka().start);break;case "End":a.l&&$w(a,a.D.Ka().end);break;case " ":e&&
981
- (a.m?xw(a):yw(a))}});a.h.o(a.i,"keyup",function(b){a.qa["delete"](b.key)});a.h.o(a.cb,"ad-started",function(b){a.m=b.ad;a.uf()});a.h.o(a.cb,"ad-stopped",function(){a.m=null;a.Xe()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return I(function(b){return u(b,ax(a),0)})});a.h.o(document,"fullscreenchange",function(){a.m&&a.m.resize(a.B.offsetWidth,a.B.offsetHeight)})}
982
- function ax(a){return I(function(b){return a.v&&0!=a.v.readyState&&!a.A.na()&&a.j.enableFullscreenOnRotation&&document.fullscreenEnabled?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?u(b,a.i.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?u(b,document.exitFullscreen(),0):b.C(0):b["return"]()})}
983
- function Ww(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Iw(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.H=Date.now():a.H+1E3<Date.now()&&(a.H=null);a.H&&"mousemove"==b.type||(a.i.style.cursor="",a.ab=!0,a.G.stop(),a.Ib()||(Jw(a),Iw(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.H||a.Z.P(3))}function bx(a){return window.matchMedia("hover: hover").matches?a.yb.some(function(b){return b.matches(":hover")}):!1}
984
- function Iw(a){var b=a.m?a.m.isPaused():!1,c=a.v.paused&&!a.Y,d=a.g.classList.contains("shaka-keyboard-navigation");b||!a.m&&c||a.ab||d||bx(a)?(Jw(a),a.g.setAttribute("shown","true"),a.aa.stop()):a.aa.P(a.j.fadeDelay)}function Mw(a){var b=a.A.na();a.dispatchEvent(new M("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Ib=function(){return this.R?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};
985
+ (a.m?xw(a):yw(a))}});a.h.o(a.i,"keyup",function(b){a.ka["delete"](b.key)});a.h.o(a.Va,"ad-started",function(b){a.m=b.ad;a.uf()});a.h.o(a.Va,"ad-stopped",function(){a.m=null;a.Ye()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return I(function(b){return u(b,ax(a),0)})});a.h.o(document,"fullscreenchange",function(){a.m&&a.m.resize(a.B.offsetWidth,a.B.offsetHeight)})}
986
+ function ax(a){return I(function(b){return a.v&&0!=a.v.readyState&&!a.A.oa()&&a.j.enableFullscreenOnRotation&&document.fullscreenEnabled?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?u(b,a.i.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?u(b,document.exitFullscreen(),0):b.C(0):b["return"]()})}
987
+ function Ww(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Iw(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.H=Date.now():a.H+1E3<Date.now()&&(a.H=null);a.H&&"mousemove"==b.type||(a.i.style.cursor="",a.bb=!0,a.G.stop(),a.Ib()||(Jw(a),Iw(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.H||a.Z.P(3))}function bx(a){return window.matchMedia("hover: hover").matches?a.sb.some(function(b){return b.matches(":hover")}):!1}
988
+ function Iw(a){var b=a.m?a.m.isPaused():!1,c=a.v.paused&&!a.Y,d=a.g.classList.contains("shaka-keyboard-navigation");b||!a.m&&c||a.bb||d||bx(a)?(Jw(a),a.g.setAttribute("shown","true"),a.aa.stop()):a.aa.P(a.j.fadeDelay)}function Mw(a){var b=a.A.oa();a.dispatchEvent(new M("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Ib=function(){return this.R?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};
985
989
  function $w(a,b){a.l.changeTo(b);a.Ib()&&Jw(a)}function Jw(a){if(a.l)if(a.l.setValue(a.v.currentTime),a.l.update(),a.l.isShowing())for(var b=t(a.F),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.F),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new M("timeandseekrangeupdated"))}
986
- function Zw(a,b){a.qa.add(b.key);var c=a.Pc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Iw(a),a.h.o(window,"mousedown",function(){a.h.fc(window,"mousedown")}));"Escape"==b.key&&a.G.Aa();c&&a.qa.has("Tab")&&cx(a,b)}
987
- function cx(a,b){var c=a.F.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.qa.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
990
+ function Zw(a,b){a.ka.add(b.key);var c=a.Pc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Iw(a),a.h.o(window,"mousedown",function(){a.h.fc(window,"mousedown")}));"Escape"==b.key&&a.G.Aa();c&&a.ka.has("Tab")&&cx(a,b)}
991
+ function cx(a,b){var c=a.F.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.ka.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
988
992
  function Kw(){var a=new Wb("en");a.ba("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
989
993
  ["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"],
990
994
  ["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"],
@@ -1043,24 +1047,24 @@ new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD
1043
1047
  "\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.ba("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY",
1044
1048
  "\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"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN",
1045
1049
  "\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"],["RESOLUTION","\u89e3\u6790\u5ea6"],
1046
- ["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.Le(navigator.languages||[]);return a}K("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Ib;Y.prototype.hideAdUI=Y.prototype.Xe;Y.prototype.showAdUI=Y.prototype.uf;
1047
- Y.prototype.toggleFullScreen=Y.prototype.Ae;Y.prototype.hideSettingsMenus=Y.prototype.Ac;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Pc;Y.prototype.setLastTouchEventTime=Y.prototype.sf;Y.prototype.getDisplayTime=Y.prototype.Ue;Y.prototype.isCastAllowed=Y.prototype.wg;Y.prototype.setSeeking=Y.prototype.ve;Y.prototype.isSeeking=Y.prototype.yg;Y.prototype.getConfig=Y.prototype.Uf;Y.prototype.getClientSideAdContainer=Y.prototype.Tf;Y.prototype.getServerSideAdContainer=Y.prototype.lg;
1048
- Y.prototype.getControlsContainer=Y.prototype.Wf;Y.prototype.getLocalPlayer=Y.prototype.ag;Y.prototype.getPlayer=Y.prototype.Wb;Y.prototype.getLocalVideo=Y.prototype.cg;Y.prototype.getVideo=Y.prototype.tb;Y.prototype.getVideoContainer=Y.prototype.sg;Y.prototype.getLocalization=Y.prototype.dg;Y.prototype.getCastProxy=Y.prototype.Rf;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.rf;Y.prototype.setEnabledShakaControls=Y.prototype.qe;Y.prototype.configure=Y.prototype.configure;
1050
+ ["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.Me(navigator.languages||[]);return a}K("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Ib;Y.prototype.hideAdUI=Y.prototype.Ye;Y.prototype.showAdUI=Y.prototype.uf;
1051
+ Y.prototype.toggleFullScreen=Y.prototype.Be;Y.prototype.hideSettingsMenus=Y.prototype.Ac;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Pc;Y.prototype.setLastTouchEventTime=Y.prototype.sf;Y.prototype.getDisplayTime=Y.prototype.Ve;Y.prototype.isCastAllowed=Y.prototype.wg;Y.prototype.setSeeking=Y.prototype.we;Y.prototype.isSeeking=Y.prototype.yg;Y.prototype.getConfig=Y.prototype.Uf;Y.prototype.getClientSideAdContainer=Y.prototype.Tf;Y.prototype.getServerSideAdContainer=Y.prototype.lg;
1052
+ Y.prototype.getControlsContainer=Y.prototype.Wf;Y.prototype.getLocalPlayer=Y.prototype.ag;Y.prototype.getPlayer=Y.prototype.Wb;Y.prototype.getLocalVideo=Y.prototype.cg;Y.prototype.getVideo=Y.prototype.vb;Y.prototype.getVideoContainer=Y.prototype.sg;Y.prototype.getLocalization=Y.prototype.dg;Y.prototype.getCastProxy=Y.prototype.Rf;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.rf;Y.prototype.setEnabledShakaControls=Y.prototype.re;Y.prototype.configure=Y.prototype.configure;
1049
1053
  Y.prototype.loadComplete=Y.prototype.zg;Y.prototype.allowCast=Y.prototype.Ff;Y.registerSeekBar=function(a){Yw=a};Y.registerElement=Ow;Y.prototype.destroy=Y.prototype.destroy;var Pw=new Map,Yw=new Hw;function dx(a,b){nw.call(this,a,b);var c=this;this.l=this.controls.j;this.j=this.controls.g;this.i=[];this.h=lk();this.h.classList.add("shaka-overflow-menu-button");this.h.classList.add("shaka-no-propagation");this.h.classList.add("material-icons-round");this.h.textContent="more_vert";this.parent.appendChild(this.h);this.g=R("div");this.g.classList.add("shaka-overflow-menu");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-hidden");
1050
1054
  this.j.appendChild(this.g);ex(this);for(var d=t(this.controls.i.getElementsByClassName("shaka-back-to-overflow-button")),e=d.next();!e.done;e=d.next())this.eventManager.o(e.value,"click",function(){c.controls.Ac();X(c.g,!0);c.g.childNodes.length&&c.g.childNodes[0].focus();Iw(c.controls)});this.eventManager.o(this.localization,"locale-updated",function(){fx(c)});this.eventManager.o(this.localization,"locale-changed",function(){fx(c)});this.eventManager.o(this.adManager,"ad-started",function(){X(c.h,
1051
1055
  !1)});this.eventManager.o(this.adManager,"ad-stopped",function(){X(c.h,!0)});this.eventManager.o(this.controls,"submenuopen",function(){X(c.g,!1)});this.eventManager.o(this.g,"touchstart",function(f){c.controls.sf(Date.now());f.stopPropagation()});this.eventManager.o(this.h,"click",function(){gx(c)});fx(this);this.ad&&X(this.h,!1)}pa(dx,nw);dx.prototype.release=function(){this.j=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];nw.prototype.release.call(this)};
1052
1056
  function hx(a,b){ix.set(a,b)}function ex(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,ix.get(c)?(c=ix.get(c),a.i.push(c.create(a.g,a.controls))):Pa("Unrecognized overflow menu element requested:",c)}function gx(a){if(a.controls.Pc())a.controls.Ac();else{X(a.g,!0);Iw(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};fb(a.g.childNodes,b)&&gb(a.g.childNodes,b)[0].focus()}}
1053
1057
  function fx(a){a.h.ariaLabel=a.localization.resolve("MORE_SETTINGS")}K("shaka.ui.OverflowMenu",dx);dx.registerElement=hx;function jx(){}jx.prototype.create=function(a,b){return new dx(a,b)};Ow("overflow_menu",new jx);var ix=new Map;function kx(a,b){nw.call(this,a,b);var c=this;this.g=lk();this.g.classList.add("shaka-airplay-button");this.g.ariaPressed="false";this.h=R("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");d.appendChild(this.j);this.i=R("span");this.i.classList.add("shaka-current-selection-span");
1054
- d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);lx(this);mx(this);this.eventManager.o(this.localization,"locale-updated",function(){lx(c)});this.eventManager.o(this.localization,"locale-changed",function(){lx(c)});this.eventManager.o(this.g,"click",function(){c.controls.tb().webkitShowPlaybackTargetPicker()});d=this.controls.tb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=c.player.Ve()==Tl;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,
1055
- "webkitcurrentplaybacktargetiswirelesschanged",function(){mx(c)})}pa(kx,nw);function mx(a){var b=a.controls.tb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function lx(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}K("shaka.ui.AirPlayButton",kx);function nx(){}nx.prototype.create=function(a,b){return new kx(a,b)};hx("airplay",new nx);Ow("airplay",new nx);function ox(a,b,c){this.i=a;this.h=px(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Pd()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.ye(b);b.ui=this;c.ui=this}q=ox.prototype;q.destroy=function(){var a=this;return I(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.C(2);if(4!=b.g)return a.g=null,a.i?u(b,a.i.destroy(),4):b.C(4);a.i=null;z(b)})};q.Pd=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Yc()&&1<navigator.maxTouchPoints};
1056
- q.getConfiguration=function(){var a=px(this);xk(a,this.h,px(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=yk(a,b));xk(this.h,a,px(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new M("uiupdated"))};q.Vf=function(){return this.g};q.Wg=function(a){this.g.qe(a)};
1058
+ d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);lx(this);mx(this);this.eventManager.o(this.localization,"locale-updated",function(){lx(c)});this.eventManager.o(this.localization,"locale-changed",function(){lx(c)});this.eventManager.o(this.g,"click",function(){c.controls.vb().webkitShowPlaybackTargetPicker()});d=this.controls.vb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=c.player.We()==Tl;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,
1059
+ "webkitcurrentplaybacktargetiswirelesschanged",function(){mx(c)})}pa(kx,nw);function mx(a){var b=a.controls.vb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function lx(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}K("shaka.ui.AirPlayButton",kx);function nx(){}nx.prototype.create=function(a,b){return new kx(a,b)};hx("airplay",new nx);Ow("airplay",new nx);function ox(a,b,c){this.i=a;this.h=px(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Qd()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.ze(b);b.ui=this;c.ui=this}q=ox.prototype;q.destroy=function(){var a=this;return I(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.C(2);if(4!=b.g)return a.g=null,a.i?u(b,a.i.destroy(),4):b.C(4);a.i=null;z(b)})};q.Qd=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Yc()&&1<navigator.maxTouchPoints};
1060
+ q.getConfiguration=function(){var a=px(this);xk(a,this.h,px(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=yk(a,b));xk(this.h,a,px(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new M("uiupdated"))};q.Vf=function(){return this.g};q.Wg=function(a){this.g.re(a)};
1057
1061
  function px(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(" "),addSeekBar:!0,addBigPlayButton:!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)",
1058
- level:"rgb(255, 255, 255)"},trackLabelFormat:qx,fadeDelay:0,doubleClickForFullscreen:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Pd()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1062
+ level:"rgb(255, 255, 255)"},trackLabelFormat:qx,fadeDelay:0,doubleClickForFullscreen:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Qd()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1059
1063
  function rx(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return I(function(r){switch(r.g){case 1:dt();if(!cl())return sx("shaka-ui-load-failed",tx),r["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){r.C(2);break}if(b.length&&!a.length){c=t(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),ux(f,e));r.C(2);break}h=t(a);k=h.next();
1060
1064
  case 4:if(k.done){r.C(2);break}l=k.value;if(l.ui){r.C(5);break}m=null;n=t(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));A(r,7);return u(r,ux(l,m),9);case 9:ua(r,5);break;case 7:return F(r),sx("shaka-ui-load-failed",vx),r["return"]();case 5:k=h.next();r.C(4);break;case 2:sx("shaka-ui-loaded"),z(r)}})}
1061
1065
  function sx(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1062
1066
  function ux(a,b){var c,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:c=new S(b);d=new ox(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.rf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=t(b.querySelectorAll("source"));
1063
- k=h.next();case 2:if(k.done){m.C(0);break}l=k.value;A(m,5);return u(m,d.g.Wb().load(l.getAttribute("src")),7);case 7:m.C(0);break;case 5:F(m);case 3:k=h.next(),m.C(2)}})}K("shaka.ui.Overlay",ox);ox.prototype.setEnabled=ox.prototype.Wg;ox.prototype.getControls=ox.prototype.Vf;ox.prototype.configure=ox.prototype.configure;ox.prototype.getConfiguration=ox.prototype.getConfiguration;ox.prototype.isMobile=ox.prototype.Pd;ox.prototype.destroy=ox.prototype.destroy;var qx=0;
1067
+ k=h.next();case 2:if(k.done){m.C(0);break}l=k.value;A(m,5);return u(m,d.g.Wb().load(l.getAttribute("src")),7);case 7:m.C(0);break;case 5:F(m);case 3:k=h.next(),m.C(2)}})}K("shaka.ui.Overlay",ox);ox.prototype.setEnabled=ox.prototype.Wg;ox.prototype.getControls=ox.prototype.Vf;ox.prototype.configure=ox.prototype.configure;ox.prototype.getConfiguration=ox.prototype.getConfiguration;ox.prototype.isMobile=ox.prototype.Qd;ox.prototype.destroy=ox.prototype.destroy;var qx=0;
1064
1068
  ox.TrackLabelFormat={LANGUAGE:qx,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var tx=0,vx=1;ox.FailReasonCode={NO_BROWSER_SUPPORT:tx,PLAYER_FAILED_TO_LOAD:vx};"complete"==document.readyState?I(function(a){if(1==a.g)return u(a,Promise.resolve(),2);rx();z(a)}):window.addEventListener("load",rx);function wx(a,b,c,d,e,f,g){function h(B,D){return B+": "+D}function k(B){return"variant"==B.type?B.audioRoles?B.audioRoles.join(", "):void 0:B.roles.join(", ")}var l=a.find(function(B){return 1==B.active}),m=ow(b);mk(b);b.appendChild(m);m=new Map;for(var n=t(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=t(a);for(p=a.next();!p.done;n={Ta:n.Ta},p=a.next()){n.Ta=p.value;p=n.Ta.language;var r=
1065
1069
  n.Ta.forced,v=f.resolve($b.Af),y=k(n.Ta),x=h(p,y);if(!m.has(x)){m.add(x);var w=lk();w.addEventListener("click",function(B){return function(){c(B.Ta)}}(n));var C=R("span");w.appendChild(C);C.textContent=xx(p,f);switch(g){case qx:r&&(C.textContent+=" ("+v+")");break;case 1:y?C.textContent=y:(Pa("Track #"+n.Ta.id+" does not have a role, but the UI is configured to only show role."),C.textContent="?");r&&(C.textContent+=" ("+v+")");break;case 2:y&&(C.textContent+=": "+y);r&&(C.textContent+=" ("+v+")");
1066
1070
  break;case 3:n.Ta.label?C.textContent=n.Ta.label:(Pa("Track #"+n.Ta.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&x==l&&(w.appendChild(rw()),C.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=C.textContent);b.appendChild(w)}}}
@@ -1071,10 +1075,10 @@ K("shaka.ui.SettingsMenu",yx);function Bx(a,b){yx.call(this,a,b,"language");var
1071
1075
  pa(Bx,yx);function Dx(a){var b=a.player.Eb();wx(b,a.menu,function(c){a.player.pd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.j.trackLabelFormat);qw(a.menu);a.controls.dispatchEvent(new M("languageselectionupdated"))}function Cx(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")}
1072
1076
  K("shaka.ui.AudioLanguageSelection",Bx);function Ex(){}Ex.prototype.create=function(a,b){return new Bx(a,b)};hx("language",new Ex);function Fx(a,b){nw.call(this,a,b);var c=this;this.h=this.controls.A;this.g=lk();this.g.classList.add("shaka-cast-button");this.g.ariaPressed="false";this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=R("span");d.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1073
1077
  this.g.appendChild(d);this.parent.appendChild(this.g);Gx(this);Hx(this);this.eventManager.o(this.localization,"locale-updated",function(){Gx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Gx(c)});this.eventManager.o(this.g,"click",function(){Ix(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Hx(c)})}pa(Fx,nw);
1074
- function Ix(a){var b;I(function(c){if(1==c.g){if(a.h.na())return a.h.vf(),c.C(0);A(c,3);a.g.disabled=!0;return u(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,ua(c,0);b=F(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new M("error",(new Map).set("detail",b)));z(c)})}function Hx(a){var b=a.h.Ie()&&a.controls.eb,c=a.h.na();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Jx(a)}
1075
- function Jx(a){a.j.textContent=a.h.na()?a.h.nd():a.localization.resolve("OFF")}function Gx(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Jx(a)}K("shaka.ui.CastButton",Fx);function Kx(){}Kx.prototype.create=function(a,b){return new Fx(a,b)};hx("cast",new Kx);Ow("cast",new Kx);function Lx(a,b){nw.call(this,a,b);var c=this;this.g=lk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Mx(this);this.eventManager.o(this.localization,"locale-updated",function(){Mx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Mx(c)});this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.player.wc();c.player.Ce(0>d||4<d?1:2*d)}})}pa(Lx,nw);
1078
+ function Ix(a){var b;I(function(c){if(1==c.g){if(a.h.oa())return a.h.vf(),c.C(0);A(c,3);a.g.disabled=!0;return u(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,ua(c,0);b=F(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new M("error",(new Map).set("detail",b)));z(c)})}function Hx(a){var b=a.h.Je()&&a.controls.eb,c=a.h.oa();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Jx(a)}
1079
+ function Jx(a){a.j.textContent=a.h.oa()?a.h.nd():a.localization.resolve("OFF")}function Gx(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Jx(a)}K("shaka.ui.CastButton",Fx);function Kx(){}Kx.prototype.create=function(a,b){return new Fx(a,b)};hx("cast",new Kx);Ow("cast",new Kx);function Lx(a,b){nw.call(this,a,b);var c=this;this.g=lk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Mx(this);this.eventManager.o(this.localization,"locale-updated",function(){Mx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Mx(c)});this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.player.wc();c.player.De(0>d||4<d?1:2*d)}})}pa(Lx,nw);
1076
1080
  function Mx(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}K("shaka.ui.FastForwardButton",Lx);function Nx(){}Nx.prototype.create=function(a,b){return new Lx(a,b)};Ow("fast_forward",new Nx);function Ox(a,b){nw.call(this,a,b);var c=this;this.g=lk();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Px(this);this.eventManager.o(this.localization,"locale-updated",function(){Px(c)});this.eventManager.o(this.localization,"locale-changed",function(){Px(c)});this.eventManager.o(this.g,"click",function(){return I(function(d){return u(d,
1077
- c.controls.Ae(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Px(c)})}pa(Ox,nw);function Px(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}K("shaka.ui.FullscreenButton",Ox);function Qx(){}Qx.prototype.create=function(a,b){return new Ox(a,b)};Ow("fullscreen",new Qx);function Rx(a,b){nw.call(this,a,b);var c=this;this.g=lk();this.g.classList.add("shaka-loop-button");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=R("span");this.l.textContent=this.localization.resolve("LOOP");d.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1081
+ c.controls.Be(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Px(c)})}pa(Ox,nw);function Px(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}K("shaka.ui.FullscreenButton",Ox);function Qx(){}Qx.prototype.create=function(a,b){return new Ox(a,b)};Ow("fullscreen",new Qx);function Rx(a,b){nw.call(this,a,b);var c=this;this.g=lk();this.g.classList.add("shaka-loop-button");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=R("span");this.l.textContent=this.localization.resolve("LOOP");d.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1078
1082
  this.g.appendChild(d);Sx(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Sx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Sx(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Aa();c.h.ia(1)});this.m=this.video.loop;this.h=new P(function(){c.m!=c.video.loop&&(Sx(c),c.m=c.video.loop)});this.h.ia(1)}pa(Rx,nw);Rx.prototype.release=function(){this.h.stop();this.h=null;nw.prototype.release.call(this)};
1079
1083
  function Sx(a){a.l.textContent=a.localization.resolve("LOOP");a.j.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")}K("shaka.ui.LoopButton",Rx);function Tx(){}Tx.prototype.create=function(a,b){return new Rx(a,b)};hx("loop",new Tx);Ow("loop",new Tx);function Ux(a,b){nw.call(this,a,b);var c=this;this.g=lk();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.parent.appendChild(this.g);Vx(this);Wx(this);this.eventManager.o(this.localization,"locale-updated",function(){Vx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Vx(c)});this.eventManager.o(this.g,"click",function(){c.ad?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});this.eventManager.o(this.video,"volumechange",
1080
1084
  function(){Vx(c);Wx(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Vx(c);Wx(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Vx(c);Wx(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Vx(c);Wx(c)})}pa(Ux,nw);function Vx(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
@@ -1083,25 +1087,25 @@ d.appendChild(this.h);this.g.appendChild(d);Zx(this);this.parent.appendChild(thi
1083
1087
  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):document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.o(this.player,
1084
1088
  "trackschanged",function(){ay(c)})}pa(Yx,nw);function $x(a){var b;I(function(c){if(1==c.g)return A(c,2),document.pictureInPictureElement?u(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),u(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return ua(c,0);b=F(c);a.controls.dispatchEvent(new M("error",(new Map).set("detail",b)));z(c)})}
1085
1089
  function Zx(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")}
1086
- function ay(a){I(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.C(0);if(!a.player||!a.player.$e())return X(a.g,!0),b.C(0);X(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.C(0)})}K("shaka.ui.PipButton",Yx);function by(){}by.prototype.create=function(a,b){return new Yx(a,b)};hx("picture_in_picture",new by);Ow("picture_in_picture",new by);function cy(a,b){yx.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.eventManager.o(this.localization,"locale-updated",function(){dy(c)});this.eventManager.o(this.localization,"locale-changed",function(){dy(c)});this.eventManager.o(this.player,"ratechange",function(){ey(c,c.player.wc())});this.g=new Map([["0.5x",.5],["0.75x",.75],["1x",1],["1.25x",1.25],["1.5x",1.5],["1.75x",1.75],["2x",2]]);dy(this);
1090
+ function ay(a){I(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.C(0);if(!a.player||!a.player.bf())return X(a.g,!0),b.C(0);X(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.C(0)})}K("shaka.ui.PipButton",Yx);function by(){}by.prototype.create=function(a,b){return new Yx(a,b)};hx("picture_in_picture",new by);Ow("picture_in_picture",new by);function cy(a,b){yx.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.eventManager.o(this.localization,"locale-updated",function(){dy(c)});this.eventManager.o(this.localization,"locale-changed",function(){dy(c)});this.eventManager.o(this.player,"ratechange",function(){ey(c,c.player.wc())});this.g=new Map([["0.5x",.5],["0.75x",.75],["1x",1],["1.25x",1.25],["1.5x",1.5],["1.75x",1.75],["2x",2]]);dy(this);
1087
1091
  fy(this);ey(this,this.player.wc())}pa(cy,yx);function dy(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")}
1088
1092
  function ey(a,b){var c=pw(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(rw()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x"}
1089
- function fy(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={kc:b.kc},d=c.next()){b.kc=d.value;d=lk();var e=R("span");e.textContent=b.kc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.kc);a.video.defaultPlaybackRate=a.g.get(f.kc)}}(b));a.menu.appendChild(d)}qw(a.menu)}K("shaka.ui.PlaybackRateSelection",cy);function gy(){}gy.prototype.create=function(a,b){return new cy(a,b)};hx("playback_rate",new gy);function hy(a,b){nw.call(this,a,b);var c=this;this.g=lk();this.g.classList.add("shaka-current-time");iy(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.V()&&(c.video.currentTime=c.player.Ka().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.Y,e=c.controls.Ue(),f=c.video.duration,g=c.player.Ka(),h=g.end-g.start;c.player.V()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(iy(c,"- "+sw(e,f)),c.g.disabled=
1093
+ function fy(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={kc:b.kc},d=c.next()){b.kc=d.value;d=lk();var e=R("span");e.textContent=b.kc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.kc);a.video.defaultPlaybackRate=a.g.get(f.kc)}}(b));a.menu.appendChild(d)}qw(a.menu)}K("shaka.ui.PlaybackRateSelection",cy);function gy(){}gy.prototype.create=function(a,b){return new cy(a,b)};hx("playback_rate",new gy);function hy(a,b){nw.call(this,a,b);var c=this;this.g=lk();this.g.classList.add("shaka-current-time");iy(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.V()&&(c.video.currentTime=c.player.Ka().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.Y,e=c.controls.Ve(),f=c.video.duration,g=c.player.Ka(),h=g.end-g.start;c.player.V()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(iy(c,"- "+sw(e,f)),c.g.disabled=
1090
1094
  !1):(iy(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=sw(e,d),f&&(e+=" / "+sw(f,d)),iy(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.V()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}pa(hy,nw);function iy(a,b){b!=a.g.textContent&&(a.g.textContent=b)}K("shaka.ui.PresentationTimeTracker",hy);function jy(){}jy.prototype.create=function(a,b){return new hy(a,b)};Ow("time_and_duration",new jy);function ky(a,b){yx.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){ly(c)});this.eventManager.o(this.localization,"locale-changed",function(){ly(c)});this.eventManager.o(this.player,"variantchanged",function(){my(c)});this.eventManager.o(this.player,"trackschanged",function(){my(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){my(c)});
1091
1095
  my(this);ly(this)}pa(ky,yx);
1092
1096
  function my(a){var b=a.player.Eb();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=ow(a.menu);mk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e=
1093
- {nc:e.nc},g=f.next()){e.nc=g.value;g=lk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.nc;a.player.configure({abr:{enabled:!1}});a.player.oe(l,a.controls.j.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=e.nc.height+"p";g.appendChild(h);d||e.nc!=c||(g.ariaSelected="true",g.appendChild(rw()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=lk();e.classList.add("shaka-enable-abr-button");
1097
+ {nc:e.nc},g=f.next()){e.nc=g.value;g=lk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.nc;a.player.configure({abr:{enabled:!1}});a.player.pe(l,a.controls.j.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=e.nc.height+"p";g.appendChild(h);d||e.nc!=c||(g.ariaSelected="true",g.appendChild(rw()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=lk();e.classList.add("shaka-enable-abr-button");
1094
1098
  a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});my(a)});a.g=R("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(rw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.menu.appendChild(e);qw(a.menu);a.controls.dispatchEvent(new M("resolutionselectionupdated"))}}
1095
1099
  function ly(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"))}K("shaka.ui.ResolutionSelection",ky);function ny(){}
1096
- ny.prototype.create=function(a,b){return new ky(a,b)};hx("quality",new ny);function oy(a,b){nw.call(this,a,b);var c=this;this.g=lk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.textContent="fast_rewind";this.parent.appendChild(this.g);py(this);this.eventManager.o(this.localization,"locale-updated",function(){py(c)});this.eventManager.o(this.localization,"locale-changed",function(){py(c)});this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.player.wc();c.player.Ce(0<d||-4>d?-1:2*d)}})}pa(oy,nw);
1100
+ ny.prototype.create=function(a,b){return new ky(a,b)};hx("quality",new ny);function oy(a,b){nw.call(this,a,b);var c=this;this.g=lk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.textContent="fast_rewind";this.parent.appendChild(this.g);py(this);this.eventManager.o(this.localization,"locale-updated",function(){py(c)});this.eventManager.o(this.localization,"locale-changed",function(){py(c)});this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.player.wc();c.player.De(0<d||-4>d?-1:2*d)}})}pa(oy,nw);
1097
1101
  function py(a){a.g.ariaLabel=a.localization.resolve("REWIND")}K("shaka.ui.RewindButton",oy);function qy(){}qy.prototype.create=function(a,b){return new oy(a,b)};Ow("rewind",new qy);function ry(a,b){nw.call(this,a,b);var c=this;this.j=R("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=R("div");this.h.classList.add("shaka-skip-ad-counter");X(this.h,!1);this.j.appendChild(this.h);this.g=lk();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);sy(this);this.i=new P(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1098
1102
  d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){sy(c)});this.eventManager.o(this.localization,"locale-changed",function(){sy(c)});this.eventManager.o(this.adManager,"ad-started",function(){ty(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,
1099
1103
  "click",function(){c.ad.skip()});this.ad&&ty(this)}pa(ry,nw);ry.prototype.release=function(){this.i.stop();this.i=null;nw.prototype.release.call(this)};function sy(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function ty(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.Aa(),a.i.ia(.5))}K("shaka.ui.SkipAdButton",ry);function uy(a,b){ww.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.h();this.g()}pa(uy,ww);uy.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};uy.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)}};
1100
1104
  K("shaka.ui.SmallPlayButton",uy);function vy(){}vy.prototype.create=function(a,b){return new uy(a,b)};Ow("play_pause",new vy);function wy(a,b){nw.call(this,a,b);var c=R("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}pa(wy,nw);K("shaka.ui.Spacer",wy);function xy(){}xy.prototype.create=function(a,b){return new wy(a,b)};Ow("spacer",new xy);function yy(a,b){yx.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Jb()?this.button.ariaPressed="true":this.button.ariaPressed="false";zy(this);this.eventManager.o(this.localization,"locale-updated",function(){Ay(c);By(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ay(c);By(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){Cy(c);By(c)});
1101
1105
  this.eventManager.o(this.player,"textchanged",function(){By(c)});this.eventManager.o(this.player,"trackschanged",function(){Dy(c)});Cy(this);Ay(this);By(this);Dy(this)}pa(yy,yx);function zy(a){var b=lk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(rw());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1102
1106
  function Cy(a){a.player.Jb()?(a.icon.classList.add("shaka-captions-on"),a.icon.classList.remove("shaka-captions-off"),a.button.ariaPressed="true"):(a.icon.classList.add("shaka-captions-off"),a.icon.classList.remove("shaka-captions-on"),a.button.ariaPressed="false");a.controls.dispatchEvent(new M("captionselectionupdated"))}
1103
- function By(a){var b=a.player.kb();wx(b,a.menu,function(c){return Ey(a,c)},a.player.Jb(),a.currentSelection,a.localization,a.controls.j.trackLabelFormat);b=lk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.xe(!1);By(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Jb()||(b.ariaSelected="true",b.appendChild(rw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));qw(a.menu);a.controls.dispatchEvent(new M("captionselectionupdated"))}
1104
- function Ey(a,b){return I(function(c){a.player.me(b);return u(c,a.player.xe(!0),0)})}function Ay(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")}function Dy(a){var b=0<a.player.kb().length;X(a.button,b);By(a)}K("shaka.ui.TextSelection",yy);function Fy(){}
1107
+ function By(a){var b=a.player.kb();wx(b,a.menu,function(c){return Ey(a,c)},a.player.Jb(),a.currentSelection,a.localization,a.controls.j.trackLabelFormat);b=lk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.ye(!1);By(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Jb()||(b.ariaSelected="true",b.appendChild(rw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));qw(a.menu);a.controls.dispatchEvent(new M("captionselectionupdated"))}
1108
+ function Ey(a,b){return I(function(c){a.player.oe(b);return u(c,a.player.ye(!0),0)})}function Ay(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")}function Dy(a){var b=0<a.player.kb().length;X(a.button,b);By(a)}K("shaka.ui.TextSelection",yy);function Fy(){}
1105
1109
  Fy.prototype.create=function(a,b){return new yy(a,b)};hx("captions",new Fy);function Gy(a,b){Aw.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.j;this.eventManager.o(this.video,"volumechange",function(){return Hy(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return Iy(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return Iy(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return Hy(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Jy(c)});
1106
1110
  this.eventManager.o(this.localization,"locale-changed",function(){return Jy(c)});Hy(this);Jy(this);if(this.ad)this.onChange()}pa(Gy,Aw);Gy.prototype.onChange=function(){this.ad?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function Hy(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Ky(a)}function Iy(a){var b=a.ad.getVolume();a.setValue(b);Ky(a)}
1107
1111
  function Ky(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 Jy(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}K("shaka.ui.VolumeBar",Gy);function Ly(){}Ly.prototype.create=function(a,b){return new Gy(a,b)};Ow("volume",new Ly);}).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})();