shaka-player 3.2.12 → 3.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/.github/workflows/build-and-test.yaml +42 -22
  2. package/.github/workflows/compute-incremental-coverage.py +14 -3
  3. package/.github/workflows/custom-actions/set-commit-status/action.yaml +1 -5
  4. package/.github/workflows/deflake.yaml +28 -0
  5. package/.github/workflows/demo-version-index.yaml +9 -1
  6. package/.github/workflows/nightly-demo.yaml +1 -1
  7. package/.github/workflows/release-please.yaml +4 -4
  8. package/.github/workflows/report-incremental-coverage.yaml +1 -1
  9. package/.github/workflows/selenium-lab-tests.yaml +21 -10
  10. package/AUTHORS +3 -0
  11. package/CHANGELOG.md +25 -0
  12. package/CONTRIBUTORS +2 -0
  13. package/dist/deps.js +3 -3
  14. package/dist/locales.js +28 -28
  15. package/dist/shaka-player.compiled.d.ts +1 -0
  16. package/dist/shaka-player.compiled.debug.d.ts +1 -0
  17. package/dist/shaka-player.compiled.debug.externs.js +1 -0
  18. package/dist/shaka-player.compiled.debug.js +181 -179
  19. package/dist/shaka-player.compiled.debug.map +4 -4
  20. package/dist/shaka-player.compiled.externs.js +1 -0
  21. package/dist/shaka-player.compiled.js +664 -663
  22. package/dist/shaka-player.compiled.map +4 -4
  23. package/dist/shaka-player.ui.d.ts +1 -0
  24. package/dist/shaka-player.ui.debug.d.ts +1 -0
  25. package/dist/shaka-player.ui.debug.externs.js +1 -0
  26. package/dist/shaka-player.ui.debug.js +222 -220
  27. package/dist/shaka-player.ui.debug.map +4 -4
  28. package/dist/shaka-player.ui.externs.js +1 -0
  29. package/dist/shaka-player.ui.js +819 -818
  30. package/dist/shaka-player.ui.map +4 -4
  31. package/docs/jsdoc-template/publish.js +33 -0
  32. package/docs/jsdoc-template/tmpl/container.tmpl +4 -1
  33. package/docs/jsdoc.conf.json +1 -0
  34. package/docs/tutorials/welcome.md +2 -2
  35. package/lib/ads/client_side_ad_manager.js +5 -2
  36. package/lib/cast/cast_sender.js +39 -14
  37. package/lib/cea/cea608_memory.js +4 -0
  38. package/lib/media/drm_engine.js +4 -2
  39. package/lib/media/streaming_engine.js +41 -4
  40. package/lib/offline/indexeddb/storage_mechanism.js +24 -0
  41. package/lib/player.js +1 -1
  42. package/lib/polyfill/media_capabilities.js +1 -0
  43. package/lib/text/ttml_text_parser.js +69 -87
  44. package/lib/util/error.js +7 -0
  45. package/lib/util/periods.js +9 -9
  46. package/lib/util/platform.js +34 -0
  47. package/lib/util/stream_utils.js +2 -1
  48. package/lib/util/xml_utils.js +45 -6
  49. package/package.json +1 -1
  50. package/test/cea/cea608_memory_unit.js +88 -0
  51. package/test/media/streaming_engine_integration.js +8 -7
  52. package/test/offline/offline_integration.js +3 -3
  53. package/test/offline/storage_integration.js +30 -0
  54. package/test/test/util/ttml_utils.js +0 -2
  55. package/test/text/ttml_text_parser_unit.js +46 -0
  56. package/test/ui/text_displayer_layout_unit.js +17 -2
  57. package/test/util/periods_unit.js +149 -11
  58. package/test/util/xml_utils_unit.js +64 -0
@@ -21,7 +21,7 @@ function wa(a,b){var c=a.B.splice(0)[0];(c=a.i=a.i||c)?c.Ye?a.g=a.m||a.j:void 0!
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
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.Ye)throw b.Oe;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
- 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 H(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}
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=
26
26
  g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.G),reject:g(this.l)}};b.prototype.G=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.I(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.F(g):this.m(g)}};
27
27
  b.prototype.F=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.A(2,g)};b.prototype.m=function(g){this.A(1,g)};b.prototype.A=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.H();this.B()};b.prototype.H=function(){var g=this;e(function(){if(g.D()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.D=
@@ -47,14 +47,14 @@ var Ka="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;
47
47
  ea("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});ea("Array.prototype.entries",function(a){return a?a:function(){return Ha(this,function(b,c){return[b,c]})}});
48
48
  ea("String.prototype.repeat",function(a){return a?a:function(b){var c=Ja(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(b,d)&&c.push(b[d]);return c}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
49
49
  ea("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(b,d)&&c.push([d,b[d]]);return c}});var La=this||self;
50
- function J(a,b){var c=a.split("."),d=La;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
50
+ function K(a,b){var c=a.split("."),d=La;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
51
51
  @license
52
52
  Shaka Player
53
53
  Copyright 2016 Google LLC
54
54
  SPDX-License-Identifier: Apache-2.0
55
55
  */
56
- function L(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 L(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}L.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};L.prototype.stopImmediatePropagation=function(){this.g=!0};L.prototype.stopPropagation=function(){};J("shaka.util.FakeEvent",L);function Na(){}function Oa(){}function Pa(){}function Ra(a){var b=Ea.apply(1,arguments);Sa.has(a)||(Sa.add(a),Pa.apply(Na,ha(b)))}function Va(){}function Wa(){}function Xa(){}function Za(){}var Sa=new Set;if(window.console&&window.console.log.bind){var $a={},ab=($a[1]=console.error.bind(console),$a[2]=console.warn.bind(console),$a[3]=console.info.bind(console),$a[4]=console.log.bind(console),$a[5]=console.debug.bind(console),$a[6]=console.debug.bind(console),$a);Pa=ab[2];Oa=ab[1]};function bb(){this.g={}}q=bb.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 cb(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 db(){this.ua=new bb;this.Uc=this}db.prototype.addEventListener=function(a,b){this.ua&&this.ua.push(a,b)};db.prototype.removeEventListener=function(a,b){this.ua&&this.ua.remove(a,b)};db.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.Uc;a.currentTarget=this.Uc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
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 Ra(a){var b=Ea.apply(1,arguments);Sa.has(a)||(Sa.add(a),Pa.apply(Na,ha(b)))}function Va(){}function Wa(){}function Xa(){}function Ya(){}var Sa=new Set;if(window.console&&window.console.log.bind){var $a={},ab=($a[1]=console.error.bind(console),$a[2]=console.warn.bind(console),$a[3]=console.info.bind(console),$a[4]=console.log.bind(console),$a[5]=console.debug.bind(console),$a[6]=console.debug.bind(console),$a);Pa=ab[2];Oa=ab[1]};function bb(){this.g={}}q=bb.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 cb(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 db(){this.ua=new bb;this.Uc=this}db.prototype.addEventListener=function(a,b){this.ua&&this.ua.push(a,b)};db.prototype.removeEventListener=function(a,b){this.ua&&this.ua.remove(a,b)};db.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.Uc;a.currentTarget=this.Uc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
58
58
  db.prototype.release=function(){this.ua=null};function eb(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function fb(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function gb(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function hb(a,b){for(var c=[],d=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,22 +65,22 @@ var ib=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
65
65
  Copyright 2006 The Closure Library Authors
66
66
  SPDX-License-Identifier: Apache-2.0
67
67
  */
68
- function jb(a){var b;a instanceof jb?(kb(this,a.Ta),this.Mb=a.Mb,this.Ua=a.Ua,mb(this,a.ac),this.Ma=a.Ma,nb(this,a.g.clone()),this.Ab=a.Ab):a&&(b=String(a).match(ib))?(kb(this,b[1]||"",!0),this.Mb=ob(b[2]||""),this.Ua=ob(b[3]||"",!0),mb(this,b[4]),this.Ma=ob(b[5]||"",!0),nb(this,b[6]||"",!0),this.Ab=ob(b[7]||"")):this.g=new pb(null)}q=jb.prototype;q.Ta="";q.Mb="";q.Ua="";q.ac=null;q.Ma="";q.Ab="";
69
- q.toString=function(){var a=[],b=this.Ta;b&&a.push(qb(b,rb,!0),":");if(b=this.Ua){a.push("//");var c=this.Mb;c&&a.push(qb(c,rb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.ac;null!=b&&a.push(":",String(b))}if(b=this.Ma)this.Ua&&"/"!=b.charAt(0)&&a.push("/"),a.push(qb(b,"/"==b.charAt(0)?sb:tb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Ab)&&a.push("#",qb(b,ub));return a.join("")};
70
- q.resolve=function(a){var b=this.clone();"data"===b.Ta&&(b=new jb);var c=!!a.Ta;c?kb(b,a.Ta):c=!!a.Mb;c?b.Mb=a.Mb:c=!!a.Ua;c?b.Ua=a.Ua:c=null!=a.ac;var d=a.Ma;if(c)mb(b,a.ac);else if(c=!!a.Ma){if("/"!=d.charAt(0))if(this.Ua&&!this.Ma)d="/"+d;else{var e=b.Ma.lastIndexOf("/");-1!=e&&(d=b.Ma.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
- 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.Ma=d:c=""!==a.g.toString();c?nb(b,a.g.clone()):c=!!a.Ab;c&&(b.Ab=a.Ab);return b};q.clone=function(){return new jb(this)};function kb(a,b,c){a.Ta=c?ob(b,!0):b;a.Ta&&(a.Ta=a.Ta.replace(/:$/,""))}function mb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.ac=b}else a.ac=null}function nb(a,b,c){b instanceof pb?a.g=b:(c||(b=qb(b,vb)),a.g=new pb(b))}
68
+ function jb(a){var b;a instanceof jb?(kb(this,a.Ua),this.Nb=a.Nb,this.Va=a.Va,lb(this,a.ac),this.Ma=a.Ma,nb(this,a.g.clone()),this.Bb=a.Bb):a&&(b=String(a).match(ib))?(kb(this,b[1]||"",!0),this.Nb=ob(b[2]||""),this.Va=ob(b[3]||"",!0),lb(this,b[4]),this.Ma=ob(b[5]||"",!0),nb(this,b[6]||"",!0),this.Bb=ob(b[7]||"")):this.g=new pb(null)}q=jb.prototype;q.Ua="";q.Nb="";q.Va="";q.ac=null;q.Ma="";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.Nb;c&&a.push(qb(c,rb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.ac;null!=b&&a.push(":",String(b))}if(b=this.Ma)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 jb);var c=!!a.Ua;c?kb(b,a.Ua):c=!!a.Nb;c?b.Nb=a.Nb:c=!!a.Va;c?b.Va=a.Va:c=null!=a.ac;var d=a.Ma;if(c)lb(b,a.ac);else if(c=!!a.Ma){if("/"!=d.charAt(0))if(this.Va&&!this.Ma)d="/"+d;else{var e=b.Ma.lastIndexOf("/");-1!=e&&(d=b.Ma.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
+ 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.Ma=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 jb(this)};function kb(a,b,c){a.Ua=c?ob(b,!0):b;a.Ua&&(a.Ua=a.Ua.replace(/:$/,""))}function lb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.ac=b}else a.ac=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.Ka=null;q.Tc=null;
73
73
  q.add=function(a,b){if(!this.Ka&&(this.Ka={},this.Tc=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.Ka.hasOwnProperty(a)&&this.Ka[a])||(this.Ka[a]=c=[]);c.push(b);this.Tc++;return this};
74
- q.toString=function(){if(this.g)return this.g;if(!this.Ka)return"";var a=[],b;for(b in this.Ka)for(var c=encodeURIComponent(b),d=this.Ka[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new pb;a.g=this.g;if(this.Ka){var b={},c;for(c in this.Ka)b[c]=this.Ka[c].concat();a.Ka=b;a.Tc=this.Tc}return a};function M(a,b,c){var d=Ea.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}M.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};J("shaka.util.Error",M);M.Severity={RECOVERABLE:1,CRITICAL:2};M.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
75
- M.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
74
+ q.toString=function(){if(this.g)return this.g;if(!this.Ka)return"";var a=[],b;for(b in this.Ka)for(var c=encodeURIComponent(b),d=this.Ka[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new pb;a.g=this.g;if(this.Ka){var b={},c;for(c in this.Ka)b[c]=this.Ka[c].concat();a.Ka=b;a.Tc=this.Tc}return a};function N(a,b,c){var d=Ea.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};K("shaka.util.Error",N);N.Severity={RECOVERABLE:1,CRITICAL:2};N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
75
+ N.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
76
76
  TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,
77
77
  WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,
78
78
  DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,
79
79
  CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,
80
80
  FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,
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,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,
82
- 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 jb(d)});return a.map(function(d){return new jb(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
- function Ib(a,b){if(1==b.length)return b[0];var c=Jb(a,b);if(null!=c)return c;throw new M(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}var Lb="text",Mb={bb:"video",wb:"audio",ka:Lb,nc:"image",$g:"application"},Kb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],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}
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
+ 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 jb(d)});return a.map(function(d){return new jb(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
+ 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}var Lb="text",Mb={bb:"video",xb:"audio",ka:Lb,nc:"image",$g:"application"},Kb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],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
84
  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"}
85
85
  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}
86
86
  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",
@@ -89,54 +89,54 @@ var Rb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
89
89
  "mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
90
90
  "sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
91
91
  "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Wb(a){db.call(this);this.j=Ob(a);this.i=new Map;this.g=new Set;this.h=new Map}pa(Wb,db);q=Wb.prototype;q.release=function(){db.prototype.release.call(this)};
92
- q.Ie=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=hb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new L("unknown-locales",(new Map).set("locales",a)));a=hb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new L("locale-changed",a))};
93
- 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 L("locale-updated"));return this};q.Lg=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 L("unknown-localization",a));return""};
92
+ q.Ie=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=hb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new M("unknown-locales",(new Map).set("locales",a)));a=hb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new M("locale-changed",a))};
93
+ 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.Lg=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""};
94
94
  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={Rb:f.Rb},h=g.next()){f.Rb=h.value;e.add(f.Rb);e.add(Tb(f.Rb));h=hb(b.keys(),function(l){return function(m){var n=l.Rb,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=hb(b.keys(),function(l){return function(m){return Tb(m)==l.Rb}}(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=
95
- 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 L("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)}J("shaka.ui.Localization",Wb);
96
- Wb.prototype.resolve=Wb.prototype.resolve;Wb.prototype.resolveDictionary=Wb.prototype.Lg;Wb.prototype.insert=Wb.prototype.ba;Wb.prototype.changeLocale=Wb.prototype.Ie;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={Eh:"OFF",fh:"CAPTIONS",Rh:"SKIP_AD",ai:"UNDETERMINED_LANGUAGE",jh:"ENTER_PICTURE_IN_PICTURE",uh:"LOOP",Bh:"MUTE",Ih:"PAUSE",rh:"FULL_SCREEN",bi:"UNMUTE",Yg:"AD_TIME",Oh:"REWIND",Xg:"AD_DURATION",Kh:"PLAY",yh:"MORE_SETTINGS",Dh:"NOT_APPLICABLE",qh:"FAST_FORWARD",Ah:"MULTIPLE_LANGUAGES",gh:"CAST",nh:"EXIT_PICTURE_IN_PICTURE",Lh:"PLAYBACK_RATE",ah:"AUTO_QUALITY",Mh:"REPLAY",lh:"EXIT_FULL_SCREEN",ih:"ENTER_LOOP_MODE",ci:"UNRECOGNIZED_LANGUAGE",Ee:"LIVE",BACK:"BACK",Sh:"SKIP_TO_LIVE",Fh:"ON",Zg:"AIRPLAY",
97
- sh:"LANGUAGE",AD_PROGRESS:"AD_PROGRESS",wf:"SUBTITLE_FORCED",Qh:"SEEK",mh:"EXIT_LOOP_MODE",ei:"VOLUME",Nh:"RESOLUTION",Jh:"PICTURE_IN_PICTURE"};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={wd:d.wd},e=a.next()){d.wd=e.value;e=b.findIndex(function(f){return function(g){return c(f.wd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
95
+ 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);
96
+ Wb.prototype.resolve=Wb.prototype.resolve;Wb.prototype.resolveDictionary=Wb.prototype.Lg;Wb.prototype.insert=Wb.prototype.ba;Wb.prototype.changeLocale=Wb.prototype.Ie;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={uh:"LOOP",Dh:"NOT_APPLICABLE",ai:"UNDETERMINED_LANGUAGE",Bh:"MUTE",nh:"EXIT_PICTURE_IN_PICTURE",Yg:"AD_TIME",BACK:"BACK",sh:"LANGUAGE",Kh:"PLAY",bi:"UNMUTE",Eh:"OFF",Sh:"SKIP_TO_LIVE",Mh:"REPLAY",Qh:"SEEK",gh:"CAST",ah:"AUTO_QUALITY",ih:"ENTER_LOOP_MODE",mh:"EXIT_LOOP_MODE",ci:"UNRECOGNIZED_LANGUAGE",Lh:"PLAYBACK_RATE",ei:"VOLUME",AD_PROGRESS:"AD_PROGRESS",Ih:"PAUSE",wf:"SUBTITLE_FORCED",Rh:"SKIP_AD",Ee:"LIVE",qh:"FAST_FORWARD",Xg:"AD_DURATION",lh:"EXIT_FULL_SCREEN",Zg:"AIRPLAY",Jh:"PICTURE_IN_PICTURE",
97
+ jh:"ENTER_PICTURE_IN_PICTURE",Nh:"RESOLUTION",fh:"CAPTIONS",yh:"MORE_SETTINGS",Fh:"ON",rh:"FULL_SCREEN",Oh:"REWIND",Ah:"MULTIPLE_LANGUAGES"};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={wd:d.wd},e=a.next()){d.wd=e.value;e=b.findIndex(function(f){return function(g){return c(f.wd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
98
98
  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=
99
99
  [];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};
100
- 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}J("shaka.text.Cue",hc);var kc="auto";
100
+ 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";
101
101
  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;
102
102
  hc.lineInterpretation={LINE_NUMBER:nc,PERCENTAGE:1};var oc="start",vc={CENTER:"center",START:oc,END:"end"};hc.lineAlign=vc;var wc={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};hc.defaultTextColor=wc;var xc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};hc.defaultTextBackgroundColor=xc;var qc=400;hc.fontWeight={NORMAL:qc,BOLD:700};
103
- var rc="normal",yc={NORMAL:rc,ITALIC:"italic",OBLIQUE:"oblique"};hc.fontStyle=yc;hc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function jc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=zc;this.scroll=Ac}J("shaka.text.CueRegion",jc);var zc=1;jc.units={PX:0,PERCENTAGE:zc,LINES:2};var Ac="";jc.scrollMode={NONE:Ac,UP:"up"};function Bc(){}function Cc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Dc(a)==Dc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Ec(a),d=Ec(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Dc(a){return a instanceof ArrayBuffer?a:a.buffer}function Fc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
104
- function Ec(a,b,c){c=void 0===c?Infinity:c;return Gc(a,void 0===b?0:b,c,Uint8Array)}function Hc(a,b,c){c=void 0===c?Infinity:c;return Gc(a,void 0===b?0:b,c,DataView)}function Gc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Dc(a),b,Math.min(b+Math.max(c,0),e)-b)}J("shaka.util.BufferUtils",Bc);Bc.toDataView=Hc;Bc.toUint8=Ec;Bc.toArrayBuffer=Fc;Bc.equal=Cc;function Ic(){}J("shaka.dependencies",Ic);Ic.has=function(a){return Jc.has(a)};Ic.add=function(a,b){if(!Kc[a])throw Error(a+" is not supported");Jc.set(a,function(){return b})};var Kc={muxjs:"muxjs"};Ic.Allowed=Kc;var Jc=new Map([["muxjs",function(){return window.muxjs}]]);function Lc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Lc.prototype.resolve=function(){};Lc.prototype.reject=function(){};function Mc(a){this.h=a;this.g=void 0}Mc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Nc(a){this.h=a;this.g=null}Nc.prototype.P=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Nc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.za=function(){this.stop();this.h();return this};P.prototype.P=function(a){var b=this;this.stop();this.g=(new Nc(function(){b.h()})).P(a);return this};P.prototype.ia=function(a){var b=this;this.stop();this.g=(new Nc(function(){b.g.P(a);b.h()})).P(a);return this};P.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};J("shaka.util.Timer",P);P.prototype.stop=P.prototype.stop;P.prototype.tickEvery=P.prototype.ia;P.prototype.tickAfter=P.prototype.P;
103
+ var rc="normal",yc={NORMAL:rc,ITALIC:"italic",OBLIQUE:"oblique"};hc.fontStyle=yc;hc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function jc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=zc;this.scroll=Ac}K("shaka.text.CueRegion",jc);var zc=1;jc.units={PX:0,PERCENTAGE:zc,LINES:2};var Ac="";jc.scrollMode={NONE:Ac,UP:"up"};function Bc(){}function Cc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Dc(a)==Dc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Ec(a),d=Ec(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Dc(a){return a instanceof ArrayBuffer?a:a.buffer}function Fc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
104
+ function Ec(a,b,c){c=void 0===c?Infinity:c;return Gc(a,void 0===b?0:b,c,Uint8Array)}function Hc(a,b,c){c=void 0===c?Infinity:c;return Gc(a,void 0===b?0:b,c,DataView)}function Gc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Dc(a),b,Math.min(b+Math.max(c,0),e)-b)}K("shaka.util.BufferUtils",Bc);Bc.toDataView=Hc;Bc.toUint8=Ec;Bc.toArrayBuffer=Fc;Bc.equal=Cc;function Ic(){}K("shaka.dependencies",Ic);Ic.has=function(a){return Jc.has(a)};Ic.add=function(a,b){if(!Kc[a])throw Error(a+" is not supported");Jc.set(a,function(){return b})};var Kc={muxjs:"muxjs"};Ic.Allowed=Kc;var Jc=new Map([["muxjs",function(){return window.muxjs}]]);function Lc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Lc.prototype.resolve=function(){};Lc.prototype.reject=function(){};function Mc(a){this.h=a;this.g=void 0}Mc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Nc(a){this.h=a;this.g=null}Nc.prototype.P=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Nc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.za=function(){this.stop();this.h();return this};P.prototype.P=function(a){var b=this;this.stop();this.g=(new Nc(function(){b.h()})).P(a);return this};P.prototype.ia=function(a){var b=this;this.stop();this.g=(new Nc(function(){b.g.P(a);b.h()})).P(a);return this};P.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};K("shaka.util.Timer",P);P.prototype.stop=P.prototype.stop;P.prototype.tickEvery=P.prototype.ia;P.prototype.tickAfter=P.prototype.P;
105
105
  P.prototype.tickNow=P.prototype.za;function Oc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Pc(a){return""!=Rc().canPlayType(a)}function Sc(){return Tc("Xbox One")}function Uc(){return Tc("Tizen")}function Vc(){return Tc("Web0S")}function Wc(){return Tc("CrKey")}function Xc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Uc()&&!Tc("PC=EOS")&&!Yc()}function Yc(){return Tc("PlayStation 4")}
106
106
  function Zc(){if(!Xc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Tc(a){return(navigator.userAgent||"").includes(a)}function Rc(){if($c)return $c;ad||(ad=new P(function(){$c=null}));($c=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||($c=document.createElement("video"));ad.P(1);return $c}var ad=null,$c=null;function bd(){}
107
107
  function cd(a){if(!a)return"";a=Ec(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Yc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Oa('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
108
108
  (a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
109
- function dd(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new M(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Hc(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return ed.value()(d)}
110
- function fd(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Ec(a);if(239==c[0]&&187==c[1]&&191==c[2])return cd(c);if(254==c[0]&&255==c[1])return dd(c.subarray(2),!1);if(255==c[0]&&254==c[1])return dd(c.subarray(2),!0);if(0==c[0]&&0==c[2])return dd(a,!1);if(0==c[1]&&0==c[3])return dd(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return cd(a);throw new M(2,2,2003);}
111
- function gd(a){if(window.TextEncoder&&!Yc()){var b=new TextEncoder;return Fc(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Fc(b)}function hd(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}J("shaka.util.StringUtils",bd);bd.resetFromCharCode=function(){ed.g=void 0};bd.toUTF16=hd;bd.toUTF8=gd;bd.fromBytesAutoDetect=fd;bd.fromUTF16=dd;
109
+ function dd(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Hc(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return ed.value()(d)}
110
+ function fd(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Ec(a);if(239==c[0]&&187==c[1]&&191==c[2])return cd(c);if(254==c[0]&&255==c[1])return dd(c.subarray(2),!1);if(255==c[0]&&254==c[1])return dd(c.subarray(2),!0);if(0==c[0]&&0==c[2])return dd(a,!1);if(0==c[1]&&0==c[3])return dd(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return cd(a);throw new N(2,2,2003);}
111
+ function gd(a){if(window.TextEncoder&&!Yc()){var b=new TextEncoder;return Fc(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Fc(b)}function hd(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}K("shaka.util.StringUtils",bd);bd.resetFromCharCode=function(){ed.g=void 0};bd.toUTF16=hd;bd.toUTF8=gd;bd.fromBytesAutoDetect=fd;bd.fromUTF16=dd;
112
112
  bd.fromUTF8=cd;var ed=new Mc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={qb:65536};0<b.qb;b={qb:b.qb},b.qb/=2)if(a(b.qb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.qb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.qb));return e}}(b);return null});function id(){}function jd(a){a=Ec(a);a=ed.value()(a);return btoa(a)}function kd(a,b){b=void 0==b?!0:b;var c=jd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function ld(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function md(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
113
- function nd(a){var b=Ec(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function od(){for(var a=Ea.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Ec(d),c),c+=d.byteLength;return b}J("shaka.util.Uint8ArrayUtils",id);id.concat=od;id.toHex=nd;id.fromHex=md;id.fromBase64=ld;id.toBase64=kd;id.toStandardBase64=jd;
113
+ function nd(a){var b=Ec(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function od(){for(var a=Ea.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Ec(d),c),c+=d.byteLength;return b}K("shaka.util.Uint8ArrayUtils",id);id.concat=od;id.toHex=nd;id.fromHex=md;id.fromBase64=ld;id.toBase64=kd;id.toStandardBase64=jd;
114
114
  id.equal=function(a,b){yb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Cc(a,b)};function pd(){var a=this;this.v=Jc.get("muxjs")();this.g=new this.v.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(od(b.initSegment,b.data))});this.g.on("done",function(){var b={data:od.apply(id,ha(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}pd.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
115
115
  function qd(a,b){if(!Jc.get("muxjs")()||!rd(a))return!1;if(b)return MediaSource.isTypeSupported(sd(b,a));var c=sd("audio",a),d=sd("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function rd(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
116
- function sd(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function td(a,b){a.l=!0;a.h=new Lc;a.m=[];a.j=[];a.i=[];var c=Ec(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new M(2,3,3018));return a.h};function ud(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function vd(a,b,c){a=ud(a,b);if(rd(a)){if(Jc.get("muxjs")())return sd(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
116
+ function sd(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function td(a,b){a.l=!0;a.h=new Lc;a.m=[];a.j=[];a.i=[];var c=Ec(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function ud(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function vd(a,b,c){a=ud(a,b);if(rd(a)){if(Jc.get("muxjs")())return sd(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
117
117
  function wd(a){var b=xd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
118
118
  case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function yd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function xd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
119
- (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function zd(a){this.l=null;this.i=a;this.j=this.B=0;this.m=Infinity;this.h=this.g=null;this.A="";this.v=new Map}function Bd(a){return Cd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}zd.prototype.destroy=function(){this.i=this.l=null;this.v.clear();return Promise.resolve()};
120
- function Dd(a,b,c,d){var e,f,g;return H(function(h){if(1==h.g)return u(h,Promise.resolve(),2);if(!a.l||!a.i)return h["return"]();if(null==c||null==d)return a.l.parseInit(Ec(b)),h["return"]();e={periodStart:a.B,segmentStart:c,segmentEnd:d};f=a.l.parseMedia(Ec(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.m});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.m);z(h)})}
121
- zd.prototype.remove=function(a,b){var c=this;return H(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));z(d)})};function Ed(a,b,c){a.j=b;a.m=c}function Fd(a,b,c){a.A=b;if(b=a.v.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
119
+ (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function zd(a){this.l=null;this.i=a;this.j=this.B=0;this.m=Infinity;this.h=this.g=null;this.A="";this.v=new Map}function Ad(a){return Cd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}zd.prototype.destroy=function(){this.i=this.l=null;this.v.clear();return Promise.resolve()};
120
+ function Dd(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g)return u(h,Promise.resolve(),2);if(!a.l||!a.i)return h["return"]();if(null==c||null==d)return a.l.parseInit(Ec(b)),h["return"]();e={periodStart:a.B,segmentStart:c,segmentEnd:d};f=a.l.parseMedia(Ec(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.m});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.m);z(h)})}
121
+ zd.prototype.remove=function(a,b){var c=this;return I(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));z(d)})};function Ed(a,b,c){a.j=b;a.m=c}function Fd(a,b,c){a.A=b;if(b=a.v.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
122
122
  function Gd(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new hc(c.startTime,c.endTime,c.text)});return b}function Hd(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Hd(a,d.value,c)}
123
123
  function Id(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Hd(a,k,e);k.startTime>=a.j&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.A&&a.i.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.v.has(f)||a.v.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.v.get(f).set(h,k);a.g=null==a.g?Math.max(c,
124
- a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.m))}J("shaka.text.TextEngine",zd);zd.prototype.destroy=zd.prototype.destroy;zd.findParser=function(a){return Cd[a]};zd.unregisterParser=function(a){delete Cd[a]};zd.registerParser=function(a,b){Cd[a]=b};var Cd={};function Jd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Kd(f,b,c);f=Ld(f,d);b=Md(f);b=Nd(b);var g=Od(b,e);a.variants=a.variants.filter(function(h){return Pd(h)==g?!0:!1})}function Md(a){var b=new bb;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Pd(c);b.push(d,c)}return b}
124
+ a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.m))}K("shaka.text.TextEngine",zd);zd.prototype.destroy=zd.prototype.destroy;zd.findParser=function(a){return Cd[a]};zd.unregisterParser=function(a){delete Cd[a]};zd.registerParser=function(a,b){Cd[a]=b};var Cd={};function Jd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Kd(f,b,c);f=Ld(f,d);b=Md(f);b=Nd(b);var g=Od(b,e);a.variants=a.variants.filter(function(h){return Pd(h)==g?!0:!1})}function Md(a){var b=new bb;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Pd(c);b.push(d,c)}return b}
125
125
  function Nd(a){var b=0,c=new Map,d=a.size();cb(a,function(e,f){for(var g=t(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new bb);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
126
126
  function Kd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={Id:d.Id},e=b.next())if(d.Id=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Id)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={td:d.td},b=c.next())if(d.td=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.td)}}(d)),b.length){a=b;break}return a}
127
127
  function Od(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Qd||d==Rd){if(a=Sd(a,d),1==a.size())return a.keys()[0]}else if(d==Td)break;return Ud(a)}function Sd(a,b){var c=0,d=new bb;cb(a,function(e,f){for(var g=0,h=0,k=t(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
128
128
  function Ud(a){var b="",c=Infinity;cb(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 Pd(a){var b="";a.video&&(b=wd(a.video.codecs));var c="";a.audio&&(c=wd(a.audio.codecs));return b+"-"+c}function Vd(a,b,c){a.variants=a.variants.filter(function(d){return Wd(d,b,c)})}
129
129
  function Wd(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}
130
- function Xd(a,b){return H(function(c){if(1==c.g)return u(c,Yd(b,0<b.offlineSessionIds.length),2);Zd(a,b);$d(b);ae(b);z(c)})}
131
- function Yd(a,b){return H(function(c){if(1==c.g)return u(c,be(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=ce(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Ib("video",g);g=Ib("audio",g);g=vd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=vd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=de(f.codecs),f=vd(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(Sc()&&e&&(e.width&&
132
- 1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Wa(ee(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Wa(ee(d));return e});z(c)})}
133
- function be(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return H(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 H(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=fe(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),
130
+ function Xd(a,b){return I(function(c){if(1==c.g)return u(c,Yd(b,0<b.offlineSessionIds.length),2);Zd(a,b);$d(b);ae(b);z(c)})}
131
+ function Yd(a,b){return I(function(c){if(1==c.g)return u(c,be(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=ce(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Ib("video",g);g=Ib("audio",g);g=vd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=vd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=de(f.codecs),f=vd(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(Sc()&&e&&(e.width&&
132
+ 1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Wa(ee(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Wa(ee(d));return e});z(c)})}
133
+ function be(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(D){if(1==D.g)return A(D,2),u(D,e.decodingInfo(x),4);if(2!=D.g)return w=D.h,y.decodingInfos.push(w),ua(D,0);F(D);JSON.stringify(x);z(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=fe(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),
134
134
  0)})}
135
135
  function fe(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=ce(f);g=Ib("audio",g);g=vd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=ce(f);f=vd(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";
136
136
  break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=de(d.codecs),f=vd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
137
137
  f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,r=t(h.initData),v=r.next();!v.done;v=r.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
138
138
  (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function de(a){return Uc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
139
- function ce(a){return"vp9"==a?"vp09.00.41.08":a}function Zd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ge(d,a.audio)||c&&a&&a.video&&!ge(c,a.video)?!1:!0})}function $d(a){a.textStreams=a.textStreams.filter(function(b){return Bd(ud(b.mimeType,b.codecs))})}function ae(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Vc()||Uc()||Wc())&&c.push("image/webp");return c.includes(b.mimeType)})}
139
+ function ce(a){return"vp9"==a?"vp09.00.41.08":a}function Zd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ge(d,a.audio)||c&&a&&a.video&&!ge(c,a.video)?!1:!0})}function $d(a){a.textStreams=a.textStreams.filter(function(b){return Ad(ud(b.mimeType,b.codecs))})}function ae(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Vc()||Uc()||Wc())&&c.push("image/webp");return c.includes(b.mimeType)})}
140
140
  function ge(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
141
141
  function he(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=t(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=t(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
142
142
  frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
@@ -154,746 +154,747 @@ se(e,a[0]):e}function se(a,b){return a.filter(function(c){return c.roles.include
154
154
  function te(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}var le=0,Qd="smooth",Rd="powerEfficient",Td="bandwidth";function ue(){var a=this;this.l=null;this.i=!1;this.h=new cc;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.i){a.h=new cc;var b=a.chooseVariant();b&&a.l(b)}});this.j=[];this.v=1;this.A=!1;this.g=this.m=null}q=ue.prototype;q.stop=function(){this.l=null;this.i=!1;this.j=[];this.v=1;this.m=null};q.init=function(a){this.l=a};
155
155
  q.chooseVariant=function(){var a=ve(this.g.restrictions,this.j),b=this.h.getBandwidthEstimate(we(this));this.j.length&&!a.length&&(a=ve(null,this.j),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.v)?1:Math.abs(this.v),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
156
156
  q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.i)a:{if(!this.A){if(!(128E3<=this.h.g))break a;this.A=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;var c=this.chooseVariant();this.h.getBandwidthEstimate(we(this));c&&this.l(c)}};q.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(we(this))};q.setVariants=function(a){this.j=a};q.playbackRateChanged=function(a){this.v=a};
157
- q.configure=function(a){this.g=a};function we(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function ve(a,b){a&&(b=b.filter(function(c){return Wd(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}J("shaka.abr.SimpleAbrManager",ue);ue.prototype.configure=ue.prototype.configure;ue.prototype.playbackRateChanged=ue.prototype.playbackRateChanged;
157
+ q.configure=function(a){this.g=a};function we(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function ve(a,b){a&&(b=b.filter(function(c){return Wd(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}K("shaka.abr.SimpleAbrManager",ue);ue.prototype.configure=ue.prototype.configure;ue.prototype.playbackRateChanged=ue.prototype.playbackRateChanged;
158
158
  ue.prototype.setVariants=ue.prototype.setVariants;ue.prototype.getBandwidthEstimate=ue.prototype.getBandwidthEstimate;ue.prototype.segmentDownloaded=ue.prototype.segmentDownloaded;ue.prototype.disable=ue.prototype.disable;ue.prototype.enable=ue.prototype.enable;ue.prototype.chooseVariant=ue.prototype.chooseVariant;ue.prototype.init=ue.prototype.init;ue.prototype.stop=ue.prototype.stop;function xe(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=t(b),d=c.next();!d.done;d=c.next())this.add(d.value)}xe.prototype.add=function(a){return ye(this.h,a)?(this.g.add(a),!0):!1};
159
159
  function ye(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&ze(c,d)&&Ae(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(ze(c,d)&&Ae(c.roles,d.roles)));return c?!1:!0}xe.prototype.values=function(){return this.g.values()};
160
- function ze(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return xd(f)[0]}),d=b.codecs.split(",").map(function(f){return xd(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function Ae(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function Be(a){this.g=a;this.h=new De(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Be.prototype.create=function(a){var b=this,c=a.filter(function(d){return ye(b.g,d)});return c.length?new xe(c[0],c):this.h.create(a)};function De(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
161
- De.prototype.create=function(a){var b=[];b=Ee(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Fe(b,this.j);a.length&&(b=a);this.g&&(a=Ld(b,this.g),a.length&&(b=a));this.h&&(a=Ge(b,this.h),a.length&&(b=a));a=new xe(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,ye(a.h,c)&&a.add(c);return a};function Ee(a,b){var c=Ob(b),d=Vb(c,a.map(function(e){return Ub(e)}));return d?a.filter(function(e){return d==Ub(e)}):[]}
160
+ function ze(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return xd(f)[0]}),d=b.codecs.split(",").map(function(f){return xd(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function Ae(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function Be(a){this.g=a;this.h=new Ce(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Be.prototype.create=function(a){var b=this,c=a.filter(function(d){return ye(b.g,d)});return c.length?new xe(c[0],c):this.h.create(a)};function Ce(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
161
+ Ce.prototype.create=function(a){var b=[];b=Ee(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Fe(b,this.j);a.length&&(b=a);this.g&&(a=Ld(b,this.g),a.length&&(b=a));this.h&&(a=Ge(b,this.h),a.length&&(b=a));a=new xe(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,ye(a.h,c)&&a.add(c);return a};function Ee(a,b){var c=Ob(b),d=Vb(c,a.map(function(e){return Ub(e)}));return d?a.filter(function(e){return d==Ub(e)}):[]}
162
162
  function Fe(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ge(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function He(){this.g=Ie;this.h=(new Map).set(Ie,2).set(Je,1)}function Ke(a,b,c){a.h.set(Ie,c).set(Je,b)}var Je=0,Ie=1;function Le(a,b){var c=Me();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}
163
- function Ne(a){var b,c;return H(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new M(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 Me(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Oe(a,b){this.promise=a;this.i=b;this.g=!1}function Pe(a){return new Oe(Promise.reject(a),function(){return Promise.resolve()})}function Qe(){var a=Promise.reject(new M(2,7,7001));a["catch"](function(){});return new Oe(a,function(){return Promise.resolve()})}function Re(a){return new Oe(Promise.resolve(a),function(){return Promise.resolve()})}function Se(a){return new Oe(a,function(){return a["catch"](function(){})})}Oe.prototype.abort=function(){this.g=!0;return this.i()};
163
+ function Ne(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 Me(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Oe(a,b){this.promise=a;this.i=b;this.g=!1}function Pe(a){return new Oe(Promise.reject(a),function(){return Promise.resolve()})}function Qe(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new Oe(a,function(){return Promise.resolve()})}function Re(a){return new Oe(Promise.resolve(a),function(){return Promise.resolve()})}function Se(a){return new Oe(a,function(){return a["catch"](function(){})})}Oe.prototype.abort=function(){this.g=!0;return this.i()};
164
164
  function Te(a){return new Oe(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Oe.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
165
- Oe.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=Ue(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 M(2,7,7001);this.promise.then(c(!0),c(!1));return new Oe(f,function(){return d()})};
166
- function Ue(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()}}}J("shaka.util.AbortableOperation",Oe);Oe.prototype.chain=Oe.prototype.ma;Oe.prototype["finally"]=Oe.prototype["finally"];Oe.all=Te;Oe.prototype.abort=Oe.prototype.abort;Oe.notAbortable=Se;Oe.completed=Re;Oe.aborted=Qe;Oe.failed=Pe;function Ve(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 We(a){var b={},c;for(c in a)b[c]=a[c];return b};function Xe(){this.g=[]}function Ye(a,b){a.g.push(b["finally"](function(){ec(a.g,b)}))}Xe.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 Ze(a){db.call(this);this.i=!1;this.l=new Xe;this.g=new Set;this.h=new Set;this.j=a||null;this.m=!1}pa(Ze,db);q=Ze.prototype;q.oe=function(a){this.m=a};function $e(a,b,c,d){c=c||af;var e=bf[a];if(!e||c>=e.priority)bf[a]={priority:c,Cg:b,Dg:void 0===d?!1:d}}q.Eg=function(a){this.g.add(a)};q.Tg=function(a){this.g["delete"](a)};q.Ef=function(){this.g.clear()};q.Fg=function(a){this.h.add(a)};q.Ug=function(a){this.h["delete"](a)};q.Ff=function(){this.h.clear()};
165
+ Oe.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=Ue(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 Oe(f,function(){return d()})};
166
+ function Ue(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",Oe);Oe.prototype.chain=Oe.prototype.ma;Oe.prototype["finally"]=Oe.prototype["finally"];Oe.all=Te;Oe.prototype.abort=Oe.prototype.abort;Oe.notAbortable=Se;Oe.completed=Re;Oe.aborted=Qe;Oe.failed=Pe;function Ve(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 We(a){var b={},c;for(c in a)b[c]=a[c];return b};function Xe(){this.g=[]}function Ye(a,b){a.g.push(b["finally"](function(){ec(a.g,b)}))}Xe.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 Ze(a){db.call(this);this.i=!1;this.l=new Xe;this.g=new Set;this.h=new Set;this.j=a||null;this.m=!1}pa(Ze,db);q=Ze.prototype;q.oe=function(a){this.m=a};function $e(a,b,c,d){c=c||af;var e=bf[a];if(!e||c>=e.priority)bf[a]={priority:c,Cg:b,Dg:void 0===d?!1:d}}q.Eg=function(a){this.g.add(a)};q.Tg=function(a){this.g["delete"](a)};q.Ef=function(){this.g.clear()};q.Fg=function(a){this.h.add(a)};q.Ug=function(a){this.h["delete"](a)};q.Ff=function(){this.h.clear()};
167
167
  function cf(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();db.prototype.release.call(this);return this.l.destroy()};
168
- q.request=function(a,b){var c=this,d=new df;if(this.i){var e=Promise.reject(new M(2,7,7001));e["catch"](function(){});return new ef(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ve(b.retryParameters):Me();b.uris=Ve(b.uris);e=ff(this,a,b);var f=e.ma(function(){return gf(c,a,b,new Le(b.retryParameters,!1),0,null,d)}),g=f.ma(function(n){return hf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
168
+ q.request=function(a,b){var c=this,d=new df;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new ef(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ve(b.retryParameters):Me();b.uris=Ve(b.uris);e=ff(this,a,b);var f=e.ma(function(){return gf(c,a,b,new Le(b.retryParameters,!1),0,null,d)}),g=f.ma(function(n){return hf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
169
169
  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.qg||!c.j||r.fromCache||a!=jf||c.j(r.timeMs,r.data.byteLength);return r},function(n){n&&(n.severity=2);throw n;});e=new ef(m.promise,function(){return m.abort()},d);Ye(this.l,e);return e};
170
- function ff(a,b,c){var d=Re(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={Dd:e.Dd},f=a.next())e.Dd=f.value,d=d.ma(function(g){return function(){c.body&&(c.body=Fc(c.body));return g.Dd(b,c)}}(e));return d.ma(void 0,function(g){if(g instanceof M&&7001==g.code)throw g;throw new M(2,1,1006,g);})}
171
- function gf(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Ta,l=!1;k||(k=location.protocol,k=k.slice(0,-1),kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=bf[k])?k.Cg:null;if(!m)return Pe(new M(2,1,1E3,h));var n=k.Dg,p=null,r=null,v=!1,y;return Se(Ne(d)).ma(function(){if(a.i)return Qe();y=Date.now();var x=m(c.uris[e],c,b,function(D,B,E){p&&p.stop();r&&r.P(C/1E3);a.j&&b==jf&&(a.j(D,B),l=!0,g.g=E)});if(!n)return x;var w=c.retryParameters.connectionTimeout;
172
- 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,qg:l}},function(x){p&&p.stop();r&&r.stop();if(a.i)return Qe();v&&(x=new M(1,1,1003,c.uris[e],b));if(x instanceof M){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 L("retry",w);a.dispatchEvent(w);e=(e+1)%c.uris.length;
173
- return gf(a,b,c,d,e,x,g)}}throw x;})}function hf(a,b,c){var d=Re(void 0),e={};a=t(a.h);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(){var h=c.response;h.data&&(h.data=Fc(h.data));return g.Ed(b,h)}}(e));return d.ma(function(){return c},function(g){var h=2;if(g instanceof M){if(7001==g.code)throw g;h=g.severity}throw new M(h,1,1007,g);})}J("shaka.net.NetworkingEngine",Ze);Ze.prototype.request=Ze.prototype.request;Ze.prototype.destroy=Ze.prototype.destroy;
170
+ function ff(a,b,c){var d=Re(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={Dd:e.Dd},f=a.next())e.Dd=f.value,d=d.ma(function(g){return function(){c.body&&(c.body=Fc(c.body));return g.Dd(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);})}
171
+ function gf(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Ua,l=!1;k||(k=location.protocol,k=k.slice(0,-1),kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=bf[k])?k.Cg:null;if(!m)return Pe(new N(2,1,1E3,h));var n=k.Dg,p=null,r=null,v=!1,y;return Se(Ne(d)).ma(function(){if(a.i)return Qe();y=Date.now();var x=m(c.uris[e],c,b,function(B,C,E){p&&p.stop();r&&r.P(D/1E3);a.j&&b==jf&&(a.j(B,C),l=!0,g.g=E)});if(!n)return x;var w=c.retryParameters.connectionTimeout;
172
+ w&&(p=new P(function(){v=!0;x.abort()}),p.P(w/1E3));var D=c.retryParameters.stallTimeout;D&&(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,qg:l}},function(x){p&&p.stop();r&&r.stop();if(a.i)return Qe();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;
173
+ return gf(a,b,c,d,e,x,g)}}throw x;})}function hf(a,b,c){var d=Re(void 0),e={};a=t(a.h);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(){var h=c.response;h.data&&(h.data=Fc(h.data));return g.Ed(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",Ze);Ze.prototype.request=Ze.prototype.request;Ze.prototype.destroy=Ze.prototype.destroy;
174
174
  Ze.makeRequest=cf;Ze.defaultRetryParameters=function(){return Me()};Ze.prototype.clearAllResponseFilters=Ze.prototype.Ff;Ze.prototype.unregisterResponseFilter=Ze.prototype.Ug;Ze.prototype.registerResponseFilter=Ze.prototype.Fg;Ze.prototype.clearAllRequestFilters=Ze.prototype.Ef;Ze.prototype.unregisterRequestFilter=Ze.prototype.Tg;Ze.prototype.registerRequestFilter=Ze.prototype.Eg;Ze.unregisterScheme=function(a){delete bf[a]};Ze.registerScheme=$e;Ze.prototype.setForceHTTPS=Ze.prototype.oe;
175
- function df(){this.g=0}Ze.NumBytesRemainingClass=df;function ef(a,b,c){Oe.call(this,a,b);this.h=c}pa(ef,Oe);Ze.PendingRequest=ef;var jf=1;Ze.RequestType={MANIFEST:0,SEGMENT:jf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var af=3;Ze.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:af};var bf={};function kf(a){this.g=!1;this.h=new Lc;this.i=a}kf.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 lf(a,b){if(a.g){if(b instanceof M&&7003==b.code)throw b;throw new M(2,7,7003,b);}};function mf(){this.g=new bb}q=mf.prototype;q.release=function(){this.ob();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new nf(a,b,c,d),this.g.push(b,a))};q.Ga=function(a,b,c,d){function e(g){f.ec(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.ec=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.ec(),this.g.remove(b,e))}};
176
- 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.ec();this.g.g={}}};J("shaka.util.EventManager",mf);mf.prototype.removeAll=mf.prototype.ob;mf.prototype.unlisten=mf.prototype.ec;mf.prototype.listenOnce=mf.prototype.Ga;mf.prototype.listen=mf.prototype.o;mf.prototype.release=mf.prototype.release;function nf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=of(a,d);this.target.addEventListener(b,c,this.g)}
175
+ function df(){this.g=0}Ze.NumBytesRemainingClass=df;function ef(a,b,c){Oe.call(this,a,b);this.h=c}pa(ef,Oe);Ze.PendingRequest=ef;var jf=1;Ze.RequestType={MANIFEST:0,SEGMENT:jf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var af=3;Ze.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:af};var bf={};function kf(a){this.g=!1;this.h=new Lc;this.i=a}kf.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 lf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function mf(){this.g=new bb}q=mf.prototype;q.release=function(){this.ob();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new nf(a,b,c,d),this.g.push(b,a))};q.Ga=function(a,b,c,d){function e(g){f.ec(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.ec=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.ec(),this.g.remove(b,e))}};
176
+ 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.ec();this.g.g={}}};K("shaka.util.EventManager",mf);mf.prototype.removeAll=mf.prototype.ob;mf.prototype.unlisten=mf.prototype.ec;mf.prototype.listenOnce=mf.prototype.Ga;mf.prototype.listen=mf.prototype.o;mf.prototype.release=mf.prototype.release;function nf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=of(a,d);this.target.addEventListener(b,c,this.g)}
177
177
  nf.prototype.ec=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function of(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 pf(a)?b:b.capture||!1}
178
- function pf(a){var b=qf;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}qf=b}return b||!1}var qf=void 0;function rf(){}function sf(a){a=fd(a);return(new jb(a)).Ua}function tf(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 M(2,6,6015);var e;"string"==typeof b?e=hd(b,!0):e=b;a=fd(a);a=hd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}J("shaka.util.FairPlayUtils",rf);rf.initDataTransform=tf;rf.defaultGetContentId=sf;function uf(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 vf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function wf(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 xf(a,b){var c=this;b=void 0===b?1:b;this.F=a;this.G=new Set;this.l=this.A=null;this.$=this.Y=!1;this.H=0;this.g=null;this.v=new mf;this.i=new Map;this.D=[];this.B=new Lc;this.h=null;this.m=function(d){c.B.reject(d);a.onError(d)};this.aa=new Map;this.ua=new Map;this.R=new P(function(){return yf(c)});this.J=!1;this.I=[];this.M=!1;this.Z=(new P(function(){zf(c)})).ia(b);this.B["catch"](function(){});this.j=new kf(function(){return Af(c)});this.W=!1}q=xf.prototype;q.destroy=function(){return this.j.destroy()};
179
- function Af(a){return H(function(b){switch(b.g){case 1:return a.v.release(),a.v=null,a.B.reject(),a.Z.stop(),a.Z=null,a.R.stop(),a.R=null,u(b,Bf(a),2);case 2:if(!a.l){b.C(3);break}A(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.A=null,a.D=[],a.h=null,a.m=function(){},a.F=null,a.W=!1,z(b)}})}q.configure=function(a){this.h=a};function Cf(a,b,c){a.$=!0;a.D=[];a.J=c;return Df(a,b)}
180
- function Ef(a,b,c){a.D=c;a.J=0<c.length;return Df(a,b)}function Ff(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Gf(a,g,[])}
181
- function Df(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return H(function(x){if(1==x.g){if(c=Hf(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=uf(a.h.servers),If(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Jf(l),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,Kf(r,uf(a.h.servers),uf(a.h.advanced||{}));return u(x,
182
- be(b,a.J,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Y=!0,x["return"](Promise.resolve());y=Gf(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}
183
- q.pc=function(a){var b=this,c,d;return H(function(e){if(1==e.g){if(!b.A)return b.v.Ga(a,"encrypted",function(){b.m(new M(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())Lf(b,g.value);b.M=!0;b.I=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.v.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Bf(b)});c=b.l.setMediaKeys(b.A);c=c["catch"](function(f){return Promise.reject(new M(2,6,6003,f.message))});return u(e,
184
- c,2)}lf(b.j);Mf(b);b.g.initData.length||b.D.length||(d=function(f){return Nf(b,f.initDataType,Ec(f.initData))},b.v.o(b.l,"encrypted",d));z(e)})};
185
- function Of(a){var b,c,d,e,f;return H(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=cf([a.g.serverCertificateUri],a.h.retryParameters);A(g,3);c=a.F.Jb.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 M(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"]();
186
- 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 M(2,6,6004,f.message);}})}function Pf(a,b){var c,d,e;return H(function(f){if(1==f.g)return u(f,Qf(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)})}
187
- function Mf(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Nf(a,d.initDataType,d.initData);c=t(a.D);for(d=c.next();!d.done;d=c.next())Qf(a,d.value);b.length||a.D.length||a.B.resolve();return a.B}function Nf(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)&&!Tc("Tizen 2"))return;Rf(a,b,c,a.g.sessionType)}function Sf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
188
- function Tf(a){a=a.i.keys();a=eb(a,function(b){return b.sessionId});return Array.from(a)}q.tc=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.Yc=function(){return vf(this.ua)};
189
- function Gf(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y;return H(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Uf(a,c,d);x.C(2);break}return u(x,Vf(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new M(2,6,6001);lf(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=
190
- f.keySystem;var C=d.get(f.keySystem);var D=[],B=[],E=[],G=[],I=new Set;Wf(C,D,E,B,G,I);var N=a.J?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:D[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||N,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:G,keyIds:I};C=t(C);for(D=C.next();!D.done;D=
191
- C.next())D=D.value,D.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(w.persistentStateRequired=D.persistentStateRequired);C=w}else C=f.keySystem,w=b.get(f.keySystem),D=[],B=[],E=[],G=[],I=new Set,Wf(w.drmInfos,D,E,B,G,I),C={keySystem:C,licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
192
- w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:G,keyIds:I};a.g=C;if(!a.g.licenseServerUri)throw new M(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,lf(a.j),a.A=v,a.Y=!0,u(x,Of(a),7);case 7:lf(a.j);ua(x,0);break;case 4:y=F(x);lf(a.j,y);a.g=null;a.G.clear();if(y instanceof M)throw y;throw new M(2,6,6002,y.message);}})}
193
- function Uf(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Jf(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new M(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Bd:d.Bd},e=a.next())for(d.Bd=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
178
+ function pf(a){var b=qf;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}qf=b}return b||!1}var qf=void 0;function rf(){}function sf(a){a=fd(a);return(new jb(a)).Va}function tf(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=hd(b,!0):e=b;a=fd(a);a=hd(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",rf);rf.initDataTransform=tf;rf.defaultGetContentId=sf;function uf(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 vf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function wf(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 xf(a,b){var c=yf(a,b);return 1!=c.length?null:c[0]}function zf(a,b,c){a=Af(a,b,c);return 1!=a.length?null:a[0]}function yf(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 Bf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
179
+ function Af(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 Cf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Df(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 Ef(a){return Array.from(a.childNodes).every(Ff)?a.textContent.trim():null}
180
+ function Ff(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Gf(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 Hf(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)}
181
+ function If(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}
182
+ function Jf(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Kf(a){a=Number(a);return 0===a%1?a:null}function Lf(a){a=Number(a);return 0===a%1&&0<a?a:null}function Mf(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Nf(a){a=Number(a);return isNaN(a)?null:a}function Of(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
183
+ function Pf(a,b){var c=new DOMParser,d=Qf.value()(a),e=null;try{e=c.parseFromString(d,"text/xml")}catch(f){return null}c=e.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(e=document.createNodeIterator(e,NodeFilter.SHOW_ALL);d=e.nextNode();)if(d instanceof HTMLElement||d instanceof SVGElement)return null;return c}function Rf(a,b){try{var c=cd(a);return Pf(c,b)}catch(d){return null}}
184
+ var Qf=new Mc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Sf(a,b){var c=this;b=void 0===b?1:b;this.F=a;this.G=new Set;this.l=this.A=null;this.$=this.Y=!1;this.H=0;this.g=null;this.v=new mf;this.i=new Map;this.D=[];this.B=new Lc;this.h=null;this.m=function(d){c.B.reject(d);a.onError(d)};this.aa=new Map;this.ua=new Map;this.R=new P(function(){return Tf(c)});this.J=!1;this.I=[];this.M=!1;this.Z=(new P(function(){Uf(c)})).ia(b);this.B["catch"](function(){});this.j=new kf(function(){return Vf(c)});this.W=!1}q=Sf.prototype;q.destroy=function(){return this.j.destroy()};
185
+ function Vf(a){return I(function(b){switch(b.g){case 1:return a.v.release(),a.v=null,a.B.reject(),a.Z.stop(),a.Z=null,a.R.stop(),a.R=null,u(b,Wf(a),2);case 2:if(!a.l){b.C(3);break}A(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.A=null,a.D=[],a.h=null,a.m=function(){},a.F=null,a.W=!1,z(b)}})}q.configure=function(a){this.h=a};function Xf(a,b,c){a.$=!0;a.D=[];a.J=c;return Yf(a,b)}
186
+ function Zf(a,b,c){a.D=c;a.J=0<c.length;return Yf(a,b)}function $f(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return ag(a,g,[])}
187
+ function Yf(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){if(c=dg(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=uf(a.h.servers),eg(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=fg(l),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,gg(r,uf(a.h.servers),uf(a.h.advanced||{}));return u(x,
188
+ be(b,a.J,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Y=!0,x["return"](Promise.resolve());y=ag(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}
189
+ q.pc=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 Wf(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,
190
+ c,2)}lf(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)})};
191
+ 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=cf([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"]();
192
+ 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
+ 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)&&!Tc("Tizen 2"))return;ng(a,b,c,a.g.sessionType)}function og(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
194
+ function pg(a){a=a.i.keys();a=eb(a,function(b){return b.sessionId});return Array.from(a)}q.tc=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.Yc=function(){return vf(this.ua)};
195
+ function ag(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);lf(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=
196
+ f.keySystem;var D=d.get(f.keySystem);var B=[],C=[],E=[],G=[],H=new Set;sg(D,B,E,C,G,H);var L=a.J?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:B[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||L,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:C[0],initData:G,keyIds:H};D=t(D);for(B=D.next();!B.done;B=
197
+ D.next())B=B.value,B.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=B.distinctiveIdentifierRequired),B.persistentStateRequired&&(w.persistentStateRequired=B.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),B=[],C=[],E=[],G=[],H=new Set,sg(w.drmInfos,B,E,C,G,H),D={keySystem:D,licenseServerUri:B[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
198
+ w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:C[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,lf(a.j),a.A=v,a.Y=!0,u(x,kg(a),7);case 7:lf(a.j);ua(x,0);break;case 4:y=F(x);lf(a.j,y);a.g=null;a.G.clear();if(y instanceof N)throw y;throw new N(2,6,6002,y.message);}})}
199
+ function qg(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(fg(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new N(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Bd:d.Bd},e=a.next())for(d.Bd=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
194
200
  l.Bd}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
195
- function Vf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x;return H(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new M(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.C(4);break}k=h.value;if(!b.has(k)){w.C(3);break}l=b.get(k);A(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
196
- w.h,w["return"](c);case 6:F(w);case 7:lf(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:lf(a.j);case 13:h=r.next();w.C(12);break;case 11:return w["return"](c)}})}
197
- function Hf(a){a=uf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=md(f),h=md(e);g={kty:"oct",kid:kd(g,!1),k:kd(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Ec(gd(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
201
+ 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.g){case 1:if(1==b.size&&b.has(""))throw new N(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.C(4);break}k=h.value;if(!b.has(k)){w.C(3);break}l=b.get(k);A(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
202
+ w.h,w["return"](c);case 6:F(w);case 7:lf(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(D){return!!D.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:lf(a.j);case 13:h=r.next();w.C(12);break;case 11:return w["return"](c)}})}
203
+ function dg(a){a=uf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=md(f),h=md(e);g={kty:"oct",kid:kd(g,!1),k:kd(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Ec(gd(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
198
204
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
199
- function Qf(a,b){var c,d,e,f,g;return H(function(h){switch(h.g){case 1:try{c=a.A.createSession("persistent-license")}catch(k){return d=new M(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):Lf(a,k)});a.v.o(c,"keystatuseschange",function(k){return Xf(a,k)});e={initData:null,loaded:!1,Zd: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;lf(a.j);
200
- if(!f)return a.i["delete"](c),a.m(new M(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Yf(a)&&a.B.resolve();return h["return"](c);case 2:g=F(h),lf(a.j,g),a.i["delete"](c),a.m(new M(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
201
- function Rf(a,b,c,d){try{var e=a.A.createSession(d)}catch(f){a.m(new M(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):Lf(a,f)});a.v.o(e,"keystatuseschange",function(f){return Xf(a,f)});a.i.set(e,{initData:c,loaded:!1,Zd:Infinity,Za:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof M||(b=new M(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&kd(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
202
- 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 M(2,6,6006,f.message,f,h))}})}function Zf(a,b,c){"skd"==b&&(b=c.serverCertificate,c=sf(a),a=tf(a,c,b));return a}
203
- function Lf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;H(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&kd(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=cf([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Sf(a.g.keySystem)&&bg(g),h=Date.now(),A(x,2),l=a.F.Jb.request(2,g),u(x,
204
- l.promise,4);case 4:k=x.h;ua(x,3);break;case 2:return m=F(x),n=new M(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&&kd(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 M(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 L("drmsessionupdate");a.F.onEvent(v);d&&(d.Za&&d.Za.resolve(),y=new P(function(){d.loaded=
205
- !0;Yf(a)&&a.B.resolve()}),y.P(cg));z(x)}})}function bg(a){var b=dd(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=ld(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
206
- function Xf(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(Sf(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||Yc())){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=nd(h);a.aa.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Za&&(a.i["delete"](c),c.close()["catch"](function(){}));
207
- Yf(a)&&(a.B.resolve(),a.R.P(dg))}function yf(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 M(2,6,6014));a.F.hd(vf(c))}
208
- function eg(){var a,b,c,d,e,f,g,h;return H(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,
209
- c],f=new Map,g=function(l){var m,n,p;return H(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,Tc("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"](vf(f))})}
210
- function fg(a){var b;return H(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).P(gg)}),A(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ua(c,0);F(c);z(c)})}
211
- function Bf(a){var b;return H(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 H(function(g){if(1==g.g)return A(g,2),a.$||a.D.includes(e.sessionId)||"persistent-license"!==f.type?u(g,fg(e),5):u(g,e.remove(),5);if(2!=g.g)return ua(g,0);F(g);z(g)})})),0)})}
212
- function hg(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={Ra:f.Ra},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ra=[];f.Ra=f.Ra.concat(e.initData||[]);f.Ra=f.Ra.concat(h.initData||[]);f.Ra=f.Ra.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ra.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ha(e.keyIds),ha(h.keyIds))):
205
+ 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,Zd: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;lf(a.j);
206
+ 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),lf(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
207
+ 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,Zd: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&&kd(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
208
+ 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=sf(a),a=tf(a,c,b));return a}
209
+ 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&&kd(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=cf([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,
210
+ 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&&kd(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
+ !0;ug(a)&&a.B.resolve()}),y.P(xg));z(x)}})}function wg(a){var b=dd(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=Pf(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=ld(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
212
+ 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?\//)||Yc())){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=nd(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
+ c.close()["catch"](function(){}));ug(a)&&(a.B.resolve(),a.R.P(yg))}function Tf(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.hd(vf(c))}
214
+ 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,
215
+ 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,Tc("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"](vf(f))})}
216
+ function Ag(a){var b;return I(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).P(Bg)}),A(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ua(c,0);F(c);z(c)})}
217
+ function Wf(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)})}
218
+ 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))):
213
219
  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,
214
- initData:f.Ra,keyIds:g});break}}return c}function Jf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function zf(a){a.i.forEach(function(b,c){var d=b.Zd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.F.onExpirationUpdated(c.sessionId,e),b.Zd=e)})}function Yf(a){a=a.i.values();return fb(a,function(b){return b.loaded})}
215
- function If(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)}
216
- function Wf(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=
220
+ initData:f.Sa,keyIds:g});break}}return c}function fg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Uf(a){a.i.forEach(function(b,c){var d=b.Zd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.F.onExpirationUpdated(c.sessionId,e),b.Zd=e)})}function ug(a){a=a.i.values();return fb(a,function(b){return b.loaded})}
221
+ 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)}
222
+ 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=
217
223
  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)}}
218
- function Kf(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
219
- (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 gg=1,cg=5,dg=.5,ig=new Mc(function(){return Fc(new Uint8Array([0]))});function jg(){}function kg(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g){if(d&&(e=lg[d.toLowerCase()]))return k["return"](e);if(f=mg(a))if(g=ng[f])return k["return"](g);return d?k.C(2):u(k,og(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=lg[d]))return k["return"](h);throw new M(2,4,4E3,a);})}
220
- function og(a,b,c){var d,e,f;return H(function(g){if(1==g.g)return d=cf([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 mg(a){a=(new jb(a)).Ma.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}J("shaka.media.ManifestParser",jg);jg.unregisterParserByMime=function(a){delete lg[a]};jg.registerParserByMime=function(a,b){lg[a]=b};
221
- jg.registerParserByExtension=function(a,b){ng[a]=b};var lg={},ng={};function pg(a,b){this.S=Hc(a);this.h=b==qg;this.g=0}q=pg.prototype;q.Fa=function(){return this.g<this.S.byteLength};q.ea=function(){return this.g};q.Wf=function(){return this.S.byteLength};q.ha=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw rg();}};q.bc=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw rg();}};q.O=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw rg();}};
222
- q.df=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw rg();}};q.cc=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 rg();}if(2097151<b)throw new M(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 rg();var b=Ec(this.S,this.g,a);this.g+=a;return b};
223
- q.skip=function(a){if(this.g+a>this.S.byteLength)throw rg();this.g+=a};q.gf=function(a){if(this.g<a)throw rg();this.g-=a};q.seek=function(a){if(0>a||a>this.S.byteLength)throw rg();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 cd(a)};function rg(){return new M(2,3,3E3)}J("shaka.util.DataViewReader",pg);pg.prototype.readTerminatedString=pg.prototype.Dc;pg.prototype.seek=pg.prototype.seek;pg.prototype.rewind=pg.prototype.gf;
224
- pg.prototype.skip=pg.prototype.skip;pg.prototype.readBytes=pg.prototype.ub;pg.prototype.readUint64=pg.prototype.cc;pg.prototype.readInt32=pg.prototype.df;pg.prototype.readUint32=pg.prototype.O;pg.prototype.readUint16=pg.prototype.bc;pg.prototype.readUint8=pg.prototype.ha;pg.prototype.getLength=pg.prototype.Wf;pg.prototype.getPosition=pg.prototype.ea;pg.prototype.hasMoreData=pg.prototype.Fa;var qg=1;pg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:qg};function sg(){this.i=[];this.h=[];this.g=!1}q=sg.prototype;q.box=function(a,b){var c=tg(a);this.i[c]=ug;this.h[c]=b;return this};q.U=function(a,b){var c=tg(a);this.i[c]=vg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new pg(a,0);for(this.g=!1;a.Fa()&&!this.g;)this.kd(0,a,b,c)};
225
- q.kd=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.cc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==vg){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 pg(b,0),k({parser:this,partialOkay:c||
226
- !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 wg(a){for(var b=xg(a);a.reader.Fa()&&!a.parser.g;)a.parser.kd(a.start+b,a.reader,a.partialOkay)}function yg(a){for(var b=xg(a),c=a.reader.O(),d=0;d<c&&(a.parser.kd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function zg(a){return function(b){a(b.reader.ub(b.reader.S.byteLength-b.reader.ea()))}}
227
- function tg(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 Ag(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function xg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}J("shaka.util.Mp4Parser",sg);sg.headerSize=xg;sg.typeToString=Ag;sg.allData=zg;sg.sampleDescription=yg;sg.children=wg;sg.prototype.parseNext=sg.prototype.kd;sg.prototype.parse=sg.prototype.parse;sg.prototype.stop=sg.prototype.stop;
228
- sg.prototype.fullBox=sg.prototype.U;sg.prototype.box=sg.prototype.box;var ug=0,vg=1;function Bg(a){function b(){d=!0}function c(l){f.push(l);wg(l)}a=Ec(a);var d=!1,e,f=[],g=[];(new sg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).U("stsd",function(l){e=l;f.push(l);yg(l)}).U("encv",b).U("enca",b).U("avc1",function(l){g.push({box:l,Cc:1701733238})}).U("avc3",function(l){g.push({box:l,Cc:1701733238})}).U("ac-3",function(l){g.push({box:l,Cc:1701733217})}).U("ec-3",function(l){g.push({box:l,Cc:1701733217})}).U("mp4a",function(l){g.push({box:l,Cc:1701733217})}).parse(a);
229
- if(d)return a;if(0==g.length||!e)throw Za(nd(a)),new M(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=Cg(a,e,k.box,f,k.Cc);return a}
230
- function Cg(a,b,c,d,e){var f=Dg.value(),g=a.subarray(c.start,c.start+c.size),h=Hc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Hc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Eg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Sc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Eg(e,d.start,d.size+k.byteLength);k=Hc(e,b.start);b=xg(b);a=k.getUint32(b);
231
- k.setUint32(b,a+1);return e}function Eg(a,b,c){a=Hc(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Dg=new Mc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Fg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Gg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){r=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
232
- r||-1===v)p=Hg(d,e),a.nestedCues.push(p);else{for(;r<=v;r++)if(y=p[r]){var x=y.l,w=y.i,C=y.j,D=y.h;if(x!=h||w!=k||C!=l||D!=m)n.payload&&a.nestedCues.push(n),n=Gg(d,e,x,w,C,D),h=x,k=w,l=C,m=D;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Hg(d,e),a.nestedCues.push(n));n=Gg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
233
- function Gg(a,b,c,d,e,f){a=new hc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Hg(a,b){var c=new hc(a,b,"");c.lineBreak=!0;return c}function Ig(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Jg(a,b){this.i=[];this.g=1;this.h=0;this.B=a;this.A=b;this.j=this.m=!1;this.l="white";this.v="black";Kg(this)}function Lg(a,b,c){return Fg(new hc(b,c,""),"CC"+(a.B<<1|a.A+1),a.i,b,c)}function Kg(a){Mg(a,0,15);a.g=1}function Ng(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Og:d=Pg.has(c)?Pg.get(c):String.fromCharCode(c);break;case Qg:d=Rg.get(c);break;case Sg:a.i[a.g].pop();d=Tg.get(c);break;case Ug:a.i[a.g].pop(),d=Vg.get(c)}d&&a.i[a.g].push(new Ig(d,a.m,a.j,a.v,a.l))}}
234
- function Wg(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Mg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
235
- var Og=0,Qg=1,Sg=2,Ug=3,Pg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Rg=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Tg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
236
- [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Vg=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
237
- [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function Xg(a,b){this.h=Yg;this.v=new Jg(a,b);this.i=new Jg(a,b);this.l=new Jg(a,b);this.g=this.i;this.j=0;this.m=null}function Zg(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==$g&&a.h!==ah&&(e=Lg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Mg(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Mg(c,0,15),d.g=15);a.h=$g;d.h=b;return e}function bh(a){a.h=ch;a.g=a.l;a.g.h=0}function dh(a){Ra("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.v;a.h=ah}
238
- var Yg=0,ch=1,$g=3,ah=4,eh="black green blue cyan red yellow magenta black".split(" "),fh="white green blue cyan red yellow magenta white_italics".split(" ");function gh(){this.l=!1;this.D=this.G=0;this.F=hh;this.i=[];this.g=this.h=this.j=0;this.B=this.v=!1;this.A="white";this.m="black";ih(this)}function ih(a){a.i=[];for(var b=0;15>b;b++)a.i.push(jh())}function jh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function kh(a,b){lh(a)&&(a.i[a.h][a.g]=new Ig(b,a.B,a.v,a.m,a.A),a.g++)}function lh(a){var b=a.g<a.D&&0<=a.g;return a.h<a.G&&0<=a.h&&b}gh.prototype.isVisible=function(){return this.l};
239
- function mh(a,b,c){var d=new hc(a.j,b,"");d.textAlign=a.F===nh?"left":a.F===oh?"right":lc;if(c=Fg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var nh=0,oh=1,hh=2;function ph(){this.i=[];this.h=null;this.g=0}function qh(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new rh(a.h)),a.h=null,a.g=0))}function rh(a){this.g=0;this.h=a}rh.prototype.Fa=function(){return this.g<this.h.length};rh.prototype.ea=function(){return this.g};function sh(a){if(!a.Fa())throw new M(2,2,3E3);return a.h[a.g++]}rh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new M(2,2,3E3);this.g+=a};function th(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
240
- function uh(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=sh(b).value;b=null;c=t(vh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=mh(e,d,a.i)),ih(e);return b}if(137===c)for(b=sh(b).value,b=t(vh(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=sh(b).value;b=null;c=t(vh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=mh(e,d,a.i)),e.l=!1;return b}if(139===c){c=sh(b).value;
241
- b=null;c=t(vh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=mh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=sh(b).value,wh(a,b,d);if(143===c)return d=wh(a,255,d),xh(a),d;if(144===c)b.skip(1),d=sh(b).value,a.g&&(a.g.v=0<(d&128),a.g.B=0<(d&64));else if(145===c)d=sh(b).value,c=sh(b).value,b.skip(1),a.g&&(b=yh((c&48)>>4,(c&12)>>2,c&3),a.g.A=yh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=sh(b).value,b=sh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
242
- b.skip(1),d=sh(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new gh;f.j=d;a.h[c]=f}d=sh(b).value;sh(b);sh(b);f=sh(b).value;var g=sh(b).value;b=sh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.B=!1,b.v=!1,b.A="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.G=(f&15)+1;b.D=(g&63)+1;a.g=a.h[c]}}}return null}function vh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
243
- function wh(a,b,c){var d=null;b=t(vh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=mh(f,c,a.i));a.h[e]=null}return d}function xh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function yh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return zh[a<<2|b<<1|c]}
244
- var Ah=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),zh="black blue green cyan red magenta yellow white".split(" ");function Bh(){this.h=[];this.g=[];this.i=new ph;this.l=0;this.A=new Map([["CC1",new Xg(0,0)],["CC2",new Xg(0,1)],["CC3",new Xg(1,0)],["CC4",new Xg(1,1)]]);this.v=this.m=0;this.j=new Map;Ch(this)}function Ch(a){a.m=0;a.v=0;a=t(a.A.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Kg(b.i),Kg(b.l),Kg(b.v)}
245
- function Dh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=t(a.h),e=d.next();!e.done;e=d.next())(e=Eh(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())qh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=Fh(a,e.value),c.push.apply(c,ha(e));a.i.i=[];a.h=[];a.g=[];return c}
246
- function Eh(a,b){var c=b.type;if(16===(b.Pa&112)){var d=b.Pa>>3&1;0===c?a.m=d:a.v=d}c=a.A.get("CC"+(c<<1|(c?a.v:a.m)+1));if(255===b.Pa&&255===b.hb||!b.Pa&&!b.hb||!Gh(b.Pa)||!Gh(b.hb))return 45<=++a.l&&Ch(a),null;a.l=0;b.Pa&=127;b.hb&=127;if(!b.Pa&&!b.hb)return null;d=null;if(16===(b.Pa&112))a:{var e=b.Pa;d=b.hb;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=fh[f]:7===f&&(h=!0);
247
- d=1===(d&1);if(c.h!==ah){f=c.g;if(c.h===$g&&e!==f.g){var k=1+e-f.h;Wg(f,k,1+f.g-f.h,f.h);Mg(f,0,k-1);Mg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.v="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Ng(c.g,Og,32),g=!1,e=fh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=eh[(d&14)>>1]),c.g.v=g;else if(17===(e&247)&&48===(d&240))Ng(c.g,Qg,d);else if(18===
248
- (e&246)&&32===(d&224))Ng(c.g,e&1?Ug:Sg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.hb){case 32:bh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Zg(c,2,d);break;case 38:e=Zg(c,3,d);break;case 39:e=Zg(c,4,d);break;case 40:Ng(c.g,Og,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Kg(c.v);dh(c);break;case 43:dh(c);break;case 44:e=c.i;g=null;c.h!==ah&&(g=Lg(e,c.j,d));Mg(e,0,15);e=g;break;case 45:e=c.g;c.h!==$g?e=null:(g=Lg(e,c.j,d),h=e.g-e.h+1,Wg(e,h-1,h,e.h),Mg(e,
249
- 0,h-1),Mg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Mg(c.l,0,15);break;case 47:e=null,c.h!==ah&&(e=Lg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,bh(c),c.j=d}d=e;break a}d=null}else e=b.hb,Ng(c.g,Og,b.Pa),Ng(c.g,Og,e);return d}
250
- function Fh(a,b){var c=[];try{for(;b.Fa();){var d=sh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=sh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new th(e));for(var g=a.j.get(e),h=b.ea();b.ea()-h<f;){e=b;var k=sh(e),l=k.value,m=k.pts;if(16===l){var n=sh(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:!lh(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=mh(r,p,g.i));if(r.h+1>=r.G){p=r;for(var v=0,y=1;15>y;y++,
251
- v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=jh()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=mh(r,p,g.i));r.i[r.h]=jh();r.g=0;break;case 12:r.isVisible()&&(e=mh(r,p,g.i)),ih(r),p=r,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=uh(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?kh(g.g,"\u266a"):kh(g.g,
252
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&kh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Ah.has(e)){var w=Ah.get(e);kh(g.g,w)}else kh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?kh(g.g,"_"):kh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(C){if(C instanceof M&&3E3===C.code)Ra("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function Gh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Hh(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,Me:c,Hf:d}}function Ih(a,b){return{Jd:1==b?a.cc():a.O()}}function Jh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.O()}}
253
- function Kh(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={ge:null,sampleSize:null,nd:null};c&256&&(g.ge=a.O());c&512&&(g.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(g.nd=0==b?a.O():a.df());e.push(g)}return{li:d,hf:e}};function Lh(){this.i=new Map;this.h=this.g=0}
254
- Lh.prototype.init=function(a){var b=this,c=[],d=[];(new sg).box("moov",wg).box("mvex",wg).U("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",wg).U("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.O();c.push(e)}).box("mdia",wg).U("mdhd",function(e){e=Jh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new M(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
255
- Lh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new sg).box("moof",wg).box("traf",wg).U("trun",function(k){f=Kh(k.reader,k.version,k.flags).hf}).U("tfhd",function(k){k=Hh(k.reader,k.flags);d=k.Me||b.g;e=k.Hf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=Ih(k.reader,k.version).Jd}).box("mdat",function(k){if(null===g)throw new M(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==
256
- (k.ha()&31)){var w=0;r.length>v&&(w=r[v].nd||0);w=(l+w)/m;for(var C=[],D,B=k.ub(x-1),E=D=0;E<B.length;)2==D&&3==B[E]?(D=0,B=[].concat(ha(B)),B.splice(E,1),B=new Uint8Array(B)):0==B[E]?D++:D=0,E++;D=B;for(E=0;E<D.length;){for(B=0;255==D[E];)B+=255,E++;B+=D[E++];for(var G=0;255==D[E];)G+=255,E++;G+=D[E++];4==B&&C.push(D.subarray(E,E+G));E+=G}C=t(C);for(D=C.next();!D.done;D=C.next())c.push({Bg:D.value,pts:w})}else try{k.skip(x-1)}catch(I){break}y-=x+4;0==y&&(l=r.length>v?l+(r[v].ge||n):l+n,v++,y=r.length>
257
- v?r[v].sampleSize||p:p)}}).parse(a,!1);return c};function Mh(){this.h=new Lh;this.g=new Bh}Mh.prototype.init=function(a){this.h.init(a)};
258
- function Nh(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.Bg);if(0<f.length&&(d=a.g,e=e.pts,f=new pg(f,0),181===f.ha()&&49===f.bc()&&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,Pa: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 Dh(a.g)}
259
- ;function Oh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Ph(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 Qh(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(Rh(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}
260
- function Sh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Rh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Rh(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 Th(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 mf;this.A={};this.B=b;this.F=new Lc;this.m=Uh(this,this.F);this.D=new kf(function(){return Vh(e)});this.G=""}function Uh(a,b){var c=new MediaSource;a.v.Ga(c,"sourceopen",function(){URL.revokeObjectURL(a.G);b.resolve()});a.G=Wh(c);a.j.src=a.G;return c}q=Th.prototype;q.destroy=function(){return this.D.destroy()};
261
- function Vh(a){var b,c,d,e,f,g,h,k;return H(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 M(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=
224
+ function gg(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
225
+ (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);})}
226
+ function Jg(a,b,c){var d,e,f;return I(function(g){if(1==g.g)return d=cf([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 jb(a)).Ma.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};
227
+ 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.Wf=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.bc=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();}};
228
+ q.df=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Mg();}};q.cc=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.skip=function(a){if(this.g+a>this.S.byteLength)throw Mg();this.g+=a};q.gf=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 cd(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.gf;
230
+ Kg.prototype.skip=Kg.prototype.skip;Kg.prototype.readBytes=Kg.prototype.ub;Kg.prototype.readUint64=Kg.prototype.cc;Kg.prototype.readInt32=Kg.prototype.df;Kg.prototype.readUint32=Kg.prototype.O;Kg.prototype.readUint16=Kg.prototype.bc;Kg.prototype.readUint8=Kg.prototype.ha;Kg.prototype.getLength=Kg.prototype.Wf;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.U=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.kd(0,a,b,c)};
231
+ q.kd=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.cc();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||
232
+ !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.kd(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.kd(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()))}}
233
+ 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.kd;Ng.prototype.parse=Ng.prototype.parse;Ng.prototype.stop=Ng.prototype.stop;
234
+ Ng.prototype.fullBox=Ng.prototype.U;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).U("stsd",function(l){e=l;f.push(l);Tg(l)}).U("encv",b).U("enca",b).U("avc1",function(l){g.push({box:l,Cc:1701733238})}).U("avc3",function(l){g.push({box:l,Cc:1701733238})}).U("ac-3",function(l){g.push({box:l,Cc:1701733217})}).U("ec-3",function(l){g.push({box:l,Cc:1701733217})}).U("mp4a",function(l){g.push({box:l,Cc:1701733217})}).parse(a);
235
+ if(d)return a;if(0==g.length||!e)throw Ya(nd(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.Cc);return a}
236
+ function Xg(a,b,c,d,e){var f=Yg.value(),g=a.subarray(c.start,c.start+c.size),h=Hc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Hc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Zg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Sc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Zg(e,d.start,d.size+k.byteLength);k=Hc(e,b.start);b=Sg(b);a=k.getUint32(b);
237
+ k.setUint32(b,a+1);return e}function Zg(a,b,c){a=Hc(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Yg=new Mc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function $g(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(C){return null!=C&&""!=C.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(C){return null!=C&&""!=C.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=ah(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){r=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
238
+ r||-1===v)p=bh(d,e),a.nestedCues.push(p);else{for(;r<=v;r++)if(y=p[r]){var x=y.l,w=y.i,D=y.j,B=y.h;if(x!=h||w!=k||D!=l||B!=m)n.payload&&a.nestedCues.push(n),n=ah(d,e,x,w,D,B),h=x,k=w,l=D,m=B;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=bh(d,e),a.nestedCues.push(n));n=ah(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
239
+ function ah(a,b,c,d,e,f){a=new hc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function bh(a,b){var c=new hc(a,b,"");c.lineBreak=!0;return c}function ch(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function dh(a,b){this.i=[];this.g=1;this.h=0;this.B=a;this.A=b;this.j=this.m=!1;this.l="white";this.v="black";eh(this)}function fh(a,b,c){return $g(new hc(b,c,""),"CC"+(a.B<<1|a.A+1),a.i,b,c)}function eh(a){gh(a,0,15);a.g=1}function hh(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case ih:d=jh.has(c)?jh.get(c):String.fromCharCode(c);break;case kh:d=lh.get(c);break;case mh:a.i[a.g].pop();d=nh.get(c);break;case oh:a.i[a.g].pop(),d=ph.get(c)}d&&a.i[a.g].push(new ch(d,a.m,a.j,a.v,a.l))}}
240
+ function qh(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function gh(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
241
+ var ih=0,kh=1,mh=2,oh=3,jh=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),lh=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),nh=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
242
+ [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),ph=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
243
+ [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function rh(a,b){this.h=sh;this.v=new dh(a,b);this.i=new dh(a,b);this.l=new dh(a,b);this.g=this.i;this.j=0;this.m=null}function th(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==uh&&a.h!==vh&&(e=fh(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,gh(c,0,15),c=a.l,c.g=0<c.h?c.h:0,gh(c,0,15),d.g=15);a.h=uh;d.h=b;return e}function wh(a){a.h=xh;a.g=a.l;a.g.h=0}function yh(a){Ra("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.v;a.h=vh}
244
+ var sh=0,xh=1,uh=3,vh=4,zh="black green blue cyan red yellow magenta black".split(" "),Ah="white green blue cyan red yellow magenta white_italics".split(" ");function Bh(){this.l=!1;this.D=this.G=0;this.F=Ch;this.i=[];this.g=this.h=this.j=0;this.B=this.v=!1;this.A="white";this.m="black";Dh(this)}function Dh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(Eh())}function Eh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Fh(a,b){Gh(a)&&(a.i[a.h][a.g]=new ch(b,a.B,a.v,a.m,a.A),a.g++)}function Gh(a){var b=a.g<a.D&&0<=a.g;return a.h<a.G&&0<=a.h&&b}Bh.prototype.isVisible=function(){return this.l};
245
+ function Hh(a,b,c){var d=new hc(a.j,b,"");d.textAlign=a.F===Ih?"left":a.F===Jh?"right":lc;if(c=$g(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Ih=0,Jh=1,Ch=2;function Kh(){this.i=[];this.h=null;this.g=0}function Lh(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Mh(a.h)),a.h=null,a.g=0))}function Mh(a){this.g=0;this.h=a}Mh.prototype.Fa=function(){return this.g<this.h.length};Mh.prototype.ea=function(){return this.g};function Nh(a){if(!a.Fa())throw new N(2,2,3E3);return a.h[a.g++]}Mh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function Oh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
246
+ function Ph(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Nh(b).value;b=null;c=t(Qh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Hh(e,d,a.i)),Dh(e);return b}if(137===c)for(b=Nh(b).value,b=t(Qh(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Nh(b).value;b=null;c=t(Qh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Hh(e,d,a.i)),e.l=!1;return b}if(139===c){c=Nh(b).value;
247
+ b=null;c=t(Qh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Hh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Nh(b).value,Rh(a,b,d);if(143===c)return d=Rh(a,255,d),Sh(a),d;if(144===c)b.skip(1),d=Nh(b).value,a.g&&(a.g.v=0<(d&128),a.g.B=0<(d&64));else if(145===c)d=Nh(b).value,c=Nh(b).value,b.skip(1),a.g&&(b=Th((c&48)>>4,(c&12)>>2,c&3),a.g.A=Th((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Nh(b).value,b=Nh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
248
+ b.skip(1),d=Nh(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Bh;f.j=d;a.h[c]=f}d=Nh(b).value;Nh(b);Nh(b);f=Nh(b).value;var g=Nh(b).value;b=Nh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.B=!1,b.v=!1,b.A="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.G=(f&15)+1;b.D=(g&63)+1;a.g=a.h[c]}}}return null}function Qh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
249
+ function Rh(a,b,c){var d=null;b=t(Qh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Hh(f,c,a.i));a.h[e]=null}return d}function Sh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Th(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Uh[a<<2|b<<1|c]}
250
+ var Vh=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Uh="black blue green cyan red magenta yellow white".split(" ");function Wh(){this.h=[];this.g=[];this.i=new Kh;this.l=0;this.A=new Map([["CC1",new rh(0,0)],["CC2",new rh(0,1)],["CC3",new rh(1,0)],["CC4",new rh(1,1)]]);this.v=this.m=0;this.j=new Map;Xh(this)}function Xh(a){a.m=0;a.v=0;a=t(a.A.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,eh(b.i),eh(b.l),eh(b.v)}
251
+ function Yh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=t(a.h),e=d.next();!e.done;e=d.next())(e=Zh(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())Lh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=$h(a,e.value),c.push.apply(c,ha(e));a.i.i=[];a.h=[];a.g=[];return c}
252
+ function Zh(a,b){var c=b.type;if(16===(b.Pa&112)){var d=b.Pa>>3&1;0===c?a.m=d:a.v=d}c=a.A.get("CC"+(c<<1|(c?a.v:a.m)+1));if(255===b.Pa&&255===b.hb||!b.Pa&&!b.hb||!ai(b.Pa)||!ai(b.hb))return 45<=++a.l&&Xh(a),null;a.l=0;b.Pa&=127;b.hb&=127;if(!b.Pa&&!b.hb)return null;d=null;if(16===(b.Pa&112))a:{var e=b.Pa;d=b.hb;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Ah[f]:7===f&&(h=!0);
253
+ 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-f.h,f.h);gh(f,0,k-1);gh(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.v="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",hh(c.g,ih,32),g=!1,e=Ah[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=zh[(d&14)>>1]),c.g.v=g;else if(17===(e&247)&&48===(d&240))hh(c.g,kh,d);else if(18===
254
+ (e&246)&&32===(d&224))hh(c.g,e&1?oh:mh,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.hb){case 32:wh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=th(c,2,d);break;case 38:e=th(c,3,d);break;case 39:e=th(c,4,d);break;case 40:hh(c.g,ih,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:eh(c.v);yh(c);break;case 43:yh(c);break;case 44:e=c.i;g=null;c.h!==vh&&(g=fh(e,c.j,d));gh(e,0,15);e=g;break;case 45:e=c.g;c.h!==uh?e=null:(g=fh(e,c.j,d),h=e.g-e.h+1,qh(e,h-1,h,e.h),gh(e,
255
+ 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.Pa),hh(c.g,ih,e);return d}
256
+ 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;15>y;y++,
257
+ 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,
258
+ 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(D){if(D instanceof N&&3E3===D.code)Ra("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}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,Me:c,Hf:d}}function ci(a,b){return{Jd:1==b?a.cc():a.O()}}function di(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.O()}}
259
+ 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={ge:null,sampleSize:null,nd:null};c&256&&(g.ge=a.O());c&512&&(g.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(g.nd=0==b?a.O():a.df());e.push(g)}return{li:d,hf:e}};function fi(){this.i=new Map;this.h=this.g=0}
260
+ fi.prototype.init=function(a){var b=this,c=[],d=[];(new Ng).box("moov",Rg).box("mvex",Rg).U("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).U("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.O();c.push(e)}).box("mdia",Rg).U("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])})};
261
+ 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).U("trun",function(k){f=ei(k.reader,k.version,k.flags).hf}).U("tfhd",function(k){k=bi(k.reader,k.flags);d=k.Me||b.g;e=k.Hf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=ci(k.reader,k.version).Jd}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,r=f,v=0,y=p;for(r.length&&(y=r[0].sampleSize||p);k.Fa();){var x=k.O();if(6==
262
+ (k.ha()&31)){var w=0;r.length>v&&(w=r[v].nd||0);w=(l+w)/m;for(var D=[],B,C=k.ub(x-1),E=B=0;E<C.length;)2==B&&3==C[E]?(B=0,C=[].concat(ha(C)),C.splice(E,1),C=new Uint8Array(C)):0==C[E]?B++:B=0,E++;B=C;for(E=0;E<B.length;){for(C=0;255==B[E];)C+=255,E++;C+=B[E++];for(var G=0;255==B[E];)G+=255,E++;G+=B[E++];4==C&&D.push(B.subarray(E,E+G));E+=G}D=t(D);for(B=D.next();!B.done;B=D.next())c.push({Bg: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].ge||n):l+n,v++,y=r.length>
263
+ 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)};
264
+ 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.Bg);if(0<f.length&&(d=a.g,e=e.pts,f=new Kg(f,0),181===f.ha()&&49===f.bc()&&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,Pa: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)}
265
+ ;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}
266
+ 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 mf;this.A={};this.B=b;this.F=new Lc;this.m=oi(this,this.F);this.D=new kf(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()};
267
+ 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=
262
268
  {};z(l)})}
263
- q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return H(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=ud(h.mimeType,h.codecs),e.Ha==d.ka?Xh(c,k):(!b&&MediaSource.isTypeSupported(k)||!qd(k,e.Ha)||(c.A[e.Ha]=new pd,k=sd(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 M(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.v.o(l,"updateend",function(n){return function(){return Yh(c,n.Ha)}}(e)),
264
- c.h[e.Ha]=l,c.I[e.Ha]=k,c.i[e.Ha]=[],c.H[e.Ha]=!!h.drmInfos.length);z(m)})};function Xh(a,b){a.g||(a.g=new zd(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Fb(Cd[b]))}function Zh(a){return a.m?"ended"==a.m.readyState:!0}function $h(a,b){if(b==Lb)var c=a.g.g;else c=ai(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 bi(a,b){return b==Lb?a.g.h:Oh(ai(a,b))}
265
- function ci(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=ai(a,b);return Qh(a,c)}q.Wc=function(){var a={total:Rh(this.j.buffered),audio:Rh(ai(this,"audio")),video:Rh(ai(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 ai(a,b){try{return a.h[b].buffered}catch(c){return null}}
266
- function di(a,b,c,d,e,f){var g,h,k,l,m,n,p,r;return H(function(v){if(1==v.g){g=Mb;if(b==g.ka)return u(v,Dd(a.g,c,d,e),0);if(a.A[b])return u(v,td(a.A[b],c),10);if(f)return a.g||Xh(a,"text/vtt"),null==d&&null==e?a.B.init(c):(h=Nh(a.B,c),h.length&&(k=a.h[g.bb].timestampOffset,Id(a.g,h,d,e,k))),c=ei(a,c,d,b),u(v,fi(a,b,function(){a.h[b].appendBuffer(c)}),0);c=ei(a,c,d,b);return u(v,fi(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||Xh(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.J(l.metadata,
267
- m,e));l.captions&&l.captions.length&&(n=a.h[g.bb].timestampOffset,p=Gd(l.captions),Id(a.g,p,d,e,n));r=l.data;r=ei(a,r,d,b);return u(v,fi(a,b,function(){a.h[b].appendBuffer(r)}),0)})}function gi(a,b){var c=bi(a,"video")||0;Fd(a.g,b,c)}function hi(a){a.g&&Fd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return H(function(f){e=Mb;return a==e.ka?u(f,d.g.remove(b,c),0):u(f,fi(d,a,function(){c<=b?Yh(d,a):d.h[a].remove(b,c)}),0)})};
268
- function ii(a,b){var c;return H(function(d){c=Mb;return b==c.ka?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,fi(a,b,function(){var e=a.m.duration;0>=e?Yh(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return H(function(d){c=Mb;return a==c.ka?d["return"]():u(d,fi(b,a,function(){b.j.currentTime-=.001;Yh(b,a)}),0)})};
269
- function ji(a,b,c,d,e){var f;return H(function(g){f=Mb;return b==f.ka?(a.g.B=c,Ed(a.g,d,e),g["return"]()):u(g,Promise.all([fi(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;Yh(a,b)}),fi(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;Yh(a,b)}),fi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Yh(a,b)})]),0)})}
270
- q.endOfStream=function(a){var b=this;return H(function(c){return u(c,ki(b,function(){Zh(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.Ya=function(a){var b=this;return H(function(c){return u(c,ki(b,function(){b.m.duration=a}),0)})};q.getDuration=function(){return this.m.duration};function Yh(a,b){var c=a.i[b][0];c&&(c.p.resolve(),li(a,b))}function fi(a,b,c){lf(a.D);c={start:c,p:new Lc};a.i[b].push(c);1==a.i[b].length&&mi(a,b);return c.p}
271
- function ki(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:lf(a.D);c=[];d={};for(e in a.h)d.kc=new Lc,f={start:function(l){return function(){return l.kc.resolve()}}(d),p:d.kc},a.i[e].push(f),c.push(d.kc),1==a.i[e].length&&f.start(),d={kc:d.kc};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 M(2,3,3015,l);}finally{for(h in a.h)li(a,h)}z(k)}})}function li(a,b){a.i[b].shift();mi(a,b)}
272
- function mi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new M(2,3,3017,b)):c.p.reject(new M(2,3,3015,d)),li(a,b)}}function ei(a,b,c,d){var e=a.H[d];null==c&&e&&(Uc()||Sc())&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=Bg(b));return b}var Wh=window.URL.createObjectURL;function ni(a,b,c){this.Ea=a;this.ya=b;this.ra=c}ni.prototype.xc=function(){return this.ya};ni.prototype.sc=function(){return this.ra};function oi(a,b){return a&&b?a.xc()==b.xc()&&a.sc()==b.sc()&&gc(a.Ea(),b.Ea()):a==b}J("shaka.media.InitSegmentReference",ni);ni.prototype.getEndByte=ni.prototype.sc;ni.prototype.getStartByte=ni.prototype.xc;
273
- function pi(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.ya=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=pi.prototype;q.Ea=function(){return this.j()};q.getStartTime=function(){return this.startTime};q.Uf=function(){return this.endTime};q.xc=function(){return this.ya};q.sc=function(){return this.ra};q.ng=function(){return this.tilesLayout};
274
- q.mg=function(){return this.i};J("shaka.media.SegmentReference",pi);pi.prototype.getTileDuration=pi.prototype.mg;pi.prototype.getTilesLayout=pi.prototype.ng;pi.prototype.getEndByte=pi.prototype.sc;pi.prototype.getStartByte=pi.prototype.xc;pi.prototype.getEndTime=pi.prototype.Uf;pi.prototype.getStartTime=pi.prototype.getStartTime;pi.prototype.getUris=pi.prototype.Ea;function Q(a,b,c){this.l=a;this.ld=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.cg=function(){return this.g};q.Ya=function(a){this.i=a};q.gg=function(){return this.l};q.lf=function(a){this.v=a};q.Hc=function(a){this.A=a};q.se=function(a){this.m=a};q.Rg=function(a){this.ld=a};q.Tf=function(){return this.ld};
269
+ 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=ud(h.mimeType,h.codecs),e.Ha==d.ka?ri(c,k):(!b&&MediaSource.isTypeSupported(k)||!qd(k,e.Ha)||(c.A[e.Ha]=new pd,k=sd(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
+ 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 zd(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))}
271
+ 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.Wc=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}}
272
+ 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,Dd(a.g,c,d,e),0);if(a.A[b])return u(v,td(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,Id(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,
273
+ m,e));l.captions&&l.captions.length&&(n=a.h[g.bb].timestampOffset,p=Gd(l.captions),Id(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;Fd(a.g,b,c)}function Ci(a){a.g&&Fd(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)})};
274
+ 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)})};
275
+ function Gi(a,b,c,d,e){var f;return I(function(g){f=Mb;return b==f.ka?(a.g.B=c,Ed(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)})}
276
+ 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){lf(a.D);c={start:c,p:new Lc};a.i[b].push(c);1==a.i[b].length&&Ji(a,b);return c.p}
277
+ function Hi(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:lf(a.D);c=[];d={};for(e in a.h)d.kc=new Lc,f={start:function(l){return function(){return l.kc.resolve()}}(d),p:d.kc},a.i[e].push(f),c.push(d.kc),1==a.i[e].length&&f.start(),d={kc:d.kc};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)}
278
+ 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&&(Uc()||Sc())&&"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.ya=b;this.ra=c}Ki.prototype.xc=function(){return this.ya};Ki.prototype.sc=function(){return this.ra};function Li(a,b){return a&&b?a.xc()==b.xc()&&a.sc()==b.sc()&&gc(a.Ea(),b.Ea()):a==b}K("shaka.media.InitSegmentReference",Ki);Ki.prototype.getEndByte=Ki.prototype.sc;Ki.prototype.getStartByte=Ki.prototype.xc;
279
+ 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.ya=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.Uf=function(){return this.endTime};q.xc=function(){return this.ya};q.sc=function(){return this.ra};q.ng=function(){return this.tilesLayout};
280
+ q.mg=function(){return this.i};K("shaka.media.SegmentReference",Mi);Mi.prototype.getTileDuration=Mi.prototype.mg;Mi.prototype.getTilesLayout=Mi.prototype.ng;Mi.prototype.getEndByte=Mi.prototype.sc;Mi.prototype.getStartByte=Mi.prototype.xc;Mi.prototype.getEndTime=Mi.prototype.Uf;Mi.prototype.getStartTime=Mi.prototype.getStartTime;Mi.prototype.getUris=Mi.prototype.Ea;function Q(a,b,c){this.l=a;this.ld=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.cg=function(){return this.g};q.Ya=function(a){this.i=a};q.gg=function(){return this.l};q.lf=function(a){this.v=a};q.Hc=function(a){this.A=a};q.se=function(a){this.m=a};q.Rg=function(a){this.ld=a};q.Tf=function(){return this.ld};
275
281
  q.Zb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Wd(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.Qd=function(){this.G=!0};q.Wd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.Vd=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)};
276
- q.V=function(){return Infinity==this.i&&!this.A};q.Gb=function(){return Infinity!=this.i&&!this.A};q.jb=function(){return Math.max(this.B,this.Cb()-this.m)};q.pf=function(a){this.B=a};q.Cb=function(){return this.V()||this.Gb()?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.wc=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.Cb()-this.m+a,this.ib()))};q.Wb=function(){return this.wc(0)};
277
- q.ib=function(){return Math.max(0,this.Cb()-(this.V()||this.Gb()?this.ld:0))};q.tf=function(){return null==this.l||null!=this.h&&this.D?!1:!0};q.kf=function(a){this.F=a};J("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.kf;Q.prototype.usingPresentationStartTime=Q.prototype.tf;Q.prototype.getSeekRangeEnd=Q.prototype.ib;Q.prototype.getSeekRangeStart=Q.prototype.Wb;Q.prototype.getSafeSeekRangeStart=Q.prototype.wc;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Cb;
278
- Q.prototype.setUserSeekStart=Q.prototype.pf;Q.prototype.getSegmentAvailabilityStart=Q.prototype.jb;Q.prototype.isInProgress=Q.prototype.Gb;Q.prototype.isLive=Q.prototype.V;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.Vd;Q.prototype.notifyMinSegmentStartTime=Q.prototype.Wd;Q.prototype.lockStartTime=Q.prototype.Qd;Q.prototype.notifySegments=Q.prototype.Zb;Q.prototype.getDelay=Q.prototype.Tf;Q.prototype.setDelay=Q.prototype.Rg;
279
- Q.prototype.setSegmentAvailabilityDuration=Q.prototype.se;Q.prototype.setStatic=Q.prototype.Hc;Q.prototype.setClockOffset=Q.prototype.lf;Q.prototype.getPresentationStartTime=Q.prototype.gg;Q.prototype.setDuration=Q.prototype.Ya;Q.prototype.getMaxSegmentDuration=Q.prototype.cg;Q.prototype.getDuration=Q.prototype.getDuration;function qi(a,b){this.j=a;this.m=ri(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.v=b;this.i=function(){}}qi.prototype.release=function(){this.j=null;this.i=function(){}};function si(a,b){a.i=b}function ti(a){this.g=a}function ri(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(Rh(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 ui(a,b,c,d,e){var f=this;this.g=a;this.D=b;this.l=c;this.B=e;this.i=new mf;this.A=!1;this.F=a.readyState;this.j=!1;this.h=d;this.v=!1;this.i.o(a,"waiting",function(){return vi(f)});this.m=(new P(function(){vi(f)})).ia(.25)}ui.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};ui.prototype.$d=function(){this.v=!0;vi(this)};
280
- function vi(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=ri(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=Sh(b,g,a.l.gapDetectionThreshold);if(!(null==
281
- 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 L("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 wi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=xi.value().get(b),c.Ga(a,b,d))}var xi=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 yi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new mf;this.i=new zi(a);wi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ai(d,d.j)})}yi.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 Di(a){return a.m?a.g.currentTime:a.j}function Ei(a,b){0<a.g.readyState?Fi(a.i,b):wi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ai(a,a.j)})}
282
- function Ai(a,b){.001>Math.abs(a.g.currentTime-b)?Gi(a):(a.h.Ga(a.g,"seeking",function(){Gi(a)}),Fi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Gi(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function zi(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--)})}zi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
283
- function Fi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ia(.1)};function Hi(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.Ga(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new mf;wi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}Hi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};Hi.prototype.v=function(a){this.h=this.j?this.h:a};Hi.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};Hi.prototype.F=function(){};
284
- function Ii(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.G=b.minBufferTime||0;this.l=c;this.D=e;this.B=null;this.j=new ui(a,b.presentationTimeline,c,Ji(a,c),f);this.h=new yi(a,function(){a:{var h=g.j;h.A=!0;h.v=!1;h.j=!1;var k=Di(g.h);h=Ki(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;Ei(g.h,h);h=void 0;break a}g.D();h=void 0}return h},Li(this,d));this.A=(new P(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Di(g.h),k=g.g.Wb(),l=g.g.ib();3>l-k&&(k=
285
- l-3);h<k&&(h=Ki(g,h),g.i.currentTime=h)}})).ia(.25)}Ii.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.A&&(this.A.stop(),this.A=null);this.i=this.h=this.g=this.l=null;this.D=function(){}};Ii.prototype.v=function(a){Ei(this.h,a)};Ii.prototype.m=function(){var a=Di(this.h);return 0<this.i.readyState&&!this.i.paused?Mi(this,a):a};
286
- function Li(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Wb():a.g.ib():0>b&&(b=a.g.ib()+b);return Ni(a,Mi(a,b))}Ii.prototype.F=function(){this.j.$d()};function Ni(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Ki(a,b){var c=Math.max(a.G,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Wb(),f=a.g.ib(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.wc(c),k=a.g.wc(d);c=a.g.wc(c+d);return b>=g?Ni(a,b):b>f?f:b<e?Ph(a.i.buffered,k)?k:c:b>=h||Ph(a.i.buffered,b)?b:c}
287
- function Mi(a,b){var c=a.g.Wb();if(b<c)return c;c=a.g.ib();return b>c?c:b}function Ji(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new qi(new ti(a),b.stallThreshold);si(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Oi(a){this.N=a;this.g=null;this.h=0;this.i=!1}q=Oi.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.wg=function(){this.i=!0};
282
+ 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.pf=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.wc=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.Wb=function(){return this.wc(0)};
283
+ q.ib=function(){return Math.max(0,this.Db()-(this.V()||this.Hb()?this.ld:0))};q.tf=function(){return null==this.l||null!=this.h&&this.D?!1:!0};q.kf=function(a){this.F=a};K("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.kf;Q.prototype.usingPresentationStartTime=Q.prototype.tf;Q.prototype.getSeekRangeEnd=Q.prototype.ib;Q.prototype.getSeekRangeStart=Q.prototype.Wb;Q.prototype.getSafeSeekRangeStart=Q.prototype.wc;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Db;
284
+ Q.prototype.setUserSeekStart=Q.prototype.pf;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.Vd;Q.prototype.notifyMinSegmentStartTime=Q.prototype.Wd;Q.prototype.lockStartTime=Q.prototype.Qd;Q.prototype.notifySegments=Q.prototype.Zb;Q.prototype.getDelay=Q.prototype.Tf;Q.prototype.setDelay=Q.prototype.Rg;
285
+ Q.prototype.setSegmentAvailabilityDuration=Q.prototype.se;Q.prototype.setStatic=Q.prototype.Hc;Q.prototype.setClockOffset=Q.prototype.lf;Q.prototype.getPresentationStartTime=Q.prototype.gg;Q.prototype.setDuration=Q.prototype.Ya;Q.prototype.getMaxSegmentDuration=Q.prototype.cg;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 mf;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.$d=function(){this.v=!0;Si(this)};
286
+ 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==
287
+ 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 mf;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)})}
288
+ 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};
289
+ 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){function b(){null==c.h||0==c.h?c.j=!0:(c.i.Ga(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new mf;Ti(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}bj.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};bj.prototype.v=function(a){this.h=this.j?this.h:a};bj.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};bj.prototype.F=function(){};
290
+ function cj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.G=b.minBufferTime||0;this.l=c;this.D=e;this.B=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.B||g.B<k-1)){g.B=k;Zi(g.h,h);h=void 0;break a}g.D();h=void 0}return h},fj(this,d));this.A=(new P(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Yi(g.h),k=g.g.Wb(),l=g.g.ib();3>l-k&&(k=
291
+ l-3);h<k&&(h=ej(g,h),g.i.currentTime=h)}})).ia(.25)}cj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.A&&(this.A.stop(),this.A=null);this.i=this.h=this.g=this.l=null;this.D=function(){}};cj.prototype.v=function(a){Zi(this.h,a)};cj.prototype.m=function(){var a=Yi(this.h);return 0<this.i.readyState&&!this.i.paused?gj(this,a):a};
292
+ function fj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Wb():a.g.ib():0>b&&(b=a.g.ib()+b);return hj(a,gj(a,b))}cj.prototype.F=function(){this.j.$d()};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.G,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Wb(),f=a.g.ib(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.wc(c),k=a.g.wc(d);c=a.g.wc(c+d);return b>=g?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 gj(a,b){var c=a.g.Wb();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.wg=function(){this.i=!0};
288
294
  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};
289
- q.fd=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.Yb=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.fd(a);this.zb(b)};q.zb=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}};
290
- 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 pi(a.startTime,b,a.j,a.ya,a.ra,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.i))}};
291
- q.pd=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))};Oi.prototype[Symbol.iterator]=function(){return this.Bb(0)};Oi.prototype.Bb=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 Pi(this,b,d)};
292
- function Qi(a,b,c){return new Oi([new pi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}J("shaka.media.SegmentIndex",Oi);Oi.forSingleSegment=Qi;Oi.prototype.getIteratorForTime=Oi.prototype.Bb;Oi.prototype.updateEvery=Oi.prototype.pd;Oi.prototype.fit=Oi.prototype.sb;Oi.prototype.evict=Oi.prototype.zb;Oi.prototype.mergeAndEvict=Oi.prototype.Yb;Oi.prototype.merge=Oi.prototype.fd;Oi.prototype.offset=Oi.prototype.offset;Oi.prototype.get=Oi.prototype.get;Oi.prototype.find=Oi.prototype.find;
293
- Oi.prototype.markImmutable=Oi.prototype.wg;Oi.prototype.release=Oi.prototype.release;Oi.prototype.destroy=Oi.prototype.destroy;function Pi(a,b,c){this.i=a;this.h=b;this.g=c}Pi.prototype.seek=function(a){yb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.Bb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
294
- Pi.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};Pi.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}};J("shaka.media.SegmentIterator",Pi);Pi.prototype.next=Pi.prototype.next;Pi.prototype.current=Pi.prototype.current;
295
- Pi.prototype.seek=Pi.prototype.seek;function Ri(){Oi.call(this,[]);this.j=[]}pa(Ri,Oi);q=Ri.prototype;q.clone=function(){var a=new Ri;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};
296
- 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.fd=function(){};q.zb=function(){};q.Yb=function(){};q.sb=function(){};q.pd=function(){};J("shaka.media.MetaSegmentIndex",Ri);Ri.prototype.updateEvery=Ri.prototype.pd;Ri.prototype.fit=Ri.prototype.sb;Ri.prototype.mergeAndEvict=Ri.prototype.Yb;Ri.prototype.evict=Ri.prototype.zb;Ri.prototype.merge=Ri.prototype.fd;
297
- Ri.prototype.offset=Ri.prototype.offset;Ri.prototype.get=Ri.prototype.get;Ri.prototype.find=Ri.prototype.find;Ri.prototype.release=Ri.prototype.release;function Si(a){var b=this;this.g=a;this.j=!1;this.i=this.g.$c();this.h=new P(function(){b.g.bf(.25*b.i)})}Si.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Si.prototype.set=function(a){this.i=a;Ti(this)};Si.prototype.Xc=function(){return this.g.Xc()};function Ti(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.$c()!=b&&a.g.qe(b);return}catch(c){}a.h.ia(.25);0!=a.g.$c()&&a.g.qe(0)};function Ui(a){var b=this;this.h=a;this.g=new Set;this.i=(new P(function(){Vi(b,!1)})).ia(.25)}Ui.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()};
298
- function Vi(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?Wi:e>h.endTime?Xi:Yi;d.g.set(h,l);for(var m=t(d.j),n=m.next();!n.done;n=m.next())n=n.value,n.Pb==k&&n.Ob==l&&n.Fb(h,f)}}};function Zi(a){db.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 L("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ia(2)}pa(Zi,db);Zi.prototype.release=function(){this.g.clear();this.h.stop();db.prototype.release.call(this)};function $i(a){db.call(this);var b=this;this.i=a;this.g=new Map;this.j=[{Pb:null,Ob:Yi,Fb:function(c,d){return aj(b,"enter",c,d)}},{Pb:Wi,Ob:Yi,Fb:function(c,d){return aj(b,"enter",c,d)}},{Pb:Xi,Ob:Yi,Fb:function(c,d){return aj(b,"enter",c,d)}},{Pb:Yi,Ob:Wi,Fb:function(c,d){return aj(b,"exit",c,d)}},{Pb:Yi,Ob:Xi,Fb:function(c,d){return aj(b,"exit",c,d)}},{Pb:Wi,Ob:Xi,Fb:function(c,d){return aj(b,"skip",c,d)}},{Pb:Xi,Ob:Wi,Fb:function(c,d){return aj(b,"skip",c,d)}}];this.h=new mf;this.h.o(this.i,"regionremove",
299
- function(c){b.g["delete"](c.region)})}pa($i,db);$i.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;db.prototype.release.call(this)};function aj(a,b,c,d){b=new L(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Wi=1,Yi=2,Xi=3;function bj(a,b,c,d,e){a=cf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function cj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.B=1;this.v=this.l=null;this.h=new Map;this.D=!1;this.F=null;this.A=!1;this.i=new kf(function(){return dj(c)})}cj.prototype.destroy=function(){return this.i.destroy()};function dj(a){var b,c,d,e;return H(function(f){if(1==f.g){b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,ej(e),b.push(fj(e));return u(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.j=null;z(f)})}
300
- cj.prototype.configure=function(a){this.j=a;this.F=new Le({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)};cj.prototype.start=function(){var a=this;return H(function(b){if(1==b.g)return u(b,gj(a),2);lf(a.i);a.D=!0;z(b)})};
301
- function hj(a,b){var c,d,e,f,g,h;H(function(k){switch(k.g){case 1:return c=Mb,A(k,2),u(k,ii(a.g.T,c.ka),4);case 4:ua(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=ud(b.mimeType,b.codecs);Xh(a.g.T,e);f=a.g.T.l;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=ij(b),a.h.set(c.ka,h),jj(a,h,0);z(k)}})}function kj(a){var b=a.h.get(Lb);b&&(ej(b),fj(b)["catch"](function(){}),a.h["delete"](Lb));a.v=null}
302
- function lj(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Lb&&(mj(a,e,!1,0,!1),c.Lb=d)}else if(d=c.Lb)c.Lb=null,mj(a,d,!0,0,!1)}}function nj(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&&mj(a,b.video,c,d,e),b.audio&&mj(a,b.audio,c,d,e))}function oj(a,b){a.v=b;a.D&&mj(a,b,!0,0,!1)}
303
- function mj(a,b,c,d,e){var f=a.h.get(b.type);f||b.type!=Lb?f&&(f.Lb&&(b.trickModeVideo?(f.Lb=b,b=b.trickModeVideo):f.Lb=null),f.stream!=b||e)&&(b.type==Lb&&Xh(a.g.T,ud(b.mimeType,b.codecs)),f.stream=b,f.oa=null,c&&(f.qc?f.sd=!0:f.Xa?(f.Nb=!0,f.Sc=d,f.sd=!0):(ej(f),pj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),qj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):hj(a,b)}
304
- function qj(a,b){var c,d;return H(function(e){if(1==e.g){if(!b.La)return e["return"]();c=b.stream;d=b.La;return c.segmentIndex?e.C(2):u(e,c.createSegmentIndex(),2)}if(b.La!=d||b.stream!=c)return e["return"]();var f=a.g.Zc();var g=bi(a.g.T,b.type),h=b.stream.segmentIndex.find(b.Qa?b.Qa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ra?k.ra-k.ya:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ra?k.ra-k.ya:null)||0),k=a.g.getBandwidthEstimate(),
305
- f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.La.h.g>h?!0:!1):f=!1;f&&b.La.abort();z(e)})}function rj(a,b){b.qc||b.Nb||(b.Xa?(b.Nb=!0,b.Sc=0):null==$h(a.g.T,b.type)?null==b.$a&&jj(a,b,0):(ej(b),pj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
306
- function gj(a){var b,c,d,e,f,g,h,k,l,m;return H(function(n){if(1==n.g){b=Mb;if(!a.l)throw new M(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.wb,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.T;f=a.j.forceTransmuxTS;return u(n,e.init(c,f),2)}lf(a.i);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.T.Ya(p):a.g.T.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.h.has(k)||
307
- (m=ij(l),a.h.set(k,m),jj(a,m,0));z(n)})}function ij(a){return{stream:a,type:a.type,oa:null,Qa:null,ed:null,Pd:null,Od:null,Nd:null,Lb:null,endOfStream:!1,Xa:!1,$a:null,Nb:!1,Sc:0,sd:!1,qc:!1,ce:!1,yc:!1,La:null}}
308
- function sj(a,b){var c,d,e,f,g;return H(function(h){switch(h.g){case 1:lf(a.i);if(b.Xa||null==b.$a||b.qc)return h["return"]();b.$a=null;if(!b.Nb){h.C(2);break}return u(h,pj(a,b,b.sd,b.Sc),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 null==b.$a&&jj(a,b,0),h["return"]();case 4:A(h,6);d=tj(a,b);null!=d&&(jj(a,b,d),b.yc=!1);ua(h,7);break;case 6:return e=F(h),u(h,uj(a,e),8);case 8:return h["return"]();
309
- case 7:f=Array.from(a.h.values());if(!a.D||!f.every(function(k){return k.endOfStream})){h.C(0);break}return u(h,a.g.T.endOfStream(),10);case 10:lf(a.i),g=a.g.T.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ya(g),z(h)}})}
310
- function tj(a,b){if(vj(b))return gi(a.g.T,b.stream.originalId||""),null;b.type==Lb&&hi(a.g.T);var c=a.g.Zc(),d=b.Qa?b.Qa.endTime:c,e=ci(a.g.T,b.type,c),f=Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal,a.j.bufferingGoal)*a.B;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.h.get(Lb))&&vj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=bi(a.g.T,b.type);e=wj(a,b,c,e);if(!e)return a.j.updateIntervalSeconds;f=Infinity;
311
- var g=Array.from(a.h.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,vj(h)||h.oa&&!h.oa.current()||(f=Math.min(f,h.Qa?h.Qa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;xj(a,b,c,e)["catch"](function(){});return null}
312
- function wj(a,b,c,d){if(b.oa)return b.oa.current();if(b.Qa||d)return b.oa=b.stream.segmentIndex.Bb(b.Qa?b.Qa.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.Bb(d),e=b.oa&&b.oa.next().value);e||(b.oa=b.stream.segmentIndex.Bb(c),e=b.oa&&b.oa.next().value);return e}
313
- function xj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,v,y;return H(function(x){switch(x.g){case 1:return e=Mb,f=b.stream,g=b.oa,b.Xa=!0,A(x,2),u(x,yj(a,b,d),4);case 4:lf(a.i);if(a.A)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(w){var C,D,B;return H(function(E){lf(a.i);if(a.A)return E["return"]();n=zj(n,w);C=!1;D=0;(new sg).box("mdat",function(G){D=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C)return E.C(0);
314
- B=n.subarray(0,D);n=n.subarray(D);return u(E,Aj(a,b,c,f,d,B),0)})},u(x,Bj(a,b,d,p),6);l=Bj(a,b,d);return u(x,l,7);case 7:return m=x.h,lf(a.i),a.A?x["return"]():b.Nb?(b.Xa=!1,jj(a,b,0),x["return"]()):u(x,Aj(a,b,c,f,d,m),6);case 6:lf(a.i);if(a.A)return x["return"]();b.Qa=d;g.next();b.Xa=!1;b.ce=!1;r=a.g.T.Wc();v=r[b.type];Xa(JSON.stringify(v));b.Nb||a.g.$d();jj(a,b,0);ua(x,0);break;case 2:y=F(x);lf(a.i,y);if(a.A)return x["return"]();b.Xa=!1;if(7001==y.code)b.Xa=!1,b.$a=null,jj(a,b,0),x.C(0);else if(b.type==
315
- e.ka&&a.j.ignoreTextStreamFailures)a.h["delete"](e.ka),x.C(0);else if(3017==y.code)Cj(a,b,y),x.C(0);else if(1001==y.code&&y.data&&404==y.data[1])b.Xa=!1,b.$a=null,jj(a,b,1),x.C(0);else return b.yc=!0,y.severity=2,u(x,uj(a,y),0)}})}function zj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
316
- function Cj(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.ce})){var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.yc=!0;a.A=!0;a.g.onError(c);return}b.ce=!0}jj(a,b,4)}
317
- function yj(a,b,c){var d,e,f,g,h,k,l;return H(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Pd||e!=b.Od||f!=b.Nd)h=function(){var n;return H(function(p){if(1==p.g)return A(p,2),b.Od=e,b.Nd=f,b.Pd=g,u(p,ji(a.g.T,b.type,g,e,f),4);if(2!=p.g)return ua(p,0);n=F(p);b.Od=null;b.Nd=null;b.Pd=null;throw n;})},d.push(h());!oi(c.h,b.ed)&&(b.ed=c.h)&&(k=Bj(a,b,c.h),l=function(){var n,p,r;return H(function(v){switch(v.g){case 1:return A(v,2),u(v,k,4);
318
- case 4:return n=v.h,lf(a.i),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,di(a.g.T,b.type,n,null,null,p),5);case 5:ua(v,0);break;case 2:throw r=F(v),b.ed=null,r;}})},d.push(l()));return u(m,Promise.all(d),0)})}
319
- function Aj(a,b,c,d,e,f){var g;return H(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new sg).U("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Dc();var n=k.reader.Dc();var p=k.reader.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.cc()/p+e.timestampOffset,r=x-e.startTime,v=k.reader.O(),y=k.reader.O(),m=k.reader.Dc(),n=k.reader.Dc();
320
- k=k.reader.ub(k.reader.S.byteLength-k.reader.ea());l&&l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.g.Ag():(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 L(Dj,l),a.g.onEvent(l)))}).parse(f),u(h,Ej(a,b,c),2);if(3!=h.g)return lf(a.i),u(h,di(a.g.T,b.type,f,e.startTime,e.endTime,g),3);lf(a.i);z(h)})}
321
- function Ej(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=$h(a.g.T,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.T.remove(b.type,e,e+g),2)}lf(a.i);z(h)})}function vj(a){return a&&a.type==Lb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
322
- function Bj(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g)return e=jf,f=bj(c.Ea(),c.ya,c.ra,a.j.retryParameters,d),g=a.g.Jb.request(e,f),b.La=g,u(k,g.promise,2);h=k.h;b.La=null;return k["return"](h.data)})}
323
- function pj(a,b,c,d){var e,f;return H(function(g){if(1==g.g)return b.Nb=!1,b.sd=!1,b.Sc=0,b.qc=!0,b.Qa=null,b.ed=null,b.oa=null,d?(e=a.g.Zc(),f=a.g.T.getDuration(),u(g,a.g.T.remove(b.type,e+d,f),3)):u(g,ii(a.g.T,b.type),4);if(3!=g.g)return lf(a.i),c?u(g,a.g.T.flush(b.type),3):g.C(3);lf(a.i);b.qc=!1;b.endOfStream=!1;jj(a,b,0);z(g)})}
324
- function jj(a,b,c){var d=b.type;if(d!=Lb||a.h.has(d))b.$a=(new Nc(function(){var e;return H(function(f){if(1==f.g)return A(f,2),u(f,sj(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 ej(a){null!=a.$a&&(a.$a.stop(),a.$a=null)}function fj(a){return H(function(b){return a.La?u(b,a.La.abort(),0):b.C(0)})}function uj(a,b){return H(function(c){if(1==c.g)return u(c,Ne(a.F),2);lf(a.i);a.g.onError(b);b.handled||a.j.failureCallback(b);z(c)})};function Fj(a,b){var c=Gj(),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 Hj(d)});this.A=new kf(function(){return Ij(d)})}Fj.prototype.destroy=function(){return this.A.destroy()};function Ij(a){var b,c,d;return H(function(e){if(1==e.g)return a.h&&a.h.abort(),Jj(a),u(e,a.B,2);a.g&&a.g.Va.Kb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Va.Kb();a.g=null;a.m=[];a.j=null;z(e)})}
325
- function Kj(a,b){var c={$b:function(){},gd:function(){},Kb:function(){},onError:function(){},jd:function(){},ki:function(){}};a.m.push({create:b,Va:c});a.h&&a.h.abort();Jj(a);return c}
326
- function Hj(a){return H(function(b){if(a.A.g)b=b.C(0);else{if(0==a.m.length||a.g&&!a.g.Eb)var c=!1;else{a.g&&(a.g.Va.Kb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Va.$b(),a.g={node:d.node,payload:d.payload,Eb:d.Eb,Va:c.Va}):c.Va.jd();c=!0}c?c=Promise.resolve():a.g?c=Lj(a):(a.j.zg(a.i),a.v=new Lc,c=a.v);b=u(b,c,1)}return b})}
327
- function Lj(a){var b,c;return H(function(d){switch(d.g){case 1:return a.i=a.j.eg(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.Jf(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.Va.gd(),a.g=null);ua(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Va.Kb();else a.g.Va.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 Jj(a){a.v&&(a.v.resolve(),a.v=null)};function Mj(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=Mj.prototype;q.remove=function(a,b){if(!this.g)return!1;Nj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
295
+ q.fd=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.Yb=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.fd(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}};
296
+ 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.ya,a.ra,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.i))}};
297
+ q.pd=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)};
298
+ 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.pd;ij.prototype.fit=ij.prototype.sb;ij.prototype.evict=ij.prototype.Ab;ij.prototype.mergeAndEvict=ij.prototype.Yb;ij.prototype.merge=ij.prototype.fd;ij.prototype.offset=ij.prototype.offset;ij.prototype.get=ij.prototype.get;ij.prototype.find=ij.prototype.find;
299
+ ij.prototype.markImmutable=ij.prototype.wg;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};
300
+ 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;
301
+ 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};
302
+ 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.fd=function(){};q.Ab=function(){};q.Yb=function(){};q.sb=function(){};q.pd=function(){};K("shaka.media.MetaSegmentIndex",lj);lj.prototype.updateEvery=lj.prototype.pd;lj.prototype.fit=lj.prototype.sb;lj.prototype.mergeAndEvict=lj.prototype.Yb;lj.prototype.evict=lj.prototype.Ab;lj.prototype.merge=lj.prototype.fd;
303
+ 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.$c();this.h=new P(function(){b.g.bf(.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.Xc=function(){return this.g.Xc()};function nj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.$c()!=b&&a.g.qe(b);return}catch(c){}a.h.ia(.25);0!=a.g.$c()&&a.g.qe(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()};
304
+ 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.Pb==k&&n.Ob==l&&n.Gb(h,f)}}};function tj(a){db.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,db);tj.prototype.release=function(){this.g.clear();this.h.stop();db.prototype.release.call(this)};function uj(a){db.call(this);var b=this;this.i=a;this.g=new Map;this.j=[{Pb:null,Ob:sj,Gb:function(c,d){return vj(b,"enter",c,d)}},{Pb:qj,Ob:sj,Gb:function(c,d){return vj(b,"enter",c,d)}},{Pb:rj,Ob:sj,Gb:function(c,d){return vj(b,"enter",c,d)}},{Pb:sj,Ob:qj,Gb:function(c,d){return vj(b,"exit",c,d)}},{Pb:sj,Ob:rj,Gb:function(c,d){return vj(b,"exit",c,d)}},{Pb:qj,Ob:rj,Gb:function(c,d){return vj(b,"skip",c,d)}},{Pb:rj,Ob:qj,Gb:function(c,d){return vj(b,"skip",c,d)}}];this.h=new mf;this.h.o(this.i,"regionremove",
305
+ function(c){b.g["delete"](c.region)})}pa(uj,db);uj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;db.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=cf(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 kf(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)})}
306
+ xj.prototype.configure=function(a){this.j=a;this.F=new Le({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);lf(a.h);a.D=!0;z(b)})};
307
+ 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.T,c.ka),4);case 4:ua(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=ud(b.mimeType,b.codecs);ri(a.g.T,e);f=a.g.T.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 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.Mb&&(Hj(a,e,!1,0,!1),c.Mb=d)}else if(d=c.Mb)c.Mb=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)}
309
+ function Hj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=Lb?f&&(f.Mb&&(b.trickModeVideo?(f.Mb=b,b=b.trickModeVideo):f.Mb=null),f.stream!=b||e)&&(b.type==Lb&&ri(a.g.T,ud(b.mimeType,b.codecs)),f.stream=b,f.oa=null,c&&(f.qc?f.sd=!0:f.Ra?(f.wb=!0,f.Sc=d,f.sd=!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 Lj(a,b){var c,d;return I(function(e){if(1==e.g){if(!b.La)return e["return"]();c=b.stream;d=b.La;return c.segmentIndex?e.C(2):u(e,c.createSegmentIndex(),2)}if(b.La!=d||b.stream!=c)return e["return"]();var f=a.g.Zc();var g=wi(a.g.T,b.type),h=b.stream.segmentIndex.find(b.Qa?b.Qa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ra?k.ra-k.ya:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ra?k.ra-k.ya:null)||0),k=a.g.getBandwidthEstimate(),
311
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.La.h.g>h?!0:!1):f=!1;f&&b.La.abort();z(e)})}function Mj(a,b){b.qc||b.wb||(b.Ra?(b.wb=!0,b.Sc=0):null==ui(a.g.T,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)})))}
312
+ 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.T;f=a.j.forceTransmuxTS;return u(n,e.init(c,f),2)}lf(a.h);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.T.Ya(p):a.g.T.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)||
313
+ (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,Qa:null,ed:null,Pd:null,Od:null,Nd:null,Mb:null,endOfStream:!1,Ra:!1,$a:null,wb:!1,Sc:0,sd:!1,qc:!1,ce:!1,yc:!1,La:null}}
314
+ function Nj(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:lf(a.h);if(b.Ra||null==b.$a||b.qc)return h["return"]();b.$a=null;if(!b.wb){h.C(2);break}return u(h,Kj(a,b,b.sd,b.Sc),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 null==b.$a&&Ej(a,b,0),h["return"]();case 4:A(h,6);d=Oj(a,b);null!=d&&(Ej(a,b,d),b.yc=!1);ua(h,7);break;case 6:return e=F(h),u(h,Pj(a,e),8);case 8:return h["return"]();
315
+ 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.T.endOfStream(),10);case 10:lf(a.h),g=a.g.T.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ya(g),z(h)}})}
316
+ function Oj(a,b){if(Qj(b))return Bi(a.g.T,b.stream.originalId||""),null;b.type==Lb&&Ci(a.g.T);var c=a.g.Zc(),d=b.Qa?b.Qa.endTime:c,e=xi(a.g.T,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.T,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;
317
+ 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.Qa?h.Qa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;Sj(a,b,c,e)["catch"](function(){});return null}
318
+ function Rj(a,b,c,d){if(b.oa)return b.oa.current();if(b.Qa||d)return b.oa=b.stream.segmentIndex.Cb(b.Qa?b.Qa.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}
319
+ function Sj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,v,y,x,w,D;return I(function(B){switch(B.g){case 1:return e=Mb,f=b.stream,g=b.oa,b.Ra=!0,A(B,2),u(B,Tj(a,b,d),4);case 4:lf(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(C){var E,G,H;return I(function(L){if(p)return L["return"]();r=!0;lf(a.h);if(a.A)return L["return"]();n=Uj(n,C);E=!1;G=0;(new Ng).box("mdat",function(J){G=
320
+ 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,lf(a.h),a.A?B["return"]():b.wb?(b.Ra=!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;lf(a.h);return a.A?B["return"]():b.wb?(b.Ra=!1,Ej(a,b,0),B["return"]()):u(B,Vj(a,b,c,f,d,y),6);case 6:lf(a.h);if(a.A)return B["return"]();b.Qa=d;g.next();b.Ra=!1;b.ce=!1;x=a.g.T.Wc();w=
321
+ x[b.type];Xa(JSON.stringify(w));b.wb||a.g.$d();Ej(a,b,0);ua(B,0);break;case 2:D=F(B);lf(a.h,D);if(a.A)return B["return"]();b.Ra=!1;if(7001==D.code)b.Ra=!1,b.$a=null,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==D.code)Xj(a,b,D),B.C(0);else if(1001==D.code&&D.data&&404==D.data[1])b.Ra=!1,b.$a=null,Ej(a,b,1),B.C(0);else return b.yc=!0,D.severity=2,u(B,Pj(a,D),0)}})}
322
+ function Uj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Xj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.ce})){var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.yc=!0;a.A=!0;a.g.onError(c);return}b.ce=!0}Ej(a,b,4)}
323
+ 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.Pd||e!=b.Od||f!=b.Nd)h=function(){var n;return I(function(p){if(1==p.g)return A(p,2),b.Od=e,b.Nd=f,b.Pd=g,u(p,Gi(a.g.T,b.type,g,e,f),4);if(2!=p.g)return ua(p,0);n=F(p);b.Od=null;b.Nd=null;b.Pd=null;throw n;})},d.push(h());!Li(c.h,b.ed)&&(b.ed=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);
324
+ case 4:return n=v.h,lf(a.h),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,yi(a.g.T,b.type,n,null,null,p),5);case 5:ua(v,0);break;case 2:throw r=F(v),b.ed=null,r;}})},d.push(l()));return u(m,Promise.all(d),0)})}
325
+ 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).U("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Dc();var n=k.reader.Dc();var p=k.reader.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.cc()/p+e.timestampOffset,r=x-e.startTime,v=k.reader.O(),y=k.reader.O(),m=k.reader.Dc(),n=k.reader.Dc();
326
+ k=k.reader.ub(k.reader.S.byteLength-k.reader.ea());l&&l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.g.Ag():(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 lf(a.h),u(h,yi(a.g.T,b.type,f,e.startTime,e.endTime,g),3);lf(a.h);z(h)})}
327
+ 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.T,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.T.remove(b.type,e,e+g),2)}lf(a.h);z(h)})}function Qj(a){return a&&a.type==Lb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
328
+ function Wj(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g)return e=jf,f=wj(c.Ea(),c.ya,c.ra,a.j.retryParameters,d),g=a.g.Kb.request(e,f),b.La=g,u(k,g.promise,2);h=k.h;b.La=null;return k["return"](h.data)})}
329
+ function Kj(a,b,c,d){var e,f;return I(function(g){if(1==g.g)return b.wb=!1,b.sd=!1,b.Sc=0,b.qc=!0,b.Qa=null,b.ed=null,b.oa=null,d?(e=a.g.Zc(),f=a.g.T.getDuration(),u(g,a.g.T.remove(b.type,e+d,f),3)):u(g,Fi(a.g.T,b.type),4);if(3!=g.g)return lf(a.h),c?u(g,a.g.T.flush(b.type),3):g.C(3);lf(a.h);b.qc=!1;b.endOfStream=!1;Ej(a,b,0);z(g)})}
330
+ 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.La?u(b,a.La.abort(),0):b.C(0)})}function Pj(a,b){return I(function(c){if(1==c.g)return u(c,Ne(a.F),2);lf(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 kf(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.Lb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Wa.Lb();a.g=null;a.m=[];a.j=null;z(e)})}
331
+ function fk(a,b){var c={$b:function(){},gd:function(){},Lb:function(){},onError:function(){},jd:function(){},ki:function(){}};a.m.push({create:b,Wa:c});a.h&&a.h.abort();ek(a);return c}
332
+ 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.Lb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Wa.$b(),a.g={node:d.node,payload:d.payload,Fb:d.Fb,Wa:c.Wa}):c.Wa.jd();c=!0}c?c=Promise.resolve():a.g?c=gk(a):(a.j.zg(a.i),a.v=new Lc,c=a.v);b=u(b,c,1)}return b})}
333
+ function gk(a){var b,c;return I(function(d){switch(d.g){case 1:return a.i=a.j.eg(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.Jf(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.gd(),a.g=null);ua(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Wa.Lb();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};
328
334
  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",
329
- "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={Qb:f.Qb},g=d.next())f.Qb=g.value,a.some(function(h){return function(k){return k.startTime==h.Qb.startTime&&k.endTime==h.Qb.endTime&&k.text==h.Qb.payload?!0:!1}}(f))||(g=Oj(f.Qb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=
330
- 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&&(Nj(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"};
331
- function Oj(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}
332
- function Nj(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}J("shaka.text.SimpleTextDisplayer",Mj);Mj.prototype.setTextVisibility=Mj.prototype.setTextVisibility;Mj.prototype.isTextVisible=Mj.prototype.isTextVisible;Mj.prototype.destroy=Mj.prototype.destroy;Mj.prototype.append=Mj.prototype.append;Mj.prototype.remove=Mj.prototype.remove;function Pj(){}function R(a){return document.createElement(a)}function Qj(){return document.createElement("button")}function Rj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}J("shaka.util.Dom",Pj);Pj.removeAllChildren=Rj;function Sj(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(){Tj(c)})).ia(.25);this.h=new Map;this.A=new mf;this.A.o(document,"fullscreenchange",function(){Tj(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){Tj(c,
333
- !0)}),this.l.observe(this.g));this.v=new Map}q=Sj.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);Tj(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)};
334
- 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});Tj(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
335
- function Uj(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.vf:null;l&&(g.push(l.Kd),l.Ec&&g.push(l.Ec),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Vj(a,k,e),l=a.h.get(k),n=l.vf,f=!0));0<k.nestedCues.length&&n&&Uj(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!=r.startTime?
336
- 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.Kd)):c.appendChild(d.Kd)}}function Tj(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())Rj(e.value);Rj(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));Uj(a,a.i,a.g,c,[])}}}
337
- function Vj(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&&Wj(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+
335
+ "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={Qb:f.Qb},g=d.next())f.Qb=g.value,a.some(function(h){return function(k){return k.startTime==h.Qb.startTime&&k.endTime==h.Qb.endTime&&k.text==h.Qb.payload?!0:!1}}(f))||(g=jk(f.Qb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=
336
+ 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"};
337
+ 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}
338
+ 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 mf;this.A.o(document,"fullscreenchange",function(){ok(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){ok(c,
339
+ !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)};
340
+ 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};
341
+ function pk(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.vf:null;l&&(g.push(l.Kd),l.Ec&&g.push(l.Ec),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(qk(a,k,e),l=a.h.get(k),n=l.vf,f=!0));0<k.nestedCues.length&&n&&pk(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!=r.startTime?
342
+ 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.Kd)):c.appendChild(d.Kd)}}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));pk(a,a.i,a.g,c,[])}}}
343
+ function qk(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&&rk(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+
338
344
  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,{Kd:f,vf:e,Ec:c})}
339
- function Wj(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=Xj(c.linePadding,c,a.m);f.paddingRight=Xj(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition=
340
- "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=Yj(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");
341
- g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Xj(c.fontSize,c,a.m);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=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==oc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==
345
+ function rk(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=sk(c.linePadding,c,a.m);f.paddingRight=sk(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition=
346
+ "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=tk(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");
347
+ g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=sk(c.fontSize,c,a.m);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=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==oc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==
342
348
  oc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%")));f.lineHeight=c.lineHeight;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);c.size&&(c.writingMode==
343
- mc?f.width=c.size+"%":f.height=c.size+"%")}function Xj(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 Yj(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}J("shaka.text.UITextDisplayer",Sj);
344
- Sj.prototype.setTextVisibility=Sj.prototype.setTextVisibility;Sj.prototype.isTextVisible=Sj.prototype.isTextVisible;Sj.prototype.remove=Sj.prototype.remove;Sj.prototype.destroy=Sj.prototype.destroy;Sj.prototype.append=Sj.prototype.append;function Zj(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+">"},
349
+ mc?f.width=c.size+"%":f.height=c.size+"%")}function sk(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 tk(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);
350
+ 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 uk(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+">"},
345
351
  "");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");
346
- 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}J("shaka.text.WebVttGenerator",function(){});function ak(){}
347
- function bk(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]=Ve(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ve(l)),k=bk(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 "+
348
- k),g=!1)}return g}function ck(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 dk(a,b){return a&&b}J("shaka.util.ConfigUtils",ak);ak.convertToConfigObject=ck;ak.mergeConfigObjects=bk;function ek(){}
349
- function fk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Me(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Zf,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Me(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
352
+ 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 vk(){}
353
+ function wk(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]=Ve(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ve(l)),k=wk(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 "+
354
+ k),g=!1)}return g}function xk(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 yk(a,b){return a&&b}K("shaka.util.ConfigUtils",vk);vk.convertToConfigObject=xk;vk.mergeConfigObjects=wk;function zk(){}
355
+ function Ak(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Me(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:vg,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Me(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
350
356
  ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},
351
- manifestPreprocessor:function(g){return dk([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1}},d={retryParameters:Me(),failureCallback:function(g){return dk([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,
352
- useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1};if(navigator.userAgent.match(/Edge\//)||Uc()||Wc())d.gapDetectionThreshold=.5;if(Vc()||Uc()||Wc())d.stallSkip=0;var e={trackSelectionCallback:function(g){return H(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return H(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),
353
- 3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return dk([g,h],void 0)},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new ue},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,
357
+ manifestPreprocessor:function(g){return yk([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1}},d={retryParameters:Me(),failureCallback:function(g){return yk([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,
358
+ useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1};if(navigator.userAgent.match(/Edge\//)||Uc()||Wc())d.gapDetectionThreshold=.5;if(Vc()||Uc()||Wc())d.stallSkip=0;var e={trackSelectionCallback:function(g){return I(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return I(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),
359
+ 3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return yk([g,h],void 0)},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new ue},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,
354
360
  minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};
355
- e.trackSelectionCallback=function(g){return H(function(h){return h["return"](gk(g,f.preferredAudioLanguage))})};return f}function hk(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 bk(a,b,c||fk(),d,"")}
356
- function gk(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/
357
- 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}J("shaka.util.PlayerConfiguration",ek);ek.mergeConfigObjects=hk;function ik(){this.g=null;this.h=[]}function jk(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 kk(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}
358
- function lk(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 mk(){this.i=this.h=null;this.g=[]}function nk(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 ok(){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 ik;this.h=new mk};function S(a,b){db.call(this);var c=this;this.l=pk;this.xb=this.g=null;this.$=!1;this.bd=new mf;this.eb=new mf;this.v=new mf;this.Rd=this.B=this.cb=this.i=this.cd=this.I=this.j=this.dd=this.J=this.Qc=this.H=this.Ba=this.F=this.M=this.m=this.G=null;this.fe=1E9;this.h=qk(this);this.be={width:Infinity,height:Infinity};this.A=null;this.qa=new De(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.va=this.h.preferredTextLanguage;this.ab=this.h.preferredTextRole;
359
- this.gb=this.h.preferForcedSubs;this.fb=[];b&&b(this);this.G=rk(this);this.G.oe(this.h.streaming.forceHTTPS);this.D=null;sk&&(this.D=Fb(sk));this.bd.o(window,"online",function(){c.ee()});this.R={name:"detach"};this.W={name:"attach"};this.Z={name:"unload"};this.Ae={name:"manifest-parser"};this.ae={name:"manifest"};this.Aa={name:"media-source"};this.Ud={name:"drm-engine"};this.Y={name:"load"};this.De={name:"src-equals-drm-engine"};this.Na={name:"src-equals"};var d=new Map;d.set(this.W,function(e,f){return Se(tk(c,
360
- e,f))});d.set(this.R,function(e){e.K&&(c.eb.ob(),e.K=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Se(e)});d.set(this.Z,function(e){return Se(uk(c,e))});d.set(this.Aa,function(e){e=vk(c,e);return Se(e)});d.set(this.Ae,function(e,f){var g=wk(c,e,f);return Se(g)});d.set(this.ae,function(e){return xk(c,e)});d.set(this.Ud,function(e){e=yk(c,e);return Se(e)});d.set(this.Y,function(e,f){return Se(zk(c,e,f))});d.set(this.De,function(e,f){var g=Ak(c,e,f);return Se(g)});d.set(this.Na,function(e,
361
- f){return Bk(c,e,f)});this.aa=new Fj(this.R,{eg: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.Aa||g==c.Y?c.Aa:g==c.Na?c.De:null);e==c.Aa&&(k=g==c.Y&&f.K==h.K?c.Ae:c.Z);e==c.Ae&&(k=Ck(c.Y,c.ae,c.Z,g,f,h));e==c.ae&&(k=Ck(c.Y,c.Ud,c.Z,g,f,h));e==c.Ud&&(k=Ck(c.Y,c.Y,c.Z,g,f,h));e==c.De&&(k=g==c.Na&&f.K==h.K?c.Na:c.Z);if(e==c.Y||e==c.Na)k=c.Z;e==c.Z&&(k=h.K&&f.K==h.K?c.W:c.R);return k},Jf:function(e,f,g){c.dispatchEvent(Dk(Ek,(new Map).set("state",
362
- e.name)));return d.get(e)(f,g)},handleError:function(e){return H(function(f){return 1==f.g?u(f,uk(c,e),2):f["return"](e.K?c.W:c.R)})},zg:function(e){c.dispatchEvent(Dk(Fk,(new Map).set("state",e.name)))}});a&&this.pc(a,!0)}pa(S,db);function Dk(a,b){return new L(a,b)}q=S.prototype;
363
- q.destroy=function(){var a=this,b;return H(function(c){switch(c.g){case 1:if(a.l==Gk)return c["return"]();a.l=Gk;b=Kj(a.aa,function(){return{node:a.R,payload:Gj(),Eb:!1}});return u(c,new Promise(function(d){b.$b=function(){};b.gd=function(){d()};b.Kb=function(){d()};b.onError=function(){d()};b.jd=function(){d()}}),2);case 2:return u(c,a.aa.destroy(),3);case 3:a.bd&&(a.bd.release(),a.bd=null);a.eb&&(a.eb.release(),a.eb=null);a.v&&(a.v.release(),a.v=null);a.Rd=null;a.B=null;a.h=null;a.A=null;a.xb=null;
361
+ e.trackSelectionCallback=function(g){return I(function(h){return h["return"](Bk(g,f.preferredAudioLanguage))})};return f}function Ck(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 wk(a,b,c||Ak(),d,"")}
362
+ function Bk(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/
363
+ 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Lb&&"image"!=g.type||c.push(g);return c}K("shaka.util.PlayerConfiguration",zk);zk.mergeConfigObjects=Ck;function Dk(){this.g=null;this.h=[]}function Ek(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 Fk(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}
364
+ function Gk(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 Hk(){this.i=this.h=null;this.g=[]}function Ik(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 Jk(){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 Dk;this.h=new Hk};function S(a,b){db.call(this);var c=this;this.l=Kk;this.yb=this.g=null;this.$=!1;this.bd=new mf;this.eb=new mf;this.v=new mf;this.Rd=this.B=this.cb=this.i=this.cd=this.I=this.j=this.dd=this.J=this.Qc=this.H=this.Ba=this.F=this.M=this.m=this.G=null;this.fe=1E9;this.h=Lk(this);this.be={width:Infinity,height:Infinity};this.A=null;this.qa=new Ce(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.va=this.h.preferredTextLanguage;this.ab=this.h.preferredTextRole;
365
+ this.gb=this.h.preferForcedSubs;this.fb=[];b&&b(this);this.G=Mk(this);this.G.oe(this.h.streaming.forceHTTPS);this.D=null;Nk&&(this.D=Fb(Nk));this.bd.o(window,"online",function(){c.ee()});this.R={name:"detach"};this.W={name:"attach"};this.Z={name:"unload"};this.Ae={name:"manifest-parser"};this.ae={name:"manifest"};this.Aa={name:"media-source"};this.Ud={name:"drm-engine"};this.Y={name:"load"};this.De={name:"src-equals-drm-engine"};this.Na={name:"src-equals"};var d=new Map;d.set(this.W,function(e,f){return Se(Ok(c,
366
+ e,f))});d.set(this.R,function(e){e.K&&(c.eb.ob(),e.K=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Se(e)});d.set(this.Z,function(e){return Se(Pk(c,e))});d.set(this.Aa,function(e){e=Qk(c,e);return Se(e)});d.set(this.Ae,function(e,f){var g=Rk(c,e,f);return Se(g)});d.set(this.ae,function(e){return Sk(c,e)});d.set(this.Ud,function(e){e=Tk(c,e);return Se(e)});d.set(this.Y,function(e,f){return Se(Uk(c,e,f))});d.set(this.De,function(e,f){var g=Vk(c,e,f);return Se(g)});d.set(this.Na,function(e,
367
+ f){return Wk(c,e,f)});this.aa=new ak(this.R,{eg: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.Aa||g==c.Y?c.Aa:g==c.Na?c.De:null);e==c.Aa&&(k=g==c.Y&&f.K==h.K?c.Ae:c.Z);e==c.Ae&&(k=Xk(c.Y,c.ae,c.Z,g,f,h));e==c.ae&&(k=Xk(c.Y,c.Ud,c.Z,g,f,h));e==c.Ud&&(k=Xk(c.Y,c.Y,c.Z,g,f,h));e==c.De&&(k=g==c.Na&&f.K==h.K?c.Na:c.Z);if(e==c.Y||e==c.Na)k=c.Z;e==c.Z&&(k=h.K&&f.K==h.K?c.W:c.R);return k},Jf:function(e,f,g){c.dispatchEvent(Yk(Zk,(new Map).set("state",
368
+ e.name)));return d.get(e)(f,g)},handleError:function(e){return I(function(f){return 1==f.g?u(f,Pk(c,e),2):f["return"](e.K?c.W:c.R)})},zg:function(e){c.dispatchEvent(Yk($k,(new Map).set("state",e.name)))}});a&&this.pc(a,!0)}pa(S,db);function Yk(a,b){return new M(a,b)}q=S.prototype;
369
+ q.destroy=function(){var a=this,b;return I(function(c){switch(c.g){case 1:if(a.l==al)return c["return"]();a.l=al;b=fk(a.aa,function(){return{node:a.R,payload:bk(),Fb:!1}});return u(c,new Promise(function(d){b.$b=function(){};b.gd=function(){d()};b.Lb=function(){d()};b.onError=function(){d()};b.jd=function(){d()}}),2);case 2:return u(c,a.aa.destroy(),3);case 3:a.bd&&(a.bd.release(),a.bd=null);a.eb&&(a.eb.release(),a.eb=null);a.v&&(a.v.release(),a.v=null);a.Rd=null;a.B=null;a.h=null;a.A=null;a.yb=null;
364
370
  if(!a.G){c.C(4);break}return u(c,a.G.destroy(),5);case 5:a.G=null;case 4:db.prototype.release.call(a),z(c)}})};
365
- function Hk(){window.Promise||Pa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Tc("Trident/"))return!1;var a=Zc();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Oc()?!0:Pc("application/x-mpegurl")}
366
- q.pc=function(a,b){b=void 0===b?!0:b;if(this.l==Gk)return Promise.reject(Ik());var c=Gj();c.K=a;Oc()||(b=!1);var d=b?this.Aa:this.W,e=Kj(this.aa,function(){return{node:d,payload:c,Eb:!1}});e.$b=function(){};return Jk(e)};q.detach=function(){var a=this;if(this.l==Gk)return Promise.reject(Ik());var b=Kj(this.aa,function(){return{node:a.R,payload:Gj(),Eb:!1}});b.$b=function(){};return Jk(b)};
367
- q.Be=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Gk)return Promise.reject(Ik());Oc()||(a=!1);var c=Gj(),d=Kj(this.aa,function(e){var f=e.K&&a?b.Aa:e.K?b.W:b.R;c.K=e.K;return{node:f,payload:c,Eb:!1}});d.$b=function(){};return Jk(d)};
368
- q.load=function(a,b,c){var d=this;if(this.l==Gk)return Promise.reject(Ik());this.dispatchEvent(Dk(Kk));var e=Gj();e.uri=a;e.we=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Lk(this,e)?this.Na:this.Y,g=Kj(this.aa,function(h){if(null==h.K)return null;e.K=h.K;return{node:f,payload:e,Eb:!0}});this.A=new ok;g.$b=function(){};return new Promise(function(h,k){g.jd=function(){return k(new M(2,7,7002))};g.gd=function(){h();d.dispatchEvent(Dk(Mk))};g.Kb=function(){return k(Ik())};g.onError=
369
- function(l){return k(l)}})};function Lk(a,b){if(!Oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=mg(d),c=Nk[c]);if(c){if(""==(b.K||Rc()).canPlayType(c))return!1;if(!Oc()||!(c in lg||mg(d)in ng)||a.h.streaming.preferNativeHls)return!0;if(Xc())return a.h.streaming.useNativeHlsOnSafari}return!1}function tk(a,b,c){null==b.K&&(b.K=c.K,a.eb.o(b.K,"error",function(){var d=Ok(a);d&&Pk(a,d)}));a.g=b.K;return Promise.resolve()}
370
- function uk(a,b){var c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return a.l!=Gk&&(a.l=pk),c=a.fb.map(function(p){return p()}),a.fb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Dk(Qk));b.mimeType=null;b.startTime=null;b.uri=null;b.K&&a.v.ob();a.Ba&&(a.Ba.release(),a.Ba=null);a.Qc&&(a.Qc.stop(),a.Qc=null);if(!a.I){n.C(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.cd=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(),
371
+ function bl(){window.Promise||Pa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Tc("Trident/"))return!1;var a=Zc();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Oc()?!0:Pc("application/x-mpegurl")}
372
+ q.pc=function(a,b){b=void 0===b?!0:b;if(this.l==al)return Promise.reject(cl());var c=bk();c.K=a;Oc()||(b=!1);var d=b?this.Aa:this.W,e=fk(this.aa,function(){return{node:d,payload:c,Fb:!1}});e.$b=function(){};return dl(e)};q.detach=function(){var a=this;if(this.l==al)return Promise.reject(cl());var b=fk(this.aa,function(){return{node:a.R,payload:bk(),Fb:!1}});b.$b=function(){};return dl(b)};
373
+ q.Be=function(a){var b=this;a=void 0===a?!0:a;if(this.l==al)return Promise.reject(cl());Oc()||(a=!1);var c=bk(),d=fk(this.aa,function(e){var f=e.K&&a?b.Aa:e.K?b.W:b.R;c.K=e.K;return{node:f,payload:c,Fb:!1}});d.$b=function(){};return dl(d)};
374
+ q.load=function(a,b,c){var d=this;if(this.l==al)return Promise.reject(cl());this.dispatchEvent(Yk(el));var e=bk();e.uri=a;e.we=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=fl(this,e)?this.Na: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 Jk;g.$b=function(){};return new Promise(function(h,k){g.jd=function(){return k(new N(2,7,7002))};g.gd=function(){h();d.dispatchEvent(Yk(gl))};g.Lb=function(){return k(cl())};g.onError=
375
+ function(l){return k(l)}})};function fl(a,b){if(!Oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Hg(d),c=hl[c]);if(c){if(""==(b.K||Rc()).canPlayType(c))return!1;if(!Oc()||!(c in Gg||Hg(d)in Ig)||a.h.streaming.preferNativeHls)return!0;if(Xc())return a.h.streaming.useNativeHlsOnSafari}return!1}function Ok(a,b,c){null==b.K&&(b.K=c.K,a.eb.o(b.K,"error",function(){var d=il(a);d&&jl(a,d)}));a.g=b.K;return Promise.resolve()}
376
+ function Pk(a,b){var c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return a.l!=al&&(a.l=Kk),c=a.fb.map(function(p){return p()}),a.fb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Yk(kl));b.mimeType=null;b.startTime=null;b.uri=null;b.K&&a.v.ob();a.Ba&&(a.Ba.release(),a.Ba=null);a.Qc&&(a.Qc.stop(),a.Qc=null);if(!a.I){n.C(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.cd=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(),
371
377
  8);case 8:a.j=null;case 7:a.H&&(a.H.release(),a.H=null);a.F&&(a.F.release(),a.F=null);if(!a.M){n.C(9);break}return u(n,a.M.destroy(),10);case 10:a.M=null;case 9:if(a.D)a.D.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);
372
- 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 ok;a.Yd=null;Rk(a);z(n)}})}
373
- function vk(a,b){var c,d,e,f;return H(function(g){if(1==g.g)return c=new Mh,d=a.h.textDisplayFactory,e=Fb(d),a.Yd=d,f=Sk(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())Tk(a,n,p,"ID3",v.value);if(a.D)a.D.onHlsTimedMetadata(m,n)}}),u(g,f.F,2);a.M=f;z(g)})}
374
- function wk(a,b,c){var d,e,f,g;return H(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,kg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.cd=h.h;a.I=Fb(a.cd);g=Ve(a.h.manifest);c.K&&"AUDIO"===c.K.nodeName&&(g.disableVideo=!0);a.I.configure(g);z(h)})}
375
- function xk(a,b){var c=b.uri,d=a.G;a.dd=new Zi(function(){return a.Ja()});a.dd.addEventListener("regionadd",function(g){g=g.region;Uk(a,Vk,g);if(a.D)a.D.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return Wk(a,g)},makeTextStreamsForClosedCaptions:function(g){return Xk(a,g)},onTimelineRegionAdded:function(g){var h=a.dd;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=
376
- l;break a}k=null}null==k&&(h.g.add(g),g=new L("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Pk(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 Oe(function(){var g,h,k,l;return H(function(m){if(1==m.g)return g=a,u(m,
377
- a.I.start(c,e),2);g.i=m.h;h=Dk(Yk);a.dispatchEvent(h);if(0==a.i.variants.length)throw new M(2,4,4036);Zk(a.i);k=Date.now()/1E3;l=k-f;a.A.G=l;z(m)})}(),function(){return a.I.stop()})}
378
- function yk(a,b){var c,d;return H(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=$k(a,{Jb:a.G,onError:function(f){Pk(a,f)},hd:function(f){al(a,f)},onExpirationUpdated:function(f,g){bl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==cl&&d&&(d=!1,a.A.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,Ef(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.pc(b.K),3):u(e,Wk(a,a.i),0)})}
379
- function zk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v;return H(function(y){switch(y.g){case 1:b.startTime=c.startTime;d=b.K;e=b.uri;a.cb=e;a.H=new Si({$c:function(){return d.playbackRate},Xc:function(){return d.defaultPlaybackRate},qe:function(x){d.playbackRate=x},bf:function(x){d.currentTime+=x}});f=function(){return dl(a)};g=function(){return el(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.Rd==h||(a.Rd=h,a.B=Fb(h),"function"!=typeof a.B.playbackRateChanged&&
380
- (yb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.h.abr));a.qa=new De(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.va=a.h.preferredTextLanguage;a.ab=a.h.preferredTextRole;a.gb=a.h.preferForcedSubs;fl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(x,w,C){a.j&&x!=a.j.l&&gl(a,x,!0,void 0===w?!1:w,void 0===C?0:C)});a.F=hl(a,b.startTime);a.Ba=il(a);
381
- k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);jl(a,k);Jd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=kl(a);a.j.configure(a.h.streaming);a.l=ll;d.textTracks&&a.v.o(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":ml(a,x)}});a.dispatchEvent(Dk(nl));l=null;if(m=a.Db().find(function(x){return x.active})){y.C(2);break}l=ol(a)?a.B.chooseVariant():null;gl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.C(3);
382
- break}n=a.F.m();return u(y,pl(l,n),4);case 4:p=y.h,a.F.v(p);case 3:ql(a,null,he(l));case 2:return r=a.kb().find(function(x){return x.active}),r||((v=re(a.i.textStreams,a.va,a.ab,a.gb)[0]||null)&&nk(a.A.h,v,!0),l&&(v?(l.audio&&rl(a,l.audio,v)&&(a.$=!0),a.$&&a.M.l.setTextVisibility(!0),sl(a)):a.$=!1),v&&(a.h.streaming.alwaysStreamText||a.Ib())&&oj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.B.enable(),tl(a)),Zd(a.j?a.j.l:null,a.i),ul(a.i),vl(a),ol(a),a.i.variants.some(function(x){return x.primary}),
378
+ 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 Jk;a.Yd=null;ll(a);z(n)}})}
379
+ function Qk(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.Yd=d,f=ml(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())nl(a,n,p,"ID3",v.value);if(a.D)a.D.onHlsTimedMetadata(m,n)}}),u(g,f.F,2);a.M=f;z(g)})}
380
+ function Rk(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.cd=h.h;a.I=Fb(a.cd);g=Ve(a.h.manifest);c.K&&"AUDIO"===c.K.nodeName&&(g.disableVideo=!0);a.I.configure(g);z(h)})}
381
+ function Sk(a,b){var c=b.uri,d=a.G;a.dd=new tj(function(){return a.Ja()});a.dd.addEventListener("regionadd",function(g){g=g.region;ol(a,pl,g);if(a.D)a.D.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return ql(a,g)},makeTextStreamsForClosedCaptions:function(g){return rl(a,g)},onTimelineRegionAdded:function(g){var h=a.dd;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=
382
+ 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 jl(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 Oe(function(){var g,h,k,l;return I(function(m){if(1==m.g)return g=a,u(m,
383
+ a.I.start(c,e),2);g.i=m.h;h=Yk(sl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);tl(a.i);k=Date.now()/1E3;l=k-f;a.A.G=l;z(m)})}(),function(){return a.I.stop()})}
384
+ function Tk(a,b){var c,d;return I(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=ul(a,{Kb:a.G,onError:function(f){jl(a,f)},hd:function(f){vl(a,f)},onExpirationUpdated:function(f,g){wl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==xl&&d&&(d=!1,a.A.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,Zf(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.pc(b.K),3):u(e,ql(a,a.i),0)})}
385
+ function Uk(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({$c:function(){return d.playbackRate},Xc:function(){return d.defaultPlaybackRate},qe:function(x){d.playbackRate=x},bf:function(x){d.currentTime+=x}});f=function(){return yl(a)};g=function(){return zl(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.Rd==h||(a.Rd=h,a.B=Fb(h),"function"!=typeof a.B.playbackRateChanged&&
386
+ (yb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.h.abr));a.qa=new Ce(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.va=a.h.preferredTextLanguage;a.ab=a.h.preferredTextRole;a.gb=a.h.preferForcedSubs;Al(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(x,w,D){a.j&&x!=a.j.l&&Bl(a,x,!0,void 0===w?!1:w,void 0===D?0:D)});a.F=Cl(a,b.startTime);a.Ba=Dl(a);
387
+ k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);El(a,k);Jd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Fl(a);a.j.configure(a.h.streaming);a.l=Gl;d.textTracks&&a.v.o(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":Hl(a,x)}});a.dispatchEvent(Yk(Il));l=null;if(m=a.Eb().find(function(x){return x.active})){y.C(2);break}l=Jl(a)?a.B.chooseVariant():null;Bl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.C(3);
388
+ break}n=a.F.m();return u(y,Kl(l,n),4);case 4:p=y.h,a.F.v(p);case 3:Ll(a,null,he(l));case 2:return r=a.kb().find(function(x){return x.active}),r||((v=re(a.i.textStreams,a.va,a.ab,a.gb)[0]||null)&&Ik(a.A.h,v,!0),l&&(v?(l.audio&&Ml(a,l.audio,v)&&(a.$=!0),a.$&&a.M.l.setTextVisibility(!0),Nl(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(),Ol(a)),Zd(a.j?a.j.l:null,a.i),Pl(a.i),Ql(a),Jl(a),a.i.variants.some(function(x){return x.primary}),
383
389
  a.v.Ga(d,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.we}),z(y)}})}
384
- function Ak(a,b,c){var d,e,f,g,h,k,l;return H(function(m){return 1==m.g?(d=Mb,e=Date.now()/1E3,f=!0,a.m=$k(a,{Jb:a.G,onError:function(n){Pk(a,n)},hd:function(n){al(a,n)},onExpirationUpdated:function(n,p){bl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==cl&&f&&(f=!1,a.A.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=mg(g),k=Nk[h],"application/x-mpegurl"==k&&Xc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
385
- createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?yd(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,Ef(a.m,[l],[]),2)):u(m,a.m.pc(b.K),
390
+ function Vk(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=ul(a,{Kb:a.G,onError:function(n){jl(a,n)},hd:function(n){vl(a,n)},onExpirationUpdated:function(n,p){wl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==xl&&f&&(f=!1,a.A.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Hg(g),k=hl[h],"application/x-mpegurl"==k&&Xc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
391
+ createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?yd(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,Zf(a.m,[l],[]),2)):u(m,a.m.pc(b.K),
386
392
  0)})}
387
- function Bk(a,b,c){function d(){return dl(a)}b.uri=c.uri;b.startTime=c.startTime;a.cb=b.uri;var e=b.K;a.F=new Hi(e);var f=!1;a.fb.push(function(){f=!0});null!=b.startTime&&a.F.v(b.startTime);a.H=new Si({$c:function(){return e.playbackRate},Xc:function(){return e.defaultPlaybackRate},qe:function(h){e.playbackRate=h},bf:function(h){e.currentTime+=h}});jl(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 el(a)});"none"!=e.preload&&
388
- a.v.Ga(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.we});e.audioTracks&&(a.v.o(e.audioTracks,"addtrack",function(){return vl(a)}),a.v.o(e.audioTracks,"removetrack",function(){return vl(a)}),a.v.o(e.audioTracks,"change",function(){return vl(a)}));e.textTracks&&(a.v.o(e.textTracks,"addtrack",function(h){if(h.track)switch(h=h.track,h.kind){case "metadata":wl(a,h);break;case "chapters":ml(a,h);break;default:vl(a)}}),a.v.o(e.textTracks,"removetrack",function(){return vl(a)}),a.v.o(e.textTracks,
389
- "change",function(){return vl(a)}));e.src=b.uri;(Uc()||Vc())&&e.load();a.l=xl;a.dispatchEvent(Dk(nl));var g=new Lc;wi(e,HTMLMediaElement.HAVE_METADATA,a.v,function(){g.resolve()});wi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.v,function(){var h;return H(function(k){if(1==k.g)return yl(a),h=zl(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"]();Al(a);z(k)})});e.error?g.reject(Ok(a)):"none"==e.preload&&
390
- (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(Ok(a))});return new Oe(g,function(){g.reject(new M(2,7,7001));return Promise.resolve()})}function yl(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.od(b);var c=a.h.preferredVariantRole;""!=c&&a.od(b,c)}}
391
- function Al(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.ie(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.ie(b,d,c)}}
392
- function wl(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,Tk(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new P(function(){var d=Bl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).za().P(.5);a.fb.push(function(){c.stop()})}}
393
- function Tk(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Dk(Cl,b))}function ml(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new P(function(){b.mode="hidden"})).za().P(.5);a.fb.push(function(){c.stop()})}}function Zk(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 $k(a,b){return new xf(b,a.h.drm.updateExpirationTime)}
394
- function rk(a){return new Ze(function(b,c){a.B&&a.B.segmentDownloaded(b,c)})}
395
- function hl(a,b){return new Ii(a.g,a.i,a.h.streaming,b,function(){a.Ba&&Vi(a.Ba,!0);if(a.j)for(var c=a.j,d=c.g.Zc(),e=c.j.smallGapLimit,f=t(c.h.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.h.get(g);h.oa=null;var k=c.g.T;g==Lb?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=ai(k,g),k=Ph(k,d,e));if(!k&&((null!=bi(c.g.T,g)||h.Xa)&&rj(c,h),h.La&&(h.La.abort(),h.La=null),g===Lb))for(g=c.g.T.B.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Ch(g),g=t(g.j.values()),h=g.next();!h.done;h=g.next())xh(h.value)}a.J&&
396
- Dl(a)},function(c){return a.dispatchEvent(c)})}function il(a){var b=new $i(a.dd);b.addEventListener("enter",function(d){Uk(a,El,d.region)});b.addEventListener("exit",function(d){Uk(a,Fl,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Uk(a,El,e),Uk(a,Fl,e))});var c=new Ui(a.g);c.g.add(b);return c}function jl(a,b){a.J=new He;a.J.g=Je;Ke(a.J,b,Math.min(.5,b/2));Rk(a);a.Qc=(new P(function(){Dl(a)})).ia(.25)}
397
- function Dl(a){switch(a.l){case xl:if(a.g.ended)var b=!0;else{var c=Oh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case ll:a:if(a.g.ended||Zh(a.M))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.Cb();var d=Oh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Qh(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?Ie:Je;c.g=d;b!=d&&Rk(a)}function Sk(a,b,c,d){return new Th(a,b,c,d)}
398
- function kl(a){return new cj(a.i,{Zc:function(){return a.F.m()},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},T:a.M,Jb:a.G,onError:function(b){return Pk(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ag:function(){a.I&&a.I.update&&a.I.update()},$d:function(){a.F&&a.F.F();Dl(a)}})}
399
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ck(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=
400
- 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=hk(this.h,a,qk(this));Gl(this);return c};
401
- function Gl(a){if(a.I){var b=Ve(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{Hl(a,a.i)}catch(f){Pk(a,f)}a.B&&ol(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Il(a)}a.G&&a.G.oe(a.h.streaming.forceHTTPS);if(a.M&&(b=a.h.textDisplayFactory,a.Yd!=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.Yd=b;a.j&&(b=a.j,(c=b.h.get(Lb))&&
402
- mj(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.h.abr),a.h.abr.enabled?a.B.enable():a.B.disable(),tl(a));a.J&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ke(a.J,b,Math.min(.5,b/2)));a.i&&fl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=qk(this);hk(a,this.h,qk(this));return a};
403
- q.Mf=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.Ja().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.Kg=function(){for(var a in this.h)delete this.h[a];hk(this.h,qk(this),qk(this));Gl(this)};q.Se=function(){return this.l};q.dg=function(){return this.g};q.uc=function(){return this.G};q.Ld=function(){return this.cb};
404
- q.Vc=function(){return this.D?this.D:null};q.V=function(){return this.i?this.i.presentationTimeline.V():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Gb=function(){return this.i?this.i.presentationTimeline.Gb():!1};q.Xe=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};
393
+ function Wk(a,b,c){function d(){return yl(a)}b.uri=c.uri;b.startTime=c.startTime;a.cb=b.uri;var e=b.K;a.F=new bj(e);var f=!1;a.fb.push(function(){f=!0});null!=b.startTime&&a.F.v(b.startTime);a.H=new mj({$c:function(){return e.playbackRate},Xc:function(){return e.defaultPlaybackRate},qe:function(h){e.playbackRate=h},bf:function(h){e.currentTime+=h}});El(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 zl(a)});"none"!=e.preload&&
394
+ a.v.Ga(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.we});e.audioTracks&&(a.v.o(e.audioTracks,"addtrack",function(){return Ql(a)}),a.v.o(e.audioTracks,"removetrack",function(){return Ql(a)}),a.v.o(e.audioTracks,"change",function(){return Ql(a)}));e.textTracks&&(a.v.o(e.textTracks,"addtrack",function(h){if(h.track)switch(h=h.track,h.kind){case "metadata":Rl(a,h);break;case "chapters":Hl(a,h);break;default:Ql(a)}}),a.v.o(e.textTracks,"removetrack",function(){return Ql(a)}),a.v.o(e.textTracks,
395
+ "change",function(){return Ql(a)}));e.src=b.uri;(Uc()||Vc())&&e.load();a.l=Sl;a.dispatchEvent(Yk(Il));var g=new Lc;Ti(e,HTMLMediaElement.HAVE_METADATA,a.v,function(){g.resolve()});Ti(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.v,function(){var h;return I(function(k){if(1==k.g)return Tl(a),h=Ul(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"]();Vl(a);z(k)})});e.error?g.reject(il(a)):"none"==e.preload&&
396
+ (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(il(a))});return new Oe(g,function(){g.reject(new N(2,7,7001));return Promise.resolve()})}function Tl(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.od(b);var c=a.h.preferredVariantRole;""!=c&&a.od(b,c)}}
397
+ function Vl(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.ie(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.ie(b,d,c)}}
398
+ function Rl(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,nl(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new P(function(){var d=Wl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).za().P(.5);a.fb.push(function(){c.stop()})}}
399
+ function nl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Yk(Xl,b))}function Hl(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new P(function(){b.mode="hidden"})).za().P(.5);a.fb.push(function(){c.stop()})}}function tl(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 ul(a,b){return new Sf(b,a.h.drm.updateExpirationTime)}
400
+ function Mk(a){return new Ze(function(b,c){a.B&&a.B.segmentDownloaded(b,c)})}
401
+ function Cl(a,b){return new cj(a.g,a.i,a.h.streaming,b,function(){a.Ba&&pj(a.Ba,!0);if(a.j)for(var c=a.j,d=c.g.Zc(),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.T;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.T,g)||h.Ra)&&Mj(c,h),h.La&&(h.La.abort(),h.La=null),g===Lb))for(g=c.g.T.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=g.next())Sh(h.value)}a.J&&
402
+ Yl(a)},function(c){return a.dispatchEvent(c)})}function Dl(a){var b=new uj(a.dd);b.addEventListener("enter",function(d){ol(a,Zl,d.region)});b.addEventListener("exit",function(d){ol(a,$l,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(ol(a,Zl,e),ol(a,$l,e))});var c=new oj(a.g);c.g.add(b);return c}function El(a,b){a.J=new He;a.J.g=Je;Ke(a.J,b,Math.min(.5,b/2));ll(a);a.Qc=(new P(function(){Yl(a)})).ia(.25)}
403
+ function Yl(a){switch(a.l){case Sl:if(a.g.ended)var b=!0;else{var c=ii(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Gl: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?Ie:Je;c.g=d;b!=d&&ll(a)}function ml(a,b,c,d){return new ni(a,b,c,d)}
404
+ function Fl(a){return new xj(a.i,{Zc:function(){return a.F.m()},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},T:a.M,Kb:a.G,onError:function(b){return jl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ag:function(){a.I&&a.I.update&&a.I.update()},$d:function(){a.F&&a.F.F();Yl(a)}})}
405
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=xk(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=
406
+ 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Ck(this.h,a,Lk(this));am(this);return c};
407
+ function am(a){if(a.I){var b=Ve(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{bm(a,a.i)}catch(f){jl(a,f)}a.B&&Jl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||cm(a)}a.G&&a.G.oe(a.h.streaming.forceHTTPS);if(a.M&&(b=a.h.textDisplayFactory,a.Yd!=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.Yd=b;a.j&&(b=a.j,(c=b.i.get(Lb))&&
408
+ 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(),Ol(a));a.J&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ke(a.J,b,Math.min(.5,b/2)));a.i&&Al(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Lk(this);Ck(a,this.h,Lk(this));return a};
409
+ q.Mf=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.Ja().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.Kg=function(){for(var a in this.h)delete this.h[a];Ck(this.h,Lk(this),Lk(this));am(this)};q.Se=function(){return this.l};q.dg=function(){return this.g};q.uc=function(){return this.G};q.Ld=function(){return this.cb};
410
+ q.Vc=function(){return this.D?this.D: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.Xe=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};
405
411
  q.Ja=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Wb(),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.pg=function(){this.V()&&(this.g.currentTime=this.Ja().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.tc=function(){return this.m?this.m.tc():Infinity};q.Yc=function(){return this.m?this.m.Yc():{}};
406
- q.Bc=function(){return this.J?this.J.g==Je:!1};q.vc=function(){return this.g?this.H?this.H.i:1:0};q.ze=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==ll&&(this.B.playbackRateChanged(a),lj(this.j,1<Math.abs(a))))};q.Ge=function(){var a=this.H.Xc();this.l==xl&&this.H.set(a);this.l==ll&&(this.H.set(a),this.B.playbackRateChanged(a),lj(this.j,!1))};
407
- q.Db=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,pe(e)){var f=he(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 oe(g)}):[]};
408
- 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=ie(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?zl(this).map(function(f){return me(f)}):[]};q.Vf=function(){return this.i?this.i.imageStreams.map(function(a){return je(a)}):[]};
409
- q.lg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B;return H(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;
410
- v=m*n;y=f.l-f.startTime;x=f.i||y/v;w=f.startTime;D=C=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,C=B%m*p,D=Math.floor(B/m)*r);return E["return"]({imageHeight:l,imageWidth:k,height:r,positionX:C,positionY:D,startTime:w,duration:x,uris:f.Ea(),width:p})}return E["return"](null)})};
411
- q.je=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&&(nk(this.A.h,b,!1),oj(this.j,b),Jl(this),this.va=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=zl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ke(c)==a.id?c.mode=this.$?"showing":"hidden":c.mode="disabled";Jl(this)}};
412
- q.ke=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&&pe(d)&&(gl(this,d,!1,b,c),this.qa=new Be(d),ol(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,
413
- ke(c)==a.id){Kl(this,c);break}};q.Lf=function(){return Ll(this.Db())};q.kg=function(){return Ll(this.kb())};q.Kf=function(){return Array.from(Ml(this.Db()))};q.jg=function(){return Array.from(Ml(this.kb()))};
414
- q.od=function(a,b){if(this.i&&this.F){this.qa=new De(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=he(f),this.ke(c,!0)):Il(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Ob(a);f=d=null;e=
415
- t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=oe(g);Ob(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Kl(this,f):d&&Kl(this,d)}};
416
- q.ie=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.va=a,this.ab=b||"",this.gb=c,(a=re(this.i.textStreams,this.va,this.ab,this.gb)[0]||null)&&a!=this.j.v&&(nk(this.A.h,a,!1),this.h.streaming.alwaysStreamText||this.Ib()))oj(this.j,a),Jl(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.je(a)}};
417
- q.Mg=function(a){if(this.i&&this.F){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 De(b.language,"",0,a),Il(this))}};q.Ib=function(){var a=this.$;return this.M?this.M.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?zl(this).some(function(b){return"showing"==b.mode}):a};q.Qe=function(){return this.g&&this.g.src&&this.g.textTracks?Nl(this).map(function(a){return me(a)}):[]};
418
- q.Of=function(a){var b=Ob(a),c=Nl(this).filter(function(f){return Ob(f.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function zl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
419
- function Bl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Nl(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
420
- q.ue=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==ll)this.M.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.v||(a=re(this.i.textStreams,this.va,this.ab,this.gb),0<a.length&&(oj(this.j,a[0]),Jl(this))):kj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=zl(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")}sl(this)}};
412
+ q.Bc=function(){return this.J?this.J.g==Je:!1};q.vc=function(){return this.g?this.H?this.H.i:1:0};q.ze=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==Gl&&(this.B.playbackRateChanged(a),Gj(this.j,1<Math.abs(a))))};q.Ge=function(){var a=this.H.Xc();this.l==Sl&&this.H.set(a);this.l==Gl&&(this.H.set(a),this.B.playbackRateChanged(a),Gj(this.j,!1))};
413
+ 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,pe(e)){var f=he(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 oe(g)}):[]};
414
+ 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=ie(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Ul(this).map(function(f){return me(f)}):[]};q.Vf=function(){return this.i?this.i.imageStreams.map(function(a){return je(a)}):[]};
415
+ q.lg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,D,B,C;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;
416
+ v=m*n;y=f.l-f.startTime;x=f.i||y/v;w=f.startTime;B=D=0;1<v&&(C=Math.floor((b-f.startTime)/x),w=f.startTime+C*x,D=C%m*p,B=Math.floor(C/m)*r);return E["return"]({imageHeight:l,imageWidth:k,height:r,positionX:D,positionY:B,startTime:w,duration:x,uris:f.Ea(),width:p})}return E["return"](null)})};
417
+ q.je=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&&(Ik(this.A.h,b,!1),Jj(this.j,b),dm(this),this.va=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Ul(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ke(c)==a.id?c.mode=this.$?"showing":"hidden":c.mode="disabled";dm(this)}};
418
+ q.ke=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&&pe(d)&&(Bl(this,d,!1,b,c),this.qa=new Be(d),Jl(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
+ ke(c)==a.id){em(this,c);break}};q.Lf=function(){return fm(this.Eb())};q.kg=function(){return fm(this.kb())};q.Kf=function(){return Array.from(gm(this.Eb()))};q.jg=function(){return Array.from(gm(this.kb()))};
420
+ q.od=function(a,b){if(this.i&&this.F){this.qa=new Ce(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=he(f),this.ke(c,!0)):cm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Ob(a);f=d=null;e=
421
+ t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=oe(g);Ob(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?em(this,f):d&&em(this,d)}};
422
+ q.ie=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.va=a,this.ab=b||"",this.gb=c,(a=re(this.i.textStreams,this.va,this.ab,this.gb)[0]||null)&&a!=this.j.v&&(Ik(this.A.h,a,!1),this.h.streaming.alwaysStreamText||this.Jb()))Jj(this.j,a),dm(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.je(a)}};
423
+ q.Mg=function(a){if(this.i&&this.F){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 Ce(b.language,"",0,a),cm(this))}};q.Jb=function(){var a=this.$;return this.M?this.M.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Ul(this).some(function(b){return"showing"==b.mode}):a};q.Qe=function(){return this.g&&this.g.src&&this.g.textTracks?hm(this).map(function(a){return me(a)}):[]};
424
+ q.Of=function(a){var b=Ob(a),c=hm(this).filter(function(f){return Ob(f.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function Ul(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
425
+ function Wl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function hm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
426
+ q.ue=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==Gl)this.M.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.v||(a=re(this.i.textStreams,this.va,this.ab,this.gb),0<a.length&&(Jj(this.j,a[0]),dm(this))):Fj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Ul(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")}Nl(this)}};
421
427
  q.fg=function(){if(!this.V())return null;var a=this.aa.l,b=0;if(this.F)b=this.F.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
422
- q.Te=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.Wc=function(){if(this.l==ll)return this.M.Wc();var a={total:[],audio:[],video:[],text:[]};this.l==xl&&(a.total=Rh(this.g.buffered));return a};
423
- q.getStats=function(){if(this.l!=ll&&this.l!=xl)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:[]};dl(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)?
424
- 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==ll){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.Te().valueOf()+1E3*this.Ja().end,this.A.F=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&
425
- (this.A.H=this.i.presentationTimeline.g);c=this.B.getBandwidthEstimate();this.A.B=c}this.l==xl&&(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=kk(e.g,"playing"),r=kk(e.g,"paused"),v=kk(e.g,"buffering"),y=e.A,x=e.F,w=e.H,C=lk(e.g),D=[];e=t(e.h.g);for(var B=e.next();!B.done;B=e.next())B=B.value,D.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,
426
- 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:D}};
427
- 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!=ll&&this.l!=xl)throw new M(1,7,7004);if(!d){var h=mg(a);d=Ol[h];if(!d)throw new M(1,2,2011,h);}if(this.l==xl){if("text/vtt"!=d)throw new M(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==
428
- b&&k.label==(f||"")&&k.kind==c}))return vl(this),a;throw new M(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new M(1,4,4033);a={id:this.fe++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Qi(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,
429
- closedCaptions:null};if(!Bd(ud(a.mimeType,a.codecs)))throw new M(2,2,2014,d);this.i.textStreams.push(a);vl(this);return ie(a)};
430
- q.Af=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 H(function(D){switch(D.g){case 1:if(h.l!=ll&&h.l!=xl)throw new M(1,7,7004);if(d){D.C(2);break}return u(D,Pl(h,a),3);case 3:d=D.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=xl){D.C(4);break}g&&(c="forced");return u(D,Ql(h,a,b,c,d,f||"",k),5);case 5:l=h.kb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return vl(h),D["return"](m);throw new M(1,2,2012);case 4:n=
431
- Mb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new M(1,4,4033);if(!k.length){D.C(6);break}return u(D,Rl(a,h.G,h.h.streaming.retryParameters),7);case 7:r=D.h,v=Sl(h,r,d,k),y=new Blob([v],{type:"text/vtt"}),a=Wh(y),d="text/vtt";case 6:x={id:h.fe++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Qi(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,
432
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=ud(x.mimeType,x.codecs);C=Bd(w);if(!C)throw new M(2,2,2014,d);h.i.textStreams.push(x);vl(h);return D["return"](ie(x))}})};
433
- q.zf=function(a,b,c){var d=this,e,f,g,h;return H(function(k){switch(k.g){case 1:if(d.l!=ll&&d.l!=xl)throw new M(1,7,7004);if(c){k.C(2);break}return u(k,Pl(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,Ql(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Qe();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 M(1,2,2015))})}),6);case 6:return k["return"](h);
434
- case 5:throw new M(1,2,2012);}})};function Pl(a,b){var c,d;return H(function(e){switch(e.g){case 1:c=mg(b);if(d=Ol[c])return e["return"](d);A(e,2);return u(e,og(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 M(1,2,2011,c);}})}
435
- function Ql(a,b,c,d,e,f,g){var h,k,l,m;return H(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,Rl(b,a.G,a.h.streaming.retryParameters),3):n.C(2);2!=n.g&&(h=n.h,k=Sl(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Wh(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)})}
436
- function Rl(a,b,c){var d,e,f;return H(function(g){if(1==g.g)return d=jf,e=cf([a],c),e.method="GET",u(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function Sl(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),Zj(b,d);throw new M(2,2,2014,c);}q.pe=function(a,b){this.be.width=a;this.be.height=b};
437
- q.ee=function(){if(this.l==ll){var a=this.j;if(a.i.g)a=!1;else if(a.A)a=!1;else{for(var b=t(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,c.yc&&(c.yc=!1,jj(a,c,.1));a=!0}}else a=!1;return a};q.$f=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.ag=function(){return this.cd};
438
- function qk(a){var b=fk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.V()&&d.includes(c.code)&&(c.severity=1,a.ee())};b.textDisplayFactory=function(){return a.xb?new Sj(a.g,a.xb):new Mj(a.g)};return b}q.ve=function(a){this.xb=a};
439
- function Xk(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 Ri;h={id:a.fe++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
440
- 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 Wk(a,b){return H(function(c){if(1==c.g)return u(c,Tl(a,b),2);Hl(a,b);z(c)})}
441
- function Tl(a,b){var c;return H(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Xd(c,b),2);ul(b);z(d)})}
442
- function Hl(a,b){if(a.l!=Gk){for(var c=a.h.restrictions,d=a.be,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Wd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&vl(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=
443
- f.next())g=g.value,Nf(a.m,g.initDataType,g.initData);Ul(a,b)}}
444
- function pl(a,b){var c,d,e,f,g;return H(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return H(function(r){if(1==r.g)return k?u(r,k.createSegmentIndex(),2):r["return"](null);n=(m=k.segmentIndex.Bb(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)})}
445
- function Rk(a){var b=a.Bc();if(a.A&&a.J&&a.F){var c=a.H;c.j=b;Ti(c);dl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Dk(Vl,b))}function el(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Dk(Wl),a.dispatchEvent(b))}function dl(a){if(a.A&&a.J){var b=a.A.g;a.J.g==Je?jk(b,"buffering"):a.g.paused?jk(b,"paused"):a.g.ended?jk(b,"ended"):jk(b,"playing")}}
446
- function ol(a){try{Ul(a,a.i)}catch(c){return Pk(a,c),!1}var b=a.i.variants.filter(function(c){return pe(c)});b=a.qa.create(b);a.B.setVariants(Array.from(b.values()));return!0}function Il(a){var b;(b=ol(a)?a.B.chooseVariant():null)&&gl(a,b,!0,!0,0)}
447
- function gl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&nj(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}));nj(a.j,b,d,e);d=null;f&&(d=he(f));b=he(b);c?ql(a,d,b):Xl(a,d,b)}}function Kl(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=oe(c);var d=oe(b);Xl(a,c,d)}
448
- function rl(a,b,c){a=Ob(a.h.preferredTextLanguage);b=Ob(b.language);c=Ob(c.language);return Nb(c,a)&&!Nb(b,c)}function ql(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Dk(Yl,b);Zl(a,b)}function vl(a){var b=Dk($l);Zl(a,b)}function Xl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Dk(am,b);Zl(a,b)}function Jl(a){var b=Dk(bm);Zl(a,b)}function sl(a){var b=Dk(cm);Zl(a,b)}function tl(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Zl(a,Dk(dm,b))}
449
- function Pk(a,b){if(a.l!=Gk){var c=Dk(em,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Uk(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(Dk(b,c))}
450
- function Ok(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 M(2,3,3016,b,c,a.g.error.message)}
451
- function al(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&&!fm.includes(l)}h!=f.allowedByKeySystem&&
452
- (e=!0)}}}if(!e||ol(a))(d=a.j.l)&&!d.allowedByKeySystem&&Il(a),e&&vl(a)}}function bl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Dk(gm);a.dispatchEvent(b)}function fl(a,b,c){0<b&&(a.V()||a.pf(b));b=a.getDuration();c<b&&(a.V()||a.Ya(c))}
453
- function Ul(a,b){var c=a.m?a.m.Yc():{},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?fm.includes(r)&&h.add(r):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
454
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new M(2,4,4012,c);}function ul(a){if(!a.variants.some(pe))throw new M(2,4,4032);}function Zl(a,b){H(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Gk&&a.dispatchEvent(b);z(c)})}function Ml(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}
455
- function Ll(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));
456
- h.push({language:l,role:n,label:p})}});return h}function Ik(){return new M(2,7,7E3)}function Ck(a,b,c,d,e,f){return d==a&&e.K==f.K&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Gj(){return{K:null,mimeType:null,startTime:null,we:NaN,uri:null}}function Jk(a){return new Promise(function(b,c){a.Kb=function(){return c(Ik())};a.gd=function(){return b()};a.onError=function(d){return c(d)};a.jd=function(){return c(Ik())}})}J("shaka.Player",S);S.prototype.setVideoContainer=S.prototype.ve;
428
+ q.Te=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.Wc=function(){if(this.l==Gl)return this.M.Wc();var a={total:[],audio:[],video:[],text:[]};this.l==Sl&&(a.total=li(this.g.buffered));return a};
429
+ q.getStats=function(){if(this.l!=Gl&&this.l!=Sl)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:[]};yl(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)?
430
+ 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==Gl){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.Te().valueOf()+1E3*this.Ja().end,this.A.F=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&
431
+ (this.A.H=this.i.presentationTimeline.g);c=this.B.getBandwidthEstimate();this.A.B=c}this.l==Sl&&(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=Fk(e.g,"playing"),r=Fk(e.g,"paused"),v=Fk(e.g,"buffering"),y=e.A,x=e.F,w=e.H,D=Gk(e.g),B=[];e=t(e.h.g);for(var C=e.next();!C.done;C=e.next())C=C.value,B.push({timestamp:C.timestamp,id:C.id,type:C.type,fromAdaptation:C.fromAdaptation,bandwidth:C.bandwidth});return{width:a,
432
+ 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:D,switchHistory:B}};
433
+ 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!=Gl&&this.l!=Sl)throw new N(1,7,7004);if(!d){var h=Hg(a);d=im[h];if(!d)throw new N(1,2,2011,h);}if(this.l==Sl){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==
434
+ b&&k.label==(f||"")&&k.kind==c}))return Ql(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.fe++,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,
435
+ closedCaptions:null};if(!Ad(ud(a.mimeType,a.codecs)))throw new N(2,2,2014,d);this.i.textStreams.push(a);Ql(this);return ie(a)};
436
+ q.Af=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,D;return I(function(B){switch(B.g){case 1:if(h.l!=Gl&&h.l!=Sl)throw new N(1,7,7004);if(d){B.C(2);break}return u(B,jm(h,a),3);case 3:d=B.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(C){}if(h.l!=Sl){B.C(4);break}g&&(c="forced");return u(B,km(h,a,b,c,d,f||"",k),5);case 5:l=h.kb();if(m=l.find(function(C){return C.language==b&&C.label==(f||"")&&C.kind==c}))return Ql(h),B["return"](m);throw new N(1,2,2012);case 4:n=
437
+ 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,lm(a,h.G,h.h.streaming.retryParameters),7);case 7:r=B.h,v=mm(h,r,d,k),y=new Blob([v],{type:"text/vtt"}),a=qi(y),d="text/vtt";case 6:x={id:h.fe++,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,
438
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=ud(x.mimeType,x.codecs);D=Ad(w);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(x);Ql(h);return B["return"](ie(x))}})};
439
+ q.zf=function(a,b,c){var d=this,e,f,g,h;return I(function(k){switch(k.g){case 1:if(d.l!=Gl&&d.l!=Sl)throw new N(1,7,7004);if(c){k.C(2);break}return u(k,jm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,km(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Qe();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);
440
+ case 5:throw new N(1,2,2012);}})};function jm(a,b){var c,d;return I(function(e){switch(e.g){case 1:c=Hg(b);if(d=im[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);}})}
441
+ function km(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,lm(b,a.G,a.h.streaming.retryParameters),3):n.C(2);2!=n.g&&(h=n.h,k=mm(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)})}
442
+ function lm(a,b,c){var d,e,f;return I(function(g){if(1==g.g)return d=jf,e=cf([a],c),e.method="GET",u(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function mm(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),uk(b,d);throw new N(2,2,2014,c);}q.pe=function(a,b){this.be.width=a;this.be.height=b};
443
+ q.ee=function(){if(this.l==Gl){var a=this.j;if(a.h.g)a=!1;else if(a.A)a=!1;else{for(var b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,c.yc&&(c.yc=!1,Ej(a,c,.1));a=!0}}else a=!1;return a};q.$f=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.ag=function(){return this.cd};
444
+ function Lk(a){var b=Ak();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.V()&&d.includes(c.code)&&(c.severity=1,a.ee())};b.textDisplayFactory=function(){return a.yb?new nk(a.g,a.yb):new hk(a.g)};return b}q.ve=function(a){this.yb=a};
445
+ function rl(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.fe++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
446
+ 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 ql(a,b){return I(function(c){if(1==c.g)return u(c,nm(a,b),2);bm(a,b);z(c)})}
447
+ function nm(a,b){var c;return I(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Xd(c,b),2);Pl(b);z(d)})}
448
+ function bm(a,b){if(a.l!=al){for(var c=a.h.restrictions,d=a.be,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Wd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Ql(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=
449
+ f.next())g=g.value,jg(a.m,g.initDataType,g.initData);om(a,b)}}
450
+ function Kl(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)})}
451
+ function ll(a){var b=a.Bc();if(a.A&&a.J&&a.F){var c=a.H;c.j=b;nj(c);yl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Yk(pm,b))}function zl(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Yk(qm),a.dispatchEvent(b))}function yl(a){if(a.A&&a.J){var b=a.A.g;a.J.g==Je?Ek(b,"buffering"):a.g.paused?Ek(b,"paused"):a.g.ended?Ek(b,"ended"):Ek(b,"playing")}}
452
+ function Jl(a){try{om(a,a.i)}catch(c){return jl(a,c),!1}var b=a.i.variants.filter(function(c){return pe(c)});b=a.qa.create(b);a.B.setVariants(Array.from(b.values()));return!0}function cm(a){var b;(b=Jl(a)?a.B.chooseVariant():null)&&Bl(a,b,!0,!0,0)}
453
+ function Bl(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=he(f));b=he(b);c?Ll(a,d,b):rm(a,d,b)}}function em(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=oe(c);var d=oe(b);rm(a,c,d)}
454
+ function Ml(a,b,c){a=Ob(a.h.preferredTextLanguage);b=Ob(b.language);c=Ob(c.language);return Nb(c,a)&&!Nb(b,c)}function Ll(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Yk(sm,b);tm(a,b)}function Ql(a){var b=Yk(um);tm(a,b)}function rm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Yk(vm,b);tm(a,b)}function dm(a){var b=Yk(wm);tm(a,b)}function Nl(a){var b=Yk(xm);tm(a,b)}function Ol(a){var b=(new Map).set("newStatus",a.h.abr.enabled);tm(a,Yk(ym,b))}
455
+ function jl(a,b){if(a.l!=al){var c=Yk(zm,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function ol(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(Yk(b,c))}
456
+ function il(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)}
457
+ function vl(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Am.includes(l)}h!=f.allowedByKeySystem&&
458
+ (e=!0)}}}if(!e||Jl(a))(d=a.j.l)&&!d.allowedByKeySystem&&cm(a),e&&Ql(a)}}function wl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Yk(Bm);a.dispatchEvent(b)}function Al(a,b,c){0<b&&(a.V()||a.pf(b));b=a.getDuration();c<b&&(a.V()||a.Ya(c))}
459
+ function om(a,b){var c=a.m?a.m.Yc():{},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?Am.includes(r)&&h.add(r):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
460
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function Pl(a){if(!a.variants.some(pe))throw new N(2,4,4032);}function tm(a,b){I(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=al&&a.dispatchEvent(b);z(c)})}function gm(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Ob(c.language)):b.add("und");return b}
461
+ function fm(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=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));
462
+ h.push({language:l,role:n,label:p})}});return h}function cl(){return new N(2,7,7E3)}function Xk(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,we:NaN,uri:null}}function dl(a){return new Promise(function(b,c){a.Lb=function(){return c(cl())};a.gd=function(){return b()};a.onError=function(d){return c(d)};a.jd=function(){return c(cl())}})}K("shaka.Player",S);S.prototype.setVideoContainer=S.prototype.ve;
457
463
  S.prototype.getManifestParserFactory=S.prototype.ag;S.prototype.getManifest=S.prototype.$f;S.prototype.retryStreaming=S.prototype.ee;S.prototype.setMaxHardwareResolution=S.prototype.pe;S.prototype.addChaptersTrack=S.prototype.zf;S.prototype.addTextTrackAsync=S.prototype.Af;S.prototype.addTextTrack=S.prototype.addTextTrack;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.Wc;S.prototype.getPresentationStartTimeAsDate=S.prototype.Te;
458
- S.prototype.getPlayheadTimeAsDate=S.prototype.fg;S.prototype.setTextTrackVisibility=S.prototype.ue;S.prototype.getChapters=S.prototype.Of;S.prototype.getChaptersTracks=S.prototype.Qe;S.prototype.isTextTrackVisible=S.prototype.Ib;S.prototype.selectVariantsByLabel=S.prototype.Mg;S.prototype.selectTextLanguage=S.prototype.ie;S.prototype.selectAudioLanguage=S.prototype.od;S.prototype.getTextLanguages=S.prototype.jg;S.prototype.getAudioLanguages=S.prototype.Kf;S.prototype.getTextLanguagesAndRoles=S.prototype.kg;
459
- S.prototype.getAudioLanguagesAndRoles=S.prototype.Lf;S.prototype.selectVariantTrack=S.prototype.ke;S.prototype.selectTextTrack=S.prototype.je;S.prototype.getThumbnails=S.prototype.lg;S.prototype.getImageTracks=S.prototype.Vf;S.prototype.getTextTracks=S.prototype.kb;S.prototype.getVariantTracks=S.prototype.Db;S.prototype.cancelTrickPlay=S.prototype.Ge;S.prototype.trickPlay=S.prototype.ze;S.prototype.getPlaybackRate=S.prototype.vc;S.prototype.isBuffering=S.prototype.Bc;S.prototype.getKeyStatuses=S.prototype.Yc;
460
- S.prototype.getExpiration=S.prototype.tc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.pg;S.prototype.seekRange=S.prototype.Ja;S.prototype.isAudioOnly=S.prototype.Xe;S.prototype.isInProgress=S.prototype.Gb;S.prototype.isLive=S.prototype.V;S.prototype.getAdManager=S.prototype.Vc;S.prototype.getAssetUri=S.prototype.Ld;S.prototype.getNetworkingEngine=S.prototype.uc;S.prototype.getMediaElement=S.prototype.dg;
464
+ S.prototype.getPlayheadTimeAsDate=S.prototype.fg;S.prototype.setTextTrackVisibility=S.prototype.ue;S.prototype.getChapters=S.prototype.Of;S.prototype.getChaptersTracks=S.prototype.Qe;S.prototype.isTextTrackVisible=S.prototype.Jb;S.prototype.selectVariantsByLabel=S.prototype.Mg;S.prototype.selectTextLanguage=S.prototype.ie;S.prototype.selectAudioLanguage=S.prototype.od;S.prototype.getTextLanguages=S.prototype.jg;S.prototype.getAudioLanguages=S.prototype.Kf;S.prototype.getTextLanguagesAndRoles=S.prototype.kg;
465
+ S.prototype.getAudioLanguagesAndRoles=S.prototype.Lf;S.prototype.selectVariantTrack=S.prototype.ke;S.prototype.selectTextTrack=S.prototype.je;S.prototype.getThumbnails=S.prototype.lg;S.prototype.getImageTracks=S.prototype.Vf;S.prototype.getTextTracks=S.prototype.kb;S.prototype.getVariantTracks=S.prototype.Eb;S.prototype.cancelTrickPlay=S.prototype.Ge;S.prototype.trickPlay=S.prototype.ze;S.prototype.getPlaybackRate=S.prototype.vc;S.prototype.isBuffering=S.prototype.Bc;S.prototype.getKeyStatuses=S.prototype.Yc;
466
+ S.prototype.getExpiration=S.prototype.tc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.pg;S.prototype.seekRange=S.prototype.Ja;S.prototype.isAudioOnly=S.prototype.Xe;S.prototype.isInProgress=S.prototype.Hb;S.prototype.isLive=S.prototype.V;S.prototype.getAdManager=S.prototype.Vc;S.prototype.getAssetUri=S.prototype.Ld;S.prototype.getNetworkingEngine=S.prototype.uc;S.prototype.getMediaElement=S.prototype.dg;
461
467
  S.prototype.getLoadMode=S.prototype.Se;S.prototype.resetConfiguration=S.prototype.Kg;S.prototype.getBufferFullness=S.prototype.Mf;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.unload=S.prototype.Be;S.prototype.detach=S.prototype.detach;S.prototype.attach=S.prototype.pc;
462
- S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return H(function(h){if(1==h.g)return b={},a?u(h,eg(),3):h.C(2);2!=h.g&&(b=h.h);var k={};if(Oc()){for(var l in lg)k[l]=!0;for(var m in ng)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()?!!lg[n]:Pc(n);for(var p in l)k[p]=
463
- Oc()?!!ng[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(","));
464
- for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Oc()?Bd(l)?!0:MediaSource.isTypeSupported(l)||qd(l):Pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=hm;for(g in f)e[g]=f[g]();return h["return"](e)})};S.isBrowserSupported=Hk;S.setAdManagerFactory=function(a){sk=a};S.registerSupportPlugin=function(a,b){hm[a]=b};S.prototype.destroy=S.prototype.destroy;
465
- var dm="abrstatuschanged",Yl="adaptation",Vl="buffering",cl="drmsessionupdate",Dj="emsg",em="error",gm="expirationupdated",Mk="loaded",Kk="loading",Yk="manifestparsed",Cl="metadata",Ek="onstatechange",Fk="onstateidle",Wl="ratechange",nl="streaming",bm="textchanged",cm="texttrackvisibility",Vk="timelineregionadded",El="timelineregionenter",Fl="timelineregionexit",$l="trackschanged",Qk="unloading",am="variantchanged",im={bh:dm,dh:Yl,eh:Vl,hh:cl,oh:Dj,Error:em,ph:gm,vh:"largegap",wh:Mk,xh:Kk,Ch:Yk,Metadata:Cl,
466
- Gh:Ek,Hh:Fk,Ph:Wl,Th:"sessiondata",Uh:nl,Vh:bm,Wh:cm,Xh:Vk,Yh:El,Zh:Fl,$h:$l,di:Qk,gi:am},Gk=0,pk=1,ll=2,xl=3;S.LoadMode={DESTROYED:Gk,NOT_LOADED:pk,MEDIA_SOURCE:ll,SRC_EQUALS:xl};S.version="v3.2.12";var jm=["3","2"];zb=new function(a){this.g=a;this.i=Ab;this.h=Bb}(new xb(Number(jm[0]),Number(jm[1])));
467
- var fm=["output-restricted","internal-error"],hm={},sk=null,Nk={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"},Ol={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
468
- ssa:"text/x-ssa",ass:"text/x-ssa"};function km(){this.h=[];this.j=this.i=this.g=0};function lm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new mf;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=lm.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};
468
+ 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]=
469
+ 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(","));
470
+ for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Oc()?Ad(l)?!0:MediaSource.isTypeSupported(l)||qd(l):Pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Cm;for(g in f)e[g]=f[g]();return h["return"](e)})};S.isBrowserSupported=bl;S.setAdManagerFactory=function(a){Nk=a};S.registerSupportPlugin=function(a,b){Cm[a]=b};S.prototype.destroy=S.prototype.destroy;
471
+ var ym="abrstatuschanged",sm="adaptation",pm="buffering",xl="drmsessionupdate",Yj="emsg",zm="error",Bm="expirationupdated",gl="loaded",el="loading",sl="manifestparsed",Xl="metadata",Zk="onstatechange",$k="onstateidle",qm="ratechange",Il="streaming",wm="textchanged",xm="texttrackvisibility",pl="timelineregionadded",Zl="timelineregionenter",$l="timelineregionexit",um="trackschanged",kl="unloading",vm="variantchanged",Dm={bh:ym,dh:sm,eh:pm,hh:xl,oh:Yj,Error:zm,ph:Bm,vh:"largegap",wh:gl,xh:el,Ch:sl,Metadata:Xl,
472
+ Gh:Zk,Hh:$k,Ph:qm,Th:"sessiondata",Uh:Il,Vh:wm,Wh:xm,Xh:pl,Yh:Zl,Zh:$l,$h:um,di:kl,gi:vm},al=0,Kk=1,Gl=2,Sl=3;S.LoadMode={DESTROYED:al,NOT_LOADED:Kk,MEDIA_SOURCE:Gl,SRC_EQUALS:Sl};S.version="v3.2.14";var Em=["3","2"];zb=new function(a){this.g=a;this.i=Ab;this.h=Bb}(new xb(Number(Em[0]),Number(Em[1])));
473
+ var Am=["output-restricted","internal-error"],Cm={},Nk=null,hl={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},im={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
474
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function Fm(){this.h=[];this.j=this.i=this.g=0};function Gm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new mf;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=Gm.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};
469
475
  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()};
470
- 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};J("shaka.ads.ClientSideAd",lm);
471
- lm.prototype.release=lm.prototype.release;lm.prototype.getPositionInSequence=lm.prototype.getPositionInSequence;lm.prototype.getSequenceLength=lm.prototype.getSequenceLength;lm.prototype.setMuted=lm.prototype.setMuted;lm.prototype.resize=lm.prototype.resize;lm.prototype.isMuted=lm.prototype.isMuted;lm.prototype.setVolume=lm.prototype.setVolume;lm.prototype.getVolume=lm.prototype.getVolume;lm.prototype.play=lm.prototype.play;lm.prototype.pause=lm.prototype.pause;lm.prototype.skip=lm.prototype.skip;
472
- lm.prototype.canSkipNow=lm.prototype.canSkipNow;lm.prototype.getTimeUntilSkippable=lm.prototype.getTimeUntilSkippable;lm.prototype.isSkippable=lm.prototype.isSkippable;lm.prototype.isPaused=lm.prototype.isPaused;lm.prototype.getRemainingTime=lm.prototype.getRemainingTime;lm.prototype.getMinSuggestedDuration=lm.prototype.getMinSuggestedDuration;lm.prototype.getDuration=lm.prototype.getDuration;function mm(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 mf;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.12");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){nm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
473
- function(f){om(e,f)});this.i.onended=function(){e.l.contentComplete()}}mm.prototype.stop=function(){this.g&&this.g.stop();this.m&&Rj(this.m)};mm.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function om(a,b){b.getError();pm(a,null);a.j(new L("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
474
- function nm(a,b){a.j(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.B)));a.g=b.getAdsManager(a.i);a.j(new L("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 L("ad-cue-points-changed",(new Map).set("cuepoints",d)))}qm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
475
- 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.g.start()}catch(f){pm(a,null)}}
476
- function qm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new L(d,e))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){om(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){rm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){rm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
477
- function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){pm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){pm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
476
+ 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",Gm);
477
+ Gm.prototype.release=Gm.prototype.release;Gm.prototype.getPositionInSequence=Gm.prototype.getPositionInSequence;Gm.prototype.getSequenceLength=Gm.prototype.getSequenceLength;Gm.prototype.setMuted=Gm.prototype.setMuted;Gm.prototype.resize=Gm.prototype.resize;Gm.prototype.isMuted=Gm.prototype.isMuted;Gm.prototype.setVolume=Gm.prototype.setVolume;Gm.prototype.getVolume=Gm.prototype.getVolume;Gm.prototype.play=Gm.prototype.play;Gm.prototype.pause=Gm.prototype.pause;Gm.prototype.skip=Gm.prototype.skip;
478
+ Gm.prototype.canSkipNow=Gm.prototype.canSkipNow;Gm.prototype.getTimeUntilSkippable=Gm.prototype.getTimeUntilSkippable;Gm.prototype.isSkippable=Gm.prototype.isSkippable;Gm.prototype.isPaused=Gm.prototype.isPaused;Gm.prototype.getRemainingTime=Gm.prototype.getRemainingTime;Gm.prototype.getMinSuggestedDuration=Gm.prototype.getMinSuggestedDuration;Gm.prototype.getDuration=Gm.prototype.getDuration;function Hm(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 mf;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.14");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Im(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
479
+ function(f){Jm(e,f)});this.i.onended=function(){e.l.contentComplete()}}Hm.prototype.stop=function(){this.g&&this.g.stop();this.m&&mk(this.m)};Hm.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Jm(a,b){b.getError();Km(a,null);a.j(new M("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
480
+ function Im(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)))}Lm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
481
+ 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){Km(a,null)}}
482
+ function Lm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new M(d,e))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Jm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Mm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Mm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
483
+ function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Km(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Km(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
478
484
  a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.v.i=!0;b(c,"ad-paused")});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.v.i=!1;b(c,"ad-resumed")});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.o(a.g,
479
485
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,google.ima.AdEvent.Type.AD_METADATA,
480
- function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function rm(a,b){var c=b.getAd();a.v=new lm(c,a.g);c=(new Map).set("ad",a.v).set("sdkAdObject",c).set("originalEvent",b);a.j(new L("ad-started",c));a.m.setAttribute("ad-active","true");a.i.pause()}
481
- function pm(a,b){a.j(new L("ad-stopped",(new Map).set("originalEvent",b)));a.m.removeAttribute("ad-active");a.i.play()};function sm(a,b){this.i=a;this.h=null;this.g=b}q=sm.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
486
+ function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Mm(a,b){var c=b.getAd();a.v=new Gm(c,a.g);c=(new Map).set("ad",a.v).set("sdkAdObject",c).set("originalEvent",b);a.j(new M("ad-started",c));a.m.setAttribute("ad-active","true");a.i.pause()}
487
+ function Km(a,b){a.j(new M("ad-stopped",(new Map).set("originalEvent",b)));a.m.removeAttribute("ad-active");a.i.play()};function Nm(a,b){this.i=a;this.h=null;this.g=b}q=Nm.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
482
488
  q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};
483
- q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};J("shaka.ads.ServerSideAd",sm);sm.prototype.release=sm.prototype.release;sm.prototype.getPositionInSequence=sm.prototype.getPositionInSequence;sm.prototype.getSequenceLength=sm.prototype.getSequenceLength;sm.prototype.setMuted=sm.prototype.setMuted;sm.prototype.resize=sm.prototype.resize;sm.prototype.isMuted=sm.prototype.isMuted;
484
- sm.prototype.setVolume=sm.prototype.setVolume;sm.prototype.getVolume=sm.prototype.getVolume;sm.prototype.play=sm.prototype.play;sm.prototype.pause=sm.prototype.pause;sm.prototype.skip=sm.prototype.skip;sm.prototype.canSkipNow=sm.prototype.canSkipNow;sm.prototype.getTimeUntilSkippable=sm.prototype.getTimeUntilSkippable;sm.prototype.isSkippable=sm.prototype.isSkippable;sm.prototype.isPaused=sm.prototype.isPaused;sm.prototype.getRemainingTime=sm.prototype.getRemainingTime;
485
- sm.prototype.getMinSuggestedDuration=sm.prototype.getMinSuggestedDuration;sm.prototype.getDuration=sm.prototype.getDuration;function tm(a,b,c,d){var e=this;this.A=a;this.l=b;this.j=null;this.H=NaN;this.i=d;this.G=!1;this.B=this.m=this.v=null;this.D="";this.F=[];this.h=new mf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.A,a);this.i(new L("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){um(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.D.length?
486
- e.j.resolve(e.D):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new sm(f,e.l);e.B&&(e.m.h=e.B);e.i(new L("ad-started",(new Map).set("ad",e.m)));e.A.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.A.removeAttribute("ad-active");
487
- var f=e.l.currentTime;e.v&&e.v>f&&(e.l.currentTime=e.v,e.v=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.B=f.getStreamData().adProgressData;e.m&&(e.m.h=e.B)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new L("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new L("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new L("ad-third-quartile"))});
488
- this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new L("ad-complete"));e.i(new L("ad-stopped"));e.A.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new L("ad-skipped"));e.i(new L("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.F=
489
- f;e.i(new L("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}tm.prototype.stop=function(){this.D="";this.v=null;this.F=[]};tm.prototype.release=function(){this.stop();this.h&&this.h.release()};tm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
490
- function um(a,b){a.i(new L("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(){db.call(this);this.g=this.i=null;this.h=new km;this.j=navigator.language}pa(T,db);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 M(2,10,1E4);this.i&&this.i.release();this.i=new mm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
491
- q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);db.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new L("ad-stopped"));this.h=new km};q.requestClientSideAds=function(a){if(!this.i)throw new M(1,10,10001);var b=this.i;b.B=Date.now()/1E3;b.l.requestAds(a)};
492
- q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.g&&this.g.release();this.g=new tm(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)})};
493
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(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.12";c=this.g;var d=b;c.j?c=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
494
- (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 M(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.12";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new M(1,10,10003);return this.g.F};
495
- 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)};J("shaka.ads.AdManager",T);
489
+ q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};K("shaka.ads.ServerSideAd",Nm);Nm.prototype.release=Nm.prototype.release;Nm.prototype.getPositionInSequence=Nm.prototype.getPositionInSequence;Nm.prototype.getSequenceLength=Nm.prototype.getSequenceLength;Nm.prototype.setMuted=Nm.prototype.setMuted;Nm.prototype.resize=Nm.prototype.resize;Nm.prototype.isMuted=Nm.prototype.isMuted;
490
+ Nm.prototype.setVolume=Nm.prototype.setVolume;Nm.prototype.getVolume=Nm.prototype.getVolume;Nm.prototype.play=Nm.prototype.play;Nm.prototype.pause=Nm.prototype.pause;Nm.prototype.skip=Nm.prototype.skip;Nm.prototype.canSkipNow=Nm.prototype.canSkipNow;Nm.prototype.getTimeUntilSkippable=Nm.prototype.getTimeUntilSkippable;Nm.prototype.isSkippable=Nm.prototype.isSkippable;Nm.prototype.isPaused=Nm.prototype.isPaused;Nm.prototype.getRemainingTime=Nm.prototype.getRemainingTime;
491
+ Nm.prototype.getMinSuggestedDuration=Nm.prototype.getMinSuggestedDuration;Nm.prototype.getDuration=Nm.prototype.getDuration;function Om(a,b,c,d){var e=this;this.A=a;this.l=b;this.j=null;this.H=NaN;this.i=d;this.G=!1;this.B=this.m=this.v=null;this.D="";this.F=[];this.h=new mf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.A,a);this.i(new M("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Pm(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.D.length?
492
+ e.j.resolve(e.D):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Nm(f,e.l);e.B&&(e.m.h=e.B);e.i(new M("ad-started",(new Map).set("ad",e.m)));e.A.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.A.removeAttribute("ad-active");
493
+ var f=e.l.currentTime;e.v&&e.v>f&&(e.l.currentTime=e.v,e.v=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.B=f.getStreamData().adProgressData;e.m&&(e.m.h=e.B)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new M("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new M("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new M("ad-third-quartile"))});
494
+ this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new M("ad-complete"));e.i(new M("ad-stopped"));e.A.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new M("ad-skipped"));e.i(new M("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.F=
495
+ f;e.i(new M("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Om.prototype.stop=function(){this.D="";this.v=null;this.F=[]};Om.prototype.release=function(){this.stop();this.h&&this.h.release()};Om.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
496
+ function Pm(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(){db.call(this);this.g=this.i=null;this.h=new Fm;this.j=navigator.language}pa(T,db);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 Hm(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)})};
497
+ q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);db.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 Fm};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)};
498
+ 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 Om(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)})};
499
+ 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.14";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
500
+ (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.14";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.F};
501
+ 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);
496
502
  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;
497
503
  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";
498
504
  T.AD_VOLUME_CHANGED="ad-volume-changed";T.AD_MUTED="ad-muted";T.AD_PAUSED="ad-paused";T.AD_RESUMED="ad-resumed";T.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";T.CUEPOINTS_CHANGED="ad-cue-points-changed";T.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";T.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";T.AD_CLICKED="ad-clicked";T.AD_PROGRESS="ad-progress";T.AD_BUFFERING="ad-buffering";T.AD_IMPRESSION="ad-impression";T.AD_DURATION_CHANGED="ad-duration-changed";T.AD_CLOSED="ad-closed";
499
- T.AD_LOADED="ad-loaded";T.ALL_ADS_COMPLETED="all-ads-completed";T.AD_LINEAR_CHANGED="ad-linear-changed";T.AD_METADATA="ad-metadata";T.AD_RECOVERABLE_ERROR="ad-recoverable-error";T.AD_BREAK_READY="ad-break-ready";T.AD_INTERACTION="ad-interaction";sk=function(){return new T};function vm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof L){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
500
- TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(Rh(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
501
- function wm(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=xm(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
502
- function xm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
503
- var ym="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),zm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Am=["loop","playbackRate"],Bm=["pause","play"],Cm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
504
- getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Dm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Em=[["getConfiguration","configure"]],Fm=[["isTextTrackVisible","setTextTrackVisibility"]],Gm="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay goToLive".split(" "),
505
- Hm=["attach","detach","load","unload"];function Im(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 Jm(g)};this.F=function(h,k){var l=wm(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 M(l.severity,l.category,l.code);
506
- 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;Km.add(this)}q=Im.prototype;q.destroy=function(){Km["delete"](this);Lm(this);Mm&&Nm(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.md=function(){return this.M};
507
- q.init=function(){if(this.H.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.za();var a=new chrome.cast.SessionRequest(this.H);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Km),d=c.next();!d.done;d=c.next())Om(d.value,b)},function(b){for(var c=t(Km),d=c.next();!d.done;d=c.next())d=d.value,Pm="available"==b,d.j.za()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Pm&&this.j.P(Qm);(a=Mm)&&a.status!=chrome.cast.SessionStatus.STOPPED?Om(this,
508
- a):Mm=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Rm),window.__onGCastApiAvailable!=Rm&&Pa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.le=function(a){this.v=a;this.h&&Sm(this,{type:"appData",appData:this.v})};
509
- q.cast=function(a){var b=this;return H(function(c){if(!b.m)throw new M(1,8,8E3);if(!Pm)throw new M(1,8,8001);if(b.h)throw new M(1,8,8002);b.l=new Lc;chrome.cast.requestSession(function(d){return Tm(b,a,d)},function(d){return Um(b,d)});return u(c,b.l,0)})};function Vm(a){if(a.h){var b=a.J();chrome.cast.requestSession(function(c){return Tm(a,b,c)},function(c){return Um(a,c)})}}q.Tb=function(){if(this.h){Lm(this);if(Mm){Nm(this);try{Mm.stop(function(){},function(){})}catch(a){}Mm=null}Jm(this)}};
510
- q.get=function(a,b){var c=this;if("video"==a){if(Bm.includes(b))return function(){return c.ef.apply(c,[a,b].concat(ha(Ea.apply(0,arguments))))}}else if("player"==a){if(Dm[b]&&!this.get("player","isLive")())return function(){};if(Gm.includes(b))return function(){return c.ef.apply(c,[a,b].concat(ha(Ea.apply(0,arguments))))};if(Hm.includes(b))return function(){return c.Hg.apply(c,[a,b].concat(ha(Ea.apply(0,arguments))))};if(Cm[b])return function(){return c.g[a][b]}}return this.g[a][b]};
511
- q.set=function(a,b,c){this.g[a][b]=c;Sm(this,{type:"set",targetName:a,property:b,value:c})};function Tm(a,b,c){Mm=c;c.addUpdateListener(a.D);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.F);Jm(a);Sm(a,{type:"init",initState:b,appData:a.v});a.l.resolve()}function Um(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 M(2,8,c,b))}
512
- q.ef=function(a,b){Sm(this,{type:"call",targetName:a,methodName:b,args:Ea.apply(2,arguments)})};q.Hg=function(a,b){var c=Ea.apply(2,arguments),d=new Lc,e=this.I.toString();this.I++;this.i[e]=d;try{Sm(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Om(a,b){var c=a.J();a.l=new Lc;a.B=!0;Tm(a,c,b)}function Nm(a){var b=Mm;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.F)}
513
- function Jm(a){var b=Mm?"connected"==Mm.status:!1;if(a.h&&!b){a.G();for(var c in a.g)a.g[c]={};Lm(a)}a.h=b;a.M=b?Mm.receiver.friendlyName:"";a.j.za()}function Lm(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new M(1,7,7E3))}}function Sm(a,b){var c=vm(b),d=Mm;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Va)}catch(e){throw c=new M(2,8,8005,e),d=new L("error",(new Map).set("detail",c)),a.A("player",d),a.Tb(),c;}}var Qm=.02,Pm=!1,Mm=null,Km=new Set;
514
- function Rm(a){if(a){a=t(Km);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Wm(a,b,c){db.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 Im(c,function(){return Xm(d)},function(){return Ym(d)},function(e,f){return Zm(d,e,f)},function(){return $m(d)},function(){return an(d)});bn(this)}pa(Wm,db);q=Wm.prototype;
515
- q.destroy=function(a){a&&this.g.Tb();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;db.prototype.release.call(this);return Promise.all(a)};q.tb=function(){return this.l};q.Vb=function(){return this.A};q.Fe=function(){return this.g.m&&Pm};q.na=function(){return this.g.na()};q.md=function(){return this.g.md()};
516
- q.cast=function(){var a=this,b;return H(function(c){return 1==c.g?(b=an(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Be(),0):c["return"]()})};q.le=function(a){this.g.le(a)};q.rf=function(){Vm(this.g)};q.Tb=function(){this.g.Tb()};
517
- q.Je=function(a){var b=this;return H(function(c){if(1==c.g){if(a==b.D)return c["return"]();b.D=a;b.g.Tb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new Im(a,function(){return Xm(b)},function(){return Ym(b)},function(d,e){return Zm(b,d,e)},function(){return $m(b)},function(){return an(b)});b.g.init();z(c)})};
518
- function bn(a){a.g.init();a.m=new mf;for(var b=t(ym),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 im)a.m.o(a.h,im[d],function(f){a.g.na()||a.v.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.fc=e,Object.defineProperty(a.l,b.fc,{configurable:!1,enumerable:!0,get:function(f){return function(){return cn(a,f.fc)}}(b),set:function(f){return function(g){var h=f.fc;a.g.na()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={fc:b.fc};a.A={};dn(a,
519
- function(f){Object.defineProperty(a.A,f,{configurable:!1,enumerable:!0,get:function(){return en(a,f)}})});fn(a);a.j=new db;a.j.Uc=a.l;a.v=new db;a.v.Uc=a.A}function fn(a){var b=new Map;dn(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)})}
520
- function dn(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)}}
521
- function an(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Ld(),startTime:null};a.i.pause();for(var c=t(Am),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(Em);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(Fm);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 Xm(a){var b=new L("caststatuschanged");a.dispatchEvent(b)}
522
- function Ym(a){var b=new L(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
523
- function $m(a){for(var b=t(Em),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(Am);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(Am),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(Fm);for(k=
524
- 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 L(em,h);a.h.dispatchEvent(h)})}
525
- function cn(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)}
526
- function en(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.uc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.Vc()};
527
- if("setVideoContainer"==b)return function(c){return a.h.ve(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&&Cm[b]||!a.g.na()?a.h[b].bind(a.h):a.g.get("player",b)}function Zm(a,b,c){a.g.na()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.v.dispatchEvent(c))}
528
- J("shaka.cast.CastProxy",Wm);Wm.prototype.changeReceiverId=Wm.prototype.Je;Wm.prototype.forceDisconnect=Wm.prototype.Tb;Wm.prototype.suggestDisconnect=Wm.prototype.rf;Wm.prototype.setAppData=Wm.prototype.le;Wm.prototype.cast=Wm.prototype.cast;Wm.prototype.receiverName=Wm.prototype.md;Wm.prototype.isCasting=Wm.prototype.na;Wm.prototype.canCast=Wm.prototype.Fe;Wm.prototype.getPlayer=Wm.prototype.Vb;Wm.prototype.getVideo=Wm.prototype.tb;Wm.prototype.destroy=Wm.prototype.destroy;function gn(a,b,c,d){db.call(this);var e=this;this.g=a;this.h=b;this.j=new mf;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(){hn(e)});jn(this)}pa(gn,db);q=gn.prototype;q.isConnected=function(){return this.G};q.sg=function(){return this.v};q.Pg=function(a){this.i=a};q.Gf=function(){this.i=null};
505
+ T.AD_LOADED="ad-loaded";T.ALL_ADS_COMPLETED="all-ads-completed";T.AD_LINEAR_CHANGED="ad-linear-changed";T.AD_METADATA="ad-metadata";T.AD_RECOVERABLE_ERROR="ad-recoverable-error";T.AD_BREAK_READY="ad-break-ready";T.AD_INTERACTION="ad-interaction";Nk=function(){return new T};function Qm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof M){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
506
+ TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(li(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
507
+ function Rm(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Sm(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
508
+ function Sm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
509
+ var Tm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Um="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Vm=["loop","playbackRate"],Wm=["pause","play"],Xm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
510
+ getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Ym={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Zm=[["getConfiguration","configure"]],$m=[["isTextTrackVisible","setTextTrackVisibility"]],an="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay goToLive".split(" "),
511
+ bn=["attach","detach","load","unload"];function cn(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 dn(g)};this.F=function(h,k){var l=Rm(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);
512
+ 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;en.add(this)}q=cn.prototype;q.destroy=function(){en["delete"](this);fn(this);gn&&hn(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.md=function(){return this.M};
513
+ q.init=function(){if(this.H.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.za();var a=new chrome.cast.SessionRequest(this.H);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(en),d=c.next();!d.done;d=c.next())jn(d.value,b)},function(b){for(var c=t(en),d=c.next();!d.done;d=c.next())d=d.value,kn="available"==b,d.j.za()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});kn&&this.j.P(ln);(a=gn)&&a.status!=chrome.cast.SessionStatus.STOPPED?jn(this,
514
+ a):gn=null}else window.__onGCastApiAvailable!==mn&&(nn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=mn)};q.le=function(a){this.v=a;this.h&&on(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(!kn)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 pn(b,a,d)},function(d){return qn(b,d)});return u(c,b.l,0)})};
515
+ function rn(a){if(a.h){var b=a.J();chrome.cast.requestSession(function(c){return pn(a,b,c)},function(c){return qn(a,c)})}}q.Tb=function(){if(this.h){fn(this);if(gn){hn(this);try{gn.stop(function(){},function(){})}catch(a){}gn=null}dn(this)}};
516
+ q.get=function(a,b){var c=this;if("video"==a){if(Wm.includes(b))return function(){return c.ef.apply(c,[a,b].concat(ha(Ea.apply(0,arguments))))}}else if("player"==a){if(Ym[b]&&!this.get("player","isLive")())return function(){};if(an.includes(b))return function(){return c.ef.apply(c,[a,b].concat(ha(Ea.apply(0,arguments))))};if(bn.includes(b))return function(){return c.Hg.apply(c,[a,b].concat(ha(Ea.apply(0,arguments))))};if(Xm[b])return function(){return c.g[a][b]}}return this.g[a][b]};
517
+ q.set=function(a,b,c){this.g[a][b]=c;on(this,{type:"set",targetName:a,property:b,value:c})};function pn(a,b,c){gn=c;c.addUpdateListener(a.D);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.F);dn(a);on(a,{type:"init",initState:b,appData:a.v});a.l.resolve()}function qn(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))}
518
+ q.ef=function(a,b){on(this,{type:"call",targetName:a,methodName:b,args:Ea.apply(2,arguments)})};q.Hg=function(a,b){var c=Ea.apply(2,arguments),d=new Lc,e=this.I.toString();this.I++;this.i[e]=d;try{on(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function jn(a,b){var c=a.J();a.l=new Lc;a.B=!0;pn(a,c,b)}function hn(a){var b=gn;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.F)}
519
+ function dn(a){var b=gn?"connected"==gn.status:!1;if(a.h&&!b){a.G();for(var c in a.g)a.g[c]={};fn(a)}a.h=b;a.M=b?gn.receiver.friendlyName:"";a.j.za()}function fn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function on(a,b){var c=Qm(b),d=gn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Va)}catch(e){throw c=new N(2,8,8005,e),d=new M("error",(new Map).set("detail",c)),a.A("player",d),a.Tb(),c;}}var ln=.02,kn=!1,gn=null,nn=null,en=new Set;
520
+ function mn(a){nn?window.__onGCastApiAvailable=nn:delete window.__onGCastApiAvailable;nn=null;if(a)for(var b=t(en),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function sn(a,b,c){db.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 cn(c,function(){return tn(d)},function(){return un(d)},function(e,f){return vn(d,e,f)},function(){return wn(d)},function(){return xn(d)});yn(this)}pa(sn,db);q=sn.prototype;
521
+ q.destroy=function(a){a&&this.g.Tb();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;db.prototype.release.call(this);return Promise.all(a)};q.tb=function(){return this.l};q.Vb=function(){return this.A};q.Fe=function(){return this.g.m&&kn};q.na=function(){return this.g.na()};q.md=function(){return this.g.md()};
522
+ q.cast=function(){var a=this,b;return I(function(c){return 1==c.g?(b=xn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Be(),0):c["return"]()})};q.le=function(a){this.g.le(a)};q.rf=function(){rn(this.g)};q.Tb=function(){this.g.Tb()};
523
+ q.Je=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.Tb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new cn(a,function(){return tn(b)},function(){return un(b)},function(d,e){return vn(b,d,e)},function(){return wn(b)},function(){return xn(b)});b.g.init();z(c)})};
524
+ function yn(a){a.g.init();a.m=new mf;for(var b=t(Tm),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 Dm)a.m.o(a.h,Dm[d],function(f){a.g.na()||a.v.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.fc=e,Object.defineProperty(a.l,b.fc,{configurable:!1,enumerable:!0,get:function(f){return function(){return zn(a,f.fc)}}(b),set:function(f){return function(g){var h=f.fc;a.g.na()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={fc:b.fc};a.A={};An(a,
525
+ function(f){Object.defineProperty(a.A,f,{configurable:!1,enumerable:!0,get:function(){return Bn(a,f)}})});Cn(a);a.j=new db;a.j.Uc=a.l;a.v=new db;a.v.Uc=a.A}function Cn(a){var b=new Map;An(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)})}
526
+ function An(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)}}
527
+ function xn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Ld(),startTime:null};a.i.pause();for(var c=t(Vm),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(Zm);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($m);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 tn(a){var b=new M("caststatuschanged");a.dispatchEvent(b)}
528
+ function un(a){var b=new M(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
529
+ function wn(a){for(var b=t(Zm),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(Vm);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(Vm),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t($m);for(k=
530
+ 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(zm,h);a.h.dispatchEvent(h)})}
531
+ function zn(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)}
532
+ function Bn(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.uc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.Vc()};
533
+ if("setVideoContainer"==b)return function(c){return a.h.ve(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&&Xm[b]||!a.g.na()?a.h[b].bind(a.h):a.g.get("player",b)}function vn(a,b,c){a.g.na()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.v.dispatchEvent(c))}
534
+ K("shaka.cast.CastProxy",sn);sn.prototype.changeReceiverId=sn.prototype.Je;sn.prototype.forceDisconnect=sn.prototype.Tb;sn.prototype.suggestDisconnect=sn.prototype.rf;sn.prototype.setAppData=sn.prototype.le;sn.prototype.cast=sn.prototype.cast;sn.prototype.receiverName=sn.prototype.md;sn.prototype.isCasting=sn.prototype.na;sn.prototype.canCast=sn.prototype.Fe;sn.prototype.getPlayer=sn.prototype.Vb;sn.prototype.getVideo=sn.prototype.tb;sn.prototype.destroy=sn.prototype.destroy;function Dn(a,b,c,d){db.call(this);var e=this;this.g=a;this.h=b;this.j=new mf;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(){En(e)});Fn(this)}pa(Dn,db);q=Dn.prototype;q.isConnected=function(){return this.G};q.sg=function(){return this.v};q.Pg=function(a){this.i=a};q.Gf=function(){this.i=null};
529
535
  q.Qg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Og=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Ng=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
530
- q.destroy=function(){var a=this,b,c;return H(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,db.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
531
- function jn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return kn(a)};b.onSenderDisconnected=function(){return kn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&ln(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);ln(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 mn(a,
532
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return nn(a,e)};b.start();b=t(ym);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return on(a,"video",e)});for(var d in im)a.j.o(a.h,im[d],function(e){return on(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.pe(3840,2160):a.h.pe(1920,1080);a.j.o(a.g,"loadeddata",function(){a.D=!0});a.j.o(a.h,"loading",function(){a.v=
533
- !1;pn(a)});a.j.o(a.g,"playing",function(){a.v=!1;pn(a)});a.j.o(a.g,"pause",function(){pn(a)});a.j.o(a.h,"unloading",function(){a.v=!0;pn(a)});a.j.o(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.v=!0,pn(a))})).P(qn)})}function kn(a){a.m=0;a.B=!0;a.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;pn(a)}
534
- function pn(a){var b;H(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new L("caststatuschanged");a.dispatchEvent(b);rn(a)||sn(a);z(c)})}
535
- function tn(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;H(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=em,k=(new Map).set("detail",g),l=new L(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],
536
- a.h[p](r);a.g.autoplay=f;b.manifest&&(a.g.play(),sn(a));z(v)}})}function on(a,b,c){a.h&&(hn(a),ln(a,{type:"event",targetName:b,event:c},a.l))}
537
- function hn(a){a.H.P(un);for(var b={video:{},player:{}},c=t(zm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.V())for(var e in Dm)0==a.m%Dm[e]&&(b.player[e]=a.h[e]());for(var f in Cm)0==a.m%Cm[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.D&&(a.m+=1);ln(a,{type:"update",update:b},a.l);rn(a)}function rn(a){return a.B&&(a.g.duration||a.h.V())?(vn(a),a.B=!1,!0):!1}
538
- function vn(a,b){var c={contentId:a.h.Ld(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);sn(a,void 0===b?0:b,c)}
539
- function nn(a,b){var c=wm(b.data);switch(c.type){case "init":a.m=0;a.D=!1;a.B=!0;tn(a,c.initState,c.appData);hn(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=
540
- 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 wn(a,h,g,null)},function(k){return wn(a,h,g,k)})}}
541
- function mn(a,b){var c=wm(b.data);switch(c.type){case "PLAY":a.g.play();sn(a);break;case "PAUSE":a.g.pause();sn(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(),sn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),sn(a));break;case "STOP":a.h.Be().then(function(){a.h&&sn(a)});break;case "GET_STATUS":vn(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));
542
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||sn(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&&vn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");ln(a,{requestId:Number(c.requestId),type:k},a.A)});break;default:ln(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.A)}}
543
- function wn(a,b,c,d){a.h&&ln(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function ln(a,b,c,d){a.G&&(a=vm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function sn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.v?xn:a.h.Bc()?yn:a.g.paused?zn:An,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);ln(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.A)}
544
- J("shaka.cast.CastReceiver",gn);gn.prototype.destroy=gn.prototype.destroy;gn.prototype.setContentArtist=gn.prototype.Ng;gn.prototype.setContentImage=gn.prototype.Og;gn.prototype.setContentTitle=gn.prototype.Qg;gn.prototype.clearContentMetadata=gn.prototype.Gf;gn.prototype.setContentMetadata=gn.prototype.Pg;gn.prototype.isIdle=gn.prototype.sg;gn.prototype.isConnected=gn.prototype.isConnected;var un=.5,qn=5,xn="IDLE",An="PLAYING",yn="BUFFERING",zn="PAUSED";function Bn(a){var b=this;this.g=[];this.h=[];this.data=[];(new sg).box("moov",wg).U("pssh",function(c){if(!(1<c.version)){var d=Ec(c.reader.S,-12,c.size);b.data.push(d);b.g.push(nd(c.reader.ub(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=nd(c.reader.ub(16));b.h.push(f)}}}}).parse(a)}
545
- function Cn(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 Dn(a){if(!a)return a;var b=new Bn(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 od.apply(id,ha(a))};function En(a,b){var c=Fn(a,b);return 1!=c.length?null:c[0]}function Gn(a,b,c){a=Hn(a,b,c);return 1!=a.length?null:a[0]}function Fn(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 In(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
546
- function Hn(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 Jn(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Kn(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 Ln(a){return Array.from(a.childNodes).every(Mn)?a.textContent.trim():null}
547
- function Mn(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Nn(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 On(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)}
548
- function Pn(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}
549
- function Qn(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Rn(a){a=Number(a);return 0===a%1?a:null}function Sn(a){a=Number(a);return 0===a%1&&0<a?a:null}function Tn(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Un(a){a=Number(a);return isNaN(a)?null:a}function Vn(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
550
- function Wn(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function Xn(a,b){try{var c=cd(a);return Wn(c,b)}catch(d){return null}};function Yn(a,b,c){var d=Zn(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 M(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.jf?(e=h.init||e,!1):!0}),f.length&&(a=$n(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=
551
- t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Le:g,ii:e,drmInfos:a,Pe:!0}}function ao(a,b,c,d){var e=Yn(a,c,d);if(b.Pe){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.Pe=!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 M(2,4,4008);return e.Le||b.Le}
552
- function bo(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}
553
- function co(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 eo(a){a=Gn(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=ld(a.textContent);a=bo(a).filter(function(b){return b.type===fo})[0];if(!a)return"";a=dd(a.value,!0);return(a=Wn(a,"WRMHEADER"))?co(a):""}
554
- function $n(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.jf];if(f){var g;if(g=Gn(e.node,"urn:microsoft:playready","pro")){g=ld(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:Cn(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Hb(f,e.init||a||g);if(f=go.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
555
- function Zn(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=ho(c.value))&&b.push(c);return b}
556
- function ho(a){var b=a.getAttribute("schemeIdUri"),c=Jn(a,"urn:mpeg:cenc:2013","default_KID"),d=Hn(a,"urn:mpeg:cenc:2013","pssh").map(Ln);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new M(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:ld(f),keyId:null}})}catch(f){throw new M(2,4,4007);}return{node:a,jf:b,keyId:c,init:0<e.length?e:null}}
557
- var fo=1,go=(new Map).set("com.widevine.alpha",function(a){return(a=Gn(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",eo).set("com.microsoft.playready.recommendation",eo).set("com.microsoft.playready.software",eo).set("com.microsoft.playready.hardware",eo);function io(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=
536
+ 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,db.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
537
+ function Fn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Gn(a)};b.onSenderDisconnected=function(){return Gn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Hn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Hn(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 In(a,
538
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Jn(a,e)};b.start();b=t(Tm);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Kn(a,"video",e)});for(var d in Dm)a.j.o(a.h,Dm[d],function(e){return Kn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.pe(3840,2160):a.h.pe(1920,1080);a.j.o(a.g,"loadeddata",function(){a.D=!0});a.j.o(a.h,"loading",function(){a.v=
539
+ !1;Ln(a)});a.j.o(a.g,"playing",function(){a.v=!1;Ln(a)});a.j.o(a.g,"pause",function(){Ln(a)});a.j.o(a.h,"unloading",function(){a.v=!0;Ln(a)});a.j.o(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.v=!0,Ln(a))})).P(Mn)})}function Gn(a){a.m=0;a.B=!0;a.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Ln(a)}
540
+ function Ln(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);Nn(a)||On(a);z(c)})}
541
+ function Pn(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=zm,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],
542
+ a.h[p](r);a.g.autoplay=f;b.manifest&&(a.g.play(),On(a));z(v)}})}function Kn(a,b,c){a.h&&(En(a),Hn(a,{type:"event",targetName:b,event:c},a.l))}
543
+ function En(a){a.H.P(Qn);for(var b={video:{},player:{}},c=t(Um),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.V())for(var e in Ym)0==a.m%Ym[e]&&(b.player[e]=a.h[e]());for(var f in Xm)0==a.m%Xm[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.D&&(a.m+=1);Hn(a,{type:"update",update:b},a.l);Nn(a)}function Nn(a){return a.B&&(a.g.duration||a.h.V())?(Rn(a),a.B=!1,!0):!1}
544
+ function Rn(a,b){var c={contentId:a.h.Ld(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);On(a,void 0===b?0:b,c)}
545
+ function Jn(a,b){var c=Rm(b.data);switch(c.type){case "init":a.m=0;a.D=!1;a.B=!0;Pn(a,c.initState,c.appData);En(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=
546
+ 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 Sn(a,h,g,null)},function(k){return Sn(a,h,g,k)})}}
547
+ function In(a,b){var c=Rm(b.data);switch(c.type){case "PLAY":a.g.play();On(a);break;case "PAUSE":a.g.pause();On(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(),On(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),On(a));break;case "STOP":a.h.Be().then(function(){a.h&&On(a)});break;case "GET_STATUS":Rn(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));
548
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||On(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&&Rn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Hn(a,{requestId:Number(c.requestId),type:k},a.A)});break;default:Hn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.A)}}
549
+ function Sn(a,b,c,d){a.h&&Hn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Hn(a,b,c,d){a.G&&(a=Qm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function On(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.v?Tn:a.h.Bc()?Un:a.g.paused?Vn:Wn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Hn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.A)}
550
+ K("shaka.cast.CastReceiver",Dn);Dn.prototype.destroy=Dn.prototype.destroy;Dn.prototype.setContentArtist=Dn.prototype.Ng;Dn.prototype.setContentImage=Dn.prototype.Og;Dn.prototype.setContentTitle=Dn.prototype.Qg;Dn.prototype.clearContentMetadata=Dn.prototype.Gf;Dn.prototype.setContentMetadata=Dn.prototype.Pg;Dn.prototype.isIdle=Dn.prototype.sg;Dn.prototype.isConnected=Dn.prototype.isConnected;var Qn=.5,Mn=5,Tn="IDLE",Wn="PLAYING",Un="BUFFERING",Vn="PAUSED";function Xn(a){var b=this;this.g=[];this.h=[];this.data=[];(new Ng).box("moov",Rg).U("pssh",function(c){if(!(1<c.version)){var d=Ec(c.reader.S,-12,c.size);b.data.push(d);b.g.push(nd(c.reader.ub(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=nd(c.reader.ub(16));b.h.push(f)}}}}).parse(a)}
551
+ function Yn(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 Zn(a){if(!a)return a;var b=new Xn(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 od.apply(id,ha(a))};function $n(a,b,c){var d=ao(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.jf?(e=h.init||e,!1):!0}),f.length&&(a=bo(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=
552
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Le:g,ii:e,drmInfos:a,Pe:!0}}function co(a,b,c,d){var e=$n(a,c,d);if(b.Pe){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.Pe=!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.Le||b.Le}
553
+ function eo(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}
554
+ function fo(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 go(a){a=zf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=ld(a.textContent);a=eo(a).filter(function(b){return b.type===ho})[0];if(!a)return"";a=dd(a.value,!0);return(a=Pf(a,"WRMHEADER"))?fo(a):""}
555
+ function bo(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.jf];if(f){var g;if(g=zf(e.node,"urn:microsoft:playready","pro")){g=ld(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:Yn(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Hb(f,e.init||a||g);if(f=io.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
556
+ function ao(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=jo(c.value))&&b.push(c);return b}
557
+ function jo(a){var b=a.getAttribute("schemeIdUri"),c=Cf(a,"urn:mpeg:cenc:2013","default_KID"),d=Af(a,"urn:mpeg:cenc:2013","pssh").map(Ef);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:ld(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,jf:b,keyId:c,init:0<e.length?e:null}}
558
+ var ho=1,io=(new Map).set("com.widevine.alpha",function(a){return(a=zf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",go).set("com.microsoft.playready.recommendation",go).set("com.microsoft.playready.software",go).set("com.microsoft.playready.hardware",go);function ko(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=
558
559
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
559
- function jo(a,b){var c=ko(a,b,"timescale"),d=1;c&&(d=Sn(c)||1);var e=ko(a,b,"duration");c=Sn(e||"");"image"==a.L.contentType&&(c=Un(e||""));c&&(c/=d);var f=ko(a,b,"startNumber");e=Number(ko(a,b,"presentationTimeOffset"))||0;var g=Tn(f||"");if(null==f||null==g)g=1;var h=lo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.X.duration||Infinity;h=Fn(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],r=h[n+1],v=Nn(p,"t",Tn),y=Nn(p,"d",Tn);p=Nn(p,"r",Rn);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
560
- p||0;if(0>p)if(r){r=Nn(r,"t",Tn);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,Vg:v}),v=m}f=l}return{timescale:d,xa:c,dc:g,pb:e/d||0,Ce:e,timeline:f}}function ko(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Eb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
561
- function lo(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Eb).map(function(d){return En(d,c)}).reduce(function(d,e){return d||e})}
562
- function mo(a,b,c,d,e,f){for(var g=Jn(a,"http://www.w3.org/1999/xlink","href"),h=Jn(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 Pe(new M(2,4,4028));if("onLoad"!=h)return Pe(new M(2,4,4027));var m=Gb([d],[g]);return e.request(0,cf(m,b)).ma(function(n){n=Xn(n.data,a.tagName);if(!n)return Pe(new M(2,4,4001,g));
563
- 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 no(a,b,c,m[0],e,f+1)})}
564
- function no(a,b,c,d,e,f){f=void 0===f?0:f;if(Jn(a,"http://www.w3.org/1999/xlink","href")){var g=mo(a,b,c,d,e,f);c&&(g=g.ma(void 0,function(){return no(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"==Jn(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(no(k,b,c,d,e,f)));return Te(g).ma(function(){return a})};function oo(a,b,c,d,e,f,g){var h,k=(new sg).U("sidx",function(l){h=po(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new M(2,3,3004);}
565
- function po(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new M(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.cc(),m=g.reader.cc();g.reader.skip(2);var n=g.reader.bc();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 M(2,3,3006);h.push(new pi(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 qo(a){this.h=Hc(a);this.g=new pg(this.h,0)}qo.prototype.Fa=function(){return this.g.Fa()};
566
- function ro(a){var b=so(a);if(7<b.length)throw new M(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=so(a);a:{d=t(to);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 M(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 uo(c,
567
- d)}function so(a){var b=a.g.ea(),c=a.g.ha();if(0==c)throw new M(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ec(a.h,b,c)}var to=[[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 uo(a,b){this.id=a;this.g=b}
568
- function vo(a){if(8<a.g.byteLength)throw new M(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new M(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 wo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new qo(a.g);for(var n=null,p=null;a.Fa();){var r=ro(a);if(187==r.id){var v=xo(r);v&&(r=c*v.Wg,v=b+v.Gg,null!=n&&m.push(new pi(n+g,r+g,l,p,v-1,f,g,h,k)),n=r,p=v)}}null!=n&&m.push(new pi(n+g,d+g,l,p,null,f,g,h,k));return m}
569
- function xo(a){var b=new qo(a.g);a=ro(b);if(179!=a.id)throw new M(2,3,3013);a=vo(a);b=ro(b);if(183!=b.id)throw new M(2,3,3012);b=new qo(b.g);for(var c=0;b.Fa();){var d=ro(b);if(241==d.id){c=vo(d);break}}return{Wg:a,Gg:c}};function yo(a,b){var c=lo(a,b,"Initialization");if(!c)return null;var d=a.L.Oa,e=c.getAttribute("sourceURL");e&&(d=Gb(a.L.Oa,[e]));e=0;var f=null;if(c=Nn(c,"range",Qn))e=c.start,f=c.end;return new ni(function(){return d},e,f)}
570
- function zo(a,b){var c=Number(ko(a,Ao,"presentationTimeOffset"))||0,d=ko(a,Ao,"timescale"),e=1;d&&(e=Sn(d)||1);var f=c/e||0,g=yo(a,Ao);Bo(a,g);var h=We(a);return{Ub:function(){var k=lo(h,Ao,"RepresentationIndex"),l=h.L.Oa;k&&(k=k.getAttribute("sourceURL"))&&(l=Gb(h.L.Oa,[k]));k=Co(h);return Do(h,b,g,l,k.start,k.end,f)}}}
571
- function Do(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,v,y,x,w,C,D,B,E;return H(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.yb||!a.X.Ze,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.ya,c.ra):null],p=null,u(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;C=null;D=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var I=oo(x,e,d,c,D,B,E);else{I=new qo(w);if(440786851!=ro(I).id)throw new M(2,3,3008);var N=ro(I);if(408125543!=N.id)throw new M(2,3,3009);I=N.g.byteOffset;
572
- N=new qo(N.g);for(var K=null;N.Fa();){var O=ro(N);if(357149030==O.id){K=O;break}}if(!K)throw new M(2,3,3010);K=new qo(K.g);O=1E6;for(N=null;K.Fa();){var V=ro(K);if(2807729==V.id)O=vo(V);else if(17545==V.id)if(4==V.g.byteLength)N=V.g.getFloat32(0);else if(8==V.g.byteLength)N=V.g.getFloat64(0);else throw new M(2,3,3003);}if(null==N)throw new M(2,3,3011);K=O/1E9;N*=K;O=ro(new qo(x));if(475249515!=O.id)throw new M(2,3,3007);I=wo(O,I,K,N,d,c,D,B,E)}C=I;h.Zb(C);r=new Oi(C);k&&r.sb(B,E,!0);return G["return"](r)})}
573
- function Ao(a){return a.Fc}function Co(a){var b=lo(a,Ao,"RepresentationIndex");a=ko(a,Ao,"indexRange");a=Qn(a||"");b&&(a=Nn(b,"range",Qn,a));return a}function Bo(a,b){Eo(a,b);if(!Co(a))throw new M(2,4,4002);}function Eo(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Lb&&"mp4"!=c&&"webm"!=c)throw new M(2,4,4006);if("webm"==c&&!b)throw new M(2,4,4005);};function Fo(a,b){var c=yo(a,Go),d=Ho(a);if(!d.xa&&!d.timeline&&1<d.Xb.length)throw new M(2,4,4002);if(!d.xa&&!a.X.duration&&!d.timeline&&1==d.Xb.length)throw new M(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new M(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=Io(a.X.start,a.X.duration,a.L.Oa,d,c);d=!e;e?e.Yb(c,a.presentationTimeline.jb()):(e=new Oi(c),f&&a.yb&&(b[f]=e));a.presentationTimeline.Zb(c);a.yb&&a.X.Ze||e.sb(a.X.start,a.X.duration?a.X.start+a.X.duration:
574
- Infinity,d);return{Ub:function(){return Promise.resolve(e)}}}function Go(a){return a.vb}function Ho(a){var b=Jo(a);a=jo(a,Go);var c=a.dc;0==c&&(c=1);var d=0;a.xa?d=a.xa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{xa:a.xa,startTime:d,dc:c,pb:a.pb,timeline:a.timeline,Xb:b}}
575
- function Io(a,b,c,d,e){var f=d.Xb.length;d.timeline&&d.timeline.length!=d.Xb.length&&(f=Math.min(d.timeline.length,d.Xb.length));for(var g=a-d.pb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={yd:m.yd},n++){var p=d.Xb[n];m.yd=Gb(c,[p.yg]);var r=void 0;r=null!=d.xa?l+d.xa:d.timeline?d.timeline[n].end:l+b;k.push(new pi(a+l,a+r,function(v){return function(){return v.yd}}(m),p.start,p.end,e,g,a,h));l=r}return k}
576
- function Jo(a){return[a.L.vb,a.Ca.vb,a.sa.vb].filter(Eb).map(function(b){return Fn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.We&&(a.We=!0);var c=b.getAttribute("media");b=Nn(b,"mediaRange",Qn,{start:0,end:null});return{yg:c,start:b.start,end:b.end}})};function Ko(a,b,c,d,e,f){var g=So(a),h=To(a);Uo(h);var k=We(a);if(h.Ac)return Eo(a,g),{Ub:function(){var v=io(h.Ac,k.L.id,null,k.bandwidth||null,null);v=Gb(k.L.Oa,[v]);return Do(k,b,g,v,0,null,h.pb)}};if(h.xa)return d||(a.presentationTimeline.Vd(h.xa),a.presentationTimeline.Wd(a.X.start)),{Ub:function(){return Vo(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=Wo(k,h,g),n=a.X.start,p=a.X.duration?a.X.start+a.X.duration:Infinity,r=Infinity!=p;l?(r&&(new Oi(m)).sb(n,
577
- p,!0),l.Yb(m,a.presentationTimeline.jb())):(l=new Oi(m),d&&a.yb&&(c[d]=l));a.presentationTimeline.Zb(m);r&&l.sb(n,p);return{Ub:function(){return Promise.resolve(l)}}}function Xo(a){return a.Gc}function To(a){var b=jo(a,Xo),c=ko(a,Xo,"media");a=ko(a,Xo,"index");return{xa:b.xa,timescale:b.timescale,dc:b.dc,pb:b.pb,Ce:b.Ce,timeline:b.timeline,Td:c,Ac:a}}
578
- function Uo(a){var b=a.Ac?1:0;b+=a.timeline?1:0;b+=a.xa?1:0;if(0==b)throw new M(2,4,4002);1!=b&&(a.Ac&&(a.timeline=null),a.xa=null);if(!a.Ac&&!a.Td)throw new M(2,4,4002);}
579
- function Vo(a,b,c,d,e){function f(K){var O=(K-r)*p,V=O+b.pb,Z=O+l;O=Z+p;var W=Math.min(O,h());Z=new pi(Z,W,function(){var ma=io(y,w,K,x,V*v);return Gb(C,[ma])},0,null,d,D,l,h());Z.l=O;return Z}function g(){var K=[Math.max(k.jb(),l),Math.min(k.Cb(),h())].map(function(O){return O-l});return[Math.ceil(K[0]/p),Math.ceil(K[1]/p)-1].map(function(O){return O+r})}function h(){var K=null!=m&&e[m]||n;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.X.start,m=a.sa.id,n=a.X.duration,p=b.xa,r=b.dc,v=b.timescale,
580
- y=b.Td,x=a.bandwidth||null,w=a.L.id,C=a.L.Oa,D=l-b.pb,B=g();a=a.yb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var G=f(E);c.push(G)}var I=new Oi(c);c=k.Cb()<h();E=k.V();if(c||E){var N=Math.max(a,B+1);I.pd(p,function(){var K=k.jb();I.zb(K);var O=t(g());O.next();O=O.next().value;for(var V=[];N<=O;){var Z=f(N);V.push(Z);N++}return K>h()&&!V.length?null:V})}return Promise.resolve(I)}
581
- function Wo(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={xd:h.xd,Cd:h.Cd,Fd:h.Fd,ud:h.ud,Hd:h.Hd,vd:h.vd},k++){var l=b.timeline[k],m=l.start,n=l.Vg;l=l.end;h.Fd=k+b.dc;h.Hd=n+b.Ce;h.Cd=a.L.id;h.ud=a.bandwidth||null;h.xd=b.Td;h.vd=a.L.Oa;g.push(new pi(d+m,d+l,function(p){return function(){var r=io(p.xd,p.Cd,p.Fd,p.ud||null,p.Hd);return Gb(p.vd,[r]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
582
- function So(a){var b=ko(a,Xo,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Oa;return new ni(function(){var f=io(b,c,null,d,null);return Gb(e,[f])},0,null)};function Yo(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Yo.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=[]};
583
- function Zo(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V,Z,W,ma,ya,Ta;return H(function(Qa){switch(Qa.g){case 1:d=Mb;$o(b);ap(b);bp(b);cp(b);if(!c&&1==b.length){e=b[0];a.g=e.Pc;a.h=e.rd;a.j=e.textStreams;a.i=e.imageStreams;Qa.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 Qa["return"]();k=b.map(function(Fa){return Fa.Pc});l=b.map(function(Fa){return Fa.rd});m=b.map(function(Fa){return Fa.textStreams});n=b.map(function(Fa){return Fa.imageStreams});
584
- p=t(m);for(r=p.next();!r.done;r=p.next())v=r.value,v.push(dp(d.ka));y=t(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(dp(d.nc));return u(Qa,ep(a.g,k,f,fp,gp),3);case 3:return u(Qa,ep(a.h,l,f,fp,gp),4);case 4:return u(Qa,ep(a.j,m,f,fp,gp),5);case 5:return u(Qa,ep(a.i,n,f,fp,gp),2);case 2:C=0;D=[];if(a.h.length&&a.g.length)for(K=t(a.g),O=K.next();!O.done;O=K.next())for(V=O.value,Z=t(a.h),W=Z.next();!W.done;W=Z.next())ma=W.value,ya=hg(V.drmInfos,ma.drmInfos),V.drmInfos.length&&ma.drmInfos.length&&
585
- !ya.length||(Ta=C++,D.push({id:Ta,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(B=a.h.concat(a.g),E=t(B),G=E.next();!G.done;G=E.next())I=G.value,N=C++,D.push({id:N,language:I.language,primary:I.primary,audio:I.type==d.wb?I:null,video:I.type==d.bb?I:null,bandwidth:I.bandwidth||0,drmInfos:I.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
586
- a.l=D;z(Qa)}})}function $o(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Pc),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.Pc=c}}
587
- function bp(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}}
588
- function ap(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.rd),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)&&wf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.rd=c}}
589
- function cp(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}}
590
- function hp(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V;return H(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.wb})});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.nc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
591
- k.push(ip(b.ka));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(ip(b.nc));return u(Z,ep([],c,0,jp,kp),2);case 2:return p=Z.h,u(Z,ep([],d,0,jp,kp),3);case 3:return r=Z.h,u(Z,ep([],e,0,jp,kp),4);case 4:return v=Z.h,u(Z,ep([],f,0,jp,kp),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(I=G.value,N=t(r),K=N.next();!K.done;K=N.next())O=K.value,V=x++,O.variantIds.push(V),I.variantIds.push(V);else for(w=r.concat(p),C=t(w),D=C.next();!D.done;D=C.next())B=D.value,
592
- B.variantIds=[x++];return Z["return"](r.concat(p).concat(v).concat(y))}})}
593
- function ep(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,E,G,I,N,K;return H(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,lp(m,b,c,e,g),5);case 5:n=O.h;if(!n)throw new M(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,mp(w,b,d,e,g),12);
594
- case 12:(C=O.h)&&a.push(C);x=y.next();O.C(9);break;case 8:D=t(g);for(r=D.next();!r.done;r=D.next())for(B=r.value,E={},G=t(B),x=G.next();!x.done;E={rb:E.rb},x=G.next())if(E.rb=x.value,I=E.rb.type==f.ka&&!E.rb.language,N=E.rb.type==f.nc&&!E.rb.tilesLayout,!I&&!N&&(K=a.some(function(V){return function(Z){return Z.mimeType==V.rb.mimeType&&wd(Z.codecs)==wd(V.rb.codecs)}}(E))))throw new M(2,4,4037);return O["return"](a)}})}
595
- function lp(a,b,c,d,e){var f;return H(function(g){if(1==g.g)return(f=np(b,a))?u(g,op(f),2):g["return"](!1);pp(a,f,c,d,e);return g["return"](!0)})}function op(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)}
596
- function mp(a,b,c,d,e){var f,g;return H(function(h){if(1==h.g)return f=c(a),(g=np(b,f))?f.createSegmentIndex?u(h,op(g),2):h.C(2):h["return"](null);pp(f,g,0,d,e);return h["return"](f)})}function pp(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)}}
597
- function fp(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Ri;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function jp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
598
- function gp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=hg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new M(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
599
- (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=fp(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),gp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&gp(a.trickModeVideo,b)}
600
- function kp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ha(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
601
- function np(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:qp,video:qp,text:rp,image:sp}[f.type],h={audio:tp,video:up,text:vp,image:wp}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function qp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||wd(b.codecs)!=wd(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<hg(c,d).length:1)}return c?!1:!0}
602
- function rp(a,b){return a.language?b.language?0==Sb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function sp(a){return a.tilesLayout?!0:!1}
603
- function tp(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
604
- d=xp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==yp)return!0;if(d==zp)return!1;d=xp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==yp?!0:d==zp?!1:a.bandwidth&&Ap(a.bandwidth,b.bandwidth,c.bandwidth)==yp?!0:!1}
605
- function up(a,b,c){if(a.id==c.id)return!0;var d=xp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==yp)return!0;if(d==zp)return!1;if(a.frameRate){d=xp(a.frameRate,b.frameRate,c.frameRate);if(d==yp)return!0;if(d==zp)return!1}return a.bandwidth&&Ap(a.bandwidth,b.bandwidth,c.bandwidth)==yp?!0:!1}
606
- function vp(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
607
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function wp(a,b,c){return a.id==c.id?!0:xp(a.width*a.height,b.width*b.height,c.width*c.height)==yp?!0:!1}function ip(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
608
- function dp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oi([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
609
- function xp(a,b,c){if(b==a&&a!=c)return zp;if(c==a&&a!=b)return yp;if(b>a){if(c<=a||c-a<b-a)return yp;if(c-a>b-a)return zp}else{if(c>a)return zp;if(a-c<a-b)return yp;if(a-c>a-b)return zp}return Bp}function Ap(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?yp:b<a?zp:Bp}var yp=1,Bp=0,zp=-1;function Cp(){var a=this;this.h=this.g=null;this.l=[];this.i=null;this.H=1;this.B={};this.M={};this.j=new Yo;this.G=0;this.I=new ac(5);this.F=new P(function(){Dp(a)});this.m=new Xe;this.v=null;this.J=[];this.A=Infinity;this.D=!1}q=Cp.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return H(function(e){if(1==e.g)return c.D=b.isLowLatencyMode(),c.l=[a],c.h=b,u(e,Ep(c),2);d=e.h;c.h&&Fp(c,d);if(!c.h)throw new M(2,7,7001);return e["return"](c.i)})};
610
- q.stop=function(){for(var a=t(Object.values(this.B)),b=a.next();!b.done;b=a.next())b.value.release();this.j&&this.j.release();this.g=this.h=null;this.l=[];this.i=null;this.B={};this.j=null;null!=this.F&&(this.F.stop(),this.F=null);return this.m.destroy()};q.update=function(){var a=this,b;return H(function(c){if(1==c.g)return A(c,2),u(c,Ep(a),4);if(2!=c.g)return ua(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};q.onExpirationUpdated=function(){};
611
- function Ep(a){var b,c,d,e,f,g,h;return H(function(k){if(1==k.g)return b=cf(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b),Ye(a.m,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);return u(k,Gp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
612
- function Gp(a,b,c){var d,e,f,g,h;return H(function(k){if(1==k.g){d=Xn(b,"MPD");if(!d)throw new M(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Hp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=no(d,a.g.retryParameters,f,c,a.h.networkingEngine);Ye(a.m,g);return u(k,g.promise,2)}h=k.h;return k["return"](Hp(a,h,c))})}
613
- function Hp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V,Z,W,ma,ya,Ta,Qa,Fa;return H(function(Ua){switch(Ua.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Fn(b,"Location").map(Ln).filter(Eb);0<f.length&&(g=Gb(e,f),e=a.l=g);h=Fn(b,"BaseURL");k=h.map(Ln);l=Gb(e,k);m=0;h&&h.length&&(m=Nn(h[0],"availabilityTimeOffset",Un)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Nn(b,"minBufferTime",Pn)||0);a.G=Nn(b,"minimumUpdatePeriod",Pn,-1);r=Nn(b,"availabilityStartTime",On);v=Nn(b,
614
- "timeShiftBufferDepth",Pn);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Nn(b,"suggestedPresentationDelay",Pn));w=a.g.dash.ignoreMaxSegmentDuration;C=null;w||(C=Nn(b,"maxSegmentDuration",Pn));D=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=t(Object.values(a.B)),G=E.next();!G.done;G=E.next())I=G.value,I.zb(B.jb());else N=a.g.defaultPresentationDelay||1.5*p,K=null!=x?x:N,B=new Q(r,K,a.g.dash.autoCorrectDrift);B.Hc("static"==D);(O=B.V())&&!isNaN(a.g.availabilityWindowOverride)&&
615
- (v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.se(v);V=b.getAttribute("profiles")||"";Z={yb:"static"!=D,presentationTimeline:B,sa:null,X:null,Ca:null,L:null,bandwidth:0,We:!1,Sb:m,profiles:V.split(",")};W=Ip(a,Z,l,b);ma=W.duration;ya=W.periods;"static"!=D&&W.Ne||B.Ya(ma||Infinity);a.A&&!a.D&&(Ta=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.D=a.h.isLowLatencyMode());a.D?B.kf(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.");
616
- B.Vd(C||1);return u(Ua,Zo(a.j,ya,Z.yb),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);Ua.C(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.tf()){Ua.C(4);break}Qa=Fn(b,"UTCTiming");return u(Ua,Jp(a,l,Qa),5);case 5:Fa=Ua.h;if(!a.h)return Ua["return"]();B.lf(Fa);case 4:B.Qd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Ua)}})}
617
- function Ip(a,b,c,d){var e=Nn(d,"mediaPresentationDuration",Pn),f=[],g=0;d=Fn(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Nn(k,"start",Pn,g),n=k.id,p=Nn(k,"duration",Pn),r=null;if(l){var v=Nn(l,"start",Pn);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=Kp(a,b,c,{start:m,duration:r,node:k,Ze:null==r||!l});f.push(g);b.sa.id&&r&&(a.M[b.sa.id]=r);if(null==r){g=
560
+ function lo(a,b){var c=mo(a,b,"timescale"),d=1;c&&(d=Lf(c)||1);var e=mo(a,b,"duration");c=Lf(e||"");"image"==a.L.contentType&&(c=Nf(e||""));c&&(c/=d);var f=mo(a,b,"startNumber");e=Number(mo(a,b,"presentationTimeOffset"))||0;var g=Mf(f||"");if(null==f||null==g)g=1;var h=no(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.X.duration||Infinity;h=yf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],r=h[n+1],v=Gf(p,"t",Mf),y=Gf(p,"d",Mf);p=Gf(p,"r",Kf);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
561
+ p||0;if(0>p)if(r){r=Gf(r,"t",Mf);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,Vg:v}),v=m}f=l}return{timescale:d,xa:c,dc:g,pb:e/d||0,Ce:e,timeline:f}}function mo(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Eb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
562
+ function no(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Eb).map(function(d){return xf(d,c)}).reduce(function(d,e){return d||e})}
563
+ function oo(a,b,c,d,e,f){for(var g=Cf(a,"http://www.w3.org/1999/xlink","href"),h=Cf(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 Pe(new N(2,4,4028));if("onLoad"!=h)return Pe(new N(2,4,4027));var m=Gb([d],[g]);return e.request(0,cf(m,b)).ma(function(n){n=Rf(n.data,a.tagName);if(!n)return Pe(new N(2,4,4001,g));
564
+ 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 po(a,b,c,m[0],e,f+1)})}
565
+ function po(a,b,c,d,e,f){f=void 0===f?0:f;if(Cf(a,"http://www.w3.org/1999/xlink","href")){var g=oo(a,b,c,d,e,f);c&&(g=g.ma(void 0,function(){return po(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"==Cf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(po(k,b,c,d,e,f)));return Te(g).ma(function(){return a})};function qo(a,b,c,d,e,f,g){var h,k=(new Ng).U("sidx",function(l){h=ro(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
566
+ function ro(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.cc(),m=g.reader.cc();g.reader.skip(2);var n=g.reader.bc();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 so(a){this.h=Hc(a);this.g=new Kg(this.h,0)}so.prototype.Fa=function(){return this.g.Fa()};
567
+ function to(a){var b=uo(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=uo(a);a:{d=t(vo);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 wo(c,
568
+ d)}function uo(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 vo=[[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 wo(a,b){this.id=a;this.g=b}
569
+ function xo(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 yo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new so(a.g);for(var n=null,p=null;a.Fa();){var r=to(a);if(187==r.id){var v=zo(r);v&&(r=c*v.Wg,v=b+v.Gg,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}
570
+ function zo(a){var b=new so(a.g);a=to(b);if(179!=a.id)throw new N(2,3,3013);a=xo(a);b=to(b);if(183!=b.id)throw new N(2,3,3012);b=new so(b.g);for(var c=0;b.Fa();){var d=to(b);if(241==d.id){c=xo(d);break}}return{Wg:a,Gg:c}};function Ao(a,b){var c=no(a,b,"Initialization");if(!c)return null;var d=a.L.Oa,e=c.getAttribute("sourceURL");e&&(d=Gb(a.L.Oa,[e]));e=0;var f=null;if(c=Gf(c,"range",Jf))e=c.start,f=c.end;return new Ki(function(){return d},e,f)}
571
+ function Bo(a,b){var c=Number(mo(a,Co,"presentationTimeOffset"))||0,d=mo(a,Co,"timescale"),e=1;d&&(e=Lf(d)||1);var f=c/e||0,g=Ao(a,Co);Do(a,g);var h=We(a);return{Ub:function(){var k=no(h,Co,"RepresentationIndex"),l=h.L.Oa;k&&(k=k.getAttribute("sourceURL"))&&(l=Gb(h.L.Oa,[k]));k=Eo(h);return Fo(h,b,g,l,k.start,k.end,f)}}}
572
+ function Fo(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,v,y,x,w,D,B,C,E;return I(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.zb||!a.X.Ze,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.ya,c.ra):null],p=null,u(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;D=null;B=l-g;C=l;E=m?l+m:Infinity;if("mp4"==n)var H=qo(x,e,d,c,B,C,E);else{H=new so(w);if(440786851!=to(H).id)throw new N(2,3,3008);var L=to(H);if(408125543!=L.id)throw new N(2,3,3009);H=L.g.byteOffset;
573
+ L=new so(L.g);for(var J=null;L.Fa();){var O=to(L);if(357149030==O.id){J=O;break}}if(!J)throw new N(2,3,3010);J=new so(J.g);O=1E6;for(L=null;J.Fa();){var V=to(J);if(2807729==V.id)O=xo(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=to(new so(x));if(475249515!=O.id)throw new N(2,3,3007);H=yo(O,H,J,L,d,c,B,C,E)}D=H;h.Zb(D);r=new ij(D);k&&r.sb(C,E,!0);return G["return"](r)})}
574
+ function Co(a){return a.Fc}function Eo(a){var b=no(a,Co,"RepresentationIndex");a=mo(a,Co,"indexRange");a=Jf(a||"");b&&(a=Gf(b,"range",Jf,a));return a}function Do(a,b){Go(a,b);if(!Eo(a))throw new N(2,4,4002);}function Go(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 Ho(a,b){var c=Ao(a,Io),d=Jo(a);if(!d.xa&&!d.timeline&&1<d.Xb.length)throw new N(2,4,4002);if(!d.xa&&!a.X.duration&&!d.timeline&&1==d.Xb.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=Ko(a.X.start,a.X.duration,a.L.Oa,d,c);d=!e;e?e.Yb(c,a.presentationTimeline.jb()):(e=new ij(c),f&&a.zb&&(b[f]=e));a.presentationTimeline.Zb(c);a.zb&&a.X.Ze||e.sb(a.X.start,a.X.duration?a.X.start+a.X.duration:
575
+ Infinity,d);return{Ub:function(){return Promise.resolve(e)}}}function Io(a){return a.vb}function Jo(a){var b=Lo(a);a=lo(a,Io);var c=a.dc;0==c&&(c=1);var d=0;a.xa?d=a.xa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{xa:a.xa,startTime:d,dc:c,pb:a.pb,timeline:a.timeline,Xb:b}}
576
+ function Ko(a,b,c,d,e){var f=d.Xb.length;d.timeline&&d.timeline.length!=d.Xb.length&&(f=Math.min(d.timeline.length,d.Xb.length));for(var g=a-d.pb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={yd:m.yd},n++){var p=d.Xb[n];m.yd=Gb(c,[p.yg]);var r=void 0;r=null!=d.xa?l+d.xa:d.timeline?d.timeline[n].end:l+b;k.push(new Mi(a+l,a+r,function(v){return function(){return v.yd}}(m),p.start,p.end,e,g,a,h));l=r}return k}
577
+ function Lo(a){return[a.L.vb,a.Ca.vb,a.sa.vb].filter(Eb).map(function(b){return yf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.We&&(a.We=!0);var c=b.getAttribute("media");b=Gf(b,"mediaRange",Jf,{start:0,end:null});return{yg:c,start:b.start,end:b.end}})};function To(a,b,c,d,e,f){var g=Uo(a),h=Vo(a);Wo(h);var k=We(a);if(h.Ac)return Go(a,g),{Ub:function(){var v=ko(h.Ac,k.L.id,null,k.bandwidth||null,null);v=Gb(k.L.Oa,[v]);return Fo(k,b,g,v,0,null,h.pb)}};if(h.xa)return d||(a.presentationTimeline.Vd(h.xa),a.presentationTimeline.Wd(a.X.start)),{Ub:function(){return Xo(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=Yo(k,h,g),n=a.X.start,p=a.X.duration?a.X.start+a.X.duration:Infinity,r=Infinity!=p;l?(r&&(new ij(m)).sb(n,
578
+ p,!0),l.Yb(m,a.presentationTimeline.jb())):(l=new ij(m),d&&a.zb&&(c[d]=l));a.presentationTimeline.Zb(m);r&&l.sb(n,p);return{Ub:function(){return Promise.resolve(l)}}}function Zo(a){return a.Gc}function Vo(a){var b=lo(a,Zo),c=mo(a,Zo,"media");a=mo(a,Zo,"index");return{xa:b.xa,timescale:b.timescale,dc:b.dc,pb:b.pb,Ce:b.Ce,timeline:b.timeline,Td:c,Ac:a}}
579
+ function Wo(a){var b=a.Ac?1:0;b+=a.timeline?1:0;b+=a.xa?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.Ac&&(a.timeline=null),a.xa=null);if(!a.Ac&&!a.Td)throw new N(2,4,4002);}
580
+ function Xo(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=ko(y,w,J,x,V*v);return Gb(D,[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.xa,r=b.dc,v=b.timescale,
581
+ y=b.Td,x=a.bandwidth||null,w=a.L.id,D=a.L.Oa,B=l-b.pb,C=g();a=a.zb?Math.max(C[0],C[1]-c+1):C[0];C=C[1];c=[];for(var E=a;E<=C;++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,C+1);H.pd(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)}
582
+ function Yo(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={xd:h.xd,Cd:h.Cd,Fd:h.Fd,ud:h.ud,Hd:h.Hd,vd:h.vd},k++){var l=b.timeline[k],m=l.start,n=l.Vg;l=l.end;h.Fd=k+b.dc;h.Hd=n+b.Ce;h.Cd=a.L.id;h.ud=a.bandwidth||null;h.xd=b.Td;h.vd=a.L.Oa;g.push(new Mi(d+m,d+l,function(p){return function(){var r=ko(p.xd,p.Cd,p.Fd,p.ud||null,p.Hd);return Gb(p.vd,[r]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
583
+ function Uo(a){var b=mo(a,Zo,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Oa;return new Ki(function(){var f=ko(b,c,null,d,null);return Gb(e,[f])},0,null)};function $o(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}$o.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=[]};
584
+ function ap(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,D,B,C,E,G,H,L,J,O,V,Z,W,ma,ya,Ta;return I(function(Qa){switch(Qa.g){case 1:d=Mb;bp(b);cp(b);dp(b);ep(b);if(!c&&1==b.length){e=b[0];a.g=e.Pc;a.h=e.rd;a.j=e.textStreams;a.i=e.imageStreams;Qa.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 Qa["return"]();k=b.map(function(Fa){return Fa.Pc});l=b.map(function(Fa){return Fa.rd});m=b.map(function(Fa){return Fa.textStreams});n=b.map(function(Fa){return Fa.imageStreams});
585
+ p=t(m);for(r=p.next();!r.done;r=p.next())v=r.value,v.push(fp(d.ka));y=t(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(fp(d.nc));return u(Qa,gp(a.g,k,f,hp,ip),3);case 3:return u(Qa,gp(a.h,l,f,hp,ip),4);case 4:return u(Qa,gp(a.j,m,f,hp,ip),5);case 5:return u(Qa,gp(a.i,n,f,hp,ip),2);case 2:D=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&&
586
+ !ya.length||(Ta=D++,B.push({id:Ta,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(C=a.h.concat(a.g),E=t(C),G=E.next();!G.done;G=E.next())H=G.value,L=D++,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:[]});
587
+ a.l=B;z(Qa)}})}function bp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Pc),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.Pc=c}}
588
+ function dp(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}}
589
+ function cp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.rd),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)&&wf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.rd=c}}
590
+ 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.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}}
591
+ function jp(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,D,B,C,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.nc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
592
+ k.push(kp(b.ka));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(kp(b.nc));return u(Z,gp([],c,0,lp,mp),2);case 2:return p=Z.h,u(Z,gp([],d,0,lp,mp),3);case 3:return r=Z.h,u(Z,gp([],e,0,lp,mp),4);case 4:return v=Z.h,u(Z,gp([],f,0,lp,mp),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),D=t(w),B=D.next();!B.done;B=D.next())C=B.value,
593
+ C.variantIds=[x++];return Z["return"](r.concat(p).concat(v).concat(y))}})}
594
+ function gp(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y,x,w,D,B,C,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,np(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,op(w,b,d,e,g),12);
595
+ case 12:(D=O.h)&&a.push(D);x=y.next();O.C(9);break;case 8:B=t(g);for(r=B.next();!r.done;r=B.next())for(C=r.value,E={},G=t(C),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.nc&&!E.rb.tilesLayout,!H&&!L&&(J=a.some(function(V){return function(Z){return Z.mimeType==V.rb.mimeType&&wd(Z.codecs)==wd(V.rb.codecs)}}(E))))throw new N(2,4,4037);return O["return"](a)}})}
596
+ function np(a,b,c,d,e){var f;return I(function(g){if(1==g.g)return(f=pp(b,a))?u(g,qp(f),2):g["return"](!1);rp(a,f,c,d,e);return g["return"](!0)})}function qp(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)}
597
+ function op(a,b,c,d,e){var f,g;return I(function(h){if(1==h.g)return f=c(a),(g=pp(b,f))?f.createSegmentIndex?u(h,qp(g),2):h.C(2):h["return"](null);rp(f,g,0,d,e);return h["return"](f)})}function rp(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)}}
598
+ function hp(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 lp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
599
+ function ip(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=Cg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new N(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
600
+ (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=hp(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),ip(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&ip(a.trickModeVideo,b)}
601
+ function mp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ha(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
602
+ function pp(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:sp,video:sp,text:tp,image:up}[f.type],h={audio:vp,video:wp,text:xp,image:yp}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function sp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||wd(b.codecs)!=wd(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<Cg(c,d).length:1)}return c?!1:!0}
603
+ function tp(a,b){return a.language?b.language?0==Sb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function up(a){return a.tilesLayout?!0:!1}
604
+ function vp(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
605
+ d=zp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Ap)return!0;if(d==Bp)return!1;d=zp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Ap?!0:d==Bp?!1:a.bandwidth&&Cp(a.bandwidth,b.bandwidth,c.bandwidth)==Ap?!0:!1}
606
+ function wp(a,b,c){if(a.id==c.id)return!0;var d=zp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Ap)return!0;if(d==Bp)return!1;if(a.frameRate){d=zp(a.frameRate,b.frameRate,c.frameRate);if(d==Ap)return!0;if(d==Bp)return!1}return a.bandwidth&&Cp(a.bandwidth,b.bandwidth,c.bandwidth)==Ap?!0:!1}
607
+ function xp(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
608
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function yp(a,b,c){return a.id==c.id?!0:zp(a.width*a.height,b.width*b.height,c.width*c.height)==Ap?!0:!1}function kp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
609
+ function fp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ij([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
610
+ function zp(a,b,c){if(b==a&&a!=c)return Bp;if(c==a&&a!=b)return Ap;if(b>a){if(c<=a||c-a<b-a)return Ap;if(c-a>b-a)return Bp}else{if(c>a)return Bp;if(a-c<a-b)return Ap;if(a-c>a-b)return Bp}return Dp}function Cp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Ap:b<a?Bp:Dp}var Ap=1,Dp=0,Bp=-1;function Ep(){var a=this;this.h=this.g=null;this.l=[];this.i=null;this.H=1;this.B={};this.M={};this.j=new $o;this.G=0;this.I=new ac(5);this.F=new P(function(){Fp(a)});this.m=new Xe;this.v=null;this.J=[];this.A=Infinity;this.D=!1}q=Ep.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return I(function(e){if(1==e.g)return c.D=b.isLowLatencyMode(),c.l=[a],c.h=b,u(e,Gp(c),2);d=e.h;c.h&&Hp(c,d);if(!c.h)throw new N(2,7,7001);return e["return"](c.i)})};
611
+ q.stop=function(){for(var a=t(Object.values(this.B)),b=a.next();!b.done;b=a.next())b.value.release();this.j&&this.j.release();this.g=this.h=null;this.l=[];this.i=null;this.B={};this.j=null;null!=this.F&&(this.F.stop(),this.F=null);return this.m.destroy()};q.update=function(){var a=this,b;return I(function(c){if(1==c.g)return A(c,2),u(c,Gp(a),4);if(2!=c.g)return ua(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};q.onExpirationUpdated=function(){};
612
+ function Gp(a){var b,c,d,e,f,g,h;return I(function(k){if(1==k.g)return b=cf(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b),Ye(a.m,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);return u(k,Ip(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
613
+ function Ip(a,b,c){var d,e,f,g,h;return I(function(k){if(1==k.g){d=Rf(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Jp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=po(d,a.g.retryParameters,f,c,a.h.networkingEngine);Ye(a.m,g);return u(k,g.promise,2)}h=k.h;return k["return"](Jp(a,h,c))})}
614
+ function Jp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,D,B,C,E,G,H,L,J,O,V,Z,W,ma,ya,Ta,Qa,Fa;return I(function(Ua){switch(Ua.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=yf(b,"Location").map(Ef).filter(Eb);0<f.length&&(g=Gb(e,f),e=a.l=g);h=yf(b,"BaseURL");k=h.map(Ef);l=Gb(e,k);m=0;h&&h.length&&(m=Gf(h[0],"availabilityTimeOffset",Nf)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Gf(b,"minBufferTime",If)||0);a.G=Gf(b,"minimumUpdatePeriod",If,-1);r=Gf(b,"availabilityStartTime",Hf);v=Gf(b,
615
+ "timeShiftBufferDepth",If);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Gf(b,"suggestedPresentationDelay",If));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Gf(b,"maxSegmentDuration",If));B=b.getAttribute("type")||"static";if(a.i)for(C=a.i.presentationTimeline,E=t(Object.values(a.B)),G=E.next();!G.done;G=E.next())H=G.value,H.Ab(C.jb());else L=a.g.defaultPresentationDelay||1.5*p,J=null!=x?x:L,C=new Q(r,J,a.g.dash.autoCorrectDrift);C.Hc("static"==B);(O=C.V())&&!isNaN(a.g.availabilityWindowOverride)&&
616
+ (v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);C.se(v);V=b.getAttribute("profiles")||"";Z={zb:"static"!=B,presentationTimeline:C,sa:null,X:null,Ca:null,L:null,bandwidth:0,We:!1,Sb:m,profiles:V.split(",")};W=Kp(a,Z,l,b);ma=W.duration;ya=W.periods;"static"!=B&&W.Ne||C.Ya(ma||Infinity);a.A&&!a.D&&(Ta=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.D=a.h.isLowLatencyMode());a.D?C.kf(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.");
617
+ C.Vd(D||1);return u(Ua,ap(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);Ua.C(3);break}a.i={presentationTimeline:C,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!C.tf()){Ua.C(4);break}Qa=yf(b,"UTCTiming");return u(Ua,Lp(a,l,Qa),5);case 5:Fa=Ua.h;if(!a.h)return Ua["return"]();C.lf(Fa);case 4:C.Qd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Ua)}})}
618
+ function Kp(a,b,c,d){var e=Gf(d,"mediaPresentationDuration",If),f=[],g=0;d=yf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Gf(k,"start",If,g),n=k.id,p=Gf(k,"duration",If),r=null;if(l){var v=Gf(l,"start",If);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=Mp(a,b,c,{start:m,duration:r,node:k,Ze:null==r||!l});f.push(g);b.sa.id&&r&&(a.M[b.sa.id]=r);if(null==r){g=
618
619
  null;break}g=m+r}}a.J=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Ne:!1}:{periods:f,duration:g,Ne:!0}}
619
- function Kp(a,b,c,d){b.sa=Lp(d.node,null,c);b.X=d;b.sa.Sb=b.Sb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=Fn(d.node,"EventStream");c=b.presentationTimeline.jb();e=t(e);for(var f=e.next();!f.done;f=e.next())Mp(a,d.start,d.duration,f.value,c);c=Fn(d.node,"AdaptationSet").map(function(m){return Np(a,b,m)}).filter(Eb);if(b.yb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Jg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new M(2,4,4018);
620
- }d=c.filter(function(m){return!m.ye});c=c.filter(function(m){return m.ye});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ye.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 wd(m.Nc.codecs)==wd(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Op(d,"audio");g=a.g.disableVideo?[]:Op(d,"video");f=a.g.disableText?
621
- []:Op(d,Lb);c=a.g.disableThumbnails?[]:Op(d,"image");if(!g.length&&!e.length)throw new M(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,Pc:d,rd:e,textStreams:g,imageStreams:f}}
622
- function Op(a,b){return a.filter(function(c){return c.contentType==b})}
623
- function Np(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ca=Lp(c,b.sa,null);var e=!1,f=Fn(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Eb),h=void 0,k=b.Ca.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=
624
- l}}var n;m=Fn(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var r=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==r?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==r?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Fn(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
625
- 10)));m=Fn(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=
626
- 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=Fn(c,"ContentProtection");var D=Yn(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=Ob(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=Fn(c,"Label"))&&l.length&&
627
- (l=l[0],l.textContent&&(E=l.textContent));l=Fn(c,"Representation");c=l.map(function(G){if(G=Pp(a,b,D,h,B,E,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Ca.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new M(2,4,4003);}if(!b.Ca.contentType||"application"==b.Ca.contentType)for(b.Ca.contentType=Qp(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.Ca.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
628
- m.value,p=t(D.drmInfos),r=p.next();!r.done;r=p.next())r=r.value,r.keyIds=r.keyIds&&m.keyIds?new Set([].concat(ha(r.keyIds),ha(m.keyIds))):r.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Eb);return{id:b.Ca.id||"__fake__"+a.H++,contentType:b.Ca.contentType,language:B,ji:e,streams:c,drmInfos:D.drmInfos,ye:f,Jg:k}}
629
- function Pp(a,b,c,d,e,f,g,h,k,l){b.L=Lp(l,b.Ca,null);a.A=Math.min(a.A,b.L.Sb);if(!Rp(b.L))return null;var m=b.X.start;b.bandwidth=Nn(l,"bandwidth",Sn)||0;var n=b.L.contentType,p=n==Lb||"application"==n;n="image"==n;try{var r=function(G,I,N){return Sp(a,G,I,N)};if(b.L.Fc)var v=zo(b,r);else if(b.L.vb)v=Fo(b,a.B);else if(b.L.Gc)v=Ko(b,r,a.B,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.L.Oa,x=b.X.duration||0;v={Ub:function(){return Promise.resolve(Qi(m,x,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
630
- throw G;}r=Fn(l,"ContentProtection");r=ao(r,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);r=new Set(r?[r]:[]);var w=!1;Fn(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 D;if(n&&((l=Fn(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
631
- (D=l.getAttribute("value")),!D))return null;var B;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");var E={id:a.H++,originalId:b.L.id,createSegmentIndex:function(){var G;return H(function(I){if(1==I.g){if(E.segmentIndex)return I.C(0);G=E;return u(I,v.Ub(),3)}G.segmentIndex=I.h;z(I)})},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,
632
- 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.Ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.L.Xd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:B,tilesLayout:D};return E}
633
- function Dp(a){var b,c;H(function(d){switch(d.g){case 1:return b=0,A(d,2),u(d,Ep(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"]();Fp(a,b);z(d)}})}function Fp(a,b){0>a.G||a.F.P(Math.max(3,a.G-b,bc(a.I)))}
634
- function Lp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Xd:null,audioSamplingRate:null,Sb:0};c=c||b.Oa;var d=Fn(a,"BaseURL"),e=d.map(Ln),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Nn(a,"frameRate",Vn)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Fn(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
635
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Fn(a,"AudioChannelConfiguration");m=Tp(m)||b.Xd;p=Nn(a,"audioSamplingRate",Tn)||b.audioSamplingRate;f||(f=Qp(g,h));var r=En(a,"SegmentBase"),v=En(a,"SegmentTemplate"),y=r?Nn(r,"availabilityTimeOffset",Un)||0:0,x=v?Nn(v,"availabilityTimeOffset",Un)||0:0;d=d&&d.length?Nn(d[0],"availabilityTimeOffset",Un)||0:0;d=b.Sb+d+y+x;return{Oa:Gb(c,e),Fc:r||b.Fc,vb:En(a,"SegmentList")||b.vb,Gc:v||b.Gc,width:Nn(a,"width",Tn)||b.width,height:Nn(a,
636
- "height",Tn)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Xd:m,audioSamplingRate:p,Sb:d}}
637
- function Tp(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=
638
- 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 Rp(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}
639
- function Up(a,b,c,d){var e,f,g,h,k,l;return H(function(m){if(1==m.g)return e=Gb(b,[c]),f=cf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Ye(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=cd(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
640
- function Jp(a,b,c){var d,e,f,g,h,k,l,m;return H(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);
641
- 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,Up(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,Up(a,b,l,"GET"),11);case 11:return n["return"](n.h);
620
+ function Mp(a,b,c,d){b.sa=Np(d.node,null,c);b.X=d;b.sa.Sb=b.Sb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=yf(d.node,"EventStream");c=b.presentationTimeline.jb();e=t(e);for(var f=e.next();!f.done;f=e.next())Op(a,d.start,d.duration,f.value,c);c=yf(d.node,"AdaptationSet").map(function(m){return Pp(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.Jg);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);
621
+ }d=c.filter(function(m){return!m.ye});c=c.filter(function(m){return m.ye});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ye.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 wd(m.Nc.codecs)==wd(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Qp(d,"audio");g=a.g.disableVideo?[]:Qp(d,"video");f=a.g.disableText?
622
+ []:Qp(d,Lb);c=a.g.disableThumbnails?[]:Qp(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,Pc:d,rd:e,textStreams:g,imageStreams:f}}
623
+ function Qp(a,b){return a.filter(function(c){return c.contentType==b})}
624
+ function Pp(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ca=Np(c,b.sa,null);var e=!1,f=yf(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Eb),h=void 0,k=b.Ca.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=
625
+ l}}var n;m=yf(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var r=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==r?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==r?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=yf(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
626
+ 10)));m=yf(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,D=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(x="CC"+p,2==r.length?p+=2:p++,D=w);v.set(x,Ob(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
627
+ 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=yf(c,"ContentProtection");var B=$n(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),C=Ob(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=yf(c,"Label"))&&l.length&&
628
+ (l=l[0],l.textContent&&(E=l.textContent));l=yf(c,"Representation");c=l.map(function(G){if(G=Rp(a,b,B,h,C,E,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Ca.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.Ca.contentType||"application"==b.Ca.contentType)for(b.Ca.contentType=Sp(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.Ca.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
629
+ 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.Ca.id||"__fake__"+a.H++,contentType:b.Ca.contentType,language:C,ji:e,streams:c,drmInfos:B.drmInfos,ye:f,Jg:k}}
630
+ function Rp(a,b,c,d,e,f,g,h,k,l){b.L=Np(l,b.Ca,null);a.A=Math.min(a.A,b.L.Sb);if(!Tp(b.L))return null;var m=b.X.start;b.bandwidth=Gf(l,"bandwidth",Lf)||0;var n=b.L.contentType,p=n==Lb||"application"==n;n="image"==n;try{var r=function(G,H,L){return Up(a,G,H,L)};if(b.L.Fc)var v=Bo(b,r);else if(b.L.vb)v=Ho(b,a.B);else if(b.L.Gc)v=To(b,r,a.B,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.L.Oa,x=b.X.duration||0;v={Ub:function(){return Promise.resolve(kj(m,x,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
631
+ throw G;}r=yf(l,"ContentProtection");r=co(r,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);r=new Set(r?[r]:[]);var w=!1;yf(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(w=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(n&&((l=yf(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
632
+ (B=l.getAttribute("value")),!B))return null;var C;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"))&&(C="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.Ub(),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,
633
+ 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.Ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.L.Xd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:C,tilesLayout:B};return E}
634
+ function Fp(a){var b,c;I(function(d){switch(d.g){case 1:return b=0,A(d,2),u(d,Gp(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"]();Hp(a,b);z(d)}})}function Hp(a,b){0>a.G||a.F.P(Math.max(3,a.G-b,bc(a.I)))}
635
+ function Np(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Xd:null,audioSamplingRate:null,Sb:0};c=c||b.Oa;var d=yf(a,"BaseURL"),e=d.map(Ef),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Gf(a,"frameRate",Of)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=yf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
636
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=yf(a,"AudioChannelConfiguration");m=Vp(m)||b.Xd;p=Gf(a,"audioSamplingRate",Mf)||b.audioSamplingRate;f||(f=Sp(g,h));var r=xf(a,"SegmentBase"),v=xf(a,"SegmentTemplate"),y=r?Gf(r,"availabilityTimeOffset",Nf)||0:0,x=v?Gf(v,"availabilityTimeOffset",Nf)||0:0;d=d&&d.length?Gf(d[0],"availabilityTimeOffset",Nf)||0:0;d=b.Sb+d+y+x;return{Oa:Gb(c,e),Fc:r||b.Fc,vb:xf(a,"SegmentList")||b.vb,Gc:v||b.Gc,width:Gf(a,"width",Mf)||b.width,height:Gf(a,
637
+ "height",Mf)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Xd:m,audioSamplingRate:p,Sb:d}}
638
+ function Vp(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=
639
+ 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 Tp(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}
640
+ function Wp(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=cf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Ye(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=cd(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
641
+ function Lp(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);
642
+ 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,Wp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,Wp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
642
643
  case 9:ua(n,3);break;case 5:F(n);case 3:g=f.next();n.C(2);break;case 4:return Pa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
643
- function Mp(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Nn(d,"timescale",Tn)||1;d=t(Fn(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Nn(k,"presentationTime",Tn)||0,m=Nn(k,"duration",Tn)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
644
- function Sp(a,b,c,d){var e,f,g,h,k;return H(function(l){if(1==l.g)return e=jf,f=bj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Ye(a.m,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Qp(a,b){return Bd(ud(a,b))?Lb:a.split("/")[0]}J("shaka.dash.DashParser",Cp);ng.mpd=function(){return new Cp};lg["application/dash+xml"]=function(){return new Cp};lg["video/vnd.mpeg.dash.mpd"]=function(){return new Cp};function Vp(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Wp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Wp.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
645
- Wp.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function U(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Xp(a,b){var c=a.getAttribute(b);if(!c)throw new M(2,4,4023,b);return c.value}function Yp(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.i=c}function Zp(a,b){this.name=a;this.value=b};function $p(a,b){return a.filter(function(c){return c.name==b})}function aq(a,b){return a.filter(function(c){return Xp(c,"TYPE")==b})}function bq(a,b){var c=$p(a,b);return c.length?c[0]:null}function cq(a,b,c){c=void 0===c?0:c;return(a=bq(a,b))?Number(a.value):c};function dq(a){this.h=a;this.g=0}function eq(a){fq(a,/[ \t]+/gm)}function fq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function gq(a){return a.g==a.h.length?null:(a=fq(a,/[^ \t\n]*/gm))?a[0]:null};function hq(){this.g=0}
646
- function iq(a,b,c){b=cd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new M(2,4,4015);b=0;for(var e=!0,f=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=jq(a,g),--a.g,kq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=jq(a,h);if(lq.includes(h.name)){if(1!=b)throw new M(2,4,4017);
647
- 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=jq(a,m),kq.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 Yp(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Yp("",g,k)));return new Vp(c,b,f,e)}f.push(h);
648
- "EXT-X-STREAM-INF"==h.name&&(h.g.push(new Zp("URI",k)),e=!0)}}return new Vp(c,b,f)}function jq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new M(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new dq(f);var h;(h=fq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=fq(f,k);)d.push(new Zp(h[1],h[2]||h[3])),eq(f)}return new Wp(c,e,d,g)}
649
- var kq="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(" "),lq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function mq(){}function nq(a){try{var b=oq(a);return Re({uri:a,cf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Pe(c)}}function oq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new M(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new M(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=ld(a):e=gd(a);return{data:e,contentType:c}}
650
- J("shaka.net.DataUriPlugin",mq);mq.parse=nq;$e("data",nq);function pq(){var a=this;this.g=this.j=null;this.Aa=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 hq;this.qa=0;this.D=new P(function(){qq(a)});this.m=rq;this.F=null;this.$=0;this.H=Infinity;this.Y=this.aa=0;this.G=new Xe;this.W=[];this.J=new Map;this.Ba=!1;this.A=new Map;this.R=null;this.Z=new Map;this.I=new Map;this.l=!1}q=pq.prototype;q.configure=function(a){this.g=a};
651
- q.start=function(a,b){var c=this,d,e;return H(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,sq(c,cf([a],c.g.retryParameters),0),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,tq(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)};
652
- q.update=function(){var a=this,b,c,d;return H(function(e){if(1==e.g){if(a.m==rq)return e["return"]();b=[];a.R=null;c=Array.from(a.h.values());return c.length?u(e,uq(a,c[0]),2):e.C(2)}for(d=1;d<c.length;d++)b.push(uq(a,c[d]));return u(e,Promise.all(b),0)})};
653
- function uq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v;return H(function(y){if(1==y.g)return c=vq,d=b.yf,e=new jb(d),a.l&&b.Df&&nb(e,new pb("_HLS_skip=YES")),u(y,sq(a,cf([e.toString()],a.g.retryParameters),0),2);if(3!=y.g){f=y.h;g=iq(a.ua,f.data,f.uri);if(1!=g.type)throw new M(2,4,4017);h=$p(g.g,"EXT-X-DEFINE");k=wq(a,h);l=b.stream;return u(y,xq(a,b.qd,g,l.type,l.mimeType,b.Sd,k,b.If),3)}m=y.h;l.segmentIndex.Yb(m,a.i.jb());m.length&&(n=cq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.Sd.get(n),l.segmentIndex.zb(p));
654
- r=m[m.length-1];if(v=bq(g.g,"EXT-X-ENDLIST"))yq(a,c.xf),a.i.Ya(r.endTime);z(y)})}q.onExpirationUpdated=function(){};
655
- function tq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V,Z,W,ma,ya,Ta,Qa,Fa,Ua,Qc,Ad;return H(function(Ya){switch(Ya.g){case 1:c=iq(a.ua,b,a.M);if(0!=c.type)throw new M(2,4,4022);d=$p(c.g,"EXT-X-DEFINE");zq(a,d);e=$p(c.g,"EXT-X-MEDIA");f=$p(c.g,"EXT-X-STREAM-INF");g=$p(c.g,"EXT-X-IMAGE-STREAM-INF");Aq(a,f);h=$p(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",
656
- Gb([a.M],[p])[0]),r&&y.set("language",r),v&&y.set("value",v),x=new L("sessiondata",y),a.j)a.j.onEvent(x);return u(Ya,Bq(a,e),2);case 2:return Cq(a,e),u(Ya,Dq(a,f),3);case 3:return w=Ya.h,u(Ya,Eq(a,e),4);case 4:return C=Ya.h,u(Ya,Fq(a,g),5);case 5:D=Ya.h;if(!a.j)throw new M(2,7,7001);if(a.Ba&&0==w.length)throw new M(2,4,4034);E=B=Infinity;G=t(a.h.values());for(I=G.next();!I.done;I=G.next())N=I.value,B=Math.min(B,N.$e),"text"!=N.stream.type&&(E=Math.min(E,N.xg-N.$e));a.m!=rq?(a.i=new Q(0,a.g.defaultPresentationDelay?
657
- 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!=rq)a.qa=a.H,K=vq,a.m==K.Ee&&(O=a.i.ld,isNaN(a.g.availabilityWindowOverride)||(O=a.g.availabilityWindowOverride),a.i.se(O));else for(a.i.Ya(E),a.i.offset(-B),V=t(a.h.values()),I=V.next();!I.done;I=V.next())Z=I.value,Z.stream.segmentIndex.offset(-B),Z.stream.segmentIndex.sb(0,E);a.W=[];W=[];ma=t(w);for(ya=ma.next();!ya.done;ya=ma.next())for(Ta=ya.value,Qa=t([Ta.video,Ta.audio]),Fa=Qa.next();!Fa.done;Fa=Qa.next())(Ua=
658
- Fa.value)&&W.push(Ua);return u(Ya,Promise.all(W.map(function(Ce){return H(function($f){return u($f,Ce.createSegmentIndex(),0)})})),6);case 6:Qc=t(W);for(Fa=Qc.next();!Fa.done;Fa=Qc.next())Ad=Fa.value,a.W.push(Ad.segmentIndex.N);Gq(a);a.i.Qd();a.F={presentationTimeline:a.i,variants:w,textStreams:C,imageStreams:D,offlineSessionIds:[],minBufferTime:0};a.j.makeTextStreamsForClosedCaptions(a.F);z(Ya)}})}
659
- function zq(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 wq(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}
660
- function Aq(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=Hq(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))}}
661
- function Eq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r;return H(function(v){if(1==v.g)return c=aq(b,"SUBTITLES"),d=c.map(function(y){var x,w,C;return H(function(D){if(1==D.g){if(x=a.g.disableText)return D["return"](null);A(D,2);return u(D,Iq(a,y),4)}if(2!=D.g)return w=D.h,D["return"](w.stream);C=F(D);if(a.g.hls.ignoreTextStreamFailures)return D["return"](null);throw C;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Xp(h,"GROUP-ID"),l=a.A.get(k))if(m=a.B.get(k))for(n=
644
+ function Op(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Gf(d,"timescale",Mf)||1;d=t(yf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Gf(k,"presentationTime",Mf)||0,m=Gf(k,"duration",Mf)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
645
+ function Up(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=jf,f=wj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Ye(a.m,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Sp(a,b){return Ad(ud(a,b))?Lb:a.split("/")[0]}K("shaka.dash.DashParser",Ep);Ig.mpd=function(){return new Ep};Gg["application/dash+xml"]=function(){return new Ep};Gg["video/vnd.mpeg.dash.mpd"]=function(){return new Ep};function Xp(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Yp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Yp.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
646
+ Yp.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function U(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Zp(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function $p(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.i=c}function aq(a,b){this.name=a;this.value=b};function bq(a,b){return a.filter(function(c){return c.name==b})}function cq(a,b){return a.filter(function(c){return Zp(c,"TYPE")==b})}function dq(a,b){var c=bq(a,b);return c.length?c[0]:null}function eq(a,b,c){c=void 0===c?0:c;return(a=dq(a,b))?Number(a.value):c};function fq(a){this.h=a;this.g=0}function gq(a){hq(a,/[ \t]+/gm)}function hq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function iq(a){return a.g==a.h.length?null:(a=hq(a,/[^ \t\n]*/gm))?a[0]:null};function jq(){this.g=0}
647
+ function kq(a,b,c){b=cd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new N(2,4,4015);b=0;for(var e=!0,f=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=lq(a,g),--a.g,mq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=lq(a,h);if(nq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
648
+ 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=lq(a,m),mq.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 $p(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new $p("",g,k)));return new Xp(c,b,f,e)}f.push(h);
649
+ "EXT-X-STREAM-INF"==h.name&&(h.g.push(new aq("URI",k)),e=!0)}}return new Xp(c,b,f)}function lq(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 fq(f);var h;(h=hq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=hq(f,k);)d.push(new aq(h[1],h[2]||h[3])),gq(f)}return new Yp(c,e,d,g)}
650
+ var mq="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(" "),nq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function oq(){}function pq(a){try{var b=qq(a);return Re({uri:a,cf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Pe(c)}}function qq(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=ld(a):e=gd(a);return{data:e,contentType:c}}
651
+ K("shaka.net.DataUriPlugin",oq);oq.parse=pq;$e("data",pq);function rq(){var a=this;this.g=this.j=null;this.Aa=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 jq;this.qa=0;this.D=new P(function(){sq(a)});this.m=tq;this.F=null;this.$=0;this.H=Infinity;this.Y=this.aa=0;this.G=new Xe;this.W=[];this.J=new Map;this.Ba=!1;this.A=new Map;this.R=null;this.Z=new Map;this.I=new Map;this.l=!1}q=rq.prototype;q.configure=function(a){this.g=a};
652
+ 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,uq(c,cf([a],c.g.retryParameters),0),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,vq(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)};
653
+ q.update=function(){var a=this,b,c,d;return I(function(e){if(1==e.g){if(a.m==tq)return e["return"]();b=[];a.R=null;c=Array.from(a.h.values());return c.length?u(e,wq(a,c[0]),2):e.C(2)}for(d=1;d<c.length;d++)b.push(wq(a,c[d]));return u(e,Promise.all(b),0)})};
654
+ function wq(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=xq,d=b.yf,e=new jb(d),a.l&&b.Df&&nb(e,new pb("_HLS_skip=YES")),u(y,uq(a,cf([e.toString()],a.g.retryParameters),0),2);if(3!=y.g){f=y.h;g=kq(a.ua,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=bq(g.g,"EXT-X-DEFINE");k=yq(a,h);l=b.stream;return u(y,zq(a,b.qd,g,l.type,l.mimeType,b.Sd,k,b.If),3)}m=y.h;l.segmentIndex.Yb(m,a.i.jb());m.length&&(n=eq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.Sd.get(n),l.segmentIndex.Ab(p));
655
+ r=m[m.length-1];if(v=dq(g.g,"EXT-X-ENDLIST"))Aq(a,c.xf),a.i.Ya(r.endTime);z(y)})}q.onExpirationUpdated=function(){};
656
+ function vq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,D,B,C,E,G,H,L,J,O,V,Z,W,ma,ya,Ta,Qa,Fa,Ua,Qc,Bd;return I(function(Za){switch(Za.g){case 1:c=kq(a.ua,b,a.M);if(0!=c.type)throw new N(2,4,4022);d=bq(c.g,"EXT-X-DEFINE");Bq(a,d);e=bq(c.g,"EXT-X-MEDIA");f=bq(c.g,"EXT-X-STREAM-INF");g=bq(c.g,"EXT-X-IMAGE-STREAM-INF");Cq(a,f);h=bq(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",
657
+ 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(Za,Dq(a,e),2);case 2:return Eq(a,e),u(Za,Fq(a,f),3);case 3:return w=Za.h,u(Za,Gq(a,e),4);case 4:return D=Za.h,u(Za,Hq(a,g),5);case 5:B=Za.h;if(!a.j)throw new N(2,7,7001);if(a.Ba&&0==w.length)throw new N(2,4,4034);E=C=Infinity;G=t(a.h.values());for(H=G.next();!H.done;H=G.next())L=H.value,C=Math.min(C,L.$e),"text"!=L.stream.type&&(E=Math.min(E,L.xg-L.$e));a.m!=tq?(a.i=new Q(0,a.g.defaultPresentationDelay?
658
+ 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!=tq)a.qa=a.H,J=xq,a.m==J.Ee&&(O=a.i.ld,isNaN(a.g.availabilityWindowOverride)||(O=a.g.availabilityWindowOverride),a.i.se(O));else for(a.i.Ya(E),a.i.offset(-C),V=t(a.h.values()),H=V.next();!H.done;H=V.next())Z=H.value,Z.stream.segmentIndex.offset(-C),Z.stream.segmentIndex.sb(0,E);a.W=[];W=[];ma=t(w);for(ya=ma.next();!ya.done;ya=ma.next())for(Ta=ya.value,Qa=t([Ta.video,Ta.audio]),Fa=Qa.next();!Fa.done;Fa=Qa.next())(Ua=
659
+ Fa.value)&&W.push(Ua);return u(Za,Promise.all(W.map(function(De){return I(function(bg){return u(bg,De.createSegmentIndex(),0)})})),6);case 6:Qc=t(W);for(Fa=Qc.next();!Fa.done;Fa=Qc.next())Bd=Fa.value,a.W.push(Bd.segmentIndex.N);Iq(a);a.i.Qd();a.F={presentationTimeline:a.i,variants:w,textStreams:D,imageStreams:B,offlineSessionIds:[],minBufferTime:0};a.j.makeTextStreamsForClosedCaptions(a.F);z(Za)}})}
660
+ function Bq(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 yq(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}
661
+ function Cq(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=Jq(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))}}
662
+ function Gq(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=cq(b,"SUBTITLES"),d=c.map(function(y){var x,w,D;return I(function(B){if(1==B.g){if(x=a.g.disableText)return B["return"](null);A(B,2);return u(B,Kq(a,y),4)}if(2!=B.g)return w=B.h,B["return"](w.stream);D=F(B);if(a.g.hls.ignoreTextStreamFailures)return B["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Zp(h,"GROUP-ID"),l=a.A.get(k))if(m=a.B.get(k))for(n=
662
663
  t(m),p=n.next();!p.done;p=n.next())r=p.value,r.stream.codecs=l;return v["return"](e.filter(function(y){return y}))})}
663
- function Fq(a,b){var c,d;return H(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return H(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);A(l,2);return u(l,Jq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
664
- function Bq(a,b){var c;return H(function(d){if(1==d.g)return b=b.filter(function(e){var f=U(e,"URI")||"";return"SUBTITLES"!=U(e,"TYPE")&&""!=f}),b.length?u(d,Iq(a,b[0]),2):d.C(2);c=b.slice(1).map(function(e){return Iq(a,e)});return u(d,Promise.all(c),0)})}
665
- function Dq(a,b){var c,d,e;return H(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,r,v;return H(function(y){if(1==y.g)return h=U(g,"FRAME-RATE"),k=Number(U(g,"AVERAGE-BANDWIDTH"))||Number(Xp(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,Kq(a,g),2);if(v=y.h){for(var x=y["return"],w=v.audio,C=v.video,D=t(C),B=D.next();!B.done;B=D.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
666
- void 0,B.frameRate=Number(h)||void 0,B.hdr=r||void 0;D=a.g.disableAudio;if(!w.length||D)w=[null];D=a.g.disableVideo;if(!C.length||D)C=[null];D=[];w=t(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var E=t(C),G=E.next();!G.done;G=E.next()){var I=G.value;G=B?B.stream:null;var N=I?I.stream:null,K=B?B.stream.drmInfos:null,O=I?I.stream.drmInfos:null;I=(I?I.qd:"")+" - "+(B?B.qd:"");G&&N&&K.length&&O.length&&!(0<hg(K,O).length)||a.va.has(I)||(G={id:a.Aa++,language:G?G.language:"und",primary:!!G&&G.primary||
667
- !!N&&N.primary,audio:G,video:N,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},D.push(G),a.va.add(I))}}y=x.call(y,D)}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)})}
668
- function Kq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return H(function(x){if(1==x.g)return c=Mb,d=Hq(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=Xp(b,"URI"),p=k.audio.find(function(w){return w&&w.qd==n}),r=Jb(c.bb,d),(v=Jb(c.wb,d))&&!r?l=c.wb:!h.length&&v&&r?(l=c.bb,d=[[r,v].join()]):k.audio.length&&p?(l=c.wb,m=!0):l=k.video.length?c.wb:c.bb,m?x.C(2):u(x,Lq(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===y)return x["return"](null);
669
- Mq(k);return x["return"](k)})}function Hq(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=xd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function Nq(a){a=U(a,"LANGUAGE")||"und";return Ob(a)}
670
- function Mq(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 Cq(a,b){var c=aq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Nq(e);var f=Xp(e,"GROUP-ID");e=Xp(e,"INSTREAM-ID");a.J.get(f)||a.J.set(f,new Map);a.J.get(f).set(e,d)}}
671
- function Iq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return H(function(x){if(1==x.g){c=Xp(b,"GROUP-ID");d="";var w=Xp(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Lb);e=w;e!=Lb&&c&&a.A.has(c)&&(d=a.A.get(c));f=Oq(Xp(b,"URI"),a.v);if(a.h.has(f))return x["return"](a.h.get(f));g=Nq(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");
672
- v="YES"==r;return u(x,Pq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.B.has(c)?a.B.get(c).push(y):a.B.set(c,[y]);if(null==y)return x["return"](null);if(a.h.has(f))return x["return"](a.h.get(f));a.h.set(f,y);return x["return"](y)})}
673
- function Jq(a,b){var c,d,e,f,g,h,k,l,m,n;return H(function(p){if(1==p.g){c=Oq(Xp(b,"URI"),a.v);d=U(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=Nq(b);f=U(b,"NAME");g=U(b,"CHARACTERISTICS");return u(p,Pq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=U(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
664
+ function Hq(a,b){var c,d;return I(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return I(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);A(l,2);return u(l,Lq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
665
+ function Dq(a,b){var c;return I(function(d){if(1==d.g)return b=b.filter(function(e){var f=U(e,"URI")||"";return"SUBTITLES"!=U(e,"TYPE")&&""!=f}),b.length?u(d,Kq(a,b[0]),2):d.C(2);c=b.slice(1).map(function(e){return Kq(a,e)});return u(d,Promise.all(c),0)})}
666
+ function Fq(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(Zp(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,Mq(a,g),2);if(v=y.h){for(var x=y["return"],w=v.audio,D=v.video,B=t(D),C=B.next();!C.done;C=B.next())if(C=C.value.stream)C.width=Number(n)||void 0,C.height=Number(p)||
667
+ void 0,C.frameRate=Number(h)||void 0,C.hdr=r||void 0;B=a.g.disableAudio;if(!w.length||B)w=[null];B=a.g.disableVideo;if(!D.length||B)D=[null];B=[];w=t(w);for(C=w.next();!C.done;C=w.next()){C=C.value;for(var E=t(D),G=E.next();!G.done;G=E.next()){var H=G.value;G=C?C.stream:null;var L=H?H.stream:null,J=C?C.stream.drmInfos:null,O=H?H.stream.drmInfos:null;H=(H?H.qd:"")+" - "+(C?C.qd:"");G&&L&&J.length&&O.length&&!(0<Cg(J,O).length)||a.va.has(H)||(G={id:a.Aa++,language:G?G.language:"und",primary:!!G&&G.primary||
668
+ !!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)})}
669
+ function Mq(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=Jq(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=Zp(b,"URI"),p=k.audio.find(function(w){return w&&w.qd==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?c.xb:c.bb,m?x.C(2):u(x,Nq(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===y)return x["return"](null);
670
+ Oq(k);return x["return"](k)})}function Jq(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=xd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function Pq(a){a=U(a,"LANGUAGE")||"und";return Ob(a)}
671
+ function Oq(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 Eq(a,b){var c=cq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Pq(e);var f=Zp(e,"GROUP-ID");e=Zp(e,"INSTREAM-ID");a.J.get(f)||a.J.set(f,new Map);a.J.get(f).set(e,d)}}
672
+ function Kq(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=Zp(b,"GROUP-ID");d="";var w=Zp(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Lb);e=w;e!=Lb&&c&&a.A.has(c)&&(d=a.A.get(c));f=Qq(Zp(b,"URI"),a.v);if(a.h.has(f))return x["return"](a.h.get(f));g=Pq(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");
673
+ v="YES"==r;return u(x,Rq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.B.has(c)?a.B.get(c).push(y):a.B.set(c,[y]);if(null==y)return x["return"](null);if(a.h.has(f))return x["return"](a.h.get(f));a.h.set(f,y);return x["return"](y)})}
674
+ function Lq(a,b){var c,d,e,f,g,h,k,l,m,n;return I(function(p){if(1==p.g){c=Qq(Zp(b,"URI"),a.v);d=U(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=Pq(b);f=U(b,"NAME");g=U(b,"CHARACTERISTICS");return u(p,Rq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=U(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
674
675
  Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=U(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
675
- function Lq(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g){e=Oq(Xp(b,"URI"),a.v);if(a.h.has(e))return k["return"](a.h.get(e));var l=U(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.J.get(l):null;g=Ib(d,c);return u(k,Pq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
676
- function Pq(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V,Z,W,ma,ya,Ta,Qa,Fa,Ua,Qc,Ad,Ya,Ce,$f,Lo,Mo,No,Bi,Ci,ag,Oo,Po,Qo,Ro;return H(function(lb){switch(lb.g){case 1:return p=Gb([a.M],[b])[0],u(lb,sq(a,cf([p],a.g.retryParameters),0),2);case 2:r=lb.h;p=r.uri;v=iq(a.ua,r.data,p);if(1!=v.type)throw new M(2,4,4017);y=[];if(v.segments)for(x=t(v.segments),w=x.next();!w.done;w=x.next())C=w.value,D=$p(C.g,"EXT-X-KEY"),y.push.apply(y,ha(D));B=!1;E=[];G=new Set;I=t(y);for(N=I.next();!N.done;N=
677
- I.next())if(K=N.value,O=Xp(K,"METHOD"),"NONE"!=O){B=!0;if("AES-128"==O)return a.Ba=!0,lb["return"](null);V=Xp(K,"KEYFORMAT");if(W=(Z=Qq[V])?Z(K):null){if(W.keyIds)for(ma=t(W.keyIds),ya=ma.next();!ya.done;ya=ma.next())Ta=ya.value,G.add(Ta);E.push(W)}}if(B&&!E.length)throw new M(2,4,4026);Qa=$p(v.g,"EXT-X-DEFINE");Fa=wq(a,Qa);Rq(a,v);return u(lb,Sq(a,d,c,v,Fa),3);case 3:return Ua=lb.h,Tq.includes(Ua)&&(c=""),Qc=new Map,Ad=new Map,A(lb,4),u(lb,xq(a,b,v,d,Ua,Qc,Fa,Ad),6);case 6:Ya=lb.h;ua(lb,5);break;
678
- case 4:Ce=F(lb);if(4035==Ce.code)return Pa("Skipping unsupported HLS stream",Ua,b),lb["return"](null);throw Ce;case 5:$f=Ya[0].startTime;Lo=Ya[Ya.length-1].endTime;Mo=new Oi(Ya);No=d==Lb?"subtitle":void 0;Bi=[];if(l)for(Ci=t(l.split(",")),ag=Ci.next();!ag.done;ag=Ci.next())Oo=ag.value,Bi.push(Oo);Qo=(Po=bq(v.g,"EXT-X-SERVER-CONTROL"))?null!=Po.getAttribute("CAN-SKIP-UNTIL"):!1;Ro={id:a.Aa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mo,mimeType:Ua,codecs:c,kind:No,
679
- encrypted:B,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:Bi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return lb["return"]({stream:Ro,qd:b,yf:p,$e:$f,xg:Lo,Sd:Qc,If:Ad,Df:Qo})}})}
680
- function Rq(a,b){var c=bq(b.g,"EXT-X-PLAYLIST-TYPE"),d=bq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)yq(a,rq);else{c?yq(a,Uq):yq(a,Vq);d=bq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new M(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=bq(b.g,"EXT-X-PART-INF");a.l&&c?(a.aa=Number(Xp(c,"PART-TARGET")),a.H=Math.min(a.aa,a.H),c=bq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(Xp(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.$=Math.max(d,a.$)}}
681
- function Wq(a,b,c,d){c=bq(c,"EXT-X-MAP");if(!c)return null;var e=Xp(c,"URI");d=Oq(Gb([b],[e])[0],d);b=[d,U(c,"BYTERANGE","")].join("-");a.Z.has(b)||(c=Xq(d,c),a.Z.set(b,c));return a.Z.get(b)}function Xq(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 ni(function(){return[a]},c,d)}
682
- function Yq(a,b,c,d,e,f,g,h,k){var l=d.g,m=Oq(d.h,g),n=bq(l,"EXTINF"),p=g=0,r=null;if(!n){if(0==d.i.length)throw new M(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},x=0;x<d.i.length;y={zd:y.zd},x++){var w=d.i[x],C=0==x?c:v[v.length-1],D=0==x?e:C.endTime,B=Number(U(w,"DURATION"))||a.aa;if(B){B=D+B;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(Zq(C,E)),E=C.next().value,G=C.next().value);if(w=U(w,"URI"))y.zd=Gb([h],
683
- [w])[0],v.push(new pi(D,B,function(I){return function(){return[I.zd]}}(y),E,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=bq(l,"EXT-X-BYTERANGE"))?(r=t(Zq(c,a.value)),p=r.next().value,r=r.next().value):v.length&&(p=v[0].ya,r=v[v.length-1].ra);c="";a=null;"image"==k&&(c="1x1",k=bq(l,"EXT-X-TILES"))&&(c=Xp(k,"LAYOUT"),(k=U(k,"DURATION"))&&(a=Number(k)));return new pi(e,g,function(){return m.length?[m]:[]},p,r,b,f,0,Infinity,v,c,a)}
684
- function Zq(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ra+1,d=c+d-1);return[c,d]}function Gq(a){if(a.i){for(var b=t(a.W),c=b.next();!c.done;c=b.next())a.i.Zb(c.value);a.W=[]}}
685
- function xq(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V,Z;return H(function(W){switch(W.g){case 1:k=c.segments;m=cq(c.g,"EXT-X-MEDIA-SEQUENCE",0);p=(n=bq(c.g,"EXT-X-SKIP"))?Number(U(n,"SKIPPED-SEGMENTS")):0;r=m+p;if(a.m!=rq&&f.has(r)){v=f.get(r);W.C(2);break}if(null!=a.R){W.C(3);break}l=Wq(a,c.h,k[0].g,g);y=a;return u(W,$q(a,b,l,e,r,!1,k[0],g,d),4);case 4:y.R=W.h;case 3:v=a.R;case 2:x=k[0].h;x.split("/").pop();w=cq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(w)||h.set(w,r),
686
- p))for(C=h;C.has(w+1)&&C.get(w+1)<r;)w++;D=a.I.get(w)||0;B=[];E=0;case 5:if(!(E<k.length)){W.C(7);break}G=k[E];I=B[B.length-1];N=0==E?v:I.endTime;r=m+p+E;f.set(r,N);l=Wq(a,c.h,G.g,g);K=bq(G.g,"EXT-X-DISCONTINUITY");if(!K){W.C(8);break}w++;h.set(w,r);return u(W,ar(a,w,b,l,e,r,G,g,N,d),9);case 9:D=W.h;case 8:!a.l&&(O=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());V=bq(G.g,"EXTINF");a.l||V?(Z=Yq(a,l,I,G,N,D,g,c.h,d))&&B.push(Z):a.l||Pa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
687
- E++;W.C(5);break;case 7:return W["return"](B)}})}function ar(a,b,c,d,e,f,g,h,k,l){var m,n;return H(function(p){if(1==p.g)return m=0,a.I.has(b)?(m=a.I.get(b),p.C(2)):u(p,$q(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)})}
688
- function br(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:c=jf;d=bj(b.Ea(),b.ya,b.ra,a.g.retryParameters);if(a.g.hls.useFullSegmentsForStartTime)return k["return"](sq(a,d,c));e=bj(b.Ea(),b.ya,b.ya+2048-1,a.g.retryParameters);A(k,2);return u(k,sq(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.",
689
- e.uris[0]);return u(k,sq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
690
- function $q(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,v,y,x;return H(function(w){switch(w.g){case 1:l=Yq(a,c,null,g,0,0,h,"",k);if(a.F&&!f&&(m=a.h.get(b),n=m.Sd.get(e),void 0!=n))return w["return"](n);d=d.toLowerCase();if(Tq.includes(d))throw Pa("Raw formats are not yet supported. Skipping "+d),new M(1,4,4035);if("video/webm"==d)throw Pa("WebM in HLS is not yet supported. Skipping."),new M(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.C(2);break}p=[br(a,l)];c&&p.push(br(a,c));return u(w,Promise.all(p),
691
- 3);case 3:return r=w.h,v=r[0],y=r[1]||r[0],w["return"](cr(b,v.uri,v.data,y.data));case 2:if("video/mp2t"!=d){w.C(4);break}return u(w,br(a,l),5);case 5:return x=w.h,w["return"](dr(b,x.uri,x.data));case 4:throw new M(2,4,4030,b);}})}
692
- function cr(a,b,c,d){var e=0;(new sg).box("moov",wg).box("trak",wg).box("mdia",wg).U("mdhd",function(h){e=Jh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new M(2,4,4030,a,b);var f=0,g=!1;(new sg).box("moof",wg).box("traf",wg).U("tfdt",function(h){f=Ih(h.reader,h.version).Jd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new M(2,4,4030,a,b);return f}
693
- function dr(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.gf(1)}function e(){throw new M(2,4,4030,a,b);}var f=new pg(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.bc();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=
694
- f.bc();var l=f.bc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Oq(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 M(2,4,4039,f);}}return c}
695
- function Sq(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y,x;return H(function(w){if(1==w.g){f=Mb;g=jf;h=Math.trunc((d.segments.length-1)/2);k=Oq(d.segments[h].h,e);l=new jb(k);m=l.Ma.split(".").pop();n=er[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.nc&&(!c||"jpeg"==c))return w["return"]("image/jpeg");r=cf([k],a.g.retryParameters);r.method="HEAD";return u(w,sq(a,r,g),2)}v=w.h;y=v.headers["content-type"];return y?
696
- w["return"](y.split(";")[0]):(x=n.mp4,w["return"](x))})}function qq(a){var b,c;H(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 yq(a,b){a.m=b;a.i&&a.i.Hc(a.m==rq);a.m!=rq||a.D.stop()}function sq(a,b,c){if(!a.G)throw new M(2,7,7001);b=a.j.networkingEngine.request(c,b);Ye(a.G,b);return b.promise}J("shaka.hls.HlsParser",pq);
697
- var Tq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],er={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",
698
- vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Qq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Xp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Xp(a,"URI");b=oq(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=
699
- Xp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Xp(a,"URI");a=oq(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=Cn(a,b);return Hb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},rq="VOD",Vq="EVENT",Uq="LIVE",vq={xf:rq,kh:Vq,Ee:Uq};ng.m3u8=function(){return new pq};lg["application/x-mpegurl"]=function(){return new pq};lg["application/vnd.apple.mpegurl"]=function(){return new pq};function fr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,cf:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=fd(b)}catch(g){}throw new M(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function gr(){}function hr(a,b,c,d){var e=new ir;uf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new jr,g={He:!1,sf:!1};a=kr(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 Oe(a,function(){g.He=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new P(function(){g.sf=!0;f.abort()});h.P(b/1E3);a["finally"](function(){h.stop()})}return a}
700
- function kr(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,y,x,w,C,D;return H(function(B){switch(B.g){case 1:return g=lr,h=mr,n=m=0,p=Date.now(),A(B,2),u(B,g(a,c),4);case 4:return k=B.h,r=k.clone().body.getReader(),y=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,x=function(E){function G(){var I,N;return H(function(K){switch(K.g){case 1:return A(K,2),u(K,r.read(),4);case 4:I=K.h;ua(K,3);break;case 2:return F(K),K["return"]();case 3:if(I.done){K.C(5);break}m+=I.value.byteLength;if(!f){K.C(5);break}return u(K,
701
- f(I.value),5);case 5:N=Date.now();if(100<N-p||I.done)e(N-p,m-n,y-m),n=m,p=N;I.done?E.close():(E.enqueue(I.value),G());z(K)}})}G()},new h({start:x}),u(B,k.arrayBuffer(),5);case 5:l=B.h;ua(B,3);break;case 2:w=F(B);if(d.He)throw new M(1,1,7001,a,b);if(d.sf)throw new M(1,1,1003,a,b);throw new M(1,1,1002,a,w,b);case 3:return C={},D=k.headers,D.forEach(function(E,G){C[G.trim()]=E}),B["return"](fr(C,l,k.status,a,k.url,b))}})}
702
- function nr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}J("shaka.net.HttpFetchPlugin",gr);gr.isSupported=nr;gr.parse=hr;var lr=window.fetch,jr=window.AbortController,mr=window.ReadableStream,ir=window.Headers;nr()&&($e("http",hr,2,!0),$e("https",hr,2,!0));function or(){}
703
- function pr(a,b,c,d){var e=new qr,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 M(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=fr(r,n.response,n.status,a,n.responseURL,
704
- c);k(y)}catch(x){l(x)}};e.onerror=function(n){l(new M(1,1,1002,a,n,c))};e.ontimeout=function(){l(new M(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 Oe(h,function(){e.abort();return Promise.resolve()})}J("shaka.net.HttpXHRPlugin",or);or.parse=pr;var qr=window.XMLHttpRequest;
705
- $e("http",pr,1,!0);$e("https",pr,1,!0);function rr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function sr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}rr.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 tr(a){var b=this;this.v=a;this.h=new Map;this.i=new kf(function(){return ur(b)["catch"](function(){})});this.j=[];this.m=function(){};this.l=function(){};this.g=new rr}tr.prototype.destroy=function(){return this.i.destroy()};function vr(a,b,c){a.m=b;a.l=c}function ur(a){var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
706
- function wr(a,b,c,d,e,f){lf(a.i);var g=sr(a.g,d);d=(a.h.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return H(function(v){if(1==v.g)return u(v,xr(a,c),2);h=v.h;if(a.i.g)throw new M(2,9,7001);if(e)for(m in k=Ec(h),l=new Bn(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}
707
- function yr(a,b,c){lf(a.i);var d=(a.h.get(b)||Promise.resolve()).then(function(){return H(function(e){return u(e,c(),0)})});a.h.set(b,d)}function zr(a){return H(function(b){return 1==b.g?u(b,Promise.all(a.h.values()),2):b["return"](a.g.h)})}function xr(a,b){var c,d,e,f;return H(function(g){if(1==g.g)return c=jf,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 Ar(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()}}Ar.prototype.abort=function(){var a=this;return H(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)})};
708
- function Br(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return H(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)})}})}Ar.prototype.store=function(){return this.h};Ar.prototype.promise=function(){return this.g};function Cr(a){this.h=a;this.g=[]}Cr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Dr(a,b){return Er(a,b,"readwrite")}function Er(a,b,c){c=a.h.transaction([b],c);var d=new Ar(c,b);a.g.push(d);d.promise().then(function(){ec(a.g,d)},function(){ec(a.g,d)});return d};function Fr(a,b,c){this.g=new Cr(a);this.i=b;this.h=c}q=Fr.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Gr(this.i)};q.removeSegments=function(a,b){return Hr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return H(function(d){if(1==d.g)return u(d,Ir(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Ke(e)}))})};q.addManifests=function(){return Gr(this.h)};
709
- q.updateManifestExpiration=function(a,b){var c=Dr(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 Hr(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return H(function(d){if(1==d.g)return u(d,Ir(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.rc(e)})))})};
710
- q.getAllManifests=function(){var a=this,b,c;return H(function(d){return 1==d.g?(b=Er(a.g,a.h,"readonly"),c=new Map,u(d,Br(b,function(e,f){var g;return H(function(h){if(1==h.g)return u(h,a.rc(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};q.Ke=function(a){return a};q.rc=function(a){return Promise.resolve(a)};function Gr(a){return Promise.reject(new M(2,9,9011,"Cannot add new value to "+a))}
711
- q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){if(1==m.g){d=Dr(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)})};
712
- function Hr(a,b,c,d){a=Dr(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()}
713
- function Ir(a,b,c){var d,e,f,g,h,k,l;return H(function(m){if(1==m.g){d=Er(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={lc:h.lc,hc:h.hc},l=k.next())h.hc=l.value,h.lc=e.get(h.hc),h.lc.onsuccess=function(n){return function(){void 0==n.lc.result&&g.push(n.hc);f[n.hc]=n.lc.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new M(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function Jr(a){this.g=new Cr(a)}Jr.prototype.destroy=function(){return this.g.destroy()};Jr.prototype.getAll=function(){var a=this,b,c;return H(function(d){return 1==d.g?(b=Er(a.g,"session-ids","readonly"),c=[],u(d,Br(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};Jr.prototype.add=function(a){var b=Dr(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()};
714
- Jr.prototype.remove=function(a){var b=this,c;return H(function(d){return 1==d.g?(c=Dr(b.g,"session-ids"),u(d,Br(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Kr(){this.g=new Map}Kr.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)};Kr.prototype.init=function(){var a=this;Lr.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)};
715
- function Mr(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Wa:d,Da:f},Da:e})})});if(b)return b;throw new M(2,9,9013,"Could not find a cell that supports add-operations");}function Nr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Wa:d,Da:f},e)})})}
716
- function Or(a,b,c){a=a.g.get(b);if(!a)throw new M(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new M(2,9,9013,"Could not find cell with name "+c);return b}function Pr(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Qr(a){var b=Array.from(a.g.keys());if(!b.length)throw new M(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
717
- function Rr(a){var b,c,d;return H(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Lr,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 Sr(a,b){Lr.set(a,b)}J("shaka.offline.StorageMuxer",Kr);Kr.unregister=function(a){Lr["delete"](a)};Kr.register=Sr;Kr.prototype.destroy=Kr.prototype.destroy;var Lr=new Map;function Tr(){Fr.apply(this,arguments)}pa(Tr,Fr);Tr.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return H(function(g){d=Dr(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 M(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
718
- Tr.prototype.rc=function(a){var b,c,d,e,f,g;return H(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=Ur(a.periods[c],e),b.push(f);return u(h,hp(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})})};
719
- function Ur(a,b){Vr(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Wr(e,a.startTime,b)})}
720
- function Wr(a,b,c){var d=a.initSegmentUri?Xr(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=Xr(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
721
- 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}}Tr.prototype.Ke=function(a){return{data:a.data}};function Xr(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 M(2,9,9004,"Could not parse uri "+a);}
722
- function Vr(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++,
723
- 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 Yr(){Fr.apply(this,arguments)}pa(Yr,Fr);
724
- Yr.prototype.rc=function(a){var b,c,d,e,f,g;return H(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(Zr(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,hp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
676
+ function Nq(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g){e=Qq(Zp(b,"URI"),a.v);if(a.h.has(e))return k["return"](a.h.get(e));var l=U(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.J.get(l):null;g=Ib(d,c);return u(k,Rq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
677
+ function Rq(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,v,y,x,w,D,B,C,E,G,H,L,J,O,V,Z,W,ma,ya,Ta,Qa,Fa,Ua,Qc,Bd,Za,De,bg,Mo,No,Oo,Di,Ei,cg,Po,Qo,Ro,So;return I(function(mb){switch(mb.g){case 1:return p=Gb([a.M],[b])[0],u(mb,uq(a,cf([p],a.g.retryParameters),0),2);case 2:r=mb.h;p=r.uri;v=kq(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())D=w.value,B=bq(D.g,"EXT-X-KEY"),y.push.apply(y,ha(B));C=!1;E=[];G=new Set;H=t(y);for(L=H.next();!L.done;L=
678
+ H.next())if(J=L.value,O=Zp(J,"METHOD"),"NONE"!=O){C=!0;if("AES-128"==O)return a.Ba=!0,mb["return"](null);V=Zp(J,"KEYFORMAT");if(W=(Z=Sq[V])?Z(J):null){if(W.keyIds)for(ma=t(W.keyIds),ya=ma.next();!ya.done;ya=ma.next())Ta=ya.value,G.add(Ta);E.push(W)}}if(C&&!E.length)throw new N(2,4,4026);Qa=bq(v.g,"EXT-X-DEFINE");Fa=yq(a,Qa);Tq(a,v);return u(mb,Uq(a,d,c,v,Fa),3);case 3:return Ua=mb.h,Vq.includes(Ua)&&(c=""),Qc=new Map,Bd=new Map,A(mb,4),u(mb,zq(a,b,v,d,Ua,Qc,Fa,Bd),6);case 6:Za=mb.h;ua(mb,5);break;
679
+ case 4:De=F(mb);if(4035==De.code)return Pa("Skipping unsupported HLS stream",Ua,b),mb["return"](null);throw De;case 5:bg=Za[0].startTime;Mo=Za[Za.length-1].endTime;No=new ij(Za);Oo=d==Lb?"subtitle":void 0;Di=[];if(l)for(Ei=t(l.split(",")),cg=Ei.next();!cg.done;cg=Ei.next())Po=cg.value,Di.push(Po);Ro=(Qo=dq(v.g,"EXT-X-SERVER-CONTROL"))?null!=Qo.getAttribute("CAN-SKIP-UNTIL"):!1;So={id:a.Aa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:No,mimeType:Ua,codecs:c,kind:Oo,
680
+ encrypted:C,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 mb["return"]({stream:So,qd:b,yf:p,$e:bg,xg:Mo,Sd:Qc,If:Bd,Df:Ro})}})}
681
+ function Tq(a,b){var c=dq(b.g,"EXT-X-PLAYLIST-TYPE"),d=dq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Aq(a,tq);else{c?Aq(a,Wq):Aq(a,Xq);d=dq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=dq(b.g,"EXT-X-PART-INF");a.l&&c?(a.aa=Number(Zp(c,"PART-TARGET")),a.H=Math.min(a.aa,a.H),c=dq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(Zp(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.$=Math.max(d,a.$)}}
682
+ function Yq(a,b,c,d){c=dq(c,"EXT-X-MAP");if(!c)return null;var e=Zp(c,"URI");d=Qq(Gb([b],[e])[0],d);b=[d,U(c,"BYTERANGE","")].join("-");a.Z.has(b)||(c=Zq(d,c),a.Z.set(b,c));return a.Z.get(b)}function Zq(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)}
683
+ function $q(a,b,c,d,e,f,g,h,k){var l=d.g,m=Qq(d.h,g),n=dq(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={zd:y.zd},x++){var w=d.i[x],D=0==x?c:v[v.length-1],B=0==x?e:D.endTime,C=Number(U(w,"DURATION"))||a.aa;if(C){C=B+C;var E=0,G=null;"EXT-X-PRELOAD-HINT"==w.name?E=(D=U(w,"BYTERANGE-START"))?Number(D):0:(E=U(w,"BYTERANGE"),D=t(ar(D,E)),E=D.next().value,G=D.next().value);if(w=U(w,"URI"))y.zd=Gb([h],
684
+ [w])[0],v.push(new Mi(B,C,function(H){return function(){return[H.zd]}}(y),E,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=dq(l,"EXT-X-BYTERANGE"))?(r=t(ar(c,a.value)),p=r.next().value,r=r.next().value):v.length&&(p=v[0].ya,r=v[v.length-1].ra);c="";a=null;"image"==k&&(c="1x1",k=dq(l,"EXT-X-TILES"))&&(c=Zp(k,"LAYOUT"),(k=U(k,"DURATION"))&&(a=Number(k)));return new Mi(e,g,function(){return m.length?[m]:[]},p,r,b,f,0,Infinity,v,c,a)}
685
+ function ar(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ra+1,d=c+d-1);return[c,d]}function Iq(a){if(a.i){for(var b=t(a.W),c=b.next();!c.done;c=b.next())a.i.Zb(c.value);a.W=[]}}
686
+ function zq(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,v,y,x,w,D,B,C,E,G,H,L,J,O,V,Z;return I(function(W){switch(W.g){case 1:k=c.segments;m=eq(c.g,"EXT-X-MEDIA-SEQUENCE",0);p=(n=dq(c.g,"EXT-X-SKIP"))?Number(U(n,"SKIPPED-SEGMENTS")):0;r=m+p;if(a.m!=tq&&f.has(r)){v=f.get(r);W.C(2);break}if(null!=a.R){W.C(3);break}l=Yq(a,c.h,k[0].g,g);y=a;return u(W,br(a,b,l,e,r,!1,k[0],g,d),4);case 4:y.R=W.h;case 3:v=a.R;case 2:x=k[0].h;x.split("/").pop();w=eq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(w)||h.set(w,r),
687
+ p))for(D=h;D.has(w+1)&&D.get(w+1)<r;)w++;B=a.I.get(w)||0;C=[];E=0;case 5:if(!(E<k.length)){W.C(7);break}G=k[E];H=C[C.length-1];L=0==E?v:H.endTime;r=m+p+E;f.set(r,L);l=Yq(a,c.h,G.g,g);J=dq(G.g,"EXT-X-DISCONTINUITY");if(!J){W.C(8);break}w++;h.set(w,r);return u(W,cr(a,w,b,l,e,r,G,g,L,d),9);case 9:B=W.h;case 8:!a.l&&(O=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());V=dq(G.g,"EXTINF");a.l||V?(Z=$q(a,l,H,G,L,B,g,c.h,d))&&C.push(Z):a.l||Pa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
688
+ E++;W.C(5);break;case 7:return W["return"](C)}})}function cr(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,br(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)})}
689
+ function dr(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:c=jf;d=wj(b.Ea(),b.ya,b.ra,a.g.retryParameters);if(a.g.hls.useFullSegmentsForStartTime)return k["return"](uq(a,d,c));e=wj(b.Ea(),b.ya,b.ya+2048-1,a.g.retryParameters);A(k,2);return u(k,uq(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.",
690
+ e.uris[0]);return u(k,uq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
691
+ function br(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=$q(a,c,null,g,0,0,h,"",k);if(a.F&&!f&&(m=a.h.get(b),n=m.Sd.get(e),void 0!=n))return w["return"](n);d=d.toLowerCase();if(Vq.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=[dr(a,l)];c&&p.push(dr(a,c));return u(w,Promise.all(p),
692
+ 3);case 3:return r=w.h,v=r[0],y=r[1]||r[0],w["return"](er(b,v.uri,v.data,y.data));case 2:if("video/mp2t"!=d){w.C(4);break}return u(w,dr(a,l),5);case 5:return x=w.h,w["return"](fr(b,x.uri,x.data));case 4:throw new N(2,4,4030,b);}})}
693
+ function er(a,b,c,d){var e=0;(new Ng).box("moov",Rg).box("trak",Rg).box("mdia",Rg).U("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).U("tfdt",function(h){f=ci(h.reader,h.version).Jd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
694
+ function fr(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.gf(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.bc();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=
695
+ f.bc();var l=f.bc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Qq(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}
696
+ function Uq(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=jf;h=Math.trunc((d.segments.length-1)/2);k=Qq(d.segments[h].h,e);l=new jb(k);m=l.Ma.split(".").pop();n=gr[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.nc&&(!c||"jpeg"==c))return w["return"]("image/jpeg");r=cf([k],a.g.retryParameters);r.method="HEAD";return u(w,uq(a,r,g),2)}v=w.h;y=v.headers["content-type"];return y?
697
+ w["return"](y.split(";")[0]):(x=n.mp4,w["return"](x))})}function sq(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 Aq(a,b){a.m=b;a.i&&a.i.Hc(a.m==tq);a.m!=tq||a.D.stop()}function uq(a,b,c){if(!a.G)throw new N(2,7,7001);b=a.j.networkingEngine.request(c,b);Ye(a.G,b);return b.promise}K("shaka.hls.HlsParser",rq);
698
+ var Vq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],gr={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",
699
+ vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Sq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Zp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Zp(a,"URI");b=qq(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=
700
+ Zp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Zp(a,"URI");a=qq(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=Yn(a,b);return Hb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},tq="VOD",Xq="EVENT",Wq="LIVE",xq={xf:tq,kh:Xq,Ee:Wq};Ig.m3u8=function(){return new rq};Gg["application/x-mpegurl"]=function(){return new rq};Gg["application/vnd.apple.mpegurl"]=function(){return new rq};function hr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,cf:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=fd(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function ir(){}function jr(a,b,c,d){var e=new kr;uf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new lr,g={He:!1,sf:!1};a=mr(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 Oe(a,function(){g.He=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new P(function(){g.sf=!0;f.abort()});h.P(b/1E3);a["finally"](function(){h.stop()})}return a}
701
+ function mr(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,y,x,w,D,B;return I(function(C){switch(C.g){case 1:return g=nr,h=or,n=m=0,p=Date.now(),A(C,2),u(C,g(a,c),4);case 4:return k=C.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,
702
+ 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(C,k.arrayBuffer(),5);case 5:l=C.h;ua(C,3);break;case 2:w=F(C);if(d.He)throw new N(1,1,7001,a,b);if(d.sf)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,w,b);case 3:return D={},B=k.headers,B.forEach(function(E,G){D[G.trim()]=E}),C["return"](hr(D,l,k.status,a,k.url,b))}})}
703
+ function pr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}K("shaka.net.HttpFetchPlugin",ir);ir.isSupported=pr;ir.parse=jr;var nr=window.fetch,lr=window.AbortController,or=window.ReadableStream,kr=window.Headers;pr()&&($e("http",jr,2,!0),$e("https",jr,2,!0));function qr(){}
704
+ function rr(a,b,c,d){var e=new sr,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=hr(r,n.response,n.status,a,n.responseURL,
705
+ 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 Oe(h,function(){e.abort();return Promise.resolve()})}K("shaka.net.HttpXHRPlugin",qr);qr.parse=rr;var sr=window.XMLHttpRequest;
706
+ $e("http",rr,1,!0);$e("https",rr,1,!0);function tr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function ur(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}tr.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 vr(a){var b=this;this.v=a;this.h=new Map;this.i=new kf(function(){return wr(b)["catch"](function(){})});this.j=[];this.m=function(){};this.l=function(){};this.g=new tr}vr.prototype.destroy=function(){return this.i.destroy()};function xr(a,b,c){a.m=b;a.l=c}function wr(a){var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
707
+ function yr(a,b,c,d,e,f){lf(a.i);var g=ur(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,zr(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 Xn(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}
708
+ function Ar(a,b,c){lf(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 Br(a){return I(function(b){return 1==b.g?u(b,Promise.all(a.h.values()),2):b["return"](a.g.h)})}function zr(a,b){var c,d,e,f;return I(function(g){if(1==g.g)return c=jf,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 Cr(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()}}Cr.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)})};
709
+ function Dr(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)})}})}Cr.prototype.store=function(){return this.h};Cr.prototype.promise=function(){return this.g};function Er(a){this.h=a;this.g=[]}Er.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Fr(a,b){return Gr(a,b,"readwrite")}function Gr(a,b,c){c=a.h.transaction([b],c);var d=new Cr(c,b);a.g.push(d);d.promise().then(function(){ec(a.g,d)},function(){ec(a.g,d)});return d};function Hr(a,b,c){this.g=new Er(a);this.i=b;this.h=c}q=Hr.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Ir(this.i)};q.removeSegments=function(a,b){return Jr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,Kr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Ke(e)}))})};q.addManifests=function(){return Ir(this.h)};
710
+ q.updateManifestExpiration=function(a,b){var c=Fr(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 Jr(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,Kr(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.rc(e)})))})};
711
+ q.getAllManifests=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=Gr(a.g,a.h,"readonly"),c=new Map,u(d,Dr(b,function(e,f){var g;return I(function(h){if(1==h.g)return u(h,a.rc(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};q.Ke=function(a){return a};q.rc=function(a){return Promise.resolve(a)};function Ir(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}
712
+ q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){if(1==m.g){d=Fr(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)})};
713
+ function Jr(a,b,c,d){a=Fr(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()}
714
+ function Kr(a,b,c){var d,e,f,g,h,k,l;return I(function(m){if(1==m.g){d=Gr(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={lc:h.lc,hc:h.hc},l=k.next())h.hc=l.value,h.lc=e.get(h.hc),h.lc.onsuccess=function(n){return function(){void 0==n.lc.result&&g.push(n.hc);f[n.hc]=n.lc.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 Lr(a){this.g=new Er(a)}Lr.prototype.destroy=function(){return this.g.destroy()};Lr.prototype.getAll=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=Gr(a.g,"session-ids","readonly"),c=[],u(d,Dr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};Lr.prototype.add=function(a){var b=Fr(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()};
715
+ Lr.prototype.remove=function(a){var b=this,c;return I(function(d){return 1==d.g?(c=Fr(b.g,"session-ids"),u(d,Dr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Mr(){this.g=new Map}Mr.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)};Mr.prototype.init=function(){var a=this;Nr.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)};
716
+ function Or(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 Pr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Xa:d,Da:f},e)})})}
717
+ function Qr(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 Rr(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Sr(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()}
718
+ function Tr(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=Nr,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 Ur(a,b){Nr.set(a,b)}K("shaka.offline.StorageMuxer",Mr);Mr.unregister=function(a){Nr["delete"](a)};Mr.register=Ur;Mr.prototype.destroy=Mr.prototype.destroy;var Nr=new Map;function Vr(){Hr.apply(this,arguments)}pa(Vr,Hr);Vr.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return I(function(g){d=Fr(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)})};
719
+ Vr.prototype.rc=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=Wr(a.periods[c],e),b.push(f);return u(h,jp(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})})};
720
+ function Wr(a,b){Xr(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Yr(e,a.startTime,b)})}
721
+ function Yr(a,b,c){var d=a.initSegmentUri?Zr(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=Zr(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
722
+ 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}}Vr.prototype.Ke=function(a){return{data:a.data}};function Zr(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);}
723
+ function Xr(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++,
724
+ 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 $r(){Hr.apply(this,arguments)}pa($r,Hr);
725
+ $r.prototype.rc=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(as(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,jp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
725
726
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
726
- function Zr(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
727
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function $r(){Fr.apply(this,arguments)}pa($r,Fr);$r.prototype.hasFixedKeySpace=function(){return!1};$r.prototype.addSegments=function(a){return this.add(this.i,a)};$r.prototype.addManifests=function(a){return this.add(this.h,a)};$r.prototype.rc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function as(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=as.prototype;
728
- q.init=function(){var a=this,b=new Lc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Tr(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Yr(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Yr(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
729
- e=e.contains("manifest-v5")&&e.contains("segment-v5")?new $r(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new Jr(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new M(2,9,9001,c.error));d.preventDefault()};return b};
730
- q.destroy=function(){var a=this;return H(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)}})};
727
+ function as(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
728
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function bs(){Hr.apply(this,arguments)}pa(bs,Hr);bs.prototype.hasFixedKeySpace=function(){return!1};bs.prototype.addSegments=function(a){return this.add(this.i,a)};bs.prototype.addManifests=function(a){return this.add(this.h,a)};bs.prototype.rc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function cs(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=cs.prototype;
729
+ q.init=function(){var a=this,b=new Lc,c=!1,d=new P(function(){c=!0;b.reject(new N(2,9,9017))});d.P(2);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Vr(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new $r(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
730
+ new $r(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new bs(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Lr(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new N(2,
731
+ 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)}})};
731
732
  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};
732
- q.erase=function(){var a=this;return H(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,bs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
733
- function bs(){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 M(2,9,9001,b.error));c.preventDefault()};return a}Sr("idb",function(){return Wc()||Sc()||!window.indexedDB?null:new as});function cs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}cs.prototype.Wa=function(){return this.i};cs.prototype.Da=function(){return this.h};cs.prototype.key=function(){return this.l};cs.prototype.toString=function(){return this.j};
734
- function ds(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 cs(b,c,d,Number(a[4])):null};function es(a,b){this.h=a;this.g=b}
735
- function fs(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=gs(a,d,e,c);e=b.streams.filter(function(l){return l.type==Lb}).map(function(l){return hs(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return hs(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=
733
+ 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,ds(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
734
+ function ds(){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}Ur("idb",function(){return Wc()||Sc()||!window.indexedDB?null:new cs});function es(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}es.prototype.Xa=function(){return this.i};es.prototype.Da=function(){return this.h};es.prototype.key=function(){return this.l};es.prototype.toString=function(){return this.j};
735
+ function fs(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 es(b,c,d,Number(a[4])):null};function gs(a,b){this.h=a;this.g=b}
736
+ function hs(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=is(a,d,e,c);e=b.streams.filter(function(l){return l.type==Lb}).map(function(l){return js(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return js(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=
736
737
  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}}
737
- function gs(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=
738
- e.value,g=hs(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=hs(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}
739
- function hs(a,b,c){var d=b.segments.map(function(e){return is(a,e)});c.Zb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oi(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,
740
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function is(a,b){var c=new cs("segment",a.h,a.g,b.dataKey);return new pi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?js(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
741
- function js(a,b){var c=new cs("segment",a.h,a.g,b);return new ni(function(){return[c.toString()]},0,null)};function ks(){this.g=null}q=ks.prototype;q.configure=function(){};
742
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:d=ds(a);c.g=d;if(null==d||"manifest"!=d.g)throw new M(2,1,9004,a);e=new Kr;ta(m);return u(m,e.init(),4);case 4:return u(m,Or(e,d.Wa(),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 es(d.Wa(),d.Da()),l=fs(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()};
743
- q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:return d=c.g,e=new Kr,A(m,2,3),u(m,e.init(),5);case 5:return u(m,Or(e,d.Wa(),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)}})};
744
- lg["application/x-offline-manifest"]=function(){return new ks};function ls(){}function ms(a){var b=ds(a);b&&"manifest"==b.g?(a={uri:a,cf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Re(a)):a=b&&"segment"==b.g?ns(b.key(),b):Pe(new M(2,1,9004,a));return a}
745
- function ns(a,b){var c=new Kr;return Re(void 0).ma(function(){return c.init()}).ma(function(){return Or(c,b.Wa(),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()})}J("shaka.offline.OfflineScheme",ls);ls.plugin=ms;$e("offline",ms);function os(a,b,c){var d,e,f,g,h,k;return H(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,ps(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=qs(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)}})}
746
- function qs(a,b,c){var d,e;return H(function(f){switch(f.g){case 1:return d=new xf({Jb:b,onError:function(){},hd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(f,2),d.configure(a),u(f,Ff(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,Of(d),8);case 8:ua(f,7);break;case 6:return F(f),u(f,d.destroy(),
747
- 9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return H(function(h){if(1==h.g)return A(h,2),u(h,Pf(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)}})}
748
- function ps(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 rs(a,b,c){var d=b.presentationTimeline.getDuration();b=ss(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function ts(a,b){var c=fs(new es(a.Wa(),a.Da()),b),d=b.appMetadata||{};c=ss(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
749
- function ss(a){var b=[],c=qe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(he(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ie(c.value));return b};function us(){this.g={}}function vs(a,b,c){c=c.endTime-c.startTime;return ws(a,b)*c}function ws(a,b){var c=a.g[b];null==c&&(c=0);return c};function xs(a){var b=this;if(a&&a.constructor!=S)throw new M(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.uc()):(this.h=fk(),this.g=new Ze);this.j=[];this.i=[];this.l=[];var c=!a;this.m=new kf(function(){var d,e,f,g,h;return H(function(k){switch(k.g){case 1:return u(k,Promise.all(b.l.map(function(l){return ur(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(),
750
- 4);case 4:b.h=null,b.g=null,z(k)}})})}function ys(){if(Oc())a:{var a=t(Lr.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=xs.prototype;q.destroy=function(){return this.m.destroy()};
751
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ck(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 hk(this.h,a)};q.getConfiguration=function(){var a=fk();hk(a,this.h,fk());return a};q.uc=function(){return this.g};
752
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new tr(this.g);this.l.push(f);b=zs(this,a,b||{},function(){var h;return H(function(k){if(1==k.g)return u(k,kg(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Fb(h))})},e,f);var g=new Oe(b,function(){return ur(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.");
753
- return g.promise.then(h)};return As(this,g)};q.ig=function(){yb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
754
- function zs(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,y,x;return H(function(w){switch(w.g){case 1:return Bs(),h=g=null,k=new Kr,m=l=null,A(w,2,3),u(w,d(),5);case 5:return g=w.h,u(w,Cs(a,b,g,e),6);case 6:n=w.h;Ds(a);p=!n.presentationTimeline.V()&&!n.presentationTimeline.Gb();if(!p)throw new M(2,9,9005,b);return u(w,Es(a,n,function(C){m=m||C},e),7);case 7:h=w.h;Ds(a);if(m)throw m;return u(w,Fs(n,e),8);case 8:return u(w,k.init(),9);case 9:return Ds(a),u(w,Mr(k),10);case 10:return l=w.h,Ds(a),u(w,Gs(a,l.Da,
755
- h,n,b,c,e,f),11);case 11:r=w.h;Ds(a);if(m)throw m;return u(w,l.Da.addManifests([r]),12);case 12:return v=w.h,Ds(a),y=new cs("manifest",l.path.Wa,l.path.Da,v[0]),w["return"](ts(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;}})}
756
- function Fs(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V,Z,W,ma;return H(function(ya){switch(ya.g){case 1:return c={width:Infinity,height:Infinity},Vd(a,b.restrictions,c),u(ya,Yd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Jd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(he(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,
757
- d.push(ie(r));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(je(x));return u(ya,b.offline.trackSelectionCallback(d),3);case 3:w=ya.h;C=a.presentationTimeline.getDuration();D=0;B=t(w);for(E=B.next();!E.done;E=B.next())G=E.value,I=G.bandwidth*C/8,D+=I;A(ya,4);return u(ya,b.offline.downloadSizeCallback(D),6);case 6:N=ya.h;if(!N)throw new M(2,9,9014);ua(ya,5);break;case 4:K=F(ya);if(K instanceof M)throw K;throw new M(2,9,9015);case 5:O=new Set;V=new Set;Z=new Set;W=t(w);for(E=
758
- 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(Ta){return O.has(Ta.id)});a.textStreams=a.textStreams.filter(function(Ta){return V.has(Ta.id)});a.imageStreams=a.imageStreams.filter(function(Ta){return Z.has(Ta.id)});Hs(a);z(ya)}})}
759
- function Gs(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,v,y,x,w,C,D;return H(function(B){switch(B.g){case 1:return k=rs(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&&Nf(c,"cenc",E)},vr(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&&
760
- G.initData.length})}),v=p&&!r,y=null,v&&(x=c.g,y=Is.get(x.keySystem)),ta(B),C=w=Js(a,h,b,c,d,e,f,g),u(B,zr(h),4);case 4:C.size=B.h;w.expiration=c.tc();D=Tf(c);w.sessionIds=g.offline.usePersistentLicense?D:[];if(p&&g.offline.usePersistentLicense&&!D.length)throw new M(2,9,9007);return B["return"](w);case 2:return va(B),u(B,h.destroy(),5);case 5:wa(B,0)}})}q.remove=function(a){return Ks(this,Ls(this,a))};
761
- function Ls(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:Bs();c=ds(b);if(null==c||"manifest"!=c.g)throw new M(2,9,9004,b);d=c;e=new Kr;ta(k);return u(k,e.init(),4);case 4:return u(k,Or(e,d.Wa(),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([Ms(a,h,e),Ns(f,d,h)]),2);case 2:return va(k),u(k,e.destroy(),8);case 8:wa(k,0)}})}
762
- function Os(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:ud(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:ud(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Ms(a,b,c){return H(function(d){return u(d,Ps(a.g,a.h.drm,c,b),0)})}
763
- function Ns(a,b,c){function d(){}var e=Qs(c);ts(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Ig=function(){return Ks(this,Rs(this))};
764
- function Rs(a){var b,c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return Bs(),b=a.g,c=a.h.drm,d=new Kr,e=!1,ta(n),u(n,d.init(),4);case 4:f=[],Pr(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,os(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)}})}
765
- q.list=function(){return Ks(this,Ss())};function Ss(){var a,b,c;return H(function(d){switch(d.g){case 1:return Bs(),a=[],b=new Kr,ta(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Nr(b,function(e,f){c=c.then(function(){var g;return H(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=ts(new cs("manifest",e.Wa,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)}})}
766
- function Cs(a,b,c,d){var e,f,g,h,k;return H(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),Ds(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Ds(a),k=Ts(h),u(l,Promise.all(eb(k,
767
- function(m){return m.createSegmentIndex()})),3);Ds(a);if(e)throw e;return l["return"](h)})}function Es(a,b,c,d){var e;return H(function(f){switch(f.g){case 1:return e=new xf({Jb:a.g,onError:c,hd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,Cf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Of(e),3);case 3:return u(f,Mf(e),4);case 4:return f["return"](e)}})}
768
- function Js(a,b,c,d,e,f,g,h){for(var k=new us,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;
769
- n.set(null,Promise.resolve(null));m=new Map;p=Ts(e);l=new Map;p=t(p);for(r=p.next();!r.done;r=p.next())r=r.value,v=Us(a,b,c,k,e,r,h,n,m),l.set(r.id,v);a=t(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.g)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
770
- expiration:d.tc(),streams:a,sessionIds:h?Tf(d):[],drmInfo:b,appMetadata:g}}
771
- function Us(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
772
- tilesLayout:f.tilesLayout},m=f.id;Vs(f,e.presentationTimeline.jb(),function(n){var p=Ws(a,b,m,f.id,c,d,n.h,g,h),r=Xs(a,b,m,f.id,c,d,n,g,k);yr(b,m,function(){var v,y;return H(function(x){if(1==x.g)return u(x,p,2);if(3!=x.g)return v=x.h,u(x,r,3);y=x.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,dataKey:y});z(x)})})});return l}
773
- function Ws(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=bj(g.Ea(),g.ya,g.ra,h.streaming.retryParameters);b=wr(b,c,h,.5*ws(f,d),!0,function(l){var m;return H(function(n){if(1==n.g)return u(n,e.addSegments([{data:l}]),2);m=n.h;a.j.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
774
- function Xs(a,b,c,d,e,f,g,h,k){var l=[g.Ea()[0],g.ya,g.ra].join("-");if(k.has(l))return k.get(l);h=bj(g.Ea(),g.ya,g.ra,h.streaming.retryParameters);b=wr(b,c,h,vs(f,d,g),!1,function(m){var n;return H(function(p){if(1==p.g)return u(p,e.addSegments([{data:m}]),2);n=p.h;a.j.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Vs(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Ds(a){if(a.m.g)throw new M(2,9,7001);}
775
- function Bs(){if(!ys())throw new M(2,9,9E3);}function Ks(a,b){return H(function(c){if(1==c.g)return a.i.push(b),ta(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);va(c);ec(a.i,b);return wa(c,0)})}function As(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){ec(a.i,c)})}
776
- function Qs(a){var b=[];a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
777
- function Ps(a,b,c,d){var e,f,g;return H(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Qr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Os(d,!1),videoCapabilities:Os(d,!0)}});return u(h,os(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
778
- function Ts(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
779
- function Hs(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}J("shaka.offline.Storage",xs);xs.deleteAll=function(){var a;return H(function(b){return 1==b.g?(a=new Kr,ta(b),u(b,Rr(a),2)):5!=b.g?(va(b),u(b,a.destroy(),5)):wa(b,0)})};xs.prototype.list=xs.prototype.list;
780
- xs.prototype.removeEmeSessions=xs.prototype.Ig;xs.prototype.remove=xs.prototype.remove;xs.prototype.getStoreInProgress=xs.prototype.ig;xs.prototype.store=xs.prototype.store;xs.prototype.getNetworkingEngine=xs.prototype.uc;xs.prototype.getConfiguration=xs.prototype.getConfiguration;xs.prototype.configure=xs.prototype.configure;xs.prototype.destroy=xs.prototype.destroy;xs.support=ys;
781
- var Is=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
782
- hm.offline=ys;function Ys(){}function Zs(){for(var a=t($s),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Cf()}catch(c){Pa("Error installing polyfill!",c)}}}function at(a,b){for(var c={priority:b||0,Cf:a},d=0;d<$s.length;d++)if($s[d].priority<c.priority){$s.splice(d,0,c);return}$s.push(c)}J("shaka.polyfill",Ys);Ys.register=at;Ys.installAll=Zs;var $s=[];function bt(){}function ct(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())dt(b.value)}function dt(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)}})}Ys.Aria=bt;bt.install=ct;at(ct);function et(){}function ft(){gt()}Ys.EncryptionScheme=et;et.install=ft;at(ft,-2);function ht(){}
783
- function it(){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}}),
784
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",jt);document.addEventListener("webkitfullscreenerror",jt);document.addEventListener("mozfullscreenchange",jt);document.addEventListener("mozfullscreenerror",jt);document.addEventListener("MSFullscreenChange",jt);document.addEventListener("MSFullscreenError",jt)}}
785
- function jt(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)}Ys.Fullscreen=ht;ht.install=it;at(it);function kt(){}function lt(){}Ys.MathRound=kt;kt.install=lt;at(lt);function mt(){}function nt(){if(Wc()||Xc()||Yc()||Tc("PlayStation 5")||Vc()||Uc()||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),ot=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=pt}
786
- function pt(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x;return H(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!Oc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Pc(g),!h)||a.audio&&(k=a.audio.contentType,
738
+ function is(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=
739
+ e.value,g=js(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=js(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}
740
+ function js(a,b,c){var d=b.segments.map(function(e){return ks(a,e)});c.Zb(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,
741
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function ks(a,b){var c=new es("segment",a.h,a.g,b.dataKey);return new Mi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?ls(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
742
+ function ls(a,b){var c=new es("segment",a.h,a.g,b);return new Ki(function(){return[c.toString()]},0,null)};function ms(){this.g=null}q=ms.prototype;q.configure=function(){};
743
+ 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=fs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new Mr;ta(m);return u(m,e.init(),4);case 4:return u(m,Qr(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 gs(d.Xa(),d.Da()),l=hs(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()};
744
+ 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 Mr,A(m,2,3),u(m,e.init(),5);case 5:return u(m,Qr(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)}})};
745
+ Gg["application/x-offline-manifest"]=function(){return new ms};function ns(){}function os(a){var b=fs(a);b&&"manifest"==b.g?(a={uri:a,cf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Re(a)):a=b&&"segment"==b.g?ps(b.key(),b):Pe(new N(2,1,9004,a));return a}
746
+ function ps(a,b){var c=new Mr;return Re(void 0).ma(function(){return c.init()}).ma(function(){return Qr(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",ns);ns.plugin=os;$e("offline",os);function qs(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,rs(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=ss(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)}})}
747
+ function ss(a,b,c){var d,e;return I(function(f){switch(f.g){case 1:return d=new Sf({Kb:b,onError:function(){},hd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(f,2),d.configure(a),u(f,$f(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(),
748
+ 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)}})}
749
+ function rs(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 ts(a,b,c){var d=b.presentationTimeline.getDuration();b=us(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function vs(a,b){var c=hs(new gs(a.Xa(),a.Da()),b),d=b.appMetadata||{};c=us(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
750
+ function us(a){var b=[],c=qe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(he(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ie(c.value));return b};function ws(){this.g={}}function xs(a,b,c){c=c.endTime-c.startTime;return ys(a,b)*c}function ys(a,b){var c=a.g[b];null==c&&(c=0);return c};function zs(a){var b=this;if(a&&a.constructor!=S)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.uc()):(this.h=Ak(),this.g=new Ze);this.j=[];this.i=[];this.l=[];var c=!a;this.m=new kf(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 wr(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(),
751
+ 4);case 4:b.h=null,b.g=null,z(k)}})})}function As(){if(Oc())a:{var a=t(Nr.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=zs.prototype;q.destroy=function(){return this.m.destroy()};
752
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=xk(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 Ck(this.h,a)};q.getConfiguration=function(){var a=Ak();Ck(a,this.h,Ak());return a};q.uc=function(){return this.g};
753
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new vr(this.g);this.l.push(f);b=Bs(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 Oe(b,function(){return wr(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.");
754
+ return g.promise.then(h)};return Cs(this,g)};q.ig=function(){yb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
755
+ function Bs(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 Ds(),h=g=null,k=new Mr,m=l=null,A(w,2,3),u(w,d(),5);case 5:return g=w.h,u(w,Es(a,b,g,e),6);case 6:n=w.h;Fs(a);p=!n.presentationTimeline.V()&&!n.presentationTimeline.Hb();if(!p)throw new N(2,9,9005,b);return u(w,Gs(a,n,function(D){m=m||D},e),7);case 7:h=w.h;Fs(a);if(m)throw m;return u(w,Hs(n,e),8);case 8:return u(w,k.init(),9);case 9:return Fs(a),u(w,Or(k),10);case 10:return l=w.h,Fs(a),u(w,Is(a,l.Da,
756
+ h,n,b,c,e,f),11);case 11:r=w.h;Fs(a);if(m)throw m;return u(w,l.Da.addManifests([r]),12);case 12:return v=w.h,Fs(a),y=new es("manifest",l.path.Xa,l.path.Da,v[0]),w["return"](vs(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;}})}
757
+ function Hs(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,D,B,C,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},Vd(a,b.restrictions,c),u(ya,Yd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Jd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(he(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,
758
+ d.push(ie(r));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(je(x));return u(ya,b.offline.trackSelectionCallback(d),3);case 3:w=ya.h;D=a.presentationTimeline.getDuration();B=0;C=t(w);for(E=C.next();!E.done;E=C.next())G=E.value,H=G.bandwidth*D/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=
759
+ 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(Ta){return O.has(Ta.id)});a.textStreams=a.textStreams.filter(function(Ta){return V.has(Ta.id)});a.imageStreams=a.imageStreams.filter(function(Ta){return Z.has(Ta.id)});Js(a);z(ya)}})}
760
+ function Is(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,v,y,x,w,D,B;return I(function(C){switch(C.g){case 1:return k=ts(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)},xr(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&&
761
+ G.initData.length})}),v=p&&!r,y=null,v&&(x=c.g,y=Ks.get(x.keySystem)),ta(C),D=w=Ls(a,h,b,c,d,e,f,g),u(C,Br(h),4);case 4:D.size=C.h;w.expiration=c.tc();B=pg(c);w.sessionIds=g.offline.usePersistentLicense?B:[];if(p&&g.offline.usePersistentLicense&&!B.length)throw new N(2,9,9007);return C["return"](w);case 2:return va(C),u(C,h.destroy(),5);case 5:wa(C,0)}})}q.remove=function(a){return Ms(this,Ns(this,a))};
762
+ function Ns(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:Ds();c=fs(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new Mr;ta(k);return u(k,e.init(),4);case 4:return u(k,Qr(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([Os(a,h,e),Ps(f,d,h)]),2);case 2:return va(k),u(k,e.destroy(),8);case 8:wa(k,0)}})}
763
+ function Qs(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:ud(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:ud(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Os(a,b,c){return I(function(d){return u(d,Rs(a.g,a.h.drm,c,b),0)})}
764
+ function Ps(a,b,c){function d(){}var e=Ss(c);vs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Ig=function(){return Ms(this,Ts(this))};
765
+ function Ts(a){var b,c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return Ds(),b=a.g,c=a.h.drm,d=new Mr,e=!1,ta(n),u(n,d.init(),4);case 4:f=[],Rr(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,qs(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)}})}
766
+ q.list=function(){return Ms(this,Us())};function Us(){var a,b,c;return I(function(d){switch(d.g){case 1:return Ds(),a=[],b=new Mr,ta(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Pr(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=vs(new es("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)}})}
767
+ function Es(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),Fs(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Fs(a),k=Vs(h),u(l,Promise.all(eb(k,
768
+ function(m){return m.createSegmentIndex()})),3);Fs(a);if(e)throw e;return l["return"](h)})}function Gs(a,b,c,d){var e;return I(function(f){switch(f.g){case 1:return e=new Sf({Kb:a.g,onError:c,hd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,Xf(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)}})}
769
+ function Ls(a,b,c,d,e,f,g,h){for(var k=new ws,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;
770
+ n.set(null,Promise.resolve(null));m=new Map;p=Vs(e);l=new Map;p=t(p);for(r=p.next();!r.done;r=p.next())r=r.value,v=Ws(a,b,c,k,e,r,h,n,m),l.set(r.id,v);a=t(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.g)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
771
+ expiration:d.tc(),streams:a,sessionIds:h?pg(d):[],drmInfo:b,appMetadata:g}}
772
+ function Ws(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
773
+ tilesLayout:f.tilesLayout},m=f.id;Xs(f,e.presentationTimeline.jb(),function(n){var p=Ys(a,b,m,f.id,c,d,n.h,g,h),r=Zs(a,b,m,f.id,c,d,n,g,k);Ar(b,m,function(){var v,y;return I(function(x){if(1==x.g)return u(x,p,2);if(3!=x.g)return v=x.h,u(x,r,3);y=x.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,dataKey:y});z(x)})})});return l}
774
+ function Ys(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=wj(g.Ea(),g.ya,g.ra,h.streaming.retryParameters);b=yr(b,c,h,.5*ys(f,d),!0,function(l){var m;return I(function(n){if(1==n.g)return u(n,e.addSegments([{data:l}]),2);m=n.h;a.j.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
775
+ function Zs(a,b,c,d,e,f,g,h,k){var l=[g.Ea()[0],g.ya,g.ra].join("-");if(k.has(l))return k.get(l);h=wj(g.Ea(),g.ya,g.ra,h.streaming.retryParameters);b=yr(b,c,h,xs(f,d,g),!1,function(m){var n;return I(function(p){if(1==p.g)return u(p,e.addSegments([{data:m}]),2);n=p.h;a.j.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Xs(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Fs(a){if(a.m.g)throw new N(2,9,7001);}
776
+ function Ds(){if(!As())throw new N(2,9,9E3);}function Ms(a,b){return I(function(c){if(1==c.g)return a.i.push(b),ta(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);va(c);ec(a.i,b);return wa(c,0)})}function Cs(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){ec(a.i,c)})}
777
+ function Ss(a){var b=[];a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
778
+ function Rs(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Sr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Qs(d,!1),videoCapabilities:Qs(d,!0)}});return u(h,qs(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
779
+ function Vs(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
780
+ function Js(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}K("shaka.offline.Storage",zs);zs.deleteAll=function(){var a;return I(function(b){return 1==b.g?(a=new Mr,ta(b),u(b,Tr(a),2)):5!=b.g?(va(b),u(b,a.destroy(),5)):wa(b,0)})};zs.prototype.list=zs.prototype.list;
781
+ zs.prototype.removeEmeSessions=zs.prototype.Ig;zs.prototype.remove=zs.prototype.remove;zs.prototype.getStoreInProgress=zs.prototype.ig;zs.prototype.store=zs.prototype.store;zs.prototype.getNetworkingEngine=zs.prototype.uc;zs.prototype.getConfiguration=zs.prototype.getConfiguration;zs.prototype.configure=zs.prototype.configure;zs.prototype.destroy=zs.prototype.destroy;zs.support=As;
782
+ var Ks=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
783
+ Cm.offline=As;function $s(){}function at(){for(var a=t(bt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Cf()}catch(c){Pa("Error installing polyfill!",c)}}}function ct(a,b){for(var c={priority:b||0,Cf:a},d=0;d<bt.length;d++)if(bt[d].priority<c.priority){bt.splice(d,0,c);return}bt.push(c)}K("shaka.polyfill",$s);$s.register=ct;$s.installAll=at;var bt=[];function dt(){}function et(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())ft(b.value)}function ft(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)}})}$s.Aria=dt;dt.install=et;ct(et);function gt(){}function ht(){it()}$s.EncryptionScheme=gt;gt.install=ht;ct(ht,-2);function jt(){}
784
+ function kt(){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}}),
785
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",lt);document.addEventListener("webkitfullscreenerror",lt);document.addEventListener("mozfullscreenchange",lt);document.addEventListener("mozfullscreenerror",lt);document.addEventListener("MSFullscreenChange",lt);document.addEventListener("MSFullscreenError",lt)}}
786
+ function lt(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)}$s.Fullscreen=jt;jt.install=kt;ct(kt);function mt(){}function nt(){}$s.MathRound=mt;mt.install=nt;ct(nt);function ot(){}function pt(){if(Wc()||Xc()||Yc()||Tc("PlayStation 5")||Vc()||Uc()||Tc("PC=EOS")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),qt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=rt}
787
+ function rt(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x;return I(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!Oc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Pc(g),!h)||a.audio&&(k=a.audio.contentType,
787
788
  l=Pc(k),!l))return w["return"](b)}else return w["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,w["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(r={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(r));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
788
- n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);A(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;ua(w,4);break;case 3:F(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}Ys.MediaCapabilities=mt;mt.install=nt;var ot=null;mt.originalMcap=ot;at(nt,-1);function qt(){}function rt(){var a=Zc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?st():a?(tt(),12>=a?(ut(),vt()):ut()):(Tc("Tizen 2")||Tc("Tizen 3")||Tc("Tizen 4"))&&wt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&xt()}
789
- function ut(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ea.apply(0,arguments));b.abort=function(){};return b}}function vt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function tt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
790
- function wt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=xd(b)[0]&&a(b)}}function st(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
791
- function xt(){var a=MediaSource.isTypeSupported;Vc()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Ys.MediaSource=qt;qt.install=rt;at(rt);function yt(){}function zt(){screen.orientation||void 0!=window.orientation&&At()}function At(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Bt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new L("change");b.dispatchEvent(c)})}Ys.Orientation=yt;
792
- yt.install=zt;function Bt(){db.call(this);this.type="";this.angle=0}pa(Bt,db);
793
- Bt.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
794
- Bt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};at(zt);function Ct(){}function Dt(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Et,window.MediaKeys=Ft,window.MediaKeySystemAccess=Gt,navigator.requestMediaKeySystemAccess=Ht)}function Ht(a,b){try{var c=new Gt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
795
- function Et(a){var b=this.mediaKeys;b&&b!=a&&It(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?It(a,this):Promise.resolve()}function Jt(a){a=Ec(a.initData);if(Hc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=dd(a.subarray(4),!0);a=gd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Fc(a);this.dispatchEvent(b)}Ys.PatchedMediaKeysApple=Ct;Ct.install=Dt;
796
- function Gt(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
789
+ n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);A(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;ua(w,4);break;case 3:F(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}$s.MediaCapabilities=ot;ot.install=pt;var qt=null;ot.originalMcap=qt;ct(pt,-1);function st(){}function tt(){var a=Zc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?ut():a?(vt(),12>=a?(wt(),xt()):wt()):(Tc("Tizen 2")||Tc("Tizen 3")||Tc("Tizen 4"))&&yt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&zt()}
790
+ function wt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ea.apply(0,arguments));b.abort=function(){};return b}}function xt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function vt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
791
+ function yt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=xd(b)[0]&&a(b)}}function ut(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
792
+ function zt(){var a=MediaSource.isTypeSupported;Vc()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}$s.MediaSource=st;st.install=tt;ct(tt);function At(){}function Bt(){screen.orientation||void 0!=window.orientation&&Ct()}function Ct(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Dt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new M("change");b.dispatchEvent(c)})}$s.Orientation=At;
793
+ At.install=Bt;function Dt(){db.call(this);this.type="";this.angle=0}pa(Dt,db);
794
+ Dt.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
795
+ Dt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};ct(Bt);function Et(){}function Ft(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Gt,window.MediaKeys=Ht,window.MediaKeySystemAccess=It,navigator.requestMediaKeySystemAccess=Jt)}function Jt(a,b){try{var c=new It(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
796
+ function Gt(a){var b=this.mediaKeys;b&&b!=a&&Kt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Kt(a,this):Promise.resolve()}function Lt(a){a=Ec(a.initData);if(Hc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=dd(a.subarray(4),!0);a=gd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Fc(a);this.dispatchEvent(b)}$s.PatchedMediaKeysApple=Et;Et.install=Ft;
797
+ function It(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
797
798
  k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=t(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
798
- Gt.prototype.createMediaKeys=function(){var a=new Ft(this.keySystem);return Promise.resolve(a)};Gt.prototype.getConfiguration=function(){return this.g};function Ft(a){this.h=new WebKitMediaKeys(a);this.g=new mf}Ft.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Kt(this.h,a)};Ft.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
799
- function It(a,b){a.g.ob();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",Jt);try{return wi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Kt(a){db.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new mf;this.sessionId="";this.expiration=NaN;this.closed=new Lc;this.keyStatuses=new Lt}pa(Kt,db);q=Kt.prototype;
800
- q.generateRequest=function(a,b){var c=this;this.g=new Lc;try{var d=this.l.createSession("video/mp4",Ec(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Fc(e.message));e=new L("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.h&&(Mt(c,"usable"),c.h.resolve(),c.h=null)});this.j.o(d,"webkitkeyerror",function(){var e=
801
- Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Mt(c,"output-not-allowed");break;default:Mt(c,"internal-error")}});Mt(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
802
- q.update=function(a){this.h=new Lc;try{this.i.update(Ec(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ob()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Mt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new L("keystatuseschange");a.dispatchEvent(c)}
803
- function Lt(){this.size=0;this.g=void 0}q=Lt.prototype;q.forEach=function(a){this.g&&a(this.g,ig.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ig.value();return this.g&&Cc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};at(Dt);function Nt(){}function Ot(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Pt,window.MediaKeySystemAccess=Qt,navigator.requestMediaKeySystemAccess=Rt,HTMLMediaElement.prototype.setMediaKeys=St)}function Rt(a,b){try{var c=new Qt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
804
- function Tt(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Fc(Dn(a.initData));this.dispatchEvent(b)}}Ys.PatchedMediaKeysMs=Nt;Nt.install=Ot;
805
- function Qt(a,b){this.keySystem=a;for(var c=!1,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
799
+ It.prototype.createMediaKeys=function(){var a=new Ht(this.keySystem);return Promise.resolve(a)};It.prototype.getConfiguration=function(){return this.g};function Ht(a){this.h=new WebKitMediaKeys(a);this.g=new mf}Ht.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Mt(this.h,a)};Ht.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
800
+ function Kt(a,b){a.g.ob();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",Lt);try{return Ti(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Mt(a){db.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new mf;this.sessionId="";this.expiration=NaN;this.closed=new Lc;this.keyStatuses=new Nt}pa(Mt,db);q=Mt.prototype;
801
+ q.generateRequest=function(a,b){var c=this;this.g=new Lc;try{var d=this.l.createSession("video/mp4",Ec(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Fc(e.message));e=new M("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.h&&(Ot(c,"usable"),c.h.resolve(),c.h=null)});this.j.o(d,"webkitkeyerror",function(){var e=
802
+ Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Ot(c,"output-not-allowed");break;default:Ot(c,"internal-error")}});Ot(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
803
+ q.update=function(a){this.h=new Lc;try{this.i.update(Ec(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ob()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Ot(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new M("keystatuseschange");a.dispatchEvent(c)}
804
+ function Nt(){this.size=0;this.g=void 0}q=Nt.prototype;q.forEach=function(a){this.g&&a(this.g,Dg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Dg.value();return this.g&&Cc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};ct(Ft);function Pt(){}function Qt(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Rt,window.MediaKeySystemAccess=St,navigator.requestMediaKeySystemAccess=Tt,HTMLMediaElement.prototype.setMediaKeys=Ut)}function Tt(a,b){try{var c=new St(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
805
+ function Vt(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Fc(Zn(a.initData));this.dispatchEvent(b)}}$s.PatchedMediaKeysMs=Pt;Pt.install=Qt;
806
+ function St(a,b){this.keySystem=a;for(var c=!1,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
806
807
  !0));if(e.videoCapabilities)for(h=t(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
807
- Qt.prototype.createMediaKeys=function(){var a=new Pt(this.keySystem);return Promise.resolve(a)};Qt.prototype.getConfiguration=function(){return this.g};function St(a){var b=this.mediaKeys;b&&b!=a&&Ut(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Ut(a,this):Promise.resolve()}function Pt(a){this.h=new MSMediaKeys(a);this.g=new mf}
808
- Pt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Vt(this.h,a)};Pt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Ut(a,b){a.g.ob();if(!b)return Promise.resolve();a.g.o(b,"msneedkey",Tt);try{return wi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
809
- function Vt(a){db.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new mf;this.sessionId="";this.expiration=NaN;this.closed=new Lc;this.keyStatuses=new Wt}pa(Vt,db);q=Vt.prototype;
810
- q.generateRequest=function(a,b){var c=this;this.g=new Lc;try{this.i=this.l.createSession("video/mp4",Ec(b),null),this.j.o(this.i,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Fc(d.message));d=new L("message",d);c.dispatchEvent(d)}),this.j.o(this.i,"mskeyadded",function(){c.g?(Xt(c,"usable"),c.g.resolve(),c.g=null):c.h&&(Xt(c,"usable"),c.h.resolve(),c.h=null)}),this.j.o(this.i,"mskeyerror",
811
- function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Xt(c,"output-not-allowed");break;default:Xt(c,"internal-error")}}),Xt(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
812
- q.update=function(a){this.h=new Lc;try{this.i.update(Ec(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ob()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Xt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new L("keystatuseschange");a.dispatchEvent(c)}
813
- function Wt(){this.size=0;this.g=void 0}q=Wt.prototype;q.forEach=function(a){this.g&&a(this.g,ig.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ig.value();return this.g&&Cc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};at(Ot);function Yt(){}function Zt(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=$t,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=au,window.MediaKeys=bu,window.MediaKeySystemAccess=cu)}function $t(){return Promise.reject(Error("The key system specified is not supported."))}
814
- function au(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Ys.PatchedMediaKeysNop=Yt;Yt.install=Zt;function bu(){throw new TypeError("Illegal constructor.");}bu.prototype.createSession=function(){};bu.prototype.setServerCertificate=function(){};function cu(){this.keySystem="";throw new TypeError("Illegal constructor.");}cu.prototype.getConfiguration=function(){};cu.prototype.createMediaKeys=function(){};at(Zt,-10);function du(){}function eu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)fu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=gu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=hu;window.MediaKeys=iu;window.MediaKeySystemAccess=ju}}
815
- function ku(a){var b=fu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function gu(a,b){try{var c=new ju(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function hu(a){var b=this.mediaKeys;b&&b!=a&&lu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&lu(a,this);return Promise.resolve()}Ys.PatchedMediaKeysWebkit=du;du.install=eu;
816
- function ju(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
808
+ St.prototype.createMediaKeys=function(){var a=new Rt(this.keySystem);return Promise.resolve(a)};St.prototype.getConfiguration=function(){return this.g};function Ut(a){var b=this.mediaKeys;b&&b!=a&&Wt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Wt(a,this):Promise.resolve()}function Rt(a){this.h=new MSMediaKeys(a);this.g=new mf}
809
+ Rt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Xt(this.h,a)};Rt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Wt(a,b){a.g.ob();if(!b)return Promise.resolve();a.g.o(b,"msneedkey",Vt);try{return Ti(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
810
+ function Xt(a){db.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new mf;this.sessionId="";this.expiration=NaN;this.closed=new Lc;this.keyStatuses=new Yt}pa(Xt,db);q=Xt.prototype;
811
+ q.generateRequest=function(a,b){var c=this;this.g=new Lc;try{this.i=this.l.createSession("video/mp4",Ec(b),null),this.j.o(this.i,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Fc(d.message));d=new M("message",d);c.dispatchEvent(d)}),this.j.o(this.i,"mskeyadded",function(){c.g?(Zt(c,"usable"),c.g.resolve(),c.g=null):c.h&&(Zt(c,"usable"),c.h.resolve(),c.h=null)}),this.j.o(this.i,"mskeyerror",
812
+ function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Zt(c,"output-not-allowed");break;default:Zt(c,"internal-error")}}),Zt(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
813
+ q.update=function(a){this.h=new Lc;try{this.i.update(Ec(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ob()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Zt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new M("keystatuseschange");a.dispatchEvent(c)}
814
+ function Yt(){this.size=0;this.g=void 0}q=Yt.prototype;q.forEach=function(a){this.g&&a(this.g,Dg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Dg.value();return this.g&&Cc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};ct(Qt);function $t(){}function au(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=bu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=cu,window.MediaKeys=du,window.MediaKeySystemAccess=eu)}function bu(){return Promise.reject(Error("The key system specified is not supported."))}
815
+ function cu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}$s.PatchedMediaKeysNop=$t;$t.install=au;function du(){throw new TypeError("Illegal constructor.");}du.prototype.createSession=function(){};du.prototype.setServerCertificate=function(){};function eu(){this.keySystem="";throw new TypeError("Illegal constructor.");}eu.prototype.getConfiguration=function(){};eu.prototype.createMediaKeys=function(){};ct(au,-10);function fu(){}function gu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)hu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=iu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=ju;window.MediaKeys=ku;window.MediaKeySystemAccess=lu}}
816
+ function mu(a){var b=hu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function iu(a,b){try{var c=new lu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ju(a){var b=this.mediaKeys;b&&b!=a&&nu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&nu(a,this);return Promise.resolve()}$s.PatchedMediaKeysWebkit=fu;fu.install=gu;
817
+ function lu(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
817
818
  m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=t(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
818
- d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}ju.prototype.createMediaKeys=function(){var a=new iu(this.g);return Promise.resolve(a)};ju.prototype.getConfiguration=function(){return this.h};function iu(a){this.l=a;this.h=null;this.g=new mf;this.i=[];this.j=new Map}
819
- function lu(a,b){a.h=b;a.g.ob();var c=fu;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Fc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=mu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new L("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=mu(a,d.sessionId))nu(d,"usable"),
820
- d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=mu(a,d.sessionId);e&&e.handleError(d)}))}iu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new ou(b,this.l,a);this.i.push(a);return a};iu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
821
- function mu(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function ou(a,b,c){db.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Lc;this.keyStatuses=new pu}pa(ou,db);q=ou.prototype;
822
- q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?nu(this,"output-restricted"):1==b?nu(this,"expired"):nu(this,"internal-error"))};
823
- function qu(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ec(gd("LOAD_SESSION|"+c));else{var e=gd("PERSISTENT|");d=od(e,b)}else d=Ec(b)}catch(g){return Promise.reject(g)}a.h=new Lc;var f=ku("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new P(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).P(.01)}return a.h}
824
- function ru(a,b,c){if(a.g)a.g.then(function(){return ru(a,b,c)})["catch"](function(){return ru(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=cd(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=ld(e.keys[0].k);e=ld(e.keys[0].kid)}else d=Ec(c),e=null;var f=ku("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
825
- function nu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new L("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return qu(this,b,null)};q.load=function(a){return"persistent-license"==this.l?qu(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Lc;ru(this,b,a);return b};
826
- q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=ku("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function pu(){this.size=0;this.g=void 0}q=pu.prototype;q.forEach=function(a){this.g&&a(this.g,ig.value())};q.get=function(a){if(this.has(a))return this.g};
827
- q.has=function(a){var b=ig.value();return this.g&&Cc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var fu="";at(eu);function su(){}function tu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=uu,Object.defineProperty(a,"disablePictureInPicture",{get:vu,set:wu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=xu,document.addEventListener("webkitpresentationmodechanged",yu,!0))}}
828
- function yu(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
829
- function uu(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function xu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
830
- function vu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function wu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Ys.PiPWebkit=su;su.install=tu;at(tu);function zu(){}function Au(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Bu)}function Bu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Ys.StorageEstimate=zu;zu.install=Au;at(Au);function Cu(){}function Du(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Ys.VideoPlayPromise=Cu;Cu.install=Du;at(Du);function Eu(){}function Fu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Tc("Web0S")&&Tc("Chrome/38.0.2125.122 Safari/537.36"))&&(a.getVideoPlaybackQuality=Gu)}}function Gu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ys.VideoPlaybackQuality=Eu;Eu.install=Fu;at(Fu);function Hu(){}function Iu(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Ju;else if(6==b)a=Ku;else{try{var c=!!Ju(1,2,"")}catch(d){c=!1}c&&(a=Ju)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Ju(a,b,c){return new window.TextTrackCue(a,b,c)}function Ku(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Ys.VTTCue=Hu;Hu.install=Iu;at(Iu);function Lu(){}Lu.prototype.parseInit=function(){};Lu.prototype.parseMedia=function(a,b){var c=null,d=[],e=cd(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Mu.exec(f))){var g=Nu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new hc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};J("shaka.text.LrcTextParser",Lu);Lu.prototype.parseMedia=Lu.prototype.parseMedia;
831
- Lu.prototype.parseInit=Lu.prototype.parseInit;var Mu=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Nu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Cd["application/x-subtitle-lrc"]=function(){return new Lu};function Ou(){}Ou.prototype.parseInit=function(){};
832
- Ou.prototype.parseMedia=function(a,b){var c=cd(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(D){throw new M(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new M(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new M(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=Kn(g,Pu,"frameRate"),k=Kn(g,Pu,"subFrameRate"),l=Kn(g,Pu,"frameRateMultiplier"),
833
- m=Kn(g,Pu,"tickRate"),n=Kn(g,Pu,"cellResolution");c=g.getAttribute("xml:space")||"default";e=Kn(g,Qu,"extent");if("default"!=c&&"preserve"!=c)throw new M(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Ru(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?In(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=t(g),r=p.next();!r.done;r=
834
- p.next()){var v=r.value;r=new jc;var y=v.getAttribute("xml:id");if(y){r.id=y;var x=null;e&&(x=Su.exec(e)||Tu.exec(e));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,C;if(w=Uu(v,l,"extent"))w=(C=Su.exec(w))||Tu.exec(w),null!=w&&(r.width=Number(w[1]),r.height=Number(w[2]),C||(null!=y&&(r.width=100*r.width/y),null!=x&&(r.height=100*r.height/x)),r.widthUnits=C||null!=y?zc:0,r.heightUnits=C||null!=x?zc:0);if(v=Uu(v,l,"origin"))w=(C=Su.exec(v))||Tu.exec(v),null!=w&&(r.viewportAnchorX=Number(w[1]),r.viewportAnchorY=
835
- Number(w[2]),C||(null!=x&&(r.viewportAnchorY=100*r.viewportAnchorY/x),null!=y&&(r.viewportAnchorX=100*r.viewportAnchorX/y)),r.viewportAnchorUnits=C||null!=y?zc:0)}else r=null;r&&m.push(r)}if(Fn(f,"p").length)throw new M(2,2,2001,"<p> can only be inside <div> in TTML");e=t(Fn(f,"div"));for(p=e.next();!p.done;p=e.next())if(Fn(p.value,"span").length)throw new M(2,2,2001,"<span> can only be inside <p> in TTML");(f=Vu(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
836
- function Vu(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var r=null,v=t(Wu),y=v.next();!y.done&&!(r=Xu(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||r)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
837
- a=[];if(!y)for(var x=t(p.childNodes),w=x.next();!w.done;w=x.next())(w=Vu(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;x=/\S/.test(p.textContent);var C=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(C||x||"br"==p.tagName||0!=a.length||d&&!h))return null;w=Yu(p,c);x=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=Zu(n,c,x,w),x=w.start,w=w.end,n=n.parentNode;null==x&&(x=0);x+=b;w=null==w?Infinity:w+b;if(!C&&0<a.length)for(x=Infinity,w=0,b=t(a),
838
- c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new hc(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hc(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Xu(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var D=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==D})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
839
- (g=Xu(l,"region",f,"")[0]);$u(b,p,g,r,e,v,0==a.length);return b}
840
- function $u(a,b,c,d,e,f,g){f=f||g;"rtl"==av(b,c,e,"direction",f)&&(a.direction="rtl");g=av(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=ic);(g=av(b,c,e,"textAlign",!0))?(a.positionAlign=bv[g],a.lineAlign=cv[g],a.textAlign=tc[g.toUpperCase()]):a.textAlign=lc;if(g=av(b,c,e,"displayAlign",!0))a.displayAlign=uc[g.toUpperCase()];if(g=av(b,c,e,"color",f))a.color=g;if(g=av(b,c,e,"backgroundColor",
841
- f))a.backgroundColor=g;if(g=av(b,c,e,"border",f))a.border=g;if(g=av(b,c,e,"fontFamily",f))a.fontFamily=g;(g=av(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=av(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=av(b,c,e,"lineHeight",f))&&g.match(dv)&&(a.lineHeight=g);(g=av(b,c,e,"fontSize",f))&&(g.match(dv)||g.match(ev))&&(a.fontSize=g);if(g=av(b,c,e,"fontStyle",f))a.fontStyle=yc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
842
- d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=av(b,c,e,"letterSpacing",f))&&d.match(dv)&&(a.letterSpacing=d);(d=av(b,c,e,"linePadding",f))&&d.match(dv)&&(a.linePadding=d);if(f=av(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Uu(c,e,"textDecoration"))&&fv(a,c);(b=gv(b,e,"textDecoration"))&&fv(a,b)}
843
- function fv(a,b){for(var c=t(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&ec(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&ec(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
844
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&ec(a.textDecoration,"overline")}}function av(a,b,c,d,e){e=void 0===e?!0:e;return(a=gv(a,c,d))?a:e?Uu(b,c,d):null}function Uu(a,b,c){if(!a)return null;var d=Kn(a,Qu,c);return d?d:hv(a,b,c)}function gv(a,b,c){var d=Kn(a,Qu,c);return d?d:hv(a,b,c)}
845
- function hv(a,b,c){a=Xu(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Jn(a[e],"urn:ebu:tt:style",c);f||(f=Kn(a[e],Qu,c));f||(f=gv(a[e],b,c));f&&(d=f)}return d}
846
- function Xu(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Jn(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Zu(a,b,c,d){a=Yu(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
847
- function Yu(a,b){var c=iv(a.getAttribute("begin"),b),d=iv(a.getAttribute("end"),b),e=iv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
848
- function iv(a,b){var c=null;if(jv.test(a)){c=jv.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(kv.test(a))c=lv(kv,a);else if(mv.test(a))c=lv(mv,a);else if(nv.test(a))c=nv.exec(a),c=Number(c[1])/b.frameRate;else if(ov.test(a))c=ov.exec(a),c=Number(c[1])/b.g;else if(pv.test(a))c=lv(pv,a);else if(a)throw new M(2,2,2001,"Could not parse cue time range in TTML");return c}
849
- function lv(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}J("shaka.text.TtmlTextParser",Ou);Ou.prototype.parseMedia=Ou.prototype.parseMedia;Ou.prototype.parseInit=Ou.prototype.parseInit;function Ru(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
850
- var Su=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,ev=/^(\d{1,2}(?:\.\d+)?|100)%$/,dv=/^(\d+px|\d+em|\d*\.?\d+c)$/,Tu=/^(\d+)px (\d+)px$/,jv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,kv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,mv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,nv=/^(\d*(?:\.\d*)?)f$/,ov=/^(\d*(?:\.\d*)?)t$/,pv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),cv={left:oc,center:"center",right:"end",start:oc,
851
- end:"end"},bv={left:"line-left",center:"center",right:"line-right"},Pu=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Qu=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Wu=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Cd["application/ttml+xml"]=function(){return new Ou};function qv(){this.g=new Ou}qv.prototype.parseInit=function(a){var b=!1;(new sg).box("moov",wg).box("trak",wg).box("mdia",wg).box("minf",wg).box("stbl",wg).U("stsd",yg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new M(2,2,2007);};qv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new sg).box("mdat",zg(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new M(2,2,2007);return e};J("shaka.text.Mp4TtmlParser",qv);qv.prototype.parseMedia=qv.prototype.parseMedia;
852
- qv.prototype.parseInit=qv.prototype.parseInit;Cd['application/mp4; codecs="stpp"']=function(){return new qv};Cd['application/mp4; codecs="stpp.ttml"']=function(){return new qv};Cd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new qv};Cd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new qv};function rv(){}rv.prototype.parseInit=function(){};
853
- rv.prototype.parseMedia=function(a,b){var c=cd(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 M(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=sv(new dq(e[1]));if(null==c)throw new M(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=
854
- [];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 dq(g);var h=new jc;gq(g);eq(g);for(var k=gq(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))?
855
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");eq(g);k=gq(g)}f.push(h)}e=new Map;tv(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=
819
+ d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}lu.prototype.createMediaKeys=function(){var a=new ku(this.g);return Promise.resolve(a)};lu.prototype.getConfiguration=function(){return this.h};function ku(a){this.l=a;this.h=null;this.g=new mf;this.i=[];this.j=new Map}
820
+ function nu(a,b){a.h=b;a.g.ob();var c=hu;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Fc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=ou(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new M("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=ou(a,d.sessionId))pu(d,"usable"),
821
+ d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=ou(a,d.sessionId);e&&e.handleError(d)}))}ku.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new qu(b,this.l,a);this.i.push(a);return a};ku.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
822
+ function ou(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function qu(a,b,c){db.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Lc;this.keyStatuses=new ru}pa(qu,db);q=qu.prototype;
823
+ q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?pu(this,"output-restricted"):1==b?pu(this,"expired"):pu(this,"internal-error"))};
824
+ function su(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ec(gd("LOAD_SESSION|"+c));else{var e=gd("PERSISTENT|");d=od(e,b)}else d=Ec(b)}catch(g){return Promise.reject(g)}a.h=new Lc;var f=mu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new P(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).P(.01)}return a.h}
825
+ function tu(a,b,c){if(a.g)a.g.then(function(){return tu(a,b,c)})["catch"](function(){return tu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=cd(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=ld(e.keys[0].k);e=ld(e.keys[0].kid)}else d=Ec(c),e=null;var f=mu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
826
+ function pu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new M("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return su(this,b,null)};q.load=function(a){return"persistent-license"==this.l?su(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Lc;tu(this,b,a);return b};
827
+ q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=mu("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function ru(){this.size=0;this.g=void 0}q=ru.prototype;q.forEach=function(a){this.g&&a(this.g,Dg.value())};q.get=function(a){if(this.has(a))return this.g};
828
+ q.has=function(a){var b=Dg.value();return this.g&&Cc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var hu="";ct(gu);function uu(){}function vu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=wu,Object.defineProperty(a,"disablePictureInPicture",{get:xu,set:yu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=zu,document.addEventListener("webkitpresentationmodechanged",Au,!0))}}
829
+ function Au(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
830
+ function wu(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function zu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
831
+ function xu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function yu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}$s.PiPWebkit=uu;uu.install=vu;ct(vu);function Bu(){}function Cu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Du)}function Du(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}$s.StorageEstimate=Bu;Bu.install=Cu;ct(Cu);function Eu(){}function Fu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}$s.VideoPlayPromise=Eu;Eu.install=Fu;ct(Fu);function Gu(){}function Hu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Tc("Web0S")&&Tc("Chrome/38.0.2125.122 Safari/537.36"))&&(a.getVideoPlaybackQuality=Iu)}}function Iu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}$s.VideoPlaybackQuality=Gu;Gu.install=Hu;ct(Hu);function Ju(){}function Ku(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Lu;else if(6==b)a=Mu;else{try{var c=!!Lu(1,2,"")}catch(d){c=!1}c&&(a=Lu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Lu(a,b,c){return new window.TextTrackCue(a,b,c)}function Mu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}$s.VTTCue=Ju;Ju.install=Ku;ct(Ku);function Nu(){}Nu.prototype.parseInit=function(){};Nu.prototype.parseMedia=function(a,b){var c=null,d=[],e=cd(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Ou.exec(f))){var g=Pu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new hc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};K("shaka.text.LrcTextParser",Nu);Nu.prototype.parseMedia=Nu.prototype.parseMedia;
832
+ Nu.prototype.parseInit=Nu.prototype.parseInit;var Ou=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Pu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Cd["application/x-subtitle-lrc"]=function(){return new Nu};function Qu(){}Qu.prototype.parseInit=function(){};
833
+ Qu.prototype.parseMedia=function(a,b){var c=cd(a),d=[];if(""==c)return d;var e=Pf(c,"tt");if(!e)throw new N(2,2,2005,"Failed to parse TTML.");c=e.getElementsByTagName("body")[0];if(!c)return[];var f=Df(e,Ru,"frameRate"),g=Df(e,Ru,"subFrameRate"),h=Df(e,Ru,"frameRateMultiplier"),k=Df(e,Ru,"tickRate"),l=Df(e,Ru,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=Df(e,Su,"extent");if("default"!=m&&"preserve"!=m)throw new N(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Tu(f,g,
834
+ h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Bf(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=t(e),r=p.next();!r.done;r=p.next()){var v=r.value;r=new jc;var y=v.getAttribute("xml:id");if(y){r.id=y;var x=null;n&&(x=Uu.exec(n)||Vu.exec(n));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,D;if(w=Wu(v,h,"extent"))w=(D=Uu.exec(w))||Vu.exec(w),
835
+ null!=w&&(r.width=Number(w[1]),r.height=Number(w[2]),D||(null!=y&&(r.width=100*r.width/y),null!=x&&(r.height=100*r.height/x)),r.widthUnits=D||null!=y?zc:0,r.heightUnits=D||null!=x?zc:0);if(v=Wu(v,h,"origin"))w=(D=Uu.exec(v))||Vu.exec(v),null!=w&&(r.viewportAnchorX=Number(w[1]),r.viewportAnchorY=Number(w[2]),D||(null!=x&&(r.viewportAnchorY=100*r.viewportAnchorY/x),null!=y&&(r.viewportAnchorX=100*r.viewportAnchorX/y)),r.viewportAnchorUnits=D||null!=y?zc:0)}else r=null;r&&k.push(r)}if(yf(c,"p").length)throw new N(2,
836
+ 2,2001,"<p> can only be inside <div> in TTML");n=t(yf(c,"div"));for(p=n.next();!p.done;p=n.next())if(yf(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");if(c=Xu(c,b.periodStart,f,g,h,e,k,m,l,null,!1))c.backgroundColor||(c.backgroundColor="transparent"),d.push(c);return d};
837
+ function Xu(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var r=null,v=t(Yu),y=v.next();!y.done&&!(r=Zu(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||r)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(C){return C.nodeType==Node.TEXT_NODE});
838
+ a=[];if(!y)for(var x=t(p.childNodes),w=x.next();!w.done;w=x.next())(w=Xu(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;x=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||x||"br"==p.tagName||0!=a.length||d&&!h))return null;w=$u(p,c);x=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=av(n,c,x,w),x=w.start,w=w.end,n=n.parentNode;null==x&&(x=0);x+=b;w=null==w?Infinity:w+b;if(!D&&0<a.length)for(x=Infinity,w=0,b=t(a),
839
+ c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new hc(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hc(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Zu(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var B=k.getAttribute("xml:id");b.region=g.filter(function(C){return C.id==B})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
840
+ (g=Zu(l,"region",f,"")[0]);bv(b,p,g,r,e,v,0==a.length);return b}
841
+ function bv(a,b,c,d,e,f,g){f=f||g;"rtl"==cv(b,c,e,"direction",f)&&(a.direction="rtl");g=cv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=ic);(g=cv(b,c,e,"textAlign",!0))?(a.positionAlign=dv[g],a.lineAlign=ev[g],a.textAlign=tc[g.toUpperCase()]):a.textAlign=lc;if(g=cv(b,c,e,"displayAlign",!0))a.displayAlign=uc[g.toUpperCase()];if(g=cv(b,c,e,"color",f))a.color=g;if(g=cv(b,c,e,"backgroundColor",
842
+ f))a.backgroundColor=g;if(g=cv(b,c,e,"border",f))a.border=g;if(g=cv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=cv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=cv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=cv(b,c,e,"lineHeight",f))&&g.match(fv)&&(a.lineHeight=g);(g=cv(b,c,e,"fontSize",f))&&(g.match(fv)||g.match(gv))&&(a.fontSize=g);if(g=cv(b,c,e,"fontStyle",f))a.fontStyle=yc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
843
+ d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=cv(b,c,e,"letterSpacing",f))&&d.match(fv)&&(a.letterSpacing=d);(d=cv(b,c,e,"linePadding",f))&&d.match(fv)&&(a.linePadding=d);if(f=cv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Wu(c,e,"textDecoration"))&&hv(a,c);(b=iv(b,e,"textDecoration"))&&hv(a,b)}
844
+ function hv(a,b){for(var c=t(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&ec(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&ec(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
845
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&ec(a.textDecoration,"overline")}}function cv(a,b,c,d,e){e=void 0===e?!0:e;return(a=iv(a,c,d))?a:e?Wu(b,c,d):null}function Wu(a,b,c){if(!a)return null;var d=Df(a,Su,c);return d?d:jv(a,b,c)}function iv(a,b,c){var d=Df(a,Su,c);return d?d:jv(a,b,c)}
846
+ function jv(a,b,c){a=Zu(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Cf(a[e],"urn:ebu:tt:style",c);f||(f=Df(a[e],Su,c));f||(f=iv(a[e],b,c));f&&(d=f)}return d}
847
+ function Zu(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Cf(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function av(a,b,c,d){a=$u(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
848
+ function $u(a,b){var c=kv(a.getAttribute("begin"),b),d=kv(a.getAttribute("end"),b),e=kv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
849
+ function kv(a,b){var c=null;if(lv.test(a)){c=lv.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(mv.test(a))c=nv(mv,a);else if(ov.test(a))c=nv(ov,a);else if(pv.test(a))c=pv.exec(a),c=Number(c[1])/b.frameRate;else if(qv.test(a))c=qv.exec(a),c=Number(c[1])/b.g;else if(rv.test(a))c=nv(rv,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
850
+ function nv(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}K("shaka.text.TtmlTextParser",Qu);Qu.prototype.parseMedia=Qu.prototype.parseMedia;Qu.prototype.parseInit=Qu.prototype.parseInit;function Tu(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
851
+ var Uu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,gv=/^(\d{1,2}(?:\.\d+)?|100)%$/,fv=/^(\d+px|\d+em|\d*\.?\d+c)$/,Vu=/^(\d+)px (\d+)px$/,lv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,mv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,ov=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,pv=/^(\d*(?:\.\d*)?)f$/,qv=/^(\d*(?:\.\d*)?)t$/,rv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),ev={left:oc,center:"center",right:"end",start:oc,
852
+ end:"end"},dv={left:"line-left",center:"center",right:"line-right"},Ru=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Su=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Yu=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Cd["application/ttml+xml"]=function(){return new Qu};function sv(){this.g=new Qu}sv.prototype.parseInit=function(a){var b=!1;(new Ng).box("moov",Rg).box("trak",Rg).box("mdia",Rg).box("minf",Rg).box("stbl",Rg).U("stsd",Tg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};sv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Ng).box("mdat",Ug(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};K("shaka.text.Mp4TtmlParser",sv);sv.prototype.parseMedia=sv.prototype.parseMedia;
853
+ sv.prototype.parseInit=sv.prototype.parseInit;Cd['application/mp4; codecs="stpp"']=function(){return new sv};Cd['application/mp4; codecs="stpp.ttml"']=function(){return new sv};Cd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new sv};Cd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new sv};function tv(){}tv.prototype.parseInit=function(){};
854
+ tv.prototype.parseMedia=function(a,b){var c=cd(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=uv(new fq(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=
855
+ [];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 fq(g);var h=new jc;iq(g);gq(g);for(var k=iq(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))?
856
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");gq(g);k=iq(g)}f.push(h)}e=new Map;vv(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=
856
857
  /^\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=
857
- !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 dq(h[0]);m=sv(k);r=fq(k,/[ \t]+--\x3e[ \t]+/g);n=sv(k);if(null==m||null==r||null==n)throw new M(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=
858
- ""):h=new hc(m,n,"");uv(p,h,e);eq(k);for(m=gq(k);m;)vv(h,m,f),eq(k),m=gq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function tv(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)}
859
- function uv(a,b,c){0===c.size&&tv(c);a=wv(a);var d=Wn("<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())xv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
860
- function wv(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 yv(a,b){return a&&0<a.length?a:b}
861
- function xv(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=yv(h.backgroundColor,e.backgroundColor),e.color=yv(h.color,e.color),e.fontFamily=yv(h.fontFamily,e.fontFamily),e.fontSize=yv(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=
862
- "italic";break;case "u":e.textDecoration.push("underline")}}if(Mn(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())xv(a.value,e,c,d)}
863
- function vv(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"==
864
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=zv(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 zv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
865
- function sv(a){a=fq(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)}J("shaka.text.VttTextParser",rv);rv.prototype.parseMedia=rv.prototype.parseMedia;rv.prototype.parseInit=rv.prototype.parseInit;Cd["text/vtt"]=function(){return new rv};Cd['text/vtt; codecs="vtt"']=function(){return new rv};Cd['text/vtt; codecs="wvtt"']=function(){return new rv};function Av(){this.g=null}Av.prototype.parseInit=function(a){var b=this,c=!1;(new sg).box("moov",wg).box("trak",wg).box("mdia",wg).U("mdhd",function(d){d=Jh(d.reader,d.version);b.g=d.timescale}).box("minf",wg).box("stbl",wg).U("stsd",yg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new M(2,2,2008);if(!c)throw new M(2,2,2008);};
866
- Av.prototype.parseMedia=function(a,b){if(!this.g)throw new M(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new sg).box("moof",wg).box("traf",wg).U("tfdt",function(B){g=!0;c=Ih(B.reader,B.version).Jd}).U("tfhd",function(B){l=Hh(B.reader,B.flags).Me}).U("trun",function(B){h=!0;d=Kh(B.reader,B.version,B.flags).hf}).box("mdat",zg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new M(2,2,2008);for(var m=c,n=new pg(e,0),p=t(d),r=p.next();!r.done;r=p.next()){r=r.value;var v=r.ge||l,y=r.nd?
867
- c+r.nd:m;m=y+(v||0);var x=0;do{var w=n.O();x+=w;var C=n.O(),D=null;"vttc"==Ag(C)?8<w&&(D=n.ub(w-8)):n.skip(w-8);v&&D&&(w=Bv(D,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(r.sampleSize&&x<r.sampleSize)}return f.filter(Eb)};function Bv(a,b,c){var d,e,f;(new sg).box("payl",zg(function(g){d=cd(g)})).box("iden",zg(function(g){e=cd(g)})).box("sttg",zg(function(g){f=cd(g)})).parse(a);return d?Cv(d,e,f,b,c):null}
868
- function Cv(a,b,c,d,e){d=new hc(d,e,"");uv(a,d,new Map);b&&(d.id=b);if(c)for(a=new dq(c),b=gq(a);b;)vv(d,b,[]),eq(a),b=gq(a);return d}J("shaka.text.Mp4VttParser",Av);Av.prototype.parseMedia=Av.prototype.parseMedia;Av.prototype.parseInit=Av.prototype.parseInit;Cd['application/mp4; codecs="wvtt"']=function(){return new Av};function Dv(){}Dv.prototype.parseInit=function(){};Dv.prototype.parseMedia=function(a){var b=cd(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 dq(c[0]),e=Ev(d),f=fq(d,/,/g);d=Ev(d);if(null==e||null==f||null==d)throw new M(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};
869
- function Ev(a){a=fq(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)}J("shaka.text.SbvTextParser",Dv);Dv.prototype.parseMedia=Dv.prototype.parseMedia;Dv.prototype.parseInit=Dv.prototype.parseInit;Cd["text/x-subviewer"]=function(){return new Dv};function Fv(){this.g=new rv}Fv.prototype.parseInit=function(){};Fv.prototype.parseMedia=function(a,b){var c=cd(a);c=Gv(c);c=Ec(gd(c));return this.g.parseMedia(c,b)};function Gv(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}J("shaka.text.SrtTextParser",Fv);Fv.srt2webvtt=Gv;Fv.prototype.parseMedia=Fv.prototype.parseMedia;
870
- Fv.prototype.parseInit=Fv.prototype.parseInit;Cd["text/srt"]=function(){return new Fv};function Hv(){}Hv.prototype.parseInit=function(){};
871
- Hv.prototype.parseMedia=function(a){var b="",c="";a=cd(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Iv.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=Jv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Kv);else if("Style"==e){e=f.split(Kv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
872
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Gd:e.Gd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Jv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Kv);else if("Dialogue"==f){g=g.split(Kv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Lv(f.Start);var k=Lv(f.End);g=new hc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Gd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Gd}}(e)))&&Mv(g,f);d.push(g)}return d};
873
- function Mv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Nv(c))a.color=c;if(c=b.BackColour)if(c=Nv(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=pc;a.textAlign="start";break;case 2:a.displayAlign=pc;a.textAlign=lc;break;case 3:a.displayAlign=pc;a.textAlign="end";
858
+ !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 fq(h[0]);m=uv(k);r=hq(k,/[ \t]+--\x3e[ \t]+/g);n=uv(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=
859
+ ""):h=new hc(m,n,"");wv(p,h,e);gq(k);for(m=iq(k);m;)xv(h,m,f),gq(k),m=iq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function vv(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)}
860
+ function wv(a,b,c){0===c.size&&vv(c);a=yv(a);var d=Pf("<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())zv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
861
+ function yv(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 Av(a,b){return a&&0<a.length?a:b}
862
+ function zv(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=Av(h.backgroundColor,e.backgroundColor),e.color=Av(h.color,e.color),e.fontFamily=Av(h.fontFamily,e.fontFamily),e.fontSize=Av(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=
863
+ "italic";break;case "u":e.textDecoration.push("underline")}}if(Ff(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())zv(a.value,e,c,d)}
864
+ function xv(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"==
865
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Bv(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 Bv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
866
+ function uv(a){a=hq(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",tv);tv.prototype.parseMedia=tv.prototype.parseMedia;tv.prototype.parseInit=tv.prototype.parseInit;Cd["text/vtt"]=function(){return new tv};Cd['text/vtt; codecs="vtt"']=function(){return new tv};Cd['text/vtt; codecs="wvtt"']=function(){return new tv};function Cv(){this.g=null}Cv.prototype.parseInit=function(a){var b=this,c=!1;(new Ng).box("moov",Rg).box("trak",Rg).box("mdia",Rg).U("mdhd",function(d){d=di(d.reader,d.version);b.g=d.timescale}).box("minf",Rg).box("stbl",Rg).U("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);};
867
+ Cv.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).U("tfdt",function(C){g=!0;c=ci(C.reader,C.version).Jd}).U("tfhd",function(C){l=bi(C.reader,C.flags).Me}).U("trun",function(C){h=!0;d=ei(C.reader,C.version,C.flags).hf}).box("mdat",Ug(function(C){k=!0;e=C})).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.ge||l,y=r.nd?
868
+ c+r.nd:m;m=y+(v||0);var x=0;do{var w=n.O();x+=w;var D=n.O(),B=null;"vttc"==Vg(D)?8<w&&(B=n.ub(w-8)):n.skip(w-8);v&&B&&(w=Dv(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 Dv(a,b,c){var d,e,f;(new Ng).box("payl",Ug(function(g){d=cd(g)})).box("iden",Ug(function(g){e=cd(g)})).box("sttg",Ug(function(g){f=cd(g)})).parse(a);return d?Ev(d,e,f,b,c):null}
869
+ function Ev(a,b,c,d,e){d=new hc(d,e,"");wv(a,d,new Map);b&&(d.id=b);if(c)for(a=new fq(c),b=iq(a);b;)xv(d,b,[]),gq(a),b=iq(a);return d}K("shaka.text.Mp4VttParser",Cv);Cv.prototype.parseMedia=Cv.prototype.parseMedia;Cv.prototype.parseInit=Cv.prototype.parseInit;Cd['application/mp4; codecs="wvtt"']=function(){return new Cv};function Fv(){}Fv.prototype.parseInit=function(){};Fv.prototype.parseMedia=function(a){var b=cd(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 fq(c[0]),e=Gv(d),f=hq(d,/,/g);d=Gv(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};
870
+ function Gv(a){a=hq(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",Fv);Fv.prototype.parseMedia=Fv.prototype.parseMedia;Fv.prototype.parseInit=Fv.prototype.parseInit;Cd["text/x-subviewer"]=function(){return new Fv};function Hv(){this.g=new tv}Hv.prototype.parseInit=function(){};Hv.prototype.parseMedia=function(a,b){var c=cd(a);c=Iv(c);c=Ec(gd(c));return this.g.parseMedia(c,b)};function Iv(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",Hv);Hv.srt2webvtt=Iv;Hv.prototype.parseMedia=Hv.prototype.parseMedia;
871
+ Hv.prototype.parseInit=Hv.prototype.parseInit;Cd["text/srt"]=function(){return new Hv};function Jv(){}Jv.prototype.parseInit=function(){};
872
+ Jv.prototype.parseMedia=function(a){var b="",c="";a=cd(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Kv.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=Lv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Mv);else if("Style"==e){e=f.split(Mv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
873
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Gd:e.Gd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Lv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Mv);else if("Dialogue"==f){g=g.split(Mv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Nv(f.Start);var k=Nv(f.End);g=new hc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Gd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Gd}}(e)))&&Ov(g,f);d.push(g)}return d};
874
+ function Ov(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Pv(c))a.color=c;if(c=b.BackColour)if(c=Pv(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=pc;a.textAlign="start";break;case 2:a.displayAlign=pc;a.textAlign=lc;break;case 3:a.displayAlign=pc;a.textAlign="end";
874
875
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=lc;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=lc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
875
- function Nv(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function Lv(a){a=Ov.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}J("shaka.text.SsaTextParser",Hv);Hv.prototype.parseMedia=Hv.prototype.parseMedia;Hv.prototype.parseInit=Hv.prototype.parseInit;var Iv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Jv=/^\s*([^:]+):\s*(.*)/,Kv=/\s*,\s*/,Ov=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
876
- Cd["text/x-ssa"]=function(){return new Hv};/*
876
+ function Pv(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function Nv(a){a=Qv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}K("shaka.text.SsaTextParser",Jv);Jv.prototype.parseMedia=Jv.prototype.parseMedia;Jv.prototype.parseInit=Jv.prototype.parseInit;var Kv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Lv=/^\s*([^:]+):\s*(.*)/,Mv=/\s*,\s*/,Qv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
877
+ Cd["text/x-ssa"]=function(){return new Jv};/*
877
878
  @license
878
879
  EME Encryption Scheme Polyfill
879
880
  Copyright 2019 Google LLC
880
881
  SPDX-License-Identifier: Apache-2.0
881
882
  */
882
- function Pv(){}var Qv;function Rv(){Qv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Qv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Sv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
883
- function Sv(a,b){var c=this,d;return H(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Qv.call(c,a,b),2);d=e.h;if(Tv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Qv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Uv;return e["return"](Uv.call(c,
883
+ function Rv(){}var Sv;function Tv(){Sv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Sv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Uv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
884
+ function Uv(a,b){var c=this,d;return I(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Sv.call(c,a,b),2);d=e.h;if(Vv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Sv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Wv;return e["return"](Wv.call(c,
884
885
  a,b))})}
885
- function Uv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return H(function(r){if(1==r.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Vv(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Wv(h.videoCapabilities,d),l=Wv(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
886
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(r,Qv.call(c,a,e),2)}p=r.h;return r["return"](new Xv(p,d))})}function Wv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}J("EmeEncryptionSchemePolyfill",Pv);Pv.install=Rv;function Yv(){}var Zv;
887
- function $v(){Zv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Zv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=aw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
888
- function aw(a){var b=this,c,d,e;return H(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,Zv.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&Tv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Zv,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
889
- navigator.mediaCapabilities.decodingInfo=bw;if(d){f.C(3);break}e=c;return u(f,cw(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](bw.call(b,a))}})}
890
- function bw(a){var b=this,c,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Vv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,Zv.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
891
- new Xv(k.keySystemAccess,c);m.C(3);break}if(!a.keySystemConfiguration){m.C(3);break}l=k;return u(m,cw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
892
- function cw(a){var b,c;return H(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
893
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}J("McEncryptionSchemePolyfill",Yv);Yv.install=$v;function Xv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
894
- Xv.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Xv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
895
- function Vv(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Tv(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
896
- function dw(){}function gt(){Rv();$v()}J("EncryptionSchemePolyfills",dw);dw.install=gt;"undefined"!==typeof module&&module.exports&&(module.exports=dw);/*
886
+ function Wv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return I(function(r){if(1==r.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Xv(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Yv(h.videoCapabilities,d),l=Yv(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
887
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(r,Sv.call(c,a,e),2)}p=r.h;return r["return"](new Zv(p,d))})}function Yv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}K("EmeEncryptionSchemePolyfill",Rv);Rv.install=Tv;function $v(){}var aw;
888
+ function bw(){aw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(aw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=cw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
889
+ function cw(a){var b=this,c,d,e;return I(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,aw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&Vv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=aw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
890
+ navigator.mediaCapabilities.decodingInfo=dw;if(d){f.C(3);break}e=c;return u(f,ew(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](dw.call(b,a))}})}
891
+ function dw(a){var b=this,c,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Xv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,aw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
892
+ new Zv(k.keySystemAccess,c);m.C(3);break}if(!a.keySystemConfiguration){m.C(3);break}l=k;return u(m,ew(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
893
+ function ew(a){var b,c;return I(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
894
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}K("McEncryptionSchemePolyfill",$v);$v.install=bw;function Zv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
895
+ Zv.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Zv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
896
+ function Xv(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Vv(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
897
+ function fw(){}function it(){Tv();bw()}K("EncryptionSchemePolyfills",fw);fw.install=it;"undefined"!==typeof module&&module.exports&&(module.exports=fw);/*
897
898
  @license
898
899
  Copyright 2013 Ali Al Dallal
899
900
 
@@ -917,7 +918,7 @@ function dw(){}function gt(){Rv();$v()}J("EncryptionSchemePolyfills",dw);dw.inst
917
918
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
918
919
  SOFTWARE.
919
920
  */
920
- for(var ew={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
921
+ for(var gw={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
921
922
  "ar-SA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",u:"Arabic (Saudi Arabia)"},"ay-BO":{s:"Aymar aru",u:"Aymara"},az:{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"az-AZ":{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"be-BY":{s:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",u:"Belarusian"},bg:{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",u:"Bulgarian"},"bg-BG":{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
922
923
  u:"Bulgarian"},bn:{s:"\u09ac\u09be\u0982\u09b2\u09be",u:"Bengali"},"bn-IN":{s:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",u:"Bengali (India)"},"bn-BD":{s:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",u:"Bengali (Bangladesh)"},"bs-BA":{s:"Bosanski",u:"Bosnian"},ca:{s:"Catal\u00e0",u:"Catalan"},"ca-ES":{s:"Catal\u00e0",u:"Catalan"},cak:{s:"Maya Kaqchikel",u:"Kaqchikel"},"ck-US":{s:"\u13e3\u13b3\u13a9 (tsalagi)",u:"Cherokee"},cs:{s:"\u010ce\u0161tina",
923
924
  u:"Czech"},"cs-CZ":{s:"\u010ce\u0161tina",u:"Czech"},cy:{s:"Cymraeg",u:"Welsh"},"cy-GB":{s:"Cymraeg",u:"Welsh"},da:{s:"Dansk",u:"Danish"},"da-DK":{s:"Dansk",u:"Danish"},de:{s:"Deutsch",u:"German"},"de-AT":{s:"Deutsch (\u00d6sterreich)",u:"German (Austria)"},"de-DE":{s:"Deutsch (Deutschland)",u:"German (Germany)"},"de-CH":{s:"Deutsch (Schweiz)",u:"German (Switzerland)"},dsb:{s:"Dolnoserb\u0161\u0107ina",u:"Lower Sorbian"},el:{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",u:"Greek"},"el-GR":{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
@@ -938,49 +939,49 @@ u:"Slovak"},"sk-SK":{s:"Sloven\u010dina (Slovakia)",u:"Slovak (Slovakia)"},sl:{s
938
939
  sw:{s:"Kiswahili",u:"Swahili"},"sw-KE":{s:"Kiswahili",u:"Swahili (Kenya)"},ta:{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},"ta-IN":{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},te:{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},"te-IN":{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},tg:{s:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",u:"Tajik"},"tg-TJ":{s:"\u0442\u043e\u04b7\u0438\u043a\u04e3",u:"Tajik"},th:{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
939
940
  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",
940
941
  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",
941
- 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"}},fw=t(Object.keys(ew)),gw=fw.next();!gw.done;gw=
942
- fw.next()){var hw=gw.value;ew[hw.toLowerCase()]=ew[hw]};function iw(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new mf;this.localization=this.controls.Ba;this.player=this.controls.Vb();this.video=this.controls.tb();this.adManager=this.player.Vc();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})}
943
- iw.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};J("shaka.ui.Element",iw);iw.prototype.release=iw.prototype.release;function jw(a){return kw(a,"shaka-back-to-overflow-button")}function kw(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function lw(a){a&&(a=kw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function mw(){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"))}
944
- function nw(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 ow(a,b){iw.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=nw(e-d,!1)+" / "+nw(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=
945
- ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.za();c.g.ia(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.za(),this.g.ia(.5))}pa(ow,iw);ow.prototype.release=function(){this.g.stop();this.g=null;iw.prototype.release.call(this)};J("shaka.ui.AdCounter",ow);function pw(a,b){iw.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&&qw(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&qw(c)});this.eventManager.o(this.adManager,"ad-started",function(){qw(c)});this.eventManager.o(this.adManager,
946
- "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&qw(this)}pa(pw,iw);function qw(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}J("shaka.ui.AdPosition",pw);function rw(a,b){iw.call(this,a,b);var c=this;this.button=Qj();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
947
- c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad?sw(c.controls):tw(c.controls)});this.ad&&(this.g(),this.h())}pa(rw,iw);rw.prototype.isPaused=function(){if(this.ad)var a=this.ad.isPaused();else a=this.controls,a=a.v.paused&&!a.Y;return a};rw.prototype.g=function(){};rw.prototype.h=function(){};J("shaka.ui.PlayButton",rw);function uw(a,b){rw.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa(uw,rw);uw.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};uw.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};J("shaka.ui.BigPlayButton",uw);function vw(a,b,c,d){iw.call(this,a,b);var e=this;this.container=R("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ha(c));this.g=!1;this.bar=document.createElement("input");this.l=new P(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ha(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
948
- this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Hb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Hb()&&(e.g=!0,ww(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(ww(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,ww(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
949
- "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}pa(vw,iw);q=vw.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);iw.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.P(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
950
- q.setValue=function(a){this.g||(this.bar.value=a)};function ww(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}J("shaka.ui.RangeElement",vw);vw.prototype.setValue=vw.prototype.setValue;vw.prototype.getValue=vw.prototype.getValue;vw.prototype.changeTo=vw.prototype.changeTo;vw.prototype.onChangeEnd=vw.prototype.onChangeEnd;vw.prototype.onChange=vw.prototype.onChange;
951
- vw.prototype.onChangeStart=vw.prototype.onChangeStart;vw.prototype.setRange=vw.prototype.setRange;function xw(a,b){vw.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(){yw(c)});this.A=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return zw(c)});this.eventManager.o(this.localization,
952
- "locale-changed",function(){return zw(c)});this.eventManager.o(this.adManager,"ad-started",function(){X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Aw(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Bw(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Bw(c)});this.setValue(this.video.currentTime);this.update();zw(this);this.ad&&X(this.container,!1)}pa(xw,vw);q=xw.prototype;
953
- q.release=function(){this.h&&(this.h.stop(),this.h=null,this.v.stop(),this.v=null);vw.prototype.release.call(this)};q.onChangeStart=function(){this.A=!this.video.paused;this.controls.re(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.P(.125))};q.onChangeEnd=function(){this.h.za();this.controls.re(!1);this.A&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
954
- 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.Ja(),g=f.end-f.start;this.setRange(f.start,f.end);Aw(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?
942
+ 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"}},hw=t(Object.keys(gw)),iw=hw.next();!iw.done;iw=
943
+ hw.next()){var jw=iw.value;gw[jw.toLowerCase()]=gw[jw]};function kw(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new mf;this.localization=this.controls.Ba;this.player=this.controls.Vb();this.video=this.controls.tb();this.adManager=this.player.Vc();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})}
944
+ kw.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",kw);kw.prototype.release=kw.prototype.release;function lw(a){return mw(a,"shaka-back-to-overflow-button")}function mw(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function nw(a){a&&(a=mw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function ow(){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"))}
945
+ function pw(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 qw(a,b){kw.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=pw(e-d,!1)+" / "+pw(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=
946
+ ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.za();c.g.ia(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.za(),this.g.ia(.5))}pa(qw,kw);qw.prototype.release=function(){this.g.stop();this.g=null;kw.prototype.release.call(this)};K("shaka.ui.AdCounter",qw);function rw(a,b){kw.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&&sw(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&sw(c)});this.eventManager.o(this.adManager,"ad-started",function(){sw(c)});this.eventManager.o(this.adManager,
947
+ "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&sw(this)}pa(rw,kw);function sw(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}K("shaka.ui.AdPosition",rw);function tw(a,b){kw.call(this,a,b);var c=this;this.button=lk();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
948
+ c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad?uw(c.controls):vw(c.controls)});this.ad&&(this.g(),this.h())}pa(tw,kw);tw.prototype.isPaused=function(){if(this.ad)var a=this.ad.isPaused();else a=this.controls,a=a.v.paused&&!a.Y;return a};tw.prototype.g=function(){};tw.prototype.h=function(){};K("shaka.ui.PlayButton",tw);function ww(a,b){tw.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa(ww,tw);ww.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};ww.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};K("shaka.ui.BigPlayButton",ww);function xw(a,b,c,d){kw.call(this,a,b);var e=this;this.container=R("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ha(c));this.g=!1;this.bar=document.createElement("input");this.l=new P(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ha(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
949
+ this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Ib()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Ib()&&(e.g=!0,yw(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(yw(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,yw(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
950
+ "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}pa(xw,kw);q=xw.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);kw.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.P(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
951
+ q.setValue=function(a){this.g||(this.bar.value=a)};function yw(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",xw);xw.prototype.setValue=xw.prototype.setValue;xw.prototype.getValue=xw.prototype.getValue;xw.prototype.changeTo=xw.prototype.changeTo;xw.prototype.onChangeEnd=xw.prototype.onChangeEnd;xw.prototype.onChange=xw.prototype.onChange;
952
+ xw.prototype.onChangeStart=xw.prototype.onChangeStart;xw.prototype.setRange=xw.prototype.setRange;function zw(a,b){xw.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(){Aw(c)});this.A=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Bw(c)});this.eventManager.o(this.localization,
953
+ "locale-changed",function(){return Bw(c)});this.eventManager.o(this.adManager,"ad-started",function(){X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Cw(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Dw(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Dw(c)});this.setValue(this.video.currentTime);this.update();Bw(this);this.ad&&X(this.container,!1)}pa(zw,xw);q=zw.prototype;
954
+ q.release=function(){this.h&&(this.h.stop(),this.h=null,this.v.stop(),this.v=null);xw.prototype.release.call(this)};q.onChangeStart=function(){this.A=!this.video.paused;this.controls.re(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.P(.125))};q.onChangeEnd=function(){this.h.za();this.controls.re(!1);this.A&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
955
+ 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.Ja(),g=f.end-f.start;this.setRange(f.start,f.end);Cw(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?
955
956
  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)};
956
- function yw(a){if(a.i.length){for(var b=a.player.Ja(),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 "+
957
- 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 Bw(a){yw(a);var b=a.player.Ja();b=b.end-b.start;a.player.V()&&5<b&&a.v.ia(1)}function Aw(a){var b=a.player.Ja();b=b.end-b.start;return a.player.V()&&5>b?!1:null==a.ad}function zw(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}J("shaka.ui.SeekBar",xw);function Cw(){}Cw.prototype.create=function(a,b){return new xw(a,b)};
958
- xw.Factory=Cw;function Y(a,b,c,d){db.call(this);var e=this;this.R=!0;this.j=d;this.A=new Wm(c,a,this.j.castReceiverAppId);this.eb=!0;this.v=this.A.tb();this.B=c;this.D=this.A.Vb();this.va=a;this.i=b;this.cb=this.D.Vc();this.l=this.m=null;this.Y=!1;this.F=[];this.xb=[];this.ab=!1;this.Z=new P(function(){e.i.style.cursor="none";e.ab=!1;Dw(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.Na=new P(function(){e.Hb()&&
959
- Ew(e)});this.H=null;this.M=[];this.Ba=Fw();this.h=new mf;this.configure(this.j);Gw(this);this.qa=new Set;Hw(this);this.Na.ia(.125);this.h.o(this.Ba,"locale-changed",function(f){e.cb.setLocale(f.locales[0])})}pa(Y,db);q=Y.prototype;
960
- q.destroy=function(){var a=this;return H(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.Na&&(a.Na.stop(),a.Na=null);Iw(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=
961
- null;case 6:a.D=null,a.B=null,a.v=null,a.Ba=null,a.qa.clear(),db.prototype.release.call(a),z(b)}})};function Iw(a){for(var b=t(a.M),c=b.next();!c.done;c=b.next())c.value.release();a.M=[]}function Jw(a,b){Kw.set(a,b)}q.Bf=function(a){this.eb=a;Hw(this)};q.vg=function(){Dw(this)};
962
- q.configure=function(a){this.j=a;this.A.Je(a.castReceiverAppId);this.l&&(this.l=null);this.gb&&(this.gb=null);this.g?(Rj(this.g),Iw(this)):(Lw(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");Mw(this);this.j.addBigPlayButton&&Nw(this);this.$||Ow(this);this.fb=R("div");this.fb.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.fb);
963
- Pw(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"))));Qw(this);this.xb=Array.from(this.i.getElementsByClassName("shaka-show-controls-on-mouse-over"));Dw(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)}};
964
- q.me=function(a){(this.R=a)?(this.i.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.i.removeAttribute("shaka-controls");Dw(this)};q.mf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.me(!1)};q.getAd=function(){return this.m};q.Nf=function(){return this.A};q.Zf=function(){return this.Ba};q.og=function(){return this.i};q.tb=function(){return this.v};q.Yf=function(){return this.B};q.Vb=function(){return this.D};q.Xf=function(){return this.va};q.Sf=function(){return this.g};
957
+ function Aw(a){if(a.i.length){for(var b=a.player.Ja(),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 "+
958
+ 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 Dw(a){Aw(a);var b=a.player.Ja();b=b.end-b.start;a.player.V()&&5<b&&a.v.ia(1)}function Cw(a){var b=a.player.Ja();b=b.end-b.start;return a.player.V()&&5>b?!1:null==a.ad}function Bw(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}K("shaka.ui.SeekBar",zw);function Ew(){}Ew.prototype.create=function(a,b){return new zw(a,b)};
959
+ zw.Factory=Ew;function Y(a,b,c,d){db.call(this);var e=this;this.R=!0;this.j=d;this.A=new sn(c,a,this.j.castReceiverAppId);this.eb=!0;this.v=this.A.tb();this.B=c;this.D=this.A.Vb();this.va=a;this.i=b;this.cb=this.D.Vc();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;Fw(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.Na=new P(function(){e.Ib()&&
960
+ Gw(e)});this.H=null;this.M=[];this.Ba=Hw();this.h=new mf;this.configure(this.j);Iw(this);this.qa=new Set;Jw(this);this.Na.ia(.125);this.h.o(this.Ba,"locale-changed",function(f){e.cb.setLocale(f.locales[0])})}pa(Y,db);q=Y.prototype;
961
+ 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.Na&&(a.Na.stop(),a.Na=null);Kw(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=
962
+ null;case 6:a.D=null,a.B=null,a.v=null,a.Ba=null,a.qa.clear(),db.prototype.release.call(a),z(b)}})};function Kw(a){for(var b=t(a.M),c=b.next();!c.done;c=b.next())c.value.release();a.M=[]}function Lw(a,b){Mw.set(a,b)}q.Bf=function(a){this.eb=a;Jw(this)};q.vg=function(){Fw(this)};
963
+ q.configure=function(a){this.j=a;this.A.Je(a.castReceiverAppId);this.l&&(this.l=null);this.gb&&(this.gb=null);this.g?(mk(this.g),Kw(this)):(Nw(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");Ow(this);this.j.addBigPlayButton&&Pw(this);this.$||Qw(this);this.fb=R("div");this.fb.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.fb);
964
+ Rw(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"))));Sw(this);this.yb=Array.from(this.i.getElementsByClassName("shaka-show-controls-on-mouse-over"));Fw(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)}};
965
+ q.me=function(a){(this.R=a)?(this.i.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.i.removeAttribute("shaka-controls");Fw(this)};q.mf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.me(!1)};q.getAd=function(){return this.m};q.Nf=function(){return this.A};q.Zf=function(){return this.Ba};q.og=function(){return this.i};q.tb=function(){return this.v};q.Yf=function(){return this.B};q.Vb=function(){return this.D};q.Xf=function(){return this.va};q.Sf=function(){return this.g};
965
966
  q.hg=function(){return this.fb};q.Pf=function(){return this.W};q.Qf=function(){return this.j};q.ug=function(){return this.Y};q.re=function(a){this.Y=a};q.rg=function(){return this.eb};q.Re=function(){return this.l?this.l.getValue():this.v.currentTime};q.nf=function(a){this.H=a};q.Oc=function(){return this.F.some(function(a){return!a.classList.contains("shaka-hidden")})};q.zc=function(){this.G.za()};
966
- q.xe=function(){var a=this,b;return H(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,
967
- 9,4);break;case 10:F(c,4);case 9:ua(c,0);break;case 4:b=F(c),a.dispatchEvent(new L("error",(new Map).set("detail",b))),c.C(0)}})};q.qf=function(){X(this.I,!0);X(this.W,!0);this.g.setAttribute("ad-active","true")};q.Ue=function(){X(this.I,!1);X(this.W,!1);this.g.removeAttribute("ad-active")};function tw(a){a.R&&a.v.duration&&(a.D.Ge(),a.v.paused&&!a.Y?a.v.play():a.v.pause())}function sw(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
968
- function Lw(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.Hb()?a.H=Date.now():(Rw(a,b),b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){a.R&&(a.Oc()?a.G.za():a.m?sw(a):tw(a))});a.h.o(a.g,"dblclick",function(){a.j.doubleClickForFullscreen&&document.fullscreenEnabled&&a.xe()})}
969
- function Nw(a){var b=R("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.gb=new uw(b,a);a.M.push(a.gb)}function Mw(a){var b=R("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Sw(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 pw(a.I,a);a.M.push(b);b=new ow(a.I,a);a.M.push(b)}
970
- function Ow(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",
967
+ q.xe=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,
968
+ 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.qf=function(){X(this.I,!0);X(this.W,!0);this.g.setAttribute("ad-active","true")};q.Ue=function(){X(this.I,!1);X(this.W,!1);this.g.removeAttribute("ad-active")};function vw(a){a.R&&a.v.duration&&(a.D.Ge(),a.v.paused&&!a.Y?a.v.play():a.v.pause())}function uw(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
969
+ function Nw(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():(Tw(a,b),b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){a.R&&(a.Oc()?a.G.za():a.m?uw(a):vw(a))});a.h.o(a.g,"dblclick",function(){a.j.doubleClickForFullscreen&&document.fullscreenEnabled&&a.xe()})}
970
+ function Pw(a){var b=R("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.gb=new ww(b,a);a.M.push(a.gb)}function Ow(a){var b=R("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Uw(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 rw(a.I,a);a.M.push(b);b=new qw(a.I,a);a.M.push(b)}
971
+ function Qw(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",
971
972
  "none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
972
- function Pw(a){a.J=R("div");a.J.classList.add("shaka-bottom-controls");a.J.classList.add("shaka-no-propagation");a.g.appendChild(a.J);a.h.o(a.J,"click",function(){a.zc()});Sw(a);a.Aa=R("div");a.Aa.classList.add("shaka-controls-button-panel");a.Aa.classList.add("shaka-show-controls-on-mouse-over");a.J.appendChild(a.Aa);for(var b={},c=t(a.j.controlPanelElements),d=c.next();!d.done;b={ic:b.ic},d=c.next())d=d.value,Kw.get(d)?(d=Kw.get(d).create(a.Aa,a),"function"!=typeof d.release&&(yb("shaka.extern.IUIElement",
973
- "Please update UI elements to have a release() method."),b.ic=d,b.ic.release=function(e){return function(){e.ic.destroy&&e.ic.destroy()}}(b)),a.M.push(d)):Pa("Unrecognized control panel element requested:",d)}function Qw(a){if(a.j.addSeekBar)a.l=Tw.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")}}
974
- function Gw(a){a.h.o(a.D,"buffering",function(){a.R&&X(a.$,a.D.Bc())});a.R&&X(a.$,a.D.Bc());a.h.o(window,"keydown",function(b){Uw(a,b)});a.h.o(window,"click",function(){return a.zc()});a.h.o(a.v,"play",function(){Dw(a)});a.h.o(a.v,"pause",function(){Dw(a)});a.h.o(a.i,"mousemove",function(b){Rw(a,b)});a.h.o(a.i,"touchmove",function(b){Rw(a,b)},{passive:!0});a.h.o(a.i,"touchend",function(b){Rw(a,b)},{passive:!0});a.h.o(a.i,"mouseleave",function(){a.H||a.Z.za()});a.h.o(a.A,"caststatuschanged",function(){Hw(a)});
975
- 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)&&Rw(a,b);if(a.j.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.l&&!d&&(b.preventDefault(),Vw(a,a.l.getValue()-5));break;case "ArrowRight":a.l&&!d&&(b.preventDefault(),Vw(a,a.l.getValue()+5));break;case "Home":a.l&&Vw(a,a.D.Ja().start);break;case "End":a.l&&Vw(a,a.D.Ja().end);break;case " ":e&&
976
- (a.m?sw(a):tw(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.qf()});a.h.o(a.cb,"ad-stopped",function(){a.m=null;a.Ue()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return H(function(b){return u(b,Ww(a),0)})});a.h.o(document,"fullscreenchange",function(){a.m&&a.m.resize(a.B.offsetWidth,a.B.offsetHeight)})}
977
- function Ww(a){return H(function(b){return a.v&&0!=a.v.readyState&&!a.A.na()&&a.j.enableFullscreenOnRotation?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"]()})}
978
- function Rw(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Dw(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.Hb()||(Ew(a),Dw(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.H||a.Z.P(3))}function Xw(a){return window.matchMedia("hover: hover").matches?a.xb.some(function(b){return b.matches(":hover")}):!1}
979
- function Dw(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||Xw(a)?(Ew(a),a.g.setAttribute("shown","true"),a.aa.stop()):a.aa.P(a.j.fadeDelay)}function Hw(a){var b=a.A.na();a.dispatchEvent(new L("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Hb=function(){return this.R?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};
980
- function Vw(a,b){a.l.changeTo(b);a.Hb()&&Ew(a)}function Ew(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 L("timeandseekrangeupdated"))}
981
- function Uw(a,b){a.qa.add(b.key);var c=a.Oc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Dw(a),a.h.o(window,"mousedown",function(){a.h.ec(window,"mousedown")}));"Escape"==b.key&&a.G.za();c&&a.qa.has("Tab")&&Yw(a,b)}
982
- function Yw(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())}}}
983
- function Fw(){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..."],
973
+ function Rw(a){a.J=R("div");a.J.classList.add("shaka-bottom-controls");a.J.classList.add("shaka-no-propagation");a.g.appendChild(a.J);a.h.o(a.J,"click",function(){a.zc()});Uw(a);a.Aa=R("div");a.Aa.classList.add("shaka-controls-button-panel");a.Aa.classList.add("shaka-show-controls-on-mouse-over");a.J.appendChild(a.Aa);for(var b={},c=t(a.j.controlPanelElements),d=c.next();!d.done;b={ic:b.ic},d=c.next())d=d.value,Mw.get(d)?(d=Mw.get(d).create(a.Aa,a),"function"!=typeof d.release&&(yb("shaka.extern.IUIElement",
974
+ "Please update UI elements to have a release() method."),b.ic=d,b.ic.release=function(e){return function(){e.ic.destroy&&e.ic.destroy()}}(b)),a.M.push(d)):Pa("Unrecognized control panel element requested:",d)}function Sw(a){if(a.j.addSeekBar)a.l=Vw.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")}}
975
+ function Iw(a){a.h.o(a.D,"buffering",function(){a.R&&X(a.$,a.D.Bc())});a.R&&X(a.$,a.D.Bc());a.h.o(window,"keydown",function(b){Ww(a,b)});a.h.o(window,"click",function(){return a.zc()});a.h.o(a.v,"play",function(){Fw(a)});a.h.o(a.v,"pause",function(){Fw(a)});a.h.o(a.i,"mousemove",function(b){Tw(a,b)});a.h.o(a.i,"touchmove",function(b){Tw(a,b)},{passive:!0});a.h.o(a.i,"touchend",function(b){Tw(a,b)},{passive:!0});a.h.o(a.i,"mouseleave",function(){a.H||a.Z.za()});a.h.o(a.A,"caststatuschanged",function(){Jw(a)});
976
+ 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)&&Tw(a,b);if(a.j.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.l&&!d&&(b.preventDefault(),Xw(a,a.l.getValue()-5));break;case "ArrowRight":a.l&&!d&&(b.preventDefault(),Xw(a,a.l.getValue()+5));break;case "Home":a.l&&Xw(a,a.D.Ja().start);break;case "End":a.l&&Xw(a,a.D.Ja().end);break;case " ":e&&
977
+ (a.m?uw(a):vw(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.qf()});a.h.o(a.cb,"ad-stopped",function(){a.m=null;a.Ue()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return I(function(b){return u(b,Yw(a),0)})});a.h.o(document,"fullscreenchange",function(){a.m&&a.m.resize(a.B.offsetWidth,a.B.offsetHeight)})}
978
+ function Yw(a){return I(function(b){return a.v&&0!=a.v.readyState&&!a.A.na()&&a.j.enableFullscreenOnRotation?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"]()})}
979
+ function Tw(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Fw(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()||(Gw(a),Fw(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.H||a.Z.P(3))}function Zw(a){return window.matchMedia("hover: hover").matches?a.yb.some(function(b){return b.matches(":hover")}):!1}
980
+ function Fw(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||Zw(a)?(Gw(a),a.g.setAttribute("shown","true"),a.aa.stop()):a.aa.P(a.j.fadeDelay)}function Jw(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};
981
+ function Xw(a,b){a.l.changeTo(b);a.Ib()&&Gw(a)}function Gw(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"))}
982
+ function Ww(a,b){a.qa.add(b.key);var c=a.Oc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Fw(a),a.h.o(window,"mousedown",function(){a.h.ec(window,"mousedown")}));"Escape"==b.key&&a.G.za();c&&a.qa.has("Tab")&&$w(a,b)}
983
+ function $w(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())}}}
984
+ function Hw(){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..."],
984
985
  ["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"],
985
986
  ["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"],
986
987
  ["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],
@@ -1038,67 +1039,67 @@ new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD
1038
1039
  "\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",
1039
1040
  "\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",
1040
1041
  "\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"],
1041
- ["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.Ie(navigator.languages||[]);return a}J("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Hb;Y.prototype.hideAdUI=Y.prototype.Ue;Y.prototype.showAdUI=Y.prototype.qf;
1042
+ ["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.Ie(navigator.languages||[]);return a}K("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Ib;Y.prototype.hideAdUI=Y.prototype.Ue;Y.prototype.showAdUI=Y.prototype.qf;
1042
1043
  Y.prototype.toggleFullScreen=Y.prototype.xe;Y.prototype.hideSettingsMenus=Y.prototype.zc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Oc;Y.prototype.setLastTouchEventTime=Y.prototype.nf;Y.prototype.getDisplayTime=Y.prototype.Re;Y.prototype.isCastAllowed=Y.prototype.rg;Y.prototype.setSeeking=Y.prototype.re;Y.prototype.isSeeking=Y.prototype.ug;Y.prototype.getConfig=Y.prototype.Qf;Y.prototype.getClientSideAdContainer=Y.prototype.Pf;Y.prototype.getServerSideAdContainer=Y.prototype.hg;
1043
1044
  Y.prototype.getControlsContainer=Y.prototype.Sf;Y.prototype.getLocalPlayer=Y.prototype.Xf;Y.prototype.getPlayer=Y.prototype.Vb;Y.prototype.getLocalVideo=Y.prototype.Yf;Y.prototype.getVideo=Y.prototype.tb;Y.prototype.getVideoContainer=Y.prototype.og;Y.prototype.getLocalization=Y.prototype.Zf;Y.prototype.getCastProxy=Y.prototype.Nf;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.mf;Y.prototype.setEnabledShakaControls=Y.prototype.me;Y.prototype.configure=Y.prototype.configure;
1044
- Y.prototype.loadComplete=Y.prototype.vg;Y.prototype.allowCast=Y.prototype.Bf;Y.registerSeekBar=function(a){Tw=a};Y.registerElement=Jw;Y.prototype.destroy=Y.prototype.destroy;var Kw=new Map,Tw=new Cw;function Zw(a,b){iw.call(this,a,b);var c=this;this.l=this.controls.j;this.j=this.controls.g;this.i=[];this.h=Qj();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");
1045
- this.j.appendChild(this.g);$w(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.zc();X(c.g,!0);c.g.childNodes.length&&c.g.childNodes[0].focus();Dw(c.controls)});this.eventManager.o(this.localization,"locale-updated",function(){ax(c)});this.eventManager.o(this.localization,"locale-changed",function(){ax(c)});this.eventManager.o(this.adManager,"ad-started",function(){X(c.h,
1046
- !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.nf(Date.now());f.stopPropagation()});this.eventManager.o(this.h,"click",function(){bx(c)});ax(this);this.ad&&X(this.h,!1)}pa(Zw,iw);Zw.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=[];iw.prototype.release.call(this)};
1047
- function cx(a,b){dx.set(a,b)}function $w(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,dx.get(c)?(c=dx.get(c),a.i.push(c.create(a.g,a.controls))):Pa("Unrecognized overflow menu element requested:",c)}function bx(a){if(a.controls.Oc())a.controls.zc();else{X(a.g,!0);Dw(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};gb(a.g.childNodes,b)&&hb(a.g.childNodes,b)[0].focus()}}
1048
- function ax(a){a.h.ariaLabel=a.localization.resolve("MORE_SETTINGS")}J("shaka.ui.OverflowMenu",Zw);Zw.registerElement=cx;function ex(){}ex.prototype.create=function(a,b){return new Zw(a,b)};Jw("overflow_menu",new ex);var dx=new Map;function fx(a,b){iw.call(this,a,b);var c=this;this.g=Qj();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");
1049
- d.appendChild(this.i);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(){c.controls.tb().webkitShowPlaybackTargetPicker()});d=this.controls.tb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=c.player.Se()==xl;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,
1050
- "webkitcurrentplaybacktargetiswirelesschanged",function(){hx(c)})}pa(fx,iw);function hx(a){var b=a.controls.tb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function gx(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}J("shaka.ui.AirPlayButton",fx);function ix(){}ix.prototype.create=function(a,b){return new fx(a,b)};cx("airplay",new ix);Jw("airplay",new ix);function jx(a,b,c){this.i=a;this.h=kx(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Md()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.ve(b);b.ui=this;c.ui=this}q=jx.prototype;q.destroy=function(){var a=this;return H(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.Md=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Xc()&&1<navigator.maxTouchPoints};
1051
- q.getConfiguration=function(){var a=kx(this);bk(a,this.h,kx(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ck(a,b));bk(this.h,a,kx(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new L("uiupdated"))};q.Rf=function(){return this.g};q.Sg=function(a){this.g.me(a)};
1052
- function kx(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)",
1053
- level:"rgb(255, 255, 255)"},trackLabelFormat:lx,fadeDelay:0,doubleClickForFullscreen:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Md()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1054
- function mx(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return H(function(r){switch(r.g){case 1:Zs();if(!Hk())return nx("shaka-ui-load-failed",ox),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),px(f,e));r.C(2);break}h=t(a);k=h.next();
1055
- 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,px(l,m),9);case 9:ua(r,5);break;case 7:return F(r),nx("shaka-ui-load-failed",qx),r["return"]();case 5:k=h.next();r.C(4);break;case 2:nx("shaka-ui-loaded"),z(r)}})}
1056
- function nx(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1057
- function px(a,b){var c,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:c=new S(b);d=new jx(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.mf(!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"));
1058
- k=h.next();case 2:if(k.done){m.C(0);break}l=k.value;A(m,5);return u(m,d.g.Vb().load(l.getAttribute("src")),7);case 7:m.C(0);break;case 5:F(m);case 3:k=h.next(),m.C(2)}})}J("shaka.ui.Overlay",jx);jx.prototype.setEnabled=jx.prototype.Sg;jx.prototype.getControls=jx.prototype.Rf;jx.prototype.configure=jx.prototype.configure;jx.prototype.getConfiguration=jx.prototype.getConfiguration;jx.prototype.isMobile=jx.prototype.Md;jx.prototype.destroy=jx.prototype.destroy;var lx=0;
1059
- jx.TrackLabelFormat={LANGUAGE:lx,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var ox=0,qx=1;jx.FailReasonCode={NO_BROWSER_SUPPORT:ox,PLAYER_FAILED_TO_LOAD:qx};"complete"==document.readyState?H(function(a){if(1==a.g)return u(a,Promise.resolve(),2);mx();z(a)}):window.addEventListener("load",mx);function rx(a,b,c,d,e,f,g){function h(D,B){return D+": "+B}function k(D){return"variant"==D.type?D.audioRoles?D.audioRoles.join(", "):void 0:D.roles.join(", ")}var l=a.find(function(D){return 1==D.active}),m=jw(b);Rj(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={Sa:n.Sa},p=a.next()){n.Sa=p.value;p=n.Sa.language;var r=
1060
- n.Sa.forced,v=f.resolve($b.wf),y=k(n.Sa),x=h(p,y);if(!m.has(x)){m.add(x);var w=Qj();w.addEventListener("click",function(D){return function(){c(D.Sa)}}(n));var C=R("span");w.appendChild(C);C.textContent=sx(p,f);switch(g){case lx:r&&(C.textContent+=" ("+v+")");break;case 1:y?C.textContent=y:(Pa("Track #"+n.Sa.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+")");
1061
- break;case 3:n.Sa.label?C.textContent=n.Sa.label:(Pa("Track #"+n.Sa.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&x==l&&(w.appendChild(mw()),C.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=C.textContent);b.appendChild(w)}}}
1062
- function sx(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Tb(a);return a in ew?ew[a].s:c in ew?ew[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function tx(a,b,c){iw.call(this,a,b);var d=this;ux(this,c);vx(this);this.eventManager.o(this.button,"click",function(){d.controls.dispatchEvent(new L("submenuopen"));X(d.menu,!0);lw(d.menu)})}pa(tx,iw);
1063
- function ux(a,b){a.button=Qj();a.icon=R("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=R("label");c.classList.add("shaka-overflow-button-label");a.nameSpan=R("span");c.appendChild(a.nameSpan);a.currentSelection=R("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1064
- function vx(a){a.menu=R("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Qj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);var b=R("i");b.classList.add("material-icons-round");b.textContent="arrow_back";a.backButton.appendChild(b);a.backSpan=R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}
1065
- J("shaka.ui.SettingsMenu",tx);function wx(a,b){tx.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){xx(c)});this.eventManager.o(this.localization,"locale-changed",function(){xx(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Db().length;X(c.button,d);yx(c)});this.eventManager.o(this.player,"variantchanged",function(){yx(c)});xx(this);yx(this)}
1066
- pa(wx,tx);function yx(a){var b=a.player.Db();rx(b,a.menu,function(c){a.player.od(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.j.trackLabelFormat);lw(a.menu);a.controls.dispatchEvent(new L("languageselectionupdated"))}function xx(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")}
1067
- J("shaka.ui.AudioLanguageSelection",wx);function zx(){}zx.prototype.create=function(a,b){return new wx(a,b)};cx("language",new zx);function Ax(a,b){iw.call(this,a,b);var c=this;this.h=this.controls.A;this.g=Qj();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);
1068
- this.g.appendChild(d);this.parent.appendChild(this.g);Bx(this);Cx(this);this.eventManager.o(this.localization,"locale-updated",function(){Bx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Bx(c)});this.eventManager.o(this.g,"click",function(){Dx(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Cx(c)})}pa(Ax,iw);
1069
- function Dx(a){var b;H(function(c){if(1==c.g){if(a.h.na())return a.h.rf(),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 L("error",(new Map).set("detail",b)));z(c)})}function Cx(a){var b=a.h.Fe()&&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");Ex(a)}
1070
- function Ex(a){a.j.textContent=a.h.na()?a.h.md():a.localization.resolve("OFF")}function Bx(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Ex(a)}J("shaka.ui.CastButton",Ax);function Fx(){}Fx.prototype.create=function(a,b){return new Ax(a,b)};cx("cast",new Fx);Jw("cast",new Fx);function Gx(a,b){iw.call(this,a,b);var c=this;this.g=Qj();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);Hx(this);this.eventManager.o(this.localization,"locale-updated",function(){Hx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Hx(c)});this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.player.vc();c.player.ze(0>d||4<d?1:2*d)}})}pa(Gx,iw);
1071
- function Hx(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}J("shaka.ui.FastForwardButton",Gx);function Ix(){}Ix.prototype.create=function(a,b){return new Gx(a,b)};Jw("fast_forward",new Ix);function Jx(a,b){iw.call(this,a,b);var c=this;this.g=Qj();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);Kx(this);this.eventManager.o(this.localization,"locale-updated",function(){Kx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Kx(c)});this.eventManager.o(this.g,"click",function(){return H(function(d){return u(d,
1072
- c.controls.xe(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Kx(c)})}pa(Jx,iw);function Kx(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}J("shaka.ui.FullscreenButton",Jx);function Lx(){}Lx.prototype.create=function(a,b){return new Jx(a,b)};Jw("fullscreen",new Lx);function Mx(a,b){iw.call(this,a,b);var c=this;this.g=Qj();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);
1073
- this.g.appendChild(d);Nx(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Nx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Nx(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.za();c.h.ia(1)});this.m=this.video.loop;this.h=new P(function(){c.m!=c.video.loop&&(Nx(c),c.m=c.video.loop)});this.h.ia(1)}pa(Mx,iw);Mx.prototype.release=function(){this.h.stop();this.h=null;iw.prototype.release.call(this)};
1074
- function Nx(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")}J("shaka.ui.LoopButton",Mx);function Ox(){}Ox.prototype.create=function(a,b){return new Mx(a,b)};cx("loop",new Ox);Jw("loop",new Ox);function Px(a,b){iw.call(this,a,b);var c=this;this.g=Qj();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.parent.appendChild(this.g);Qx(this);Rx(this);this.eventManager.o(this.localization,"locale-updated",function(){Qx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Qx(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",
1075
- function(){Qx(c);Rx(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Qx(c);Rx(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Qx(c);Rx(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Qx(c);Rx(c)})}pa(Px,iw);function Qx(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1076
- function Rx(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}J("shaka.ui.MuteButton",Px);function Sx(){}Sx.prototype.create=function(a,b){return new Px(a,b)};Jw("mute",new Sx);function Tx(a,b){iw.call(this,a,b);var c=this;this.l=this.controls.B;this.g=Qj();this.g.classList.add("shaka-pip-button");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);this.h=R("span");this.h.classList.add("shaka-current-selection-span");
1077
- d.appendChild(this.h);this.g.appendChild(d);Ux(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){Ux(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ux(c)});this.eventManager.o(this.g,"click",function(){Vx(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent="branding_watermark";c.g.ariaLabel=c.localization.resolve("EXIT_PICTURE_IN_PICTURE");
1045
+ Y.prototype.loadComplete=Y.prototype.vg;Y.prototype.allowCast=Y.prototype.Bf;Y.registerSeekBar=function(a){Vw=a};Y.registerElement=Lw;Y.prototype.destroy=Y.prototype.destroy;var Mw=new Map,Vw=new Ew;function ax(a,b){kw.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");
1046
+ this.j.appendChild(this.g);bx(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.zc();X(c.g,!0);c.g.childNodes.length&&c.g.childNodes[0].focus();Fw(c.controls)});this.eventManager.o(this.localization,"locale-updated",function(){cx(c)});this.eventManager.o(this.localization,"locale-changed",function(){cx(c)});this.eventManager.o(this.adManager,"ad-started",function(){X(c.h,
1047
+ !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.nf(Date.now());f.stopPropagation()});this.eventManager.o(this.h,"click",function(){dx(c)});cx(this);this.ad&&X(this.h,!1)}pa(ax,kw);ax.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=[];kw.prototype.release.call(this)};
1048
+ function ex(a,b){fx.set(a,b)}function bx(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,fx.get(c)?(c=fx.get(c),a.i.push(c.create(a.g,a.controls))):Pa("Unrecognized overflow menu element requested:",c)}function dx(a){if(a.controls.Oc())a.controls.zc();else{X(a.g,!0);Fw(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};gb(a.g.childNodes,b)&&hb(a.g.childNodes,b)[0].focus()}}
1049
+ function cx(a){a.h.ariaLabel=a.localization.resolve("MORE_SETTINGS")}K("shaka.ui.OverflowMenu",ax);ax.registerElement=ex;function gx(){}gx.prototype.create=function(a,b){return new ax(a,b)};Lw("overflow_menu",new gx);var fx=new Map;function hx(a,b){kw.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");
1050
+ d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);ix(this);jx(this);this.eventManager.o(this.localization,"locale-updated",function(){ix(c)});this.eventManager.o(this.localization,"locale-changed",function(){ix(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.Se()==Sl;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,
1051
+ "webkitcurrentplaybacktargetiswirelesschanged",function(){jx(c)})}pa(hx,kw);function jx(a){var b=a.controls.tb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function ix(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}K("shaka.ui.AirPlayButton",hx);function kx(){}kx.prototype.create=function(a,b){return new hx(a,b)};ex("airplay",new kx);Lw("airplay",new kx);function lx(a,b,c){this.i=a;this.h=mx(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Md()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.ve(b);b.ui=this;c.ui=this}q=lx.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.Md=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Xc()&&1<navigator.maxTouchPoints};
1052
+ q.getConfiguration=function(){var a=mx(this);wk(a,this.h,mx(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=xk(a,b));wk(this.h,a,mx(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.Rf=function(){return this.g};q.Sg=function(a){this.g.me(a)};
1053
+ function mx(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)",
1054
+ level:"rgb(255, 255, 255)"},trackLabelFormat:nx,fadeDelay:0,doubleClickForFullscreen:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Md()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1055
+ function ox(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return I(function(r){switch(r.g){case 1:at();if(!bl())return px("shaka-ui-load-failed",qx),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),rx(f,e));r.C(2);break}h=t(a);k=h.next();
1056
+ 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,rx(l,m),9);case 9:ua(r,5);break;case 7:return F(r),px("shaka-ui-load-failed",sx),r["return"]();case 5:k=h.next();r.C(4);break;case 2:px("shaka-ui-loaded"),z(r)}})}
1057
+ function px(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1058
+ function rx(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 lx(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.mf(!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"));
1059
+ k=h.next();case 2:if(k.done){m.C(0);break}l=k.value;A(m,5);return u(m,d.g.Vb().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",lx);lx.prototype.setEnabled=lx.prototype.Sg;lx.prototype.getControls=lx.prototype.Rf;lx.prototype.configure=lx.prototype.configure;lx.prototype.getConfiguration=lx.prototype.getConfiguration;lx.prototype.isMobile=lx.prototype.Md;lx.prototype.destroy=lx.prototype.destroy;var nx=0;
1060
+ lx.TrackLabelFormat={LANGUAGE:nx,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var qx=0,sx=1;lx.FailReasonCode={NO_BROWSER_SUPPORT:qx,PLAYER_FAILED_TO_LOAD:sx};"complete"==document.readyState?I(function(a){if(1==a.g)return u(a,Promise.resolve(),2);ox();z(a)}):window.addEventListener("load",ox);function tx(a,b,c,d,e,f,g){function h(B,C){return B+": "+C}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=lw(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=
1061
+ n.Ta.forced,v=f.resolve($b.wf),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 D=R("span");w.appendChild(D);D.textContent=ux(p,f);switch(g){case nx:r&&(D.textContent+=" ("+v+")");break;case 1:y?D.textContent=y:(Pa("Track #"+n.Ta.id+" does not have a role, but the UI is configured to only show role."),D.textContent="?");r&&(D.textContent+=" ("+v+")");break;case 2:y&&(D.textContent+=": "+y);r&&(D.textContent+=" ("+v+")");
1062
+ break;case 3:n.Ta.label?D.textContent=n.Ta.label:(Pa("Track #"+n.Ta.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&x==l&&(w.appendChild(ow()),D.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=D.textContent);b.appendChild(w)}}}
1063
+ function ux(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Tb(a);return a in gw?gw[a].s:c in gw?gw[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function vx(a,b,c){kw.call(this,a,b);var d=this;wx(this,c);xx(this);this.eventManager.o(this.button,"click",function(){d.controls.dispatchEvent(new M("submenuopen"));X(d.menu,!0);nw(d.menu)})}pa(vx,kw);
1064
+ function wx(a,b){a.button=lk();a.icon=R("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=R("label");c.classList.add("shaka-overflow-button-label");a.nameSpan=R("span");c.appendChild(a.nameSpan);a.currentSelection=R("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1065
+ function xx(a){a.menu=R("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=lk();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);var b=R("i");b.classList.add("material-icons-round");b.textContent="arrow_back";a.backButton.appendChild(b);a.backSpan=R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}
1066
+ K("shaka.ui.SettingsMenu",vx);function yx(a,b){vx.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){zx(c)});this.eventManager.o(this.localization,"locale-changed",function(){zx(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Eb().length;X(c.button,d);Ax(c)});this.eventManager.o(this.player,"variantchanged",function(){Ax(c)});zx(this);Ax(this)}
1067
+ pa(yx,vx);function Ax(a){var b=a.player.Eb();tx(b,a.menu,function(c){a.player.od(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.j.trackLabelFormat);nw(a.menu);a.controls.dispatchEvent(new M("languageselectionupdated"))}function zx(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")}
1068
+ K("shaka.ui.AudioLanguageSelection",yx);function Bx(){}Bx.prototype.create=function(a,b){return new yx(a,b)};ex("language",new Bx);function Cx(a,b){kw.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);
1069
+ this.g.appendChild(d);this.parent.appendChild(this.g);Dx(this);Ex(this);this.eventManager.o(this.localization,"locale-updated",function(){Dx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Dx(c)});this.eventManager.o(this.g,"click",function(){Fx(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Ex(c)})}pa(Cx,kw);
1070
+ function Fx(a){var b;I(function(c){if(1==c.g){if(a.h.na())return a.h.rf(),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 Ex(a){var b=a.h.Fe()&&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");Gx(a)}
1071
+ function Gx(a){a.j.textContent=a.h.na()?a.h.md():a.localization.resolve("OFF")}function Dx(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Gx(a)}K("shaka.ui.CastButton",Cx);function Hx(){}Hx.prototype.create=function(a,b){return new Cx(a,b)};ex("cast",new Hx);Lw("cast",new Hx);function Ix(a,b){kw.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);Jx(this);this.eventManager.o(this.localization,"locale-updated",function(){Jx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Jx(c)});this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.player.vc();c.player.ze(0>d||4<d?1:2*d)}})}pa(Ix,kw);
1072
+ function Jx(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}K("shaka.ui.FastForwardButton",Ix);function Kx(){}Kx.prototype.create=function(a,b){return new Ix(a,b)};Lw("fast_forward",new Kx);function Lx(a,b){kw.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);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(){return I(function(d){return u(d,
1073
+ c.controls.xe(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Mx(c)})}pa(Lx,kw);function Mx(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}K("shaka.ui.FullscreenButton",Lx);function Nx(){}Nx.prototype.create=function(a,b){return new Lx(a,b)};Lw("fullscreen",new Nx);function Ox(a,b){kw.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);
1074
+ this.g.appendChild(d);Px(this);this.parent.appendChild(this.g);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(){c.video.loop=!c.video.loop;c.h.za();c.h.ia(1)});this.m=this.video.loop;this.h=new P(function(){c.m!=c.video.loop&&(Px(c),c.m=c.video.loop)});this.h.ia(1)}pa(Ox,kw);Ox.prototype.release=function(){this.h.stop();this.h=null;kw.prototype.release.call(this)};
1075
+ function Px(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",Ox);function Qx(){}Qx.prototype.create=function(a,b){return new Ox(a,b)};ex("loop",new Qx);Lw("loop",new Qx);function Rx(a,b){kw.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);Sx(this);Tx(this);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.ad?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});this.eventManager.o(this.video,"volumechange",
1076
+ function(){Sx(c);Tx(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Sx(c);Tx(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Sx(c);Tx(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Sx(c);Tx(c)})}pa(Rx,kw);function Sx(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1077
+ function Tx(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}K("shaka.ui.MuteButton",Rx);function Ux(){}Ux.prototype.create=function(a,b){return new Rx(a,b)};Lw("mute",new Ux);function Vx(a,b){kw.call(this,a,b);var c=this;this.l=this.controls.B;this.g=lk();this.g.classList.add("shaka-pip-button");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);this.h=R("span");this.h.classList.add("shaka-current-selection-span");
1078
+ d.appendChild(this.h);this.g.appendChild(d);Wx(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){Wx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Wx(c)});this.eventManager.o(this.g,"click",function(){Xx(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent="branding_watermark";c.g.ariaLabel=c.localization.resolve("EXIT_PICTURE_IN_PICTURE");
1078
1079
  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,
1079
- "trackschanged",function(){Wx(c)})}pa(Tx,iw);function Vx(a){var b;H(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 L("error",(new Map).set("detail",b)));z(c)})}
1080
- function Ux(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")}
1081
- function Wx(a){H(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.C(0);if(!a.player||!a.player.Xe())return X(a.g,!0),b.C(0);X(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.C(0)})}J("shaka.ui.PipButton",Tx);function Xx(){}Xx.prototype.create=function(a,b){return new Tx(a,b)};cx("picture_in_picture",new Xx);Jw("picture_in_picture",new Xx);function Yx(a,b){tx.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(){Zx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Zx(c)});this.eventManager.o(this.player,"ratechange",function(){$x(c,c.player.vc())});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]]);Zx(this);
1082
- ay(this);$x(this,this.player.vc())}pa(Yx,tx);function Zx(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")}
1083
- function $x(a,b){var c=kw(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(mw()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x"}
1084
- function ay(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={jc:b.jc},d=c.next()){b.jc=d.value;d=Qj();var e=R("span");e.textContent=b.jc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.jc);a.video.defaultPlaybackRate=a.g.get(f.jc)}}(b));a.menu.appendChild(d)}lw(a.menu)}J("shaka.ui.PlaybackRateSelection",Yx);function by(){}by.prototype.create=function(a,b){return new Yx(a,b)};cx("playback_rate",new by);function cy(a,b){iw.call(this,a,b);var c=this;this.g=Qj();this.g.classList.add("shaka-current-time");dy(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.V()&&(c.video.currentTime=c.player.Ja().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.Y,e=c.controls.Re(),f=c.video.duration,g=c.player.Ja(),h=g.end-g.start;c.player.V()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(dy(c,"- "+nw(e,f)),c.g.disabled=
1085
- !1):(dy(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=nw(e,d),f&&(e+=" / "+nw(f,d)),dy(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(cy,iw);function dy(a,b){b!=a.g.textContent&&(a.g.textContent=b)}J("shaka.ui.PresentationTimeTracker",cy);function ey(){}ey.prototype.create=function(a,b){return new cy(a,b)};Jw("time_and_duration",new ey);function fy(a,b){tx.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(){gy(c)});this.eventManager.o(this.localization,"locale-changed",function(){gy(c)});this.eventManager.o(this.player,"variantchanged",function(){hy(c)});this.eventManager.o(this.player,"trackschanged",function(){hy(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){hy(c)});
1086
- hy(this);gy(this)}pa(fy,tx);
1087
- function hy(a){var b=a.player.Db();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=jw(a.menu);Rj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e=
1088
- {mc:e.mc},g=f.next()){e.mc=g.value;g=Qj();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.mc;a.player.configure({abr:{enabled:!1}});a.player.ke(l,a.controls.j.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=e.mc.height+"p";g.appendChild(h);d||e.mc!=c||(g.ariaSelected="true",g.appendChild(mw()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Qj();e.classList.add("shaka-enable-abr-button");
1089
- a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});hy(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(mw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.menu.appendChild(e);lw(a.menu);a.controls.dispatchEvent(new L("resolutionselectionupdated"))}}
1090
- function gy(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"))}J("shaka.ui.ResolutionSelection",fy);function iy(){}
1091
- iy.prototype.create=function(a,b){return new fy(a,b)};cx("quality",new iy);function jy(a,b){iw.call(this,a,b);var c=this;this.g=Qj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.textContent="fast_rewind";this.parent.appendChild(this.g);ky(this);this.eventManager.o(this.localization,"locale-updated",function(){ky(c)});this.eventManager.o(this.localization,"locale-changed",function(){ky(c)});this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.player.vc();c.player.ze(0<d||-4>d?-1:2*d)}})}pa(jy,iw);
1092
- function ky(a){a.g.ariaLabel=a.localization.resolve("REWIND")}J("shaka.ui.RewindButton",jy);function ly(){}ly.prototype.create=function(a,b){return new jy(a,b)};Jw("rewind",new ly);function my(a,b){iw.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=Qj();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);ny(this);this.i=new P(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1093
- d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){ny(c)});this.eventManager.o(this.localization,"locale-changed",function(){ny(c)});this.eventManager.o(this.adManager,"ad-started",function(){oy(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,
1094
- "click",function(){c.ad.skip()});this.ad&&oy(this)}pa(my,iw);my.prototype.release=function(){this.i.stop();this.i=null;iw.prototype.release.call(this)};function ny(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function oy(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.za(),a.i.ia(.5))}J("shaka.ui.SkipAdButton",my);function py(a,b){rw.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.h();this.g()}pa(py,rw);py.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};py.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)}};
1095
- J("shaka.ui.SmallPlayButton",py);function qy(){}qy.prototype.create=function(a,b){return new py(a,b)};Jw("play_pause",new qy);function ry(a,b){iw.call(this,a,b);var c=R("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}pa(ry,iw);J("shaka.ui.Spacer",ry);function sy(){}sy.prototype.create=function(a,b){return new ry(a,b)};Jw("spacer",new sy);function ty(a,b){tx.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.Ib()?this.button.ariaPressed="true":this.button.ariaPressed="false";uy(this);this.eventManager.o(this.localization,"locale-updated",function(){vy(c);wy(c)});this.eventManager.o(this.localization,"locale-changed",function(){vy(c);wy(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){xy(c);wy(c)});
1096
- this.eventManager.o(this.player,"textchanged",function(){wy(c)});this.eventManager.o(this.player,"trackschanged",function(){yy(c)});xy(this);vy(this);wy(this);yy(this)}pa(ty,tx);function uy(a){var b=Qj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(mw());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1097
- function xy(a){a.player.Ib()?(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 L("captionselectionupdated"))}
1098
- function wy(a){var b=a.player.kb();rx(b,a.menu,function(c){return zy(a,c)},a.player.Ib(),a.currentSelection,a.localization,a.controls.j.trackLabelFormat);b=Qj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.ue(!1);wy(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Ib()||(b.ariaSelected="true",b.appendChild(mw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));lw(a.menu);a.controls.dispatchEvent(new L("captionselectionupdated"))}
1099
- function zy(a,b){return H(function(c){a.player.je(b);return u(c,a.player.ue(!0),0)})}function vy(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 yy(a){var b=0<a.player.kb().length;X(a.button,b);wy(a)}J("shaka.ui.TextSelection",ty);function Ay(){}
1100
- Ay.prototype.create=function(a,b){return new ty(a,b)};cx("captions",new Ay);function By(a,b){vw.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 Cy(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return Dy(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return Dy(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return Cy(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Ey(c)});
1101
- this.eventManager.o(this.localization,"locale-changed",function(){return Ey(c)});Cy(this);Ey(this);if(this.ad)this.onChange()}pa(By,vw);By.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 Cy(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Fy(a)}function Dy(a){var b=a.ad.getVolume();a.setValue(b);Fy(a)}
1102
- function Fy(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 Ey(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}J("shaka.ui.VolumeBar",By);function Gy(){}Gy.prototype.create=function(a,b){return new By(a,b)};Jw("volume",new Gy);}).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})();
1080
+ "trackschanged",function(){Yx(c)})}pa(Vx,kw);function Xx(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)})}
1081
+ function Wx(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")}
1082
+ function Yx(a){I(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.C(0);if(!a.player||!a.player.Xe())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",Vx);function Zx(){}Zx.prototype.create=function(a,b){return new Vx(a,b)};ex("picture_in_picture",new Zx);Lw("picture_in_picture",new Zx);function $x(a,b){vx.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(){ay(c)});this.eventManager.o(this.localization,"locale-changed",function(){ay(c)});this.eventManager.o(this.player,"ratechange",function(){by(c,c.player.vc())});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]]);ay(this);
1083
+ cy(this);by(this,this.player.vc())}pa($x,vx);function ay(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")}
1084
+ function by(a,b){var c=mw(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(ow()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x"}
1085
+ function cy(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={jc:b.jc},d=c.next()){b.jc=d.value;d=lk();var e=R("span");e.textContent=b.jc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.jc);a.video.defaultPlaybackRate=a.g.get(f.jc)}}(b));a.menu.appendChild(d)}nw(a.menu)}K("shaka.ui.PlaybackRateSelection",$x);function dy(){}dy.prototype.create=function(a,b){return new $x(a,b)};ex("playback_rate",new dy);function ey(a,b){kw.call(this,a,b);var c=this;this.g=lk();this.g.classList.add("shaka-current-time");fy(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.V()&&(c.video.currentTime=c.player.Ja().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.Y,e=c.controls.Re(),f=c.video.duration,g=c.player.Ja(),h=g.end-g.start;c.player.V()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(fy(c,"- "+pw(e,f)),c.g.disabled=
1086
+ !1):(fy(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=pw(e,d),f&&(e+=" / "+pw(f,d)),fy(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(ey,kw);function fy(a,b){b!=a.g.textContent&&(a.g.textContent=b)}K("shaka.ui.PresentationTimeTracker",ey);function gy(){}gy.prototype.create=function(a,b){return new ey(a,b)};Lw("time_and_duration",new gy);function hy(a,b){vx.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(){iy(c)});this.eventManager.o(this.localization,"locale-changed",function(){iy(c)});this.eventManager.o(this.player,"variantchanged",function(){jy(c)});this.eventManager.o(this.player,"trackschanged",function(){jy(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){jy(c)});
1087
+ jy(this);iy(this)}pa(hy,vx);
1088
+ function jy(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=lw(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=
1089
+ {mc:e.mc},g=f.next()){e.mc=g.value;g=lk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.mc;a.player.configure({abr:{enabled:!1}});a.player.ke(l,a.controls.j.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=e.mc.height+"p";g.appendChild(h);d||e.mc!=c||(g.ariaSelected="true",g.appendChild(ow()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=lk();e.classList.add("shaka-enable-abr-button");
1090
+ a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});jy(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(ow()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.menu.appendChild(e);nw(a.menu);a.controls.dispatchEvent(new M("resolutionselectionupdated"))}}
1091
+ function iy(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",hy);function ky(){}
1092
+ ky.prototype.create=function(a,b){return new hy(a,b)};ex("quality",new ky);function ly(a,b){kw.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);my(this);this.eventManager.o(this.localization,"locale-updated",function(){my(c)});this.eventManager.o(this.localization,"locale-changed",function(){my(c)});this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.player.vc();c.player.ze(0<d||-4>d?-1:2*d)}})}pa(ly,kw);
1093
+ function my(a){a.g.ariaLabel=a.localization.resolve("REWIND")}K("shaka.ui.RewindButton",ly);function ny(){}ny.prototype.create=function(a,b){return new ly(a,b)};Lw("rewind",new ny);function oy(a,b){kw.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);py(this);this.i=new P(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1094
+ d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){py(c)});this.eventManager.o(this.localization,"locale-changed",function(){py(c)});this.eventManager.o(this.adManager,"ad-started",function(){qy(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,
1095
+ "click",function(){c.ad.skip()});this.ad&&qy(this)}pa(oy,kw);oy.prototype.release=function(){this.i.stop();this.i=null;kw.prototype.release.call(this)};function py(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function qy(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.za(),a.i.ia(.5))}K("shaka.ui.SkipAdButton",oy);function ry(a,b){tw.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.h();this.g()}pa(ry,tw);ry.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};ry.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)}};
1096
+ K("shaka.ui.SmallPlayButton",ry);function sy(){}sy.prototype.create=function(a,b){return new ry(a,b)};Lw("play_pause",new sy);function ty(a,b){kw.call(this,a,b);var c=R("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}pa(ty,kw);K("shaka.ui.Spacer",ty);function uy(){}uy.prototype.create=function(a,b){return new ty(a,b)};Lw("spacer",new uy);function vy(a,b){vx.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";wy(this);this.eventManager.o(this.localization,"locale-updated",function(){xy(c);yy(c)});this.eventManager.o(this.localization,"locale-changed",function(){xy(c);yy(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){zy(c);yy(c)});
1097
+ this.eventManager.o(this.player,"textchanged",function(){yy(c)});this.eventManager.o(this.player,"trackschanged",function(){Ay(c)});zy(this);xy(this);yy(this);Ay(this)}pa(vy,vx);function wy(a){var b=lk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(ow());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1098
+ function zy(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"))}
1099
+ function yy(a){var b=a.player.kb();tx(b,a.menu,function(c){return By(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.ue(!1);yy(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Jb()||(b.ariaSelected="true",b.appendChild(ow()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));nw(a.menu);a.controls.dispatchEvent(new M("captionselectionupdated"))}
1100
+ function By(a,b){return I(function(c){a.player.je(b);return u(c,a.player.ue(!0),0)})}function xy(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 Ay(a){var b=0<a.player.kb().length;X(a.button,b);yy(a)}K("shaka.ui.TextSelection",vy);function Cy(){}
1101
+ Cy.prototype.create=function(a,b){return new vy(a,b)};ex("captions",new Cy);function Dy(a,b){xw.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 Ey(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return Fy(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return Fy(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return Ey(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Gy(c)});
1102
+ this.eventManager.o(this.localization,"locale-changed",function(){return Gy(c)});Ey(this);Gy(this);if(this.ad)this.onChange()}pa(Dy,xw);Dy.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 Ey(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Hy(a)}function Fy(a){var b=a.ad.getVolume();a.setValue(b);Hy(a)}
1103
+ function Hy(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 Gy(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}K("shaka.ui.VolumeBar",Dy);function Iy(){}Iy.prototype.create=function(a,b){return new Dy(a,b)};Lw("volume",new Iy);}).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})();
1103
1104
 
1104
1105
  //# sourceMappingURL=shaka-player.ui.map