shaka-player 4.0.0 → 4.1.0

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 (114) hide show
  1. package/.github/config.yml +1 -0
  2. package/.github/workflows/release-please.yaml +6 -11
  3. package/CHANGELOG.md +33 -0
  4. package/CONTRIBUTORS +1 -0
  5. package/README.md +4 -4
  6. package/build/misspellings.txt +1 -0
  7. package/demo/common/message_ids.js +1 -0
  8. package/demo/config.js +3 -1
  9. package/demo/demo.less +0 -1
  10. package/demo/locales/en.json +1 -0
  11. package/demo/locales/source.json +4 -0
  12. package/dist/controls.css +3 -3
  13. package/dist/controls.css.map +1 -1
  14. package/dist/demo.compiled.debug.js +4 -4
  15. package/dist/demo.compiled.debug.map +2 -2
  16. package/dist/demo.compiled.js +4 -4
  17. package/dist/demo.compiled.map +2 -2
  18. package/dist/demo.css +1 -1
  19. package/dist/demo.css.map +1 -1
  20. package/dist/deps.js +3 -3
  21. package/dist/locales.js +32 -32
  22. package/dist/receiver.compiled.debug.js +2 -2
  23. package/dist/receiver.compiled.debug.map +2 -2
  24. package/dist/receiver.compiled.js +2 -2
  25. package/dist/receiver.compiled.map +2 -2
  26. package/dist/shaka-player.compiled.d.ts +15 -8
  27. package/dist/shaka-player.compiled.debug.d.ts +15 -8
  28. package/dist/shaka-player.compiled.debug.externs.js +11 -2
  29. package/dist/shaka-player.compiled.debug.js +266 -253
  30. package/dist/shaka-player.compiled.debug.map +3 -3
  31. package/dist/shaka-player.compiled.externs.js +11 -2
  32. package/dist/shaka-player.compiled.js +792 -784
  33. package/dist/shaka-player.compiled.map +3 -3
  34. package/dist/shaka-player.ui.d.ts +16 -9
  35. package/dist/shaka-player.ui.debug.d.ts +16 -9
  36. package/dist/shaka-player.ui.debug.externs.js +11 -2
  37. package/dist/shaka-player.ui.debug.js +299 -282
  38. package/dist/shaka-player.ui.debug.map +3 -3
  39. package/dist/shaka-player.ui.externs.js +11 -2
  40. package/dist/shaka-player.ui.js +948 -941
  41. package/dist/shaka-player.ui.map +3 -3
  42. package/docs/design/chromecast.md +3 -1
  43. package/docs/tutorials/drm-config.md +16 -0
  44. package/docs/tutorials/ui.md +26 -0
  45. package/docs/tutorials/upgrade.md +4 -2
  46. package/externs/chromecast.js +9 -2
  47. package/externs/shaka/manifest.js +7 -0
  48. package/externs/shaka/player.js +32 -2
  49. package/externs/shaka/text.js +7 -0
  50. package/karma.conf.js +4 -0
  51. package/lib/abr/simple_abr_manager.js +2 -1
  52. package/lib/cast/cast_proxy.js +19 -8
  53. package/lib/cast/cast_receiver.js +3 -3
  54. package/lib/cast/cast_sender.js +12 -2
  55. package/lib/dash/dash_parser.js +2 -2
  56. package/lib/hls/hls_parser.js +46 -15
  57. package/lib/media/drm_engine.js +36 -8
  58. package/lib/media/gap_jumping_controller.js +23 -1
  59. package/lib/media/media_source_engine.js +91 -37
  60. package/lib/media/playhead.js +47 -4
  61. package/lib/media/stall_detector.js +19 -2
  62. package/lib/media/streaming_engine.js +9 -3
  63. package/lib/offline/indexeddb/storage_mechanism.js +4 -2
  64. package/lib/offline/manifest_converter.js +1 -0
  65. package/lib/player.js +339 -175
  66. package/lib/text/cue.js +6 -0
  67. package/lib/text/ui_text_displayer.js +1 -0
  68. package/lib/text/vtt_text_parser.js +11 -7
  69. package/lib/util/config_utils.js +25 -0
  70. package/lib/util/error.js +13 -0
  71. package/lib/util/fake_event.js +39 -0
  72. package/lib/util/manifest_parser_utils.js +1 -1
  73. package/lib/util/mime_utils.js +62 -6
  74. package/lib/util/periods.js +5 -4
  75. package/lib/util/player_configuration.js +16 -14
  76. package/lib/util/stats.js +28 -1
  77. package/lib/util/stream_utils.js +11 -2
  78. package/package.json +5 -2
  79. package/test/cast/cast_proxy_unit.js +3 -1
  80. package/test/cast/cast_sender_unit.js +21 -6
  81. package/test/demo/demo_unit.js +2 -1
  82. package/test/hls/hls_live_unit.js +79 -7
  83. package/test/hls/manifest_text_parser_unit.js +19 -0
  84. package/test/media/adaptation_set_unit.js +1 -0
  85. package/test/media/playhead_unit.js +114 -25
  86. package/test/media/stall_detector_unit.js +20 -2
  87. package/test/media/streaming_engine_integration.js +2 -1
  88. package/test/media/streaming_engine_unit.js +1 -0
  89. package/test/offline/indexeddb_storage_unit.js +1 -1
  90. package/test/offline/storage_compatibility_unit.js +1 -1
  91. package/test/player_external.js +7 -1
  92. package/test/player_integration.js +9 -10
  93. package/test/player_src_equals_integration.js +81 -83
  94. package/test/player_unit.js +240 -2
  95. package/test/test/boot.js +9 -0
  96. package/test/test/externs/filters.js +4 -0
  97. package/test/test/util/manifest_generator.js +2 -0
  98. package/test/test/util/simple_fakes.js +45 -2
  99. package/test/test/util/streaming_engine_util.js +1 -0
  100. package/test/text/vtt_text_parser_unit.js +68 -5
  101. package/test/ui/ui_unit.js +18 -5
  102. package/test/util/mime_utils_unit.js +54 -0
  103. package/test/util/periods_unit.js +79 -0
  104. package/test/util/stream_utils_unit.js +108 -0
  105. package/ui/controls.js +12 -8
  106. package/ui/externs/ui.js +10 -1
  107. package/ui/less/containers.less +1 -1
  108. package/ui/less/general.less +1 -1
  109. package/ui/less/range_elements.less +1 -0
  110. package/ui/resolution_selection.js +1 -1
  111. package/ui/statistics_button.js +10 -0
  112. package/ui/ui.js +12 -1
  113. package/.github/pull_request_template.md +0 -10
  114. package/docs/tutorials/gsoc-ideas-list.md +0 -3
@@ -15,19 +15,19 @@ fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
15
15
  fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
16
  function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
17
17
  if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else{var ma;a:{var na={a:!0},oa={};try{oa.__proto__=na;ma=oa.a;break a}catch(a){}ma=!1}la=ma?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var pa=la;
18
- function qa(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(pa)pa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Tg=b.prototype}function ra(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ra.prototype.s=function(a){this.h=a};
19
- function ta(a,b){a.i={je:b,qe:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ra.prototype.A=function(a){this.g=a};function z(a){a.g=0}function B(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function E(a){a.m=0;var b=a.i.je;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
20
- function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.qe?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new ra;this.h=a}function Aa(a,b){sa(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ca(a)}
18
+ function qa(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(pa)pa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.dh=b.prototype}function ra(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ra.prototype.s=function(a){this.h=a};
19
+ function ta(a,b){a.i={pe:b,we:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ra.prototype.A=function(a){this.g=a};function z(a){a.g=0}function B(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function F(a){a.m=0;var b=a.i.pe;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
20
+ function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.we?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new ra;this.h=a}function Aa(a,b){sa(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ca(a)}
21
21
  function Ba(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}
22
- function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.qe)throw b.je;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
22
+ function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.we)throw b.pe;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
23
  function Ea(a){this.next=function(b){sa(a.g);a.g.l?b=Ba(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ca(a));return b};this["throw"]=function(b){sa(a.g);a.g.l?b=Ba(a,a.g.l["throw"],b,a.g.s):(ta(a.g,b),b=Ca(a));return b};this["return"]=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this}}
24
- function Fa(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function K(a){return Fa(new Ea(new ya(a)))}function Ga(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
24
+ function Fa(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function L(a){return Fa(new Ea(new ya(a)))}function Ia(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
25
25
  fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.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
- 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.J(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
27
- b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.H();this.u()};b.prototype.H=function(){var g=this;e(function(){if(g.C()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.C=
26
+ g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.I(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
27
+ b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.u()};b.prototype.G=function(){var g=this;e(function(){if(g.C()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.C=
28
28
  function(){if(this.o)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.u=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
29
- b.prototype.J=function(g){var h=this.j();g.Bc(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(n,q){return"function"==typeof n?function(v){try{l(n(v))}catch(x){m(x)}}:q}var l,m,p=new b(function(n,q){l=n;m=q});this.Bc(k(g,l),k(h,m));return p};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Bc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
- break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).Bc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function p(v){return function(x){n[v]=x;q--;0==q&&l(n)}}var n=[],q=0;do n.push(void 0),q++,d(k.value).Bc(p(n.length-1),m),k=h.next();
29
+ b.prototype.I=function(g){var h=this.j();g.Ec(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(n,q){return"function"==typeof n?function(x){try{l(n(x))}catch(w){m(w)}}:q}var l,m,p=new b(function(n,q){l=n;m=q});this.Ec(k(g,l),k(h,m));return p};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Ec=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
+ break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).Ec(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function p(x){return function(w){n[x]=w;q--;0==q&&l(n)}}var n=[],q=0;do n.push(void 0),q++,d(k.value).Ec(p(n.length-1),m),k=h.next();
31
31
  while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
32
  fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ja(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
33
  m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(p){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ja(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ja(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
@@ -39,7 +39,7 @@ h.ga.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g
39
39
  m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
40
40
  fa("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
41
41
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
42
- b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{oe:e,v:f}}return{oe:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).oe}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
42
+ b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{ue:e,v:f}}return{ue:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).ue}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
43
43
  fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});function La(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
44
44
  fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=La(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});
45
45
  function Ma(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.keys",function(a){return a?a:function(){return Ma(this,function(b){return b})}});var Na="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ja(d,e)&&(a[e]=d[e])}return a};
@@ -52,22 +52,22 @@ fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(
52
52
  Copyright 2016 Google LLC
53
53
  SPDX-License-Identifier: Apache-2.0
54
54
  */
55
- function Pa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Pa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function Qa(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Pa(2);this.j=new Pa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Qa(this.h),Qa(this.j))};function Ta(){}function Ua(){}function Va(){}function Wa(a){var b=Ga.apply(1,arguments);Xa.has(a)||(Xa.add(a),Va.apply(Ta,ia(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;if(window.console&&window.console.log.bind){var bb={},cb=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Va=cb[2];Ua=cb[1]};function db(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function eb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fb(a,b,c){c||(c=db);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={ad:d.ad},e=a.next()){d.ad=e.value;e=b.findIndex(function(f){return function(g){return c(f.ad,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
56
- function gb(a,b,c){c||(c=db);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 hb(a,b,c){this.startTime=a;this.direction=jb;this.endTime=b;this.payload=c;this.region=new kb;this.position=null;this.positionAlign=lb;this.size=0;this.textAlign=mb;this.writingMode=nb;this.lineInterpretation=ob;this.line=null;this.lineHeight="";this.lineAlign=pb;this.displayAlign=qb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=rb;this.fontStyle=sb;this.linePadding=this.letterSpacing=this.fontFamily=
57
- "";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}hb.prototype.clone=function(){var a=new hb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
58
- function tb(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!gb(a.nestedCues,b.nestedCues,tb))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!gb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",hb);var lb="auto";
59
- hb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:lb};var mb="center",ub={LEFT:"left",RIGHT:"right",CENTER:mb,START:"start",END:"end"};hb.textAlign=ub;var qb="after",vb={BEFORE:"before",CENTER:"center",AFTER:qb};hb.displayAlign=vb;var jb="ltr";hb.direction={HORIZONTAL_LEFT_TO_RIGHT:jb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var nb="horizontal-tb";hb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:nb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ob=0;
60
- hb.lineInterpretation={LINE_NUMBER:ob,PERCENTAGE:1};var pb="start",wb={CENTER:"center",START:pb,END:"end"};hb.lineAlign=wb;var xb={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};hb.defaultTextColor=xb;var yb={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};hb.defaultTextBackgroundColor=yb;var rb=400;hb.fontWeight={NORMAL:rb,BOLD:700};
61
- var sb="normal",zb={NORMAL:sb,ITALIC:"italic",OBLIQUE:"oblique"};hb.fontStyle=zb;hb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function kb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ab;this.scroll=Cb}M("shaka.text.CueRegion",kb);var Ab=1;kb.units={PX:0,PERCENTAGE:Ab,LINES:2};var Cb="";kb.scrollMode={NONE:Cb,UP:"up"};function Db(){}function Eb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Fb(a)==Fb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Gb(a),d=Gb(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Fb(a){return a instanceof ArrayBuffer?a:a.buffer}function Hb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
62
- function Gb(a,b,c){c=void 0===c?Infinity:c;return Ib(a,void 0===b?0:b,c,Uint8Array)}function Jb(a,b,c){c=void 0===c?Infinity:c;return Ib(a,void 0===b?0:b,c,DataView)}function Ib(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(Fb(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Db);Db.toDataView=Jb;Db.toUint8=Gb;Db.toArrayBuffer=Hb;Db.equal=Eb;function Kb(){}M("shaka.dependencies",Kb);Kb.has=function(a){return Lb.has(a)};Kb.add=function(a,b){if(!Mb[a])throw Error(a+" is not supported");Lb.set(a,function(){return b})};var Mb={muxjs:"muxjs"};Kb.Allowed=Mb;var Lb=new Map([["muxjs",function(){return window.muxjs}]]);function N(a,b,c){var d=Ga.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," ")};M("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};
63
- 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,
64
- TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,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,WEBM_CUE_TIME_ELEMENT_MISSING:3013,
65
- 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,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,
66
- 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_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,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,
67
- NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,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,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,
68
- 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,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,
69
- INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,
70
- CURRENT_DAI_REQUEST_NOT_FINISHED:10004};/*
55
+ function Pa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Pa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function Qa(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Pa(2);this.j=new Pa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Qa(this.h),Qa(this.j))};function Ta(){}function Ua(){}function Va(){}function Wa(a){var b=Ia.apply(1,arguments);Xa.has(a)||(Xa.add(a),Va.apply(Ta,ia(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;if(window.console&&window.console.log.bind){var bb={},cb=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Va=cb[2];Ua=cb[1]};function db(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function eb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fb(a,b,c){c||(c=db);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={gd:d.gd},e=a.next()){d.gd=e.value;e=b.findIndex(function(f){return function(g){return c(f.gd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
56
+ function gb(a,b,c){c||(c=db);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function ib(a,b,c){this.startTime=a;this.direction=jb;this.endTime=b;this.payload=c;this.region=new kb;this.position=null;this.positionAlign=lb;this.size=0;this.textAlign=mb;this.writingMode=nb;this.lineInterpretation=ob;this.line=null;this.lineHeight="";this.lineAlign=pb;this.displayAlign=qb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=rb;this.fontStyle=sb;this.linePadding=this.letterSpacing=
57
+ this.fontFamily="";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}ib.prototype.clone=function(){var a=new ib(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
58
+ function tb(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!gb(a.nestedCues,b.nestedCues,tb))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!gb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",ib);var lb="auto";
59
+ ib.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:lb};var mb="center",ub={LEFT:"left",RIGHT:"right",CENTER:mb,START:"start",END:"end"};ib.textAlign=ub;var qb="after",vb={BEFORE:"before",CENTER:"center",AFTER:qb};ib.displayAlign=vb;var jb="ltr";ib.direction={HORIZONTAL_LEFT_TO_RIGHT:jb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var nb="horizontal-tb";ib.writingMode={HORIZONTAL_TOP_TO_BOTTOM:nb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ob=0;
60
+ ib.lineInterpretation={LINE_NUMBER:ob,PERCENTAGE:1};var pb="start",wb={CENTER:"center",START:pb,END:"end"};ib.lineAlign=wb;var xb={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};ib.defaultTextColor=xb;var yb={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};ib.defaultTextBackgroundColor=yb;var rb=400;ib.fontWeight={NORMAL:rb,BOLD:700};
61
+ var sb="normal",zb={NORMAL:sb,ITALIC:"italic",OBLIQUE:"oblique"};ib.fontStyle=zb;ib.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function kb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Bb;this.scroll=Cb}M("shaka.text.CueRegion",kb);var Bb=1;kb.units={PX:0,PERCENTAGE:Bb,LINES:2};var Cb="";kb.scrollMode={NONE:Cb,UP:"up"};function Db(){}function Eb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Fb(a)==Fb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Gb(a),d=Gb(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Fb(a){return a instanceof ArrayBuffer?a:a.buffer}function Hb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
62
+ function Gb(a,b,c){c=void 0===c?Infinity:c;return Ib(a,void 0===b?0:b,c,Uint8Array)}function Jb(a,b,c){c=void 0===c?Infinity:c;return Ib(a,void 0===b?0:b,c,DataView)}function Ib(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(Fb(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Db);Db.toDataView=Jb;Db.toUint8=Gb;Db.toArrayBuffer=Hb;Db.equal=Eb;function Kb(){}M("shaka.dependencies",Kb);Kb.has=function(a){return Lb.has(a)};Kb.add=function(a,b){if(!Mb[a])throw Error(a+" is not supported");Lb.set(a,function(){return b})};var Mb={muxjs:"muxjs"};Kb.Allowed=Mb;var Lb=new Map([["muxjs",function(){return window.muxjs}]]);function N(a,b,c){var d=Ia.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," ")};M("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};
63
+ 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,SEGMENT_MISSING:1011,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,
64
+ CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,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,
65
+ 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,
66
+ 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_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,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,
67
+ 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,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,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,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,
68
+ 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,CAST_CANCELED_BY_USER:8004,
69
+ CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,CS_IMA_SDK_MISSING:1E4,
70
+ CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};/*
71
71
  @license
72
72
  Copyright 2008 The Closure Library Authors
73
73
  SPDX-License-Identifier: Apache-2.0
@@ -77,812 +77,820 @@ var Nb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
77
77
  Copyright 2006 The Closure Library Authors
78
78
  SPDX-License-Identifier: Apache-2.0
79
79
  */
80
- function Ob(a){var b;a instanceof Ob?(Pb(this,a.Fa),this.pb=a.pb,this.Ha=a.Ha,Qb(this,a.Ib),this.va=a.va,Rb(this,a.g.clone()),this.gb=a.gb):a&&(b=String(a).match(Nb))?(Pb(this,b[1]||"",!0),this.pb=Sb(b[2]||""),this.Ha=Sb(b[3]||"",!0),Qb(this,b[4]),this.va=Sb(b[5]||"",!0),Rb(this,b[6]||"",!0),this.gb=Sb(b[7]||"")):this.g=new Tb(null)}r=Ob.prototype;r.Fa="";r.pb="";r.Ha="";r.Ib=null;r.va="";r.gb="";
81
- r.toString=function(){var a=[],b=this.Fa;b&&a.push(Ub(b,Vb,!0),":");if(b=this.Ha){a.push("//");var c=this.pb;c&&a.push(Ub(c,Vb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ib;null!=b&&a.push(":",String(b))}if(b=this.va)this.Ha&&"/"!=b.charAt(0)&&a.push("/"),a.push(Ub(b,"/"==b.charAt(0)?Wb:Xb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.gb)&&a.push("#",Ub(b,Yb));return a.join("")};
82
- r.resolve=function(a){var b=this.clone();"data"===b.Fa&&(b=new Ob);var c=!!a.Fa;c?Pb(b,a.Fa):c=!!a.pb;c?b.pb=a.pb:c=!!a.Ha;c?b.Ha=a.Ha:c=null!=a.Ib;var d=a.va;if(c)Qb(b,a.Ib);else if(c=!!a.va){if("/"!=d.charAt(0))if(this.Ha&&!this.va)d="/"+d;else{var e=b.va.lastIndexOf("/");-1!=e&&(d=b.va.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
80
+ function Ob(a){var b;a instanceof Ob?(Pb(this,a.Fa),this.ob=a.ob,this.Ha=a.Ha,Qb(this,a.Ib),this.va=a.va,Rb(this,a.g.clone()),this.gb=a.gb):a&&(b=String(a).match(Nb))?(Pb(this,b[1]||"",!0),this.ob=Sb(b[2]||""),this.Ha=Sb(b[3]||"",!0),Qb(this,b[4]),this.va=Sb(b[5]||"",!0),Rb(this,b[6]||"",!0),this.gb=Sb(b[7]||"")):this.g=new Tb(null)}r=Ob.prototype;r.Fa="";r.ob="";r.Ha="";r.Ib=null;r.va="";r.gb="";
81
+ r.toString=function(){var a=[],b=this.Fa;b&&a.push(Ub(b,Vb,!0),":");if(b=this.Ha){a.push("//");var c=this.ob;c&&a.push(Ub(c,Vb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ib;null!=b&&a.push(":",String(b))}if(b=this.va)this.Ha&&"/"!=b.charAt(0)&&a.push("/"),a.push(Ub(b,"/"==b.charAt(0)?Wb:Xb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.gb)&&a.push("#",Ub(b,Yb));return a.join("")};
82
+ r.resolve=function(a){var b=this.clone();"data"===b.Fa&&(b=new Ob);var c=!!a.Fa;c?Pb(b,a.Fa):c=!!a.ob;c?b.ob=a.ob:c=!!a.Ha;c?b.Ha=a.Ha:c=null!=a.Ib;var d=a.va;if(c)Qb(b,a.Ib);else if(c=!!a.va){if("/"!=d.charAt(0))if(this.Ha&&!this.va)d="/"+d;else{var e=b.va.lastIndexOf("/");-1!=e&&(d=b.va.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
83
83
  h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.va=d:c=""!==a.g.toString();c?Rb(b,a.g.clone()):c=!!a.gb;c&&(b.gb=a.gb);return b};r.clone=function(){return new Ob(this)};function Pb(a,b,c){a.Fa=c?Sb(b,!0):b;a.Fa&&(a.Fa=a.Fa.replace(/:$/,""))}function Qb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ib=b}else a.Ib=null}function Rb(a,b,c){b instanceof Tb?a.g=b:(c||(b=Ub(b,Zb)),a.g=new Tb(b))}
84
84
  function Sb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Ub(a,b,c){return null!=a?(a=encodeURI(a).replace(b,$b),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function $b(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Vb=/[#\/\?@]/g,Xb=/[#\?:]/g,Wb=/[#\?]/g,Zb=/[#\?@]/g,Yb=/#/g;function Tb(a){this.g=a||null}
85
- function ac(a){if(!a.na&&(a.na={},a.Dc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=Tb.prototype;r.na=null;r.Dc=null;r.add=function(a,b){ac(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.Dc++;return this};
86
- r.set=function(a,b){ac(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new Tb;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.Dc=this.Dc}return a};function bc(a,b){return a.concat(b)}function cc(){}function dc(a){return null!=a};function ec(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Ob(d)});return a.map(function(d){return new Ob(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(bc,[]).map(function(d){return d.toString()})}function hc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
87
- function ic(a,b){if(1==b.length)return b[0];var c=jc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function jc(a,b){for(var c=t(kc[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==lc?"":null}var lc="text",mc={Oa:"video",eb:"audio",X:lc,Ub:"image",hg:"application"},kc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function nc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}nc.prototype.resolve=function(){};nc.prototype.reject=function(){};function oc(a){this.h=a;this.g=void 0}oc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function pc(){}function qc(a){if(!a)return"";a=Gb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}function rc(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=Jb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return sc.value()(d)}
85
+ function ac(a){if(!a.oa&&(a.oa={},a.Gc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=Tb.prototype;r.oa=null;r.Gc=null;r.add=function(a,b){ac(this);this.g=null;var c=this.oa.hasOwnProperty(a)&&this.oa[a];c||(this.oa[a]=c=[]);c.push(b);this.Gc++;return this};
86
+ r.set=function(a,b){ac(this);this.g=null;this.oa.hasOwnProperty(a)?this.oa[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.oa)return"";var a=[],b;for(b in this.oa)for(var c=encodeURIComponent(b),d=this.oa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new Tb;a.g=this.g;if(this.oa){var b={},c;for(c in this.oa)b[c]=this.oa[c].concat();a.oa=b;a.Gc=this.Gc}return a};function bc(a,b){return a.concat(b)}function cc(){}function dc(a){return null!=a};function gc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Ob(d)});return a.map(function(d){return new Ob(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(bc,[]).map(function(d){return d.toString()})}function hc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
87
+ function ic(a,b){if(1==b.length)return b[0];var c=jc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function jc(a,b){for(var c=t(kc[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==lc?"":null}var lc="text",mc={wa:"video",eb:"audio",Y:lc,Ub:"image",pg:"application"},kc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function nc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}nc.prototype.resolve=function(){};nc.prototype.reject=function(){};function oc(a){this.h=a;this.g=void 0}oc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function pc(){}function qc(a){if(!a)return"";a=Gb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}function rc(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=Jb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return sc.value()(d)}
88
88
  function tc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Gb(a);if(239==c[0]&&187==c[1]&&191==c[2])return qc(c);if(254==c[0]&&255==c[1])return rc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return rc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return rc(a,!1);if(0==c[1]&&0==c[3])return rc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return qc(a);throw new N(2,2,2003);}function uc(a){var b=new TextEncoder;return Hb(b.encode(a))}
89
89
  function vc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}M("shaka.util.StringUtils",pc);pc.resetFromCharCode=function(){sc.g=void 0};pc.toUTF16=vc;pc.toUTF8=uc;pc.fromBytesAutoDetect=tc;pc.fromUTF16=rc;pc.fromUTF8=qc;
90
90
  var sc=new oc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Wa:65536};0<b.Wa;b={Wa:b.Wa},b.Wa/=2)if(a(b.Wa))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Wa)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Wa));return e}}(b);return null});function wc(){}function xc(a){a=Gb(a);a=sc.value()(a);return btoa(a)}function yc(a,b){b=void 0==b?!0:b;var c=xc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function zc(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 Ac(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}
91
- function Bc(a){var b=Gb(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 Dc(){for(var a=Ga.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(Gb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",wc);wc.concat=Dc;wc.toHex=Bc;wc.fromHex=Ac;wc.fromBase64=zc;wc.toBase64=yc;wc.toStandardBase64=xc;function Ec(){var a=this;this.o=Lb.get("muxjs")();this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Dc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Dc.apply(wc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Ec.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
91
+ function Bc(a){var b=Gb(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 Cc(){for(var a=Ia.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(Gb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",wc);wc.concat=Cc;wc.toHex=Bc;wc.fromHex=Ac;wc.fromBase64=zc;wc.toBase64=yc;wc.toStandardBase64=xc;function Ec(){var a=this;this.o=Lb.get("muxjs")();this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Cc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Cc.apply(wc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Ec.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
92
92
  function Fc(a,b){if(!Lb.get("muxjs")()||!Gc(a))return!1;if(b)return MediaSource.isTypeSupported(Hc(b,a));var c=Hc("audio",a),d=Hc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Gc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
93
- function Hc(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 Ic(a,b){a.l=!0;a.h=new nc;a.m=[];a.j=[];a.i=[];var c=Gb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Jc(){}function Kc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Lc(a,b,c){a=Kc(a,b);return Lb.get("muxjs")()&&Gc(a)?Hc(c,a):a}function Mc(a){a=a.split(".");var b=a[0];a.pop();return b}function Nc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}M("shaka.util.MimeUtils",Jc);Jc.getFullType=Kc;
94
- (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Oc(a){this.j=null;this.i=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.C="";this.o=new Map}function Pc(a){return Qc[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Oc.prototype.destroy=function(){this.i=this.j=null;this.o.clear();return Promise.resolve()};
95
- function Rc(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g)return u(k,Promise.resolve(),2);if(!a.j||!a.i)return k["return"]();if(null==c||null==d)return a.j.parseInit(Gb(b)),k["return"]();e=a.u?c:a.s;f={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.j.parseMedia(Gb(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.i.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);z(k)})}
96
- Oc.prototype.remove=function(a,b){var c=this;return K(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 Sc(a,b,c){a.l=b;a.m=c}function Tc(a,b,c){a.C=b;if(b=a.o.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)}
97
- function Uc(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 hb(c.startTime,c.endTime,c.text)});return b}function Vc(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Vc(a,d.value,c)}
98
- function Wc(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,[]);Vc(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.C&&a.i.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.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.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
99
- a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.text.TextEngine",Oc);Oc.prototype.destroy=Oc.prototype.destroy;Oc.findParser=function(a){return Qc[a]};Oc.unregisterParser=function(a){delete Qc[a]};Oc.registerParser=function(a,b){Qc[a]=b};var Qc={};function Xc(){}function Yc(a,b){a=O(a);b=O(b);return a.split("-")[0]==b.split("-")[0]}function Zc(a,b){a=O(a);b=O(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function $c(a,b){a=O(a);b=O(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function O(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=ad.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
100
- function bd(a,b){a=O(a);b=O(b);return b==a?4:Zc(b,a)?3:$c(b,a)?2:Zc(a,b)?1:0}function cd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=ad.get(a)||a}function dd(a){return a.language?O(a.language):a.audio&&a.audio.language?O(a.audio.language):a.video&&a.video.language?O(a.video.language):"und"}
101
- function ed(a,b){for(var c=O(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(O(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,Zc(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,$c(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Zc(c,f))return f;return null}M("shaka.util.LanguageUtils",Xc);Xc.findClosestLocale=ed;Xc.getLocaleForVariant=dd;
102
- Xc.getLocaleForText=function(a){return O(a.language||"und")};Xc.getBase=cd;Xc.relatedness=bd;Xc.areSiblings=function(a,b){var c=cd(a),d=cd(b);return a!=c&&b!=d&&c==d};Xc.normalize=O;Xc.isSiblingOf=$c;Xc.isParentOf=Zc;Xc.areLanguageCompatible=Yc;Xc.areLocaleCompatible=function(a,b){a=O(a);b=O(b);return a==b};
103
- var ad=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",
93
+ function Hc(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 Ic(a,b){a.l=!0;a.h=new nc;a.m=[];a.j=[];a.i=[];var c=Gb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Jc(){}function Kc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Lc(a,b,c){a=Kc(a,b);if(Gc(a)){if(Lb.get("muxjs")())return Hc(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
94
+ function Mc(a){var b=Nc(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";
95
+ 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 Oc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Nc(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}M("shaka.util.MimeUtils",Jc);Jc.getFullType=Kc;
96
+ (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Pc(a){this.j=null;this.i=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.C="";this.o=new Map}function Qc(a){return Rc[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Pc.prototype.destroy=function(){this.i=this.j=null;this.o.clear();return Promise.resolve()};
97
+ function Sc(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g)return u(k,Promise.resolve(),2);if(!a.j||!a.i)return k["return"]();if(null==c||null==d)return a.j.parseInit(Gb(b)),k["return"]();e=a.u?c:a.s;f={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.j.parseMedia(Gb(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.i.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);z(k)})}
98
+ Pc.prototype.remove=function(a,b){var c=this;return L(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 Tc(a,b,c){a.l=b;a.m=c}function Uc(a,b,c){a.C=b;if(b=a.o.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)}
99
+ function Vc(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 ib(c.startTime,c.endTime,c.text)});return b}function Wc(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Wc(a,d.value,c)}
100
+ function Xc(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,[]);Wc(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.C&&a.i.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.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.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
101
+ a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.text.TextEngine",Pc);Pc.prototype.destroy=Pc.prototype.destroy;Pc.findParser=function(a){return Rc[a]};Pc.unregisterParser=function(a){delete Rc[a]};Pc.registerParser=function(a,b){Rc[a]=b};var Rc={};function Yc(){}function Zc(a,b){a=O(a);b=O(b);return a.split("-")[0]==b.split("-")[0]}function $c(a,b){a=O(a);b=O(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function ad(a,b){a=O(a);b=O(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function O(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=bd.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
102
+ function cd(a,b){a=O(a);b=O(b);return b==a?4:$c(b,a)?3:ad(b,a)?2:$c(a,b)?1:0}function dd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=bd.get(a)||a}function ed(a){return a.language?O(a.language):a.audio&&a.audio.language?O(a.audio.language):a.video&&a.video.language?O(a.video.language):"und"}
103
+ function fd(a,b){for(var c=O(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(O(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,$c(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,ad(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,$c(c,f))return f;return null}M("shaka.util.LanguageUtils",Yc);Yc.findClosestLocale=fd;Yc.getLocaleForVariant=ed;
104
+ Yc.getLocaleForText=function(a){return O(a.language||"und")};Yc.getBase=dd;Yc.relatedness=cd;Yc.areSiblings=function(a,b){var c=dd(a),d=dd(b);return a!=c&&b!=d&&c==d};Yc.normalize=O;Yc.isSiblingOf=ad;Yc.isParentOf=$c;Yc.areLanguageCompatible=Zc;Yc.areLocaleCompatible=function(a,b){a=O(a);b=O(b);return a==b};
105
+ var bd=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",
104
106
  "cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
105
107
  "is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
106
108
  "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",
107
109
  "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",
108
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function fd(){this.g={}}r=fd.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function gd(a,b){for(var c in a.g)b(c,a.g[c])}r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function hd(a){this.h=a;this.g=null}hd.prototype.R=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};hd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function R(a){this.h=a;this.g=null}R.prototype.Lb=function(){this.stop();this.h();return this};R.prototype.R=function(a){var b=this;this.stop();this.g=(new hd(function(){b.h()})).R(a);return this};R.prototype.Ca=function(a){var b=this;this.stop();this.g=(new hd(function(){b.g.R(a);b.h()})).R(a);return this};R.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",R);R.prototype.stop=R.prototype.stop;R.prototype.tickEvery=R.prototype.Ca;R.prototype.tickAfter=R.prototype.R;
109
- R.prototype.tickNow=R.prototype.Lb;function id(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function jd(a){return""!=kd().canPlayType(a)}function pd(){return qd("Tizen")}function rd(){return qd("CrKey")}function sd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!pd()}function td(){if(!sd())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}
110
- function qd(a){return(navigator.userAgent||"").includes(a)}function kd(){if(ud)return ud;vd||(vd=new R(function(){ud=null}));(ud=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(ud=document.createElement("video"));vd.R(1);return ud}var vd=null,ud=null;function wd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=xd(f,b,c);f=yd(f,d);b=zd(f);b=Ad(b);var g=Bd(b,e);a.variants=a.variants.filter(function(h){return Cd(h)==g?!0:!1})}function zd(a){var b=new fd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Cd(c);b.push(d,c)}return b}
111
- function Ad(a){var b=0,c=new Map,d=a.size();gd(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 fd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
112
- function xd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={md:d.md},e=b.next())if(d.md=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.md)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Yc:d.Yc},b=c.next())if(d.Yc=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Yc)}}(d)),b.length){a=b;break}return a}
113
- function Bd(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Dd||d==Ed){if(a=Fd(a,d),1==a.size())return a.keys()[0]}else if(d==Gd)break;return Hd(a)}function Fd(a,b){var c=0,d=new fd;gd(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}
114
- function Hd(a){var b="",c=Infinity;gd(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 Cd(a){var b="";a.video&&(b=Mc(a.video.codecs));var c="";a.audio&&(c=Mc(a.audio.codecs));return b+"-"+c}function Id(a,b,c){a.variants=a.variants.filter(function(d){return Jd(d,b,c)})}
115
- function Jd(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}
116
- function Kd(a,b){return K(function(c){if(1==c.g)return u(c,Ld(b,0<b.offlineSessionIds.length),2);Md(a,b);Nd(b);return u(c,Od(b),0)})}
117
- function Ld(a,b){return K(function(c){if(1==c.g)return u(c,Pd(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Qd(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=ic("video",g);g=ic("audio",g);g=Lc(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=Lc(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=Rd(f.codecs),f=Lc(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(qd("Xbox One")&&
118
- e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Za(Sd(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Za(Sd(d));return e});z(c)})}
119
- function Pd(a,b,c){var d,e,f,g,h,k,l,m,p,n,q;return K(function(v){if(d=a.some(function(x){return x.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(x,w){var y;return K(function(D){if(1==D.g)return B(D,2),u(D,e.decodingInfo(w),4);if(2!=D.g)return y=D.h,x.decodingInfos.push(y),va(D,0);E(D);JSON.stringify(w);z(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Td(l,b,c),p=t(m),n=p.next();!n.done;n=p.next())q=n.value,f.push(g(l,q));return u(v,Promise.all(f),
110
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function gd(){this.g={}}r=gd.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function hd(a,b){for(var c in a.g)b(c,a.g[c])}r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function id(a){this.h=a;this.g=null}id.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};id.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function R(a){this.h=a;this.g=null}R.prototype.Lb=function(){this.stop();this.h();return this};R.prototype.S=function(a){var b=this;this.stop();this.g=(new id(function(){b.h()})).S(a);return this};R.prototype.Da=function(a){var b=this;this.stop();this.g=(new id(function(){b.g.S(a);b.h()})).S(a);return this};R.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",R);R.prototype.stop=R.prototype.stop;R.prototype.tickEvery=R.prototype.Da;R.prototype.tickAfter=R.prototype.S;
111
+ R.prototype.tickNow=R.prototype.Lb;function jd(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function od(a){return""!=pd().canPlayType(a)}function qd(){return rd("Xbox One")}function sd(){return rd("Tizen")}function td(){return rd("CrKey")}function ud(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!sd()}function vd(){if(!ud())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}
112
+ function rd(a){return(navigator.userAgent||"").includes(a)}function pd(){if(wd)return wd;xd||(xd=new R(function(){wd=null}));(wd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(wd=document.createElement("video"));xd.S(1);return wd}var xd=null,wd=null;function yd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=zd(f,b,c);f=Ad(f,d);b=Bd(f);b=Cd(b);var g=Dd(b,e);a.variants=a.variants.filter(function(h){return Ed(h)==g?!0:!1})}function Bd(a){var b=new gd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Ed(c);b.push(d,c)}return b}
113
+ function Cd(a){var b=0,c=new Map,d=a.size();hd(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 gd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
114
+ function zd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={sd:d.sd},e=b.next())if(d.sd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.sd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={dd:d.dd},b=c.next())if(d.dd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.dd)}}(d)),b.length){a=b;break}return a}
115
+ function Dd(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Fd||d==Gd){if(a=Hd(a,d),1==a.size())return a.keys()[0]}else if(d==Id)break;return Jd(a)}function Hd(a,b){var c=0,d=new gd;hd(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}
116
+ function Jd(a){var b="",c=Infinity;hd(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 Ed(a){var b="";a.video&&(b=Mc(a.video.codecs));var c="";a.audio&&(c=Mc(a.audio.codecs));return b+"-"+c}function Kd(a,b,c){a.variants=a.variants.filter(function(d){return Ld(d,b,c)})}
117
+ function Ld(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;if(0!=a.disabledUntilTime){if(a.disabledUntilTime>Date.now()/1E3)return!1;a.disabledUntilTime=0}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}
118
+ function Md(a,b,c){var d=!1;a=t(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Ld(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Nd(a,b){return L(function(c){if(1==c.g)return u(c,Od(b,0<b.offlineSessionIds.length),2);Pd(a,b);Qd(b);return u(c,Rd(b),0)})}
119
+ function Od(a,b){return L(function(c){if(1==c.g)return u(c,Sd(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Td(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=ic("video",g);g=ic("audio",g);g=Lc(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=Lc(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=Ud(f.codecs),f=Lc(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(qd()&&e&&(e.width&&
120
+ 1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Za(Vd(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Za(Vd(d));return e});z(c)})}
121
+ function Sd(a,b,c){var d,e,f,g,h,k,l,m,p,n,q;return L(function(x){if(d=a.some(function(w){return w.decodingInfos.length}))return x["return"]();e=navigator.mediaCapabilities;f=[];g=function(w,v){var y;return L(function(D){if(1==D.g)return B(D,2),u(D,e.decodingInfo(v),4);if(2!=D.g)return y=D.h,w.decodingInfos.push(y),va(D,0);F(D);JSON.stringify(v);z(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Wd(l,b,c),p=t(m),n=p.next();!n.done;n=p.next())q=n.value,f.push(g(l,q));return u(x,Promise.all(f),
120
122
  0)})}
121
- function Td(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=ic("video",g);f=Qd(f);g=ic("audio",g);g=Lc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Qd(f);f=Lc(e.mimeType,f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
122
- break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Rd(d.codecs),f=Lc(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,[]);
123
- 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 p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=t(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,q=t(h.initData),v=q.next();!v.done;v=q.next())n.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
124
- (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 Rd(a){return pd()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
125
- function Qd(a){return"vp9"==a?"vp09.00.10.08":a}function Md(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Ud(d,a.audio)||c&&a&&a.video&&!Ud(c,a.video)?!1:!0})}function Nd(a){a.textStreams=a.textStreams.filter(function(b){return Pc(Kc(b.mimeType,b.codecs))})}
126
- function Od(a){var b,c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;if(Vd.has(f)){l.A(5);break}g=Wd.get(f);if(!g){Vd.set(f,!1);l.A(5);break}return u(l,Xd(g),7);case 7:h=l.h,Vd.set(f,h);case 5:(k=Vd.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,z(l)}})}
127
- function Xd(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)})["catch"](function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function Ud(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
128
- function Yd(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var p=t(b.roles),n=p.next();!n.done;n=p.next())m.add(n.value);if(c)for(p=t(c.roles),n=p.next();!n.done;n=p.next())m.add(n.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
123
+ function Wd(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=ic("video",g);f=Td(f);g=ic("audio",g);g=Lc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Td(f);f=Lc(e.mimeType,f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
124
+ break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Ud(d.codecs),f=Lc(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,[]);
125
+ 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 p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=t(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,q=t(h.initData),x=q.next();!x.done;x=q.next())n.add(x.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
126
+ (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 Ud(a){return sd()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
127
+ function Td(a){return"vp9"==a?"vp09.00.10.08":a}function Pd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Xd(d,a.audio)||c&&a&&a.video&&!Xd(c,a.video)?!1:!0})}function Qd(a){a.textStreams=a.textStreams.filter(function(b){return Qc(Kc(b.mimeType,b.codecs))})}
128
+ function Rd(a){var b,c,d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;if(Yd.has(f)){l.A(5);break}g=Zd.get(f);if(!g){Yd.set(f,!1);l.A(5);break}return u(l,$d(g),7);case 7:h=l.h,Yd.set(f,h);case 5:(k=Yd.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,z(l)}})}
129
+ function $d(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)})["catch"](function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function Xd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
130
+ function ae(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var p=t(b.roles),n=p.next();!n.done;n=p.next())m.add(n.value);if(c)for(p=t(c.roles),n=p.next();!n.done;n=p.next())m.add(n.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
129
131
  kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),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,
130
132
  a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.label=b.label,a.audioRoles=b.roles);return a}
131
- function Zd(a){return{id:a.id,active:!1,type:lc,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
133
+ function be(a){return{id:a.id,active:!1,type:lc,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
132
134
  originalAudioId:null,originalTextId:a.originalId,originalImageId:null}}
133
- function $d(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
134
- audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function ae(a){a.__shaka_id||(a.__shaka_id=be++);return a.__shaka_id}
135
- function ce(a){var b=de(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function ee(a){var b=de(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
136
- function de(a){return{id:ae(a),active:!1,type:"",bandwidth:0,language:O(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
137
- originalTextId:null,originalImageId:null}}function fe(a){return a.allowedByApplication&&a.allowedByKeySystem}function he(a){return a.filter(function(b){return fe(b)})}
138
- function yd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
139
- function ie(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=ed(O(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return O(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=je(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(bc,[]);return a.length?
140
- je(e,a[0]):e}function je(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Sd(a){var b=[];a.audio&&b.push(ke(a.audio));a.video&&b.push(ke(a.video));return b.join(", ")}
141
- function ke(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"}
142
- var be=0,Dd="smooth",Ed="powerEfficient",Gd="bandwidth",Vd=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Wd=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function le(){var a=this;this.l=null;this.j=!1;this.h=new Sa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.j){a.h=new Sa;a.g&&a.h.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.i=[];this.o=1;this.s=!1;this.g=this.m=null}r=le.prototype;r.stop=function(){this.l=null;this.j=!1;this.i=[];this.o=1;this.m=null};r.init=function(a){this.l=a};
143
- r.chooseVariant=function(){var a=me(this.g.restrictions,this.i),b=this.h.getBandwidthEstimate(ne(this));this.i.length&&!a.length&&(a=me(null,this.i),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.o)?1:Math.abs(this.o),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
144
- r.enable=function(){this.j=!0};r.disable=function(){this.j=!1};r.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.j)a:{if(!this.s){var c=this.h;if(!(c.g>=c.i))break a;this.s=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(ne(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate)};r.setVariants=function(a){this.i=a};
145
- r.playbackRateChanged=function(a){this.o=a};r.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function ne(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function me(a,b){a&&(b=b.filter(function(c){return Jd(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}M("shaka.abr.SimpleAbrManager",le);
146
- le.prototype.configure=le.prototype.configure;le.prototype.playbackRateChanged=le.prototype.playbackRateChanged;le.prototype.setVariants=le.prototype.setVariants;le.prototype.getBandwidthEstimate=le.prototype.getBandwidthEstimate;le.prototype.segmentDownloaded=le.prototype.segmentDownloaded;le.prototype.disable=le.prototype.disable;le.prototype.enable=le.prototype.enable;le.prototype.chooseVariant=le.prototype.chooseVariant;le.prototype.init=le.prototype.init;le.prototype.stop=le.prototype.stop;function oe(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)}oe.prototype.add=function(a){return pe(this.h,a)?(this.g.add(a),!0):!1};
147
- function pe(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)&&qe(c,d)&&re(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(qe(c,d)&&re(c.roles,d.roles)));return c?!1:!0}oe.prototype.values=function(){return this.g.values()};
148
- function qe(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return Mc(f)}),d=b.codecs.split(",").map(function(f){return Mc(f)});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 re(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 se(a){this.g=a;this.h=new te(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}se.prototype.create=function(a){var b=this,c=a.filter(function(d){return pe(b.g,d)});return c.length?new oe(c[0],c):this.h.create(a)};function te(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
149
- te.prototype.create=function(a){var b=[];b=ue(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=ve(b,this.j);a.length&&(b=a);this.g&&(a=yd(b,this.g),a.length&&(b=a));this.h&&(a=we(b,this.h),a.length&&(b=a));a=new oe(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,pe(a.h,c)&&a.add(c);return a};function ue(a,b){var c=O(b),d=ed(c,a.map(function(e){return dd(e)}));return d?a.filter(function(e){return d==dd(e)}):[]}
150
- function ve(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function we(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function xe(){this.g=ye;this.h=(new Map).set(ye,2).set(ze,1)}function Ae(a,b,c){a.h.set(ye,c).set(ze,b)}var ze=0,ye=1;function Be(a,b){var c=Ce();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=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}
151
- function De(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new N(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.o);return u(d,new Promise(function(e){(new R(e)).R(c/1E3)}),2)}a.h*=a.m;z(d)})}function Ce(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ee(a,b){this.promise=a;this.i=b;this.g=!1}function Fe(a){return new Ee(Promise.reject(a),function(){return Promise.resolve()})}function Ge(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new Ee(a,function(){return Promise.resolve()})}function He(a){return new Ee(Promise.resolve(a),function(){return Promise.resolve()})}function Ie(a){return new Ee(a,function(){return a["catch"](function(){})})}Ee.prototype.abort=function(){this.g=!0;return this.i()};
152
- function Je(a){return new Ee(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ee.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
153
- Ee.prototype.$=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ke(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new nc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Ee(f,function(){return d()})};
154
- function Ke(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",Ee);Ee.prototype.chain=Ee.prototype.$;Ee.prototype["finally"]=Ee.prototype["finally"];Ee.all=Je;Ee.prototype.abort=Ee.prototype.abort;Ee.notAbortable=Ie;Ee.completed=He;Ee.aborted=Ge;Ee.failed=Fe;function S(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}
155
- function Le(a){var b=new S(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}S.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};S.prototype.stopImmediatePropagation=function(){this.g=!0};S.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",S);function Me(){this.ea=new fd;this.Fc=this}Me.prototype.addEventListener=function(a,b){this.ea&&this.ea.push(a,b)};Me.prototype.removeEventListener=function(a,b){this.ea&&this.ea.remove(a,b)};Me.prototype.dispatchEvent=function(a){if(!this.ea)return!0;var b=this.ea.get(a.type)||[],c=this.ea.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Fc;a.currentTarget=this.Fc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
156
- Me.prototype.release=function(){this.ea=null};function Ne(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 Oe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Pe(){this.g=[]}function Qe(a,b){a.g.push(b["finally"](function(){eb(a.g,b)}))}Pe.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 Re(a,b,c){Me.call(this);this.i=!1;this.m=new Pe;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}qa(Re,Me);r=Re.prototype;r.Sd=function(a){this.o=a};function Se(a,b,c,d){c=c||Te;var e=Ue[a];if(!e||c>=e.priority)Ue[a]={priority:c,Kf:b,Lf:void 0===d?!1:d}}r.Mf=function(a){this.g.add(a)};r.cg=function(a){this.g["delete"](a)};r.Te=function(){this.g.clear()};r.Nf=function(a){this.h.add(a)};r.dg=function(a){this.h["delete"](a)};r.Ue=function(){this.h.clear()};
157
- function Ve(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Me.prototype.release.call(this);return this.m.destroy()};
158
- r.request=function(a,b){var c=this,d=new We;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new Xe(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ne(b.retryParameters):Ce();b.uris=Ne(b.uris);e=Ye(this,a,b);var f=e.$(function(){return Ze(c,a,b,new Be(b.retryParameters,!1),0,null,d)}),g=f.$(function(p){return $e(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
159
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.$(function(p){var n=Date.now()-l,q=p.response;q.timeMs+=k;q.timeMs+=n;p.yf||!c.l||q.fromCache||a!=af||c.l(q.timeMs,q.data.byteLength);return q},function(p){p&&(p.severity=2);throw p;});e=new Xe(m.promise,function(){return m.abort()},d);Qe(this.m,e);return e};
160
- function Ye(a,b,c){var d=He(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={gd:e.gd},f=a.next())e.gd=f.value,d=d.$(function(g){return function(){c.body&&(c.body=Hb(c.body));return g.gd(b,c)}}(e));return d.$(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
161
- function Ze(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Ob(c.uris[e]),k=h.Fa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Pb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ue[k])?k.Kf:null;if(!m)return Fe(new N(2,1,1E3,h));var p=k.Lf,n=null,q=null,v=!1,x=!1,w;return Ie(De(d)).$(function(){if(a.i)return Ge();w=Date.now();var y=m(c.uris[e],c,b,function(A,F,G){n&&n.stop();q&&q.R(C/1E3);a.l&&b==af&&(a.l(A,F),l=!0,g.g=G)},function(A){a.j&&a.j(A,c,b);x=!0});
162
- if(!p)return y;var D=c.retryParameters.connectionTimeout;D&&(n=new R(function(){v=!0;y.abort()}),n.R(D/1E3));var C=c.retryParameters.stallTimeout;C&&(q=new R(function(){v=!0;y.abort()}));return y}).$(function(y){n&&n.stop();q&&q.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-w);var D={response:y,yf:l};!x&&a.j&&a.j(y.headers,c,b);return D},function(y){n&&n.stop();q&&q.stop();if(a.s){var D=null,C=0;y instanceof N&&(D=y,1001==y.code&&(C=y.data[1]));a.s(c,D,C,v)}if(a.i)return Ge();v&&(y=new N(1,1,1003,
163
- c.uris[e],b));if(y instanceof N){if(7001==y.code)throw y;if(1010==y.code)throw f;if(1==y.severity)return D=(new Map).set("error",y),D=new S("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,Ze(a,b,c,d,e,y,g)}throw y;})}
164
- function $e(a,b,c){var d=He(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={hd:e.hd},f=a.next())e.hd=f.value,d=d.$(function(g){return function(){var h=c.response;h.data&&(h.data=Hb(h.data));return g.hd(b,h)}}(e));return d.$(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",Re);Re.prototype.request=Re.prototype.request;Re.prototype.destroy=Re.prototype.destroy;Re.makeRequest=Ve;
165
- Re.defaultRetryParameters=function(){return Ce()};Re.prototype.clearAllResponseFilters=Re.prototype.Ue;Re.prototype.unregisterResponseFilter=Re.prototype.dg;Re.prototype.registerResponseFilter=Re.prototype.Nf;Re.prototype.clearAllRequestFilters=Re.prototype.Te;Re.prototype.unregisterRequestFilter=Re.prototype.cg;Re.prototype.registerRequestFilter=Re.prototype.Mf;Re.unregisterScheme=function(a){delete Ue[a]};Re.registerScheme=Se;Re.prototype.setForceHTTPS=Re.prototype.Sd;function We(){this.g=0}
166
- Re.NumBytesRemainingClass=We;function Xe(a,b,c){Ee.call(this,a,b);this.h=c}qa(Xe,Ee);Re.PendingRequest=Xe;var af=1;Re.RequestType={MANIFEST:0,SEGMENT:af,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Te=3;Re.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Te};var Ue={};function bf(a){this.g=!1;this.h=new nc;this.i=a}bf.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 cf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function df(){this.g=new fd}r=df.prototype;r.release=function(){this.Ld();this.g=null};r.B=function(a,b,c,d){this.g&&(a=new ef(a,b,c,d),this.g.push(b,a))};r.sa=function(a,b,c,d){function e(g){f.Da(a,b,e);c(g)}var f=this;this.B(a,b,e,d)};r.Da=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.Da(),this.g.remove(b,e))}};
167
- r.Ld=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Da();this.g.g={}}};M("shaka.util.EventManager",df);df.prototype.removeAll=df.prototype.Ld;df.prototype.unlisten=df.prototype.Da;df.prototype.listenOnce=df.prototype.sa;df.prototype.listen=df.prototype.B;df.prototype.release=df.prototype.release;function ef(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=ff(a,d);this.target.addEventListener(b,c,this.g)}
168
- ef.prototype.Da=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function ff(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 gf(a)?b:b.capture||!1}
169
- function gf(a){var b=hf;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}hf=b}return b||!1}var hf=void 0;function jf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function kf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function lf(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 mf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function nf(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 of(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.H=new Set;this.j=this.s=null;this.ia=this.da=!1;this.J=0;this.g=null;this.o=new df;this.i=new Map;this.C=[];this.u=new nc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.qa=new Map;this.ea=new Map;this.Y=new R(function(){return pf(c)});this.M=!1;this.K=[];this.V=!1;this.fa=(new R(function(){qf(c)})).Ca(b);this.u["catch"](function(){});this.l=new bf(function(){return rf(c)});this.Z=!1;this.G=null}r=of.prototype;r.destroy=function(){return this.l.destroy()};
170
- function rf(a){return K(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.fa.stop(),a.fa=null,a.Y.stop(),a.Y=null,u(b,sf(a),2);case 2:if(!a.j){b.A(3);break}B(b,4);return u(b,a.j.setMediaKeys(null),6);case 6:va(b,5);break;case 4:E(b);case 5:a.j=null;case 3:a.g=null,a.H.clear(),a.s=null,a.C=[],a.h=null,a.m=function(){},a.D=null,a.Z=!1,a.G=null,z(b)}})}r.configure=function(a){this.h=a};function tf(a,b,c){a.ia=!0;a.C=[];a.M=c;return uf(a,b)}
171
- function vf(a,b,c){a.C=c;a.M=0<c.length;return uf(a,b)}function wf(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 xf(a,g,[])}
172
- function uf(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,x;return K(function(w){if(1==w.g){if(c=yf(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(y){return y.video&&y.video.drmInfos.length||y.audio&&y.audio.drmInfos.length?!0:!1});g||(h=lf(a.h.servers),zf(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Af(l),p=t(m),n=p.next();!n.done;n=p.next())q=n.value,Bf(q,lf(a.h.servers),lf(a.h.advanced||{}));return u(w,
173
- Pd(b,a.M,a.Z),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.da=!0,w["return"](Promise.resolve());x=xf(a,void 0,b);return w["return"](g?x:x["catch"](function(){}))})}function Cf(a){var b;return K(function(c){switch(c.g){case 1:if(a.j.mediaKeys)return c["return"]();if(!a.G){c.A(2);break}return u(c,a.G,3);case 3:return c["return"]();case 2:return B(c,4),a.G=a.j.setMediaKeys(a.s),u(c,a.G,6);case 6:va(c,5);break;case 4:b=E(c),a.m(new N(2,6,6003,b.message));case 5:cf(a.l),z(c)}})}
174
- function Ff(a,b){return K(function(c){if(1==c.g)return u(c,Cf(a),2);Gf(a,b.initDataType,Gb(b.initData));z(c)})}
175
- r.Yb=function(a){var b=this,c;return K(function(d){if(1==d.g){if(!b.s)return b.o.sa(a,"encrypted",function(){b.m(new N(2,6,6010))}),d["return"]();b.j=a;b.o.sa(b.j,"play",function(){for(var e=t(b.K),f=e.next();!f.done;f=e.next())Hf(b,f.value);b.V=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.j&&b.o.B(b.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return sf(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||window.shakaMediaKeysPolyfill||b.C.length?u(d,
176
- Cf(b),2):d.A(2)}If(b);c||b.C.length||b.o.B(b.j,"encrypted",function(e){return Ff(b,e)});z(d)})};
177
- function Jf(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=Ve([a.g.serverCertificateUri],a.h.retryParameters);B(g,3);c=a.D.mb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Gb(d.data);va(g,4);break;case 3:throw e=E(g),new N(2,6,6017,e);case 4:if(a.l.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
178
- B(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=E(g),new N(2,6,6004,f.message);}})}function Kf(a,b){var c,d,e;return K(function(f){if(1==f.g)return u(f,Lf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.La=new nc,d.push(e.La);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
179
- function If(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Gf(a,d.initDataType,d.initData);c=t(a.C);for(d=c.next();!d.done;d=c.next())Lf(a,d.value);b.length||a.C.length||a.u.resolve();return a.u}function Gf(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Eb(c,e.value.initData)&&!qd("Tizen 2"))return;Mf(a,b,c,a.g.sessionType)}}function Nf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
180
- function Of(a){a=a.i.keys();a=jf(a,function(b){return b.sessionId});return Array.from(a)}r.cc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Jc=function(){return mf(this.ea)};
181
- function xf(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,x;return K(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Pf(a,c,d);w.A(2);break}return u(w,Qf(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new N(2,6,6001);cf(a.l);B(w,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.H.add(p.contentType.toLowerCase());n=t(k);for(m=n.next();!m.done;m=n.next())q=m.value,a.H.add(q.contentType.toLowerCase());if(c.length){var y=
182
- f.keySystem;var D=d.get(f.keySystem);var C=[],A=[],F=[],G=[],H=new Set;Rf(D,C,F,A,G,H);var L=a.M?"persistent-license":"temporary";y={keySystem:y,licenseServerUri:C[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||L,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:A[0],initData:G,keyIds:H};D=t(D);for(C=D.next();!C.done;C=
183
- D.next())C=C.value,C.distinctiveIdentifierRequired&&(y.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(y.persistentStateRequired=C.persistentStateRequired);D=y}else D=f.keySystem,y=b.get(f.keySystem),C=[],A=[],F=[],G=[],H=new Set,Rf(y.drmInfos,C,F,A,G,H),D={keySystem:D,licenseServerUri:C[0],distinctiveIdentifierRequired:"required"==y.distinctiveIdentifier,persistentStateRequired:"required"==y.persistentState,sessionType:y.sessionTypes[0]||"temporary",audioRobustness:(y.audioCapabilities?
184
- y.audioCapabilities[0].robustness:"")||"",videoRobustness:(y.videoCapabilities?y.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:A[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return u(w,f.createMediaKeys(),6);case 6:return v=w.h,cf(a.l),a.s=v,a.da=!0,u(w,Jf(a),7);case 7:cf(a.l);va(w,0);break;case 4:x=E(w);cf(a.l,x);a.g=null;a.H.clear();if(x instanceof N)throw x;throw new N(2,6,6002,x.message);}})}
185
- function Pf(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Af(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={ed:d.ed},e=a.next())for(d.ed=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==
186
- l.ed}}(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}
187
- function Qf(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,x,w;return K(function(y){switch(y.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){y.A(4);break}k=h.value;if(!b.has(k)){y.A(3);break}l=b.get(k);B(y,6);return u(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
188
- y.h,y["return"](c);case 6:E(y);case 7:cf(a.l);case 3:h=g.next();y.A(2);break;case 4:m=t([!0,!1]),p=m.next();case 9:if(p.done){y.A(11);break}n=p.value;q=t(b.keys());h=q.next();case 12:if(h.done){p=m.next();y.A(9);break}v=h.value;x=b.get(v);w=x.drmInfos.some(function(D){return!!D.licenseServerUri});if(w!=n){y.A(13);break}B(y,15);return u(y,navigator.requestMediaKeySystemAccess(v,[x]),17);case 17:return c=y.h,y["return"](c);case 15:E(y);case 16:cf(a.l);case 13:h=q.next();y.A(12);break;case 11:return y["return"](c)}})}
189
- function yf(a){a=lf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Ac(f),h=Ac(e);g={kty:"oct",kid:yc(g,!1),k:yc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Gb(uc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
135
+ function ce(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
136
+ audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function de(a){a.__shaka_id||(a.__shaka_id=ee++);return a.__shaka_id}
137
+ function fe(a){var b=he(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function ie(a){var b=he(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
138
+ function he(a){return{id:de(a),active:!1,type:"",bandwidth:0,language:O(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
139
+ originalTextId:null,originalImageId:null}}function je(a){return a.allowedByApplication&&a.allowedByKeySystem}function ke(a){return a.filter(function(b){return je(b)})}
140
+ function Ad(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
141
+ function le(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=fd(O(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return O(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=me(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(bc,[]);return a.length?
142
+ me(e,a[0]):e}function me(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Vd(a){var b=[];a.audio&&b.push(ne(a.audio));a.video&&b.push(ne(a.video));return b.join(", ")}
143
+ function ne(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"}
144
+ var ee=0,Fd="smooth",Gd="powerEfficient",Id="bandwidth",Yd=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Zd=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function oe(){var a=this;this.l=null;this.j=!1;this.h=new Sa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.j){a.h=new Sa;a.g&&a.h.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.i=[];this.o=1;this.s=!1;this.g=this.m=null}r=oe.prototype;r.stop=function(){this.l=null;this.j=!1;this.i=[];this.o=1;this.m=null};r.init=function(a){this.l=a};
145
+ r.chooseVariant=function(){var a=pe(this.g.restrictions,this.i),b=this.h.getBandwidthEstimate(qe(this));this.i.length&&!a.length&&(a=pe(null,this.i),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.o)?1:Math.abs(this.o),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
146
+ r.enable=function(){this.j=!0};r.disable=function(){this.j=!1};r.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.j)a:{if(!this.s){var c=this.h;if(!(c.g>=c.i))break a;this.s=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(qe(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(qe(this))};r.setVariants=function(a){this.i=a};r.playbackRateChanged=function(a){this.o=a};
147
+ r.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function qe(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function pe(a,b){a&&(b=b.filter(function(c){return Ld(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}M("shaka.abr.SimpleAbrManager",oe);oe.prototype.configure=oe.prototype.configure;
148
+ oe.prototype.playbackRateChanged=oe.prototype.playbackRateChanged;oe.prototype.setVariants=oe.prototype.setVariants;oe.prototype.getBandwidthEstimate=oe.prototype.getBandwidthEstimate;oe.prototype.segmentDownloaded=oe.prototype.segmentDownloaded;oe.prototype.disable=oe.prototype.disable;oe.prototype.enable=oe.prototype.enable;oe.prototype.chooseVariant=oe.prototype.chooseVariant;oe.prototype.init=oe.prototype.init;oe.prototype.stop=oe.prototype.stop;function re(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)}re.prototype.add=function(a){return se(this.h,a)?(this.g.add(a),!0):!1};
149
+ function se(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)&&te(c,d)&&ue(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(te(c,d)&&ue(c.roles,d.roles)));return c?!1:!0}re.prototype.values=function(){return this.g.values()};
150
+ function te(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return Nc(f)[0]}),d=b.codecs.split(",").map(function(f){return Nc(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 ue(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 ve(a){this.g=a;this.h=new we(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}ve.prototype.create=function(a){var b=this,c=a.filter(function(d){return se(b.g,d)});return c.length?new re(c[0],c):this.h.create(a)};function we(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
151
+ we.prototype.create=function(a){var b=[];b=xe(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=ye(b,this.j);a.length&&(b=a);this.g&&(a=Ad(b,this.g),a.length&&(b=a));this.h&&(a=ze(b,this.h),a.length&&(b=a));a=new re(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,se(a.h,c)&&a.add(c);return a};function xe(a,b){var c=O(b),d=fd(c,a.map(function(e){return ed(e)}));return d?a.filter(function(e){return d==ed(e)}):[]}
152
+ function ye(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function ze(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Ae(){this.g=Be;this.h=(new Map).set(Be,2).set(Ce,1)}function De(a,b,c){a.h.set(Be,c).set(Ce,b)}var Ce=0,Be=1;function Ee(a,b){var c=Fe();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
153
+ function Ge(a){var b,c;return L(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.o);return u(d,new Promise(function(e){(new R(e)).S(c/1E3)}),2)}a.h*=a.m;z(d)})}function Fe(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function He(a,b){this.promise=a;this.i=b;this.g=!1}function Ie(a){return new He(Promise.reject(a),function(){return Promise.resolve()})}function Je(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new He(a,function(){return Promise.resolve()})}function Ke(a){return new He(Promise.resolve(a),function(){return Promise.resolve()})}function Le(a){return new He(a,function(){return a["catch"](function(){})})}He.prototype.abort=function(){this.g=!0;return this.i()};
154
+ function Me(a){return new He(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}He.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
155
+ He.prototype.$=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ne(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new nc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new He(f,function(){return d()})};
156
+ function Ne(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",He);He.prototype.chain=He.prototype.$;He.prototype["finally"]=He.prototype["finally"];He.all=Me;He.prototype.abort=He.prototype.abort;He.notAbortable=Le;He.completed=Ke;He.aborted=Je;He.failed=Ie;function S(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
157
+ function Oe(a){var b=new S(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}S.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};S.prototype.stopImmediatePropagation=function(){this.g=!0};S.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",S);
158
+ var Pe={rg:"abrstatuschanged",sg:"adaptation",tg:"buffering",vg:"downloadfailed",wg:"downloadheadersreceived",xg:"drmsessionupdate",zg:"emsg",Error:"error",Ag:"expirationupdated",Bg:"gapjumped",Dg:"loaded",Eg:"loading",Gg:"manifestparsed",Hg:"mediaqualitychanged",Metadata:"metadata",Jg:"onstatechange",Kg:"onstateidle",Lg:"ratechange",Ng:"sessiondata",Og:"stalldetected",Pg:"streaming",Qg:"textchanged",Rg:"texttrackvisibility",Sg:"timelineregionadded",Tg:"timelineregionenter",Ug:"timelineregionexit",
159
+ Vg:"trackschanged",Xg:"unloading",Yg:"variantchanged"};function Qe(){this.ea=new gd;this.Jc=this}Qe.prototype.addEventListener=function(a,b){this.ea&&this.ea.push(a,b)};Qe.prototype.removeEventListener=function(a,b){this.ea&&this.ea.remove(a,b)};Qe.prototype.dispatchEvent=function(a){if(!this.ea)return!0;var b=this.ea.get(a.type)||[],c=this.ea.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Jc;a.currentTarget=this.Jc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
160
+ Qe.prototype.release=function(){this.ea=null};function Re(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 Se(a){var b={},c;for(c in a)b[c]=a[c];return b};function Te(){this.g=[]}function Ue(a,b){a.g.push(b["finally"](function(){eb(a.g,b)}))}Te.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 Ve(a,b,c){Qe.call(this);this.i=!1;this.m=new Te;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}qa(Ve,Qe);r=Ve.prototype;r.Wd=function(a){this.o=a};function We(a,b,c,d){c=c||Xe;var e=Ye[a];if(!e||c>=e.priority)Ye[a]={priority:c,Sf:b,Tf:void 0===d?!1:d}}r.Uf=function(a){this.g.add(a)};r.kg=function(a){this.g["delete"](a)};r.af=function(){this.g.clear()};r.Vf=function(a){this.h.add(a)};r.lg=function(a){this.h["delete"](a)};r.bf=function(){this.h.clear()};
161
+ function Ze(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Qe.prototype.release.call(this);return this.m.destroy()};
162
+ r.request=function(a,b){var c=this,d=new $e;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new af(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Re(b.retryParameters):Fe();b.uris=Re(b.uris);e=bf(this,a,b);var f=e.$(function(){return cf(c,a,b,new Ee(b.retryParameters,!1),0,null,d)}),g=f.$(function(p){return df(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
163
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.$(function(p){var n=Date.now()-l,q=p.response;q.timeMs+=k;q.timeMs+=n;p.Gf||!c.l||q.fromCache||a!=ef||c.l(q.timeMs,q.data.byteLength);return q},function(p){p&&(p.severity=2);throw p;});e=new af(m.promise,function(){return m.abort()},d);Ue(this.m,e);return e};
164
+ function bf(a,b,c){var d=Ke(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={nd:e.nd},f=a.next())e.nd=f.value,d=d.$(function(g){return function(){c.body&&(c.body=Hb(c.body));return g.nd(b,c)}}(e));return d.$(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
165
+ function cf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Ob(c.uris[e]),k=h.Fa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Pb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ye[k])?k.Sf:null;if(!m)return Ie(new N(2,1,1E3,h));var p=k.Tf,n=null,q=null,x=!1,w=!1,v;return Le(Ge(d)).$(function(){if(a.i)return Je();v=Date.now();var y=m(c.uris[e],c,b,function(A,G,E){n&&n.stop();q&&q.S(C/1E3);a.l&&b==ef&&(a.l(A,G),l=!0,g.g=E)},function(A){a.j&&a.j(A,c,b);w=!0});
166
+ if(!p)return y;var D=c.retryParameters.connectionTimeout;D&&(n=new R(function(){x=!0;y.abort()}),n.S(D/1E3));var C=c.retryParameters.stallTimeout;C&&(q=new R(function(){x=!0;y.abort()}));return y}).$(function(y){n&&n.stop();q&&q.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-v);var D={response:y,Gf:l};!w&&a.j&&a.j(y.headers,c,b);return D},function(y){n&&n.stop();q&&q.stop();if(a.s){var D=null,C=0;y instanceof N&&(D=y,1001==y.code&&(C=y.data[1]));a.s(c,D,C,x)}if(a.i)return Je();x&&(y=new N(1,1,1003,
167
+ c.uris[e],b));if(y instanceof N){if(7001==y.code)throw y;if(1010==y.code)throw f;if(1==y.severity)return D=(new Map).set("error",y),D=new S("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,cf(a,b,c,d,e,y,g)}throw y;})}
168
+ function df(a,b,c){var d=Ke(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={od:e.od},f=a.next())e.od=f.value,d=d.$(function(g){return function(){var h=c.response;h.data&&(h.data=Hb(h.data));return g.od(b,h)}}(e));return d.$(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",Ve);Ve.prototype.request=Ve.prototype.request;Ve.prototype.destroy=Ve.prototype.destroy;Ve.makeRequest=Ze;
169
+ Ve.defaultRetryParameters=function(){return Fe()};Ve.prototype.clearAllResponseFilters=Ve.prototype.bf;Ve.prototype.unregisterResponseFilter=Ve.prototype.lg;Ve.prototype.registerResponseFilter=Ve.prototype.Vf;Ve.prototype.clearAllRequestFilters=Ve.prototype.af;Ve.prototype.unregisterRequestFilter=Ve.prototype.kg;Ve.prototype.registerRequestFilter=Ve.prototype.Uf;Ve.unregisterScheme=function(a){delete Ye[a]};Ve.registerScheme=We;Ve.prototype.setForceHTTPS=Ve.prototype.Wd;function $e(){this.g=0}
170
+ Ve.NumBytesRemainingClass=$e;function af(a,b,c){He.call(this,a,b);this.h=c}qa(af,He);Ve.PendingRequest=af;var ef=1;Ve.RequestType={MANIFEST:0,SEGMENT:ef,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Xe=3;Ve.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Xe};var Ye={};function ff(a){this.g=!1;this.h=new nc;this.i=a}ff.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 gf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function hf(){this.g=new gd}r=hf.prototype;r.release=function(){this.pc();this.g=null};r.B=function(a,b,c,d){this.g&&(a=new jf(a,b,c,d),this.g.push(b,a))};r.pa=function(a,b,c,d){function e(g){f.vc(a,b,e);c(g)}var f=this;this.B(a,b,e,d)};r.vc=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.vc(),this.g.remove(b,e))}};
171
+ r.pc=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.vc();this.g.g={}}};M("shaka.util.EventManager",hf);hf.prototype.removeAll=hf.prototype.pc;hf.prototype.unlisten=hf.prototype.vc;hf.prototype.listenOnce=hf.prototype.pa;hf.prototype.listen=hf.prototype.B;hf.prototype.release=hf.prototype.release;function jf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=kf(a,d);this.target.addEventListener(b,c,this.g)}
172
+ jf.prototype.vc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function kf(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 lf(a)?b:b.capture||!1}
173
+ function lf(a){var b=mf;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}mf=b}return b||!1}var mf=void 0;function nf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function of(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function pf(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 qf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function rf(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 sf(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.s=null;this.ia=this.da=!1;this.I=0;this.g=null;this.o=new hf;this.i=new Map;this.C=[];this.u=new nc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ja=new Map;this.ea=new Map;this.T=new R(function(){return tf(c)});this.M=!1;this.K=[];this.O=!1;this.fa=(new R(function(){uf(c)})).Da(b);this.u["catch"](function(){});this.j=new ff(function(){return vf(c)});this.Z=!1;this.F=null}r=sf.prototype;r.destroy=function(){return this.j.destroy()};
174
+ function vf(a){return L(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.fa.stop(),a.fa=null,a.T.stop(),a.T=null,u(b,wf(a),2);case 2:if(!a.l){b.A(3);break}B(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.s=null,a.C=[],a.h=null,a.m=function(){},a.D=null,a.Z=!1,a.F=null,z(b)}})}r.configure=function(a){this.h=a};function xf(a,b,c){a.ia=!0;a.C=[];a.M=c;return yf(a,b)}
175
+ function zf(a,b,c){a.C=c;a.M=0<c.length;return yf(a,b)}function Af(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Bf(a,g,[])}
176
+ function yf(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,x,w;return L(function(v){if(1==v.g){if(c=Cf(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(y){return y.video&&y.video.drmInfos.length||y.audio&&y.audio.drmInfos.length?!0:!1});g||(h=pf(a.h.servers),Df(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Gf(l),p=t(m),n=p.next();!n.done;n=p.next())q=n.value,Hf(q,pf(a.h.servers),pf(a.h.advanced||{}),a.h.keySystemsMapping);
177
+ return u(v,Sd(b,a.M,a.Z),2)}x=g||Object.keys(a.h.servers).length;if(!x)return a.da=!0,v["return"](Promise.resolve());w=Bf(a,void 0,b);return v["return"](g?w:w["catch"](function(){}))})}function If(a){var b;return L(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c["return"]();if(!a.F){c.A(2);break}return u(c,a.F,3);case 3:return c["return"]();case 2:return B(c,4),a.F=a.l.setMediaKeys(a.s),u(c,a.F,6);case 6:va(c,5);break;case 4:b=F(c),a.m(new N(2,6,6003,b.message));case 5:gf(a.j),z(c)}})}
178
+ function Jf(a,b){return L(function(c){if(1==c.g)return u(c,If(a),2);Kf(a,b.initDataType,Gb(b.initData));z(c)})}
179
+ r.Yb=function(a){var b=this,c;return L(function(d){if(1==d.g){if(!b.s)return b.o.pa(a,"encrypted",function(){b.m(new N(2,6,6010))}),d["return"]();b.l=a;b.o.pa(b.l,"play",function(){for(var e=t(b.K),f=e.next();!f.done;f=e.next())Lf(b,f.value);b.O=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.B(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return wf(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||window.shakaMediaKeysPolyfill||b.C.length?u(d,
180
+ If(b),2):d.A(2)}Mf(b);c||b.C.length||b.o.B(b.l,"encrypted",function(e){return Jf(b,e)});z(d)})};
181
+ function Nf(a){var b,c,d,e,f;return L(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=Ze([a.g.serverCertificateUri],a.h.retryParameters);B(g,3);c=a.D.lb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Gb(d.data);va(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"]();
182
+ B(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function Of(a,b){var c,d,e;return L(function(f){if(1==f.g)return u(f,Pf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.La=new nc,d.push(e.La);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
183
+ 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,Kf(a,d.initDataType,d.initData);c=t(a.C);for(d=c.next();!d.done;d=c.next())Pf(a,d.value);b.length||a.C.length||a.u.resolve();return a.u}function Kf(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Eb(c,e.value.initData)&&!rd("Tizen 2"))return;Qf(a,b,c,a.g.sessionType)}}function Rf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
184
+ function Sf(a){a=a.i.keys();a=nf(a,function(b){return b.sessionId});return Array.from(a)}r.ec=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Lc=function(){return qf(this.ea)};
185
+ function Bf(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,x,w;return L(function(v){switch(v.g){case 1:d=new Map;if(c.length){e=Tf(a,c,d);v.A(2);break}return u(v,Uf(a,b),3);case 3:e=v.h;case 2:f=e;if(!f)throw new N(2,6,6001);gf(a.j);B(v,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())p=m.value,a.G.add(p.contentType.toLowerCase());n=t(k);for(m=n.next();!m.done;m=n.next())q=m.value,a.G.add(q.contentType.toLowerCase());if(c.length){var y=
186
+ f.keySystem;var D=d.get(f.keySystem);var C=[],A=[],G=[],E=[],H=new Set;Vf(D,C,G,A,E,H);var J=a.M?"persistent-license":"temporary";y={keySystem:y,licenseServerUri:C[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||J,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:A[0],initData:E,keyIds:H};D=t(D);for(C=D.next();!C.done;C=
187
+ D.next())C=C.value,C.distinctiveIdentifierRequired&&(y.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(y.persistentStateRequired=C.persistentStateRequired);D=y}else D=f.keySystem,y=b.get(f.keySystem),C=[],A=[],G=[],E=[],H=new Set,Vf(y.drmInfos,C,G,A,E,H),D={keySystem:D,licenseServerUri:C[0],distinctiveIdentifierRequired:"required"==y.distinctiveIdentifier,persistentStateRequired:"required"==y.persistentState,sessionType:y.sessionTypes[0]||"temporary",audioRobustness:(y.audioCapabilities?
188
+ y.audioCapabilities[0].robustness:"")||"",videoRobustness:(y.videoCapabilities?y.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:A[0],initData:E,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return u(v,f.createMediaKeys(),6);case 6:return x=v.h,gf(a.j),a.s=x,a.da=!0,u(v,Nf(a),7);case 7:gf(a.j);va(v,0);break;case 4:w=F(v);gf(a.j,w);a.g=null;a.G.clear();if(w instanceof N)throw w;throw new N(2,6,6002,w.message);}})}
189
+ function Tf(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Gf(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new N(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={ld:d.ld},e=a.next())for(d.ld=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==
190
+ l.ld}}(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}
191
+ function Uf(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,x,w,v;return L(function(y){switch(y.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){y.A(4);break}k=h.value;if(!b.has(k)){y.A(3);break}l=b.get(k);B(y,6);return u(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
192
+ y.h,y["return"](c);case 6:F(y);case 7:gf(a.j);case 3:h=g.next();y.A(2);break;case 4:m=t([!0,!1]),p=m.next();case 9:if(p.done){y.A(11);break}n=p.value;q=t(b.keys());h=q.next();case 12:if(h.done){p=m.next();y.A(9);break}x=h.value;w=b.get(x);v=w.drmInfos.some(function(D){return!!D.licenseServerUri});if(v!=n){y.A(13);break}B(y,15);return u(y,navigator.requestMediaKeySystemAccess(x,[w]),17);case 17:return c=y.h,y["return"](c);case 15:F(y);case 16:gf(a.j);case 13:h=q.next();y.A(12);break;case 11:return y["return"](c)}})}
193
+ function Cf(a){a=pf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Ac(f),h=Ac(e);g={kty:"oct",kid:yc(g,!1),k:yc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Gb(uc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
190
194
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
191
- function Lf(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.s.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.B(c,"message",function(k){a.j&&a.h.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.V?a.K.push(k):Hf(a,k)});a.o.B(c,"keystatuseschange",function(k){return Sf(a,k)});e={initData:null,initDataType:null,loaded:!1,Gd:Infinity,La:null,type:"persistent-license"};a.i.set(c,e);B(h,2);return u(h,c.load(b),4);
192
- case 4:f=h.h;cf(a.l);if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Tf(a)&&a.u.resolve();return h["return"](c);case 2:g=E(h),cf(a.l,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
193
- function Mf(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.B(e,"message",function(f){a.j&&a.h.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.V?a.K.push(f):Hf(a,f)});a.o.B(e,"keystatuseschange",function(f){return Sf(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Gd:Infinity,La:null,type:d});a.h.logLicenseExchange&&yc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.l.g){a.i["delete"](e);var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;
194
- 0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new N(2,6,6006,f.message,f,h))}})}
195
- function Hf(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,x;K(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&yc(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=Ve([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,g.drmInfo=a.g,d&&(g.initData=d.initData,g.initDataType=d.initDataType),
196
- Nf(a.g.keySystem)&&Uf(g),h=Date.now(),B(w,2),l=a.D.mb.request(2,g),u(w,l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=E(w),p=new N(2,6,6007,m),a.m(p),d&&d.La&&d.La.reject(p),w["return"]();case 3:if(a.l.g)return w["return"]();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&yc(k.data);B(w,5);return u(w,c.update(k.data),7);case 7:va(w,6);break;case 5:return n=E(w),q=new N(2,6,6008,n.message),a.m(q),d&&d.La&&d.La.reject(q),w["return"]();case 6:v=new S("drmsessionupdate"),a.D.onEvent(v),d&&(d.La&&
197
- d.La.resolve(),x=new R(function(){d.loaded=!0;Tf(a)&&a.u.resolve()}),x.R(Vf)),z(w)}})}
198
- function Uf(a){var b=rc(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=zc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
199
- function Sf(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(Nf(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Jb(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),p=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,p,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Bc(h);a.qa.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.La&&(a.i["delete"](c),c.close()["catch"](function(){}));
200
- Tf(a)&&(a.u.resolve(),a.Y.R(Wf))}function pf(a){var b=a.qa,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new N(2,6,6014));a.D.Qc(mf(c))}
201
- function Xf(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
202
- c],f=new Map,g=function(l){var m,p,n;return K(function(q){switch(q.g){case 1:B(q,2);if("org.w3.clearkey"===l&&td())throw Error("Unsupported keySystem");return u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,qd("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:E(q),f.set(l,null),z(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](mf(f))})}
203
- function Yf(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new R(e)).R(Zf)}),B(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);E(c);z(c)})}
204
- function sf(a){var b;return K(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 K(function(g){if(1==g.g)return B(g,2),a.ia||a.C.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Yf(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);E(g);z(g)})})),0)})}
205
- function $f(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={Ea:f.Ea},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ea=[];f.Ea=f.Ea.concat(e.initData||[]);f.Ea=f.Ea.concat(h.initData||[]);f.Ea=f.Ea.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ea.findIndex(function(p){return p.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
195
+ function Pf(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:try{c=a.s.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.B(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.K.push(k):Lf(a,k)});a.o.B(c,"keystatuseschange",function(k){return Wf(a,k)});e={initData:null,initDataType:null,loaded:!1,Kd:Infinity,La:null,type:"persistent-license"};a.i.set(c,e);B(h,2);return u(h,c.load(b),4);
196
+ case 4:f=h.h;gf(a.j);if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Xf(a)&&a.u.resolve();return h["return"](c);case 2:g=F(h),gf(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
197
+ function Qf(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.B(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.K.push(f):Lf(a,f)});a.o.B(e,"keystatuseschange",function(f){return Wf(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Kd:Infinity,La: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&&yc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
198
+ 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))}})}
199
+ function Lf(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,x,w;L(function(v){switch(v.g){case 1:return c=b.target,a.h.logLicenseExchange&&yc(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=Ze([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,g.drmInfo=a.g,d&&(g.initData=d.initData,g.initDataType=d.initDataType),
200
+ Rf(a.g.keySystem)&&Yf(g),h=Date.now(),B(v,2),l=a.D.lb.request(2,g),u(v,l.promise,4);case 4:k=v.h;va(v,3);break;case 2:return m=F(v),p=new N(2,6,6007,m),a.m(p),d&&d.La&&d.La.reject(p),v["return"]();case 3:if(a.j.g)return v["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&yc(k.data);B(v,5);return u(v,c.update(k.data),7);case 7:va(v,6);break;case 5:return n=F(v),q=new N(2,6,6008,n.message),a.m(q),d&&d.La&&d.La.reject(q),v["return"]();case 6:if(a.j.g)return v["return"]();x=new S("drmsessionupdate");
201
+ a.D.onEvent(x);d&&(d.La&&d.La.resolve(),w=new R(function(){d.loaded=!0;Xf(a)&&a.u.resolve()}),w.S(Zf));z(v)}})}
202
+ function Yf(a){var b=rc(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=zc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
203
+ function Wf(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(Rf(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Jb(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),p=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,p,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Bc(h);a.ja.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.La&&(a.i["delete"](c),c.close()["catch"](function(){}));
204
+ Xf(a)&&(a.u.resolve(),a.T.S($f))}function tf(a){var b=a.ja,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new N(2,6,6014));a.D.Wc(qf(c))}
205
+ function ag(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
206
+ c],f=new Map,g=function(l){var m,p,n;return L(function(q){switch(q.g){case 1:B(q,2);if("org.w3.clearkey"===l&&vd())throw Error("Unsupported keySystem");return u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,rd("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:F(q),f.set(l,null),z(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](qf(f))})}
207
+ function bg(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new R(e)).S(cg)}),B(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);z(c)})}
208
+ function wf(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return B(g,2),a.ia||a.C.includes(e.sessionId)||"persistent-license"!==f.type?u(g,bg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);z(g)})})),0)})}
209
+ function dg(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={Ea:f.Ea},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ea=[];f.Ea=f.Ea.concat(e.initData||[]);f.Ea=f.Ea.concat(h.initData||[]);f.Ea=f.Ea.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ea.findIndex(function(p){return p.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
206
210
  e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
207
- initData:f.Ea,keyIds:g});break}}return c}function Af(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function qf(a){a.i.forEach(function(b,c){var d=b.Gd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Gd=e)})}function Tf(a){a=a.i.values();return kf(a,function(b){return b.loaded})}
208
- function zf(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
209
- function Rf(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={pa:g.pa},h=a.next()){g.pa=h.value;b.includes(g.pa.licenseServerUri)||b.push(g.pa.licenseServerUri);d.includes(g.pa.serverCertificateUri)||d.push(g.pa.serverCertificateUri);g.pa.serverCertificate&&(c.some(function(m){return function(p){return Eb(p,m.pa.serverCertificate)}}(g))||c.push(g.pa.serverCertificate));if(g.pa.initData){h={};for(var k=t(g.pa.initData),l=k.next();!l.done;h={vc:h.vc},l=k.next())h.vc=l.value,e.some(function(m){return function(p){var n=
210
- m.vc;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Eb(p.initData,n.initData)}}(h))||e.push(h.vc)}if(g.pa.keyIds)for(h=t(g.pa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
211
- function Bf(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
212
- (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 Zf=1,Vf=5,Wf=.5,ag=new oc(function(){return Hb(new Uint8Array([0]))});function bg(){}function cg(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){if(d&&(e=dg[d.toLowerCase()]))return k["return"](e);if(f=eg(a))if(g=fg[f])return k["return"](g);return d?k.A(2):u(k,gg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=dg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
213
- function gg(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=Ve([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 eg(a){a=(new Ob(a)).va.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",bg);bg.unregisterParserByMime=function(a){delete dg[a]};bg.registerParserByMime=function(a,b){dg[a]=b};
214
- bg.registerParserByExtension=function(a,b){fg[a]=b};var dg={},fg={};function hg(a,b){this.P=Jb(a);this.h=b==ig;this.g=0}r=hg.prototype;r.ma=function(){return this.g<this.P.byteLength};r.aa=function(){return this.g};r.ef=function(){return this.P.byteLength};r.Ta=function(){try{var a=this.P.getUint8(this.g);this.g+=1;return a}catch(b){throw jg();}};r.Id=function(){try{var a=this.P.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw jg();}};r.N=function(){try{var a=this.P.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw jg();}};
215
- r.xe=function(){try{var a=this.P.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw jg();}};r.Jb=function(){try{if(this.h){var a=this.P.getUint32(this.g,!0);var b=this.P.getUint32(this.g+4,!0)}else b=this.P.getUint32(this.g,!1),a=this.P.getUint32(this.g+4,!1)}catch(c){throw jg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.ab=function(a){if(this.g+a>this.P.byteLength)throw jg();var b=Gb(this.P,this.g,a);this.g+=a;return b};
216
- r.skip=function(a){if(this.g+a>this.P.byteLength)throw jg();this.g+=a};r.Tf=function(a){if(this.g<a)throw jg();this.g-=a};r.seek=function(a){if(0>a||a>this.P.byteLength)throw jg();this.g=a};r.nc=function(){for(var a=this.g;this.ma()&&0!=this.P.getUint8(this.g);)this.g+=1;a=Gb(this.P,a,this.g-a);this.g+=1;return qc(a)};function jg(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",hg);hg.prototype.readTerminatedString=hg.prototype.nc;hg.prototype.seek=hg.prototype.seek;hg.prototype.rewind=hg.prototype.Tf;
217
- hg.prototype.skip=hg.prototype.skip;hg.prototype.readBytes=hg.prototype.ab;hg.prototype.readUint64=hg.prototype.Jb;hg.prototype.readInt32=hg.prototype.xe;hg.prototype.readUint32=hg.prototype.N;hg.prototype.readUint16=hg.prototype.Id;hg.prototype.readUint8=hg.prototype.Ta;hg.prototype.getLength=hg.prototype.ef;hg.prototype.getPosition=hg.prototype.aa;hg.prototype.hasMoreData=hg.prototype.ma;var ig=1;hg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ig};function kg(){this.i=[];this.h=[];this.g=!1}r=kg.prototype;r.box=function(a,b){var c=lg(a);this.i[c]=mg;this.h[c]=b;return this};r.S=function(a,b){var c=lg(a);this.i[c]=ng;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new hg(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Sc(0,a,b,c)};
218
- r.Sc=function(a,b,c,d){var e=b.aa();if(d&&e+8>b.P.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=!1;switch(f){case 0:f=b.P.byteLength-e;break;case 1:if(d&&b.aa()+8>b.P.byteLength){this.g=!0;return}f=b.Jb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==ng){if(d&&b.aa()+4>b.P.byteLength){this.g=!0;return}m=b.N();l=m>>>24;m&=16777215}g=e+f;c&&g>b.P.byteLength&&(g=b.P.byteLength);d&&g>b.P.byteLength?this.g=!0:(d=g-b.aa(),b=0<d?b.ab(d):new Uint8Array(0),b=new hg(b,0),k({parser:this,partialOkay:c||
219
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.aa(),b.P.byteLength-b.aa()))}};function og(a){for(var b=pg(a);a.reader.ma()&&!a.parser.g;)a.parser.Sc(a.start+b,a.reader,a.partialOkay)}function qg(a){for(var b=pg(a),c=a.reader.N(),d=0;d<c&&(a.parser.Sc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function rg(a){return function(b){a(b.reader.ab(b.reader.P.byteLength-b.reader.aa()))}}
220
- function lg(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 sg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function pg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",kg);kg.headerSize=pg;kg.typeToString=sg;kg.allData=rg;kg.sampleDescription=qg;kg.children=og;kg.prototype.parseNext=kg.prototype.Sc;kg.prototype.parse=kg.prototype.parse;kg.prototype.stop=kg.prototype.stop;
221
- kg.prototype.fullBox=kg.prototype.S;kg.prototype.box=kg.prototype.box;var mg=0,ng=1;function tg(a){function b(){d=!0}function c(l){f.push(l);og(l)}a=Gb(a);var d=!1,e,f=[],g=[];(new kg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).S("stsd",function(l){e=l;f.push(l);qg(l)}).S("encv",b).S("enca",b).S("avc1",function(l){g.push({box:l,lc:1701733238})}).S("avc3",function(l){g.push({box:l,lc:1701733238})}).S("ac-3",function(l){g.push({box:l,lc:1701733217})}).S("ec-3",function(l){g.push({box:l,lc:1701733217})}).S("mp4a",function(l){g.push({box:l,lc:1701733217})}).parse(a);
222
- if(d)return a;if(0==g.length||!e)throw ab(Bc(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=ug(a,e,k.box,f,k.lc);return a}
223
- function ug(a,b,c,d,e){var f=vg.value(),g=a.subarray(c.start,c.start+c.size),h=Jb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Jb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);wg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=qd("Xbox One")?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,wg(e,d.start,d.size+k.byteLength);k=Jb(e,b.start);b=pg(b);
224
- a=k.getUint32(b);k.setUint32(b,a+1);return e}function wg(a,b,c){a=Jb(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 vg=new oc(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 xg(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(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",p=yg(d,e,h,k,l,m);f<=g;f++){for(var n=c[f],q=-1,v=-1,x=0;x<n.length;x++)if(null!=n[x]&&""!==n[x].g.trim()){q=x;break}for(x=n.length-1;0<=x;x--)if(null!=n[x]&&""!==n[x].g.trim()){v=x;break}if(-1===
225
- q||-1===v)n=zg(d,e),a.nestedCues.push(n);else{for(;q<=v;q++)if(x=n[q]){var w=x.l,y=x.i,D=x.j,C=x.h;if(w!=h||y!=k||D!=l||C!=m)p.payload&&a.nestedCues.push(p),p=yg(d,e,w,y,D,C),h=w,k=y,l=D,m=C;p.payload+=x.g}else p.payload+=" ";p.payload&&a.nestedCues.push(p);f!==g&&(p=zg(d,e),a.nestedCues.push(p));p=yg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
226
- function yg(a,b,c,d,e,f){a=new hb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function zg(a,b){var c=new hb(a,b,"");c.lineBreak=!0;return c}function Ag(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Bg(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";Cg(this)}function Dg(a,b,c){return xg(new hb(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function Cg(a){Eg(a,0,15);a.g=1}function Fg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Gg:d=Hg.has(c)?Hg.get(c):String.fromCharCode(c);break;case Ig:d=Jg.get(c);break;case Kg:a.i[a.g].pop();d=Lg.get(c);break;case Mg:a.i[a.g].pop(),d=Ng.get(c)}d&&a.i[a.g].push(new Ag(d,a.m,a.j,a.o,a.l))}}
227
- function Og(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 Eg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
228
- var Gg=0,Ig=1,Kg=2,Mg=3,Hg=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"]]),Jg=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"]]),Lg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
229
- [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"]]),Ng=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
230
- [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 Pg(a,b){this.h=Qg;this.o=new Bg(a,b);this.i=new Bg(a,b);this.l=new Bg(a,b);this.g=this.i;this.j=0;this.m=null}function Rg(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Sg&&a.h!==Tg&&(e=Dg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Eg(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Eg(c,0,15),d.g=15);a.h=Sg;d.h=b;return e}function Ug(a){a.h=Vg;a.g=a.l;a.g.h=0}function Wg(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=Tg}
231
- var Qg=0,Vg=1,Sg=3,Tg=4,Xg="black green blue cyan red yellow magenta black".split(" "),Yg="white green blue cyan red yellow magenta white_italics".split(" ");function Zg(){this.l=!1;this.C=this.G=0;this.D=$g;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";ah(this)}function ah(a){a.i=[];for(var b=0;15>b;b++)a.i.push(bh())}function bh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function ch(a,b){dh(a)&&(a.i[a.h][a.g]=new Ag(b,a.u,a.o,a.m,a.s),a.g++)}function dh(a){var b=a.g<a.C&&0<=a.g;return a.h<a.G&&0<=a.h&&b}Zg.prototype.isVisible=function(){return this.l};
232
- function eh(a,b,c){var d=new hb(a.j,b,"");d.textAlign=a.D===fh?"left":a.D===gh?"right":mb;if(c=xg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var fh=0,gh=1,$g=2;function hh(){this.i=[];this.h=null;this.g=0}function ih(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 jh(a.h)),a.h=null,a.g=0))}function jh(a){this.g=0;this.h=a}jh.prototype.ma=function(){return this.g<this.h.length};jh.prototype.aa=function(){return this.g};function kh(a){if(!a.ma())throw new N(2,2,3E3);return a.h[a.g++]}jh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function lh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
233
- function mh(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=kh(b).value;b=null;c=t(nh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=eh(e,d,a.i)),ah(e);return b}if(137===c)for(b=kh(b).value,b=t(nh(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=kh(b).value;b=null;c=t(nh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=eh(e,d,a.i)),e.l=!1;return b}if(139===c){c=kh(b).value;
234
- b=null;c=t(nh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=eh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=kh(b).value,oh(a,b,d);if(143===c)return d=oh(a,255,d),ph(a),d;if(144===c)b.skip(1),d=kh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=kh(b).value,c=kh(b).value,b.skip(1),a.g&&(b=qh((c&48)>>4,(c&12)>>2,c&3),a.g.s=qh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=kh(b).value,b=kh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
235
- b.skip(1),d=kh(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Zg;f.j=d;a.h[c]=f}d=kh(b).value;kh(b);kh(b);f=kh(b).value;var g=kh(b).value;b=kh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.G=(f&15)+1;b.C=(g&63)+1;a.g=a.h[c]}}}return null}function nh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
236
- function oh(a,b,c){var d=null;b=t(nh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=eh(f,c,a.i));a.h[e]=null}return d}function ph(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function qh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return rh[a<<2|b<<1|c]}
237
- var sh=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"]]),rh="black blue green cyan red magenta yellow white".split(" ");function th(){this.h=[];this.g=[];this.i=new hh;this.l=0;this.s=new Map([["CC1",new Pg(0,0)],["CC2",new Pg(0,1)],["CC3",new Pg(1,0)],["CC4",new Pg(1,1)]]);this.o=this.m=0;this.j=new Map;uh(this)}function uh(a){a.m=0;a.o=0;a=t(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Cg(b.i),Cg(b.l),Cg(b.o)}
238
- function vh(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=wh(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())ih(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=xh(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
239
- function wh(a,b){var c=b.type;if(16===(b.xa&112)){var d=b.xa>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.xa&&255===b.Pa||!b.xa&&!b.Pa||!yh(b.xa)||!yh(b.Pa))return 45<=++a.l&&uh(a),null;a.l=0;b.xa&=127;b.Pa&=127;if(!b.xa&&!b.Pa)return null;d=null;if(16===(b.xa&112))a:{var e=b.xa;d=b.Pa;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=Yg[f]:7===f&&(h=!0);
240
- d=1===(d&1);if(c.h!==Tg){f=c.g;if(c.h===Sg&&e!==f.g){var k=1+e-f.h;Og(f,k,1+f.g-f.h,f.h);Eg(f,0,k-1);Eg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.o="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Fg(c.g,Gg,32),g=!1,e=Yg[(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=Xg[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))Fg(c.g,Ig,d);else if(18===
241
- (e&246)&&32===(d&224))Fg(c.g,e&1?Mg:Kg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Pa){case 32:Ug(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Rg(c,2,d);break;case 38:e=Rg(c,3,d);break;case 39:e=Rg(c,4,d);break;case 40:Fg(c.g,Gg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Cg(c.o);Wg(c);break;case 43:Wg(c);break;case 44:e=c.i;g=null;c.h!==Tg&&(g=Dg(e,c.j,d));Eg(e,0,15);e=g;break;case 45:e=c.g;c.h!==Sg?e=null:(g=Dg(e,c.j,d),h=e.g-e.h+1,Og(e,h-1,h,e.h),Eg(e,
242
- 0,h-1),Eg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Eg(c.l,0,15);break;case 47:e=null,c.h!==Tg&&(e=Dg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Ug(c),c.j=d}d=e;break a}d=null}else e=b.Pa,Fg(c.g,Gg,b.xa),Fg(c.g,Gg,e);return d}
243
- function xh(a,b){var c=[];try{for(;b.ma();){var d=kh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=kh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new lh(e));for(var g=a.j.get(e),h=b.aa();b.aa()-h<f;){e=b;var k=kh(e),l=k.value,m=k.pts;if(16===l){var p=kh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!dh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.C-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=eh(q,n,g.i));if(q.h+1>=q.G){n=q;for(var v=0,x=1;15>x;x++,
244
- v++)n.i[v]=n.i[x];for(x=0;1>x;x++,v++)n.i[v]=bh()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=eh(q,n,g.i));q.i[q.h]=bh();q.g=0;break;case 12:q.isVisible()&&(e=eh(q,n,g.i)),ah(q),n=q,n.h=0,n.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=mh(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?ch(g.g,"\u266a"):ch(g.g,
245
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&ch(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(sh.has(e)){var y=sh.get(e);ch(g.g,y)}else ch(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?ch(g.g,"_"):ch(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function yh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function zh(a,b){var c=null,d=null,e=a.N();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:e,he:c,We:d}}function Ah(a,b){return{be:1==b?a.Jb():a.N()}}function Bh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
246
- function Ch(a,b,c){var d=a.N(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Nd:null,sampleSize:null,Uc:null};c&256&&(g.Nd=a.N());c&512&&(g.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(g.Uc=0==b?a.N():a.xe());e.push(g)}return{Sg:d,ze:e}};function Dh(){this.i=new Map;this.h=this.g=0}
247
- Dh.prototype.init=function(a){var b=this,c=[],d=[];(new kg).box("moov",og).box("mvex",og).S("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.N();f=f.N();b.g=e;b.h=f}).box("trak",og).S("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.N();c.push(e)}).box("mdia",og).S("mdhd",function(e){e=Bh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
248
- Dh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new kg).box("moof",og).box("traf",og).S("trun",function(k){f=Ch(k.reader,k.version,k.flags).ze}).S("tfhd",function(k){k=zh(k.reader,k.flags);d=k.he||b.g;e=k.We||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).S("tfdt",function(k){g=Ah(k.reader,k.version).be}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,p=d,n=e,q=f,v=0,x=n;for(q.length&&(x=q[0].sampleSize||n);k.ma();){var w=k.N();if(6==
249
- (k.Ta()&31)){var y=0;q.length>v&&(y=q[v].Uc||0);y=(l+y)/m;for(var D=[],C,A=k.ab(w-1),F=C=0;F<A.length;)2==C&&3==A[F]?(C=0,A=[].concat(ia(A)),A.splice(F,1),A=new Uint8Array(A)):0==A[F]?C++:C=0,F++;C=A;for(F=0;F<C.length;){for(A=0;255==C[F];)A+=255,F++;A+=C[F++];for(var G=0;255==C[F];)G+=255,F++;G+=C[F++];4==A&&D.push(C.subarray(F,F+G));F+=G}D=t(D);for(C=D.next();!C.done;C=D.next())c.push({Jf:C.value,pts:y})}else try{k.skip(w-1)}catch(H){break}x-=w+4;0==x&&(l=q.length>v?l+(q[v].Nd||p):l+p,v++,x=q.length>
250
- v?q[v].sampleSize||n:n)}}).parse(a,!1);return c};function Eh(){this.h=new Dh;this.g=new th}Eh.prototype.init=function(a){this.h.init(a)};
251
- function Fh(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=Gb(e.Jf);if(0<f.length&&(d=a.g,e=e.pts,f=new hg(f,0),181===f.Ta()&&49===f.Id()&&1195456820===f.N()&&3===f.Ta())){var g=f.Ta();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Ta(),l=(k&4)>>2,m=f.Ta(),p=f.Ta();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,xa:m,Pa:p,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:p,order:d.g.length})))}}}}return vh(a.g)}
252
- ;function Gh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Hh(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Ih(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(Jh(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
253
- function Kh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Jh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Jh(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 Lh(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.K={};this.J={};this.g=null;this.D=!1;this.M=d||function(){};this.i={};this.o=new df;this.s={};this.u=b;this.G=new nc;this.m=Mh(this,this.G);this.C=new bf(function(){return Nh(e)});this.H=""}function Mh(a,b){var c=new MediaSource;a.o.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.H);b.resolve()});a.H=Oh(c);a.j.src=a.H;return c}r=Lh.prototype;r.destroy=function(){return this.C.destroy()};
254
- function Nh(a){var b,c,d,e,f,g,h,k;return K(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"](cc)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.s)b.push(a.s[k].destroy());return u(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.s={};a.u=null;a.i=
211
+ initData:f.Ea,keyIds:g});break}}return c}function Gf(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.Kd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Kd=e)})}function Xf(a){a=a.i.values();return of(a,function(b){return b.loaded})}
212
+ function Df(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
213
+ function Vf(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={ra:g.ra},h=a.next()){g.ra=h.value;b.includes(g.ra.licenseServerUri)||b.push(g.ra.licenseServerUri);d.includes(g.ra.serverCertificateUri)||d.push(g.ra.serverCertificateUri);g.ra.serverCertificate&&(c.some(function(m){return function(p){return Eb(p,m.ra.serverCertificate)}}(g))||c.push(g.ra.serverCertificate));if(g.ra.initData){h={};for(var k=t(g.ra.initData),l=k.next();!l.done;h={yc:h.yc},l=k.next())h.yc=l.value,e.some(function(m){return function(p){var n=
214
+ m.yc;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Eb(p.initData,n.initData)}}(h))||e.push(h.yc)}if(g.ra.keyIds)for(h=t(g.ra.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
215
+ function Hf(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))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||(a.serverCertificate=
216
+ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var cg=1,Zf=5,$f=.5,eg=new oc(function(){return Hb(new Uint8Array([0]))});function fg(){}function gg(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){if(d&&(e=hg[d.toLowerCase()]))return k["return"](e);if(f=ig(a))if(g=jg[f])return k["return"](g);return d?k.A(2):u(k,kg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=hg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
217
+ function kg(a,b,c){var d,e,f;return L(function(g){if(1==g.g)return d=Ze([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 ig(a){a=(new Ob(a)).va.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",fg);fg.unregisterParserByMime=function(a){delete hg[a]};fg.registerParserByMime=function(a,b){hg[a]=b};
218
+ fg.registerParserByExtension=function(a,b){jg[a]=b};var hg={},jg={};function lg(a,b){this.R=Jb(a);this.h=b==mg;this.g=0}r=lg.prototype;r.na=function(){return this.g<this.R.byteLength};r.aa=function(){return this.g};r.nf=function(){return this.R.byteLength};r.Ta=function(){try{var a=this.R.getUint8(this.g);this.g+=1;return a}catch(b){throw ng();}};r.Nd=function(){try{var a=this.R.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw ng();}};r.N=function(){try{var a=this.R.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw ng();}};
219
+ r.Fe=function(){try{var a=this.R.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw ng();}};r.Jb=function(){try{if(this.h){var a=this.R.getUint32(this.g,!0);var b=this.R.getUint32(this.g+4,!0)}else b=this.R.getUint32(this.g,!1),a=this.R.getUint32(this.g+4,!1)}catch(c){throw ng();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.ab=function(a){if(this.g+a>this.R.byteLength)throw ng();var b=Gb(this.R,this.g,a);this.g+=a;return b};
220
+ r.skip=function(a){if(this.g+a>this.R.byteLength)throw ng();this.g+=a};r.ag=function(a){if(this.g<a)throw ng();this.g-=a};r.seek=function(a){if(0>a||a>this.R.byteLength)throw ng();this.g=a};r.oc=function(){for(var a=this.g;this.na()&&0!=this.R.getUint8(this.g);)this.g+=1;a=Gb(this.R,a,this.g-a);this.g+=1;return qc(a)};function ng(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",lg);lg.prototype.readTerminatedString=lg.prototype.oc;lg.prototype.seek=lg.prototype.seek;lg.prototype.rewind=lg.prototype.ag;
221
+ lg.prototype.skip=lg.prototype.skip;lg.prototype.readBytes=lg.prototype.ab;lg.prototype.readUint64=lg.prototype.Jb;lg.prototype.readInt32=lg.prototype.Fe;lg.prototype.readUint32=lg.prototype.N;lg.prototype.readUint16=lg.prototype.Nd;lg.prototype.readUint8=lg.prototype.Ta;lg.prototype.getLength=lg.prototype.nf;lg.prototype.getPosition=lg.prototype.aa;lg.prototype.hasMoreData=lg.prototype.na;var mg=1;lg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:mg};function og(){this.i=[];this.h=[];this.g=!1}r=og.prototype;r.box=function(a,b){var c=pg(a);this.i[c]=qg;this.h[c]=b;return this};r.U=function(a,b){var c=pg(a);this.i[c]=rg;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new lg(a,0);for(this.g=!1;a.na()&&!this.g;)this.Yc(0,a,b,c)};
222
+ r.Yc=function(a,b,c,d){var e=b.aa();if(d&&e+8>b.R.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=!1;switch(f){case 0:f=b.R.byteLength-e;break;case 1:if(d&&b.aa()+8>b.R.byteLength){this.g=!0;return}f=b.Jb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==rg){if(d&&b.aa()+4>b.R.byteLength){this.g=!0;return}m=b.N();l=m>>>24;m&=16777215}g=e+f;c&&g>b.R.byteLength&&(g=b.R.byteLength);d&&g>b.R.byteLength?this.g=!0:(d=g-b.aa(),b=0<d?b.ab(d):new Uint8Array(0),b=new lg(b,0),k({parser:this,partialOkay:c||
223
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.aa(),b.R.byteLength-b.aa()))}};function sg(a){for(var b=tg(a);a.reader.na()&&!a.parser.g;)a.parser.Yc(a.start+b,a.reader,a.partialOkay)}function ug(a){for(var b=tg(a),c=a.reader.N(),d=0;d<c&&(a.parser.Yc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function vg(a){return function(b){a(b.reader.ab(b.reader.R.byteLength-b.reader.aa()))}}
224
+ function pg(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 wg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function tg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",og);og.headerSize=tg;og.typeToString=wg;og.allData=vg;og.sampleDescription=ug;og.children=sg;og.prototype.parseNext=og.prototype.Yc;og.prototype.parse=og.prototype.parse;og.prototype.stop=og.prototype.stop;
225
+ og.prototype.fullBox=og.prototype.U;og.prototype.box=og.prototype.box;var qg=0,rg=1;function xg(a){function b(){d=!0}function c(l){f.push(l);sg(l)}a=Gb(a);var d=!1,e,f=[],g=[];(new og).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).U("stsd",function(l){e=l;f.push(l);ug(l)}).U("encv",b).U("enca",b).U("avc1",function(l){g.push({box:l,mc:1701733238})}).U("avc3",function(l){g.push({box:l,mc:1701733238})}).U("ac-3",function(l){g.push({box:l,mc:1701733217})}).U("ec-3",function(l){g.push({box:l,mc:1701733217})}).U("mp4a",function(l){g.push({box:l,mc:1701733217})}).parse(a);
226
+ if(d)return a;if(0==g.length||!e)throw ab(Bc(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=yg(a,e,k.box,f,k.mc);return a}
227
+ function yg(a,b,c,d,e){var f=zg.value(),g=a.subarray(c.start,c.start+c.size),h=Jb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Jb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Ag(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=qd()?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,Ag(e,d.start,d.size+k.byteLength);k=Jb(e,b.start);b=tg(b);a=k.getUint32(b);
228
+ k.setUint32(b,a+1);return e}function Ag(a,b,c){a=Jb(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 zg=new oc(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 Bg(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(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",p=Cg(d,e,h,k,l,m);f<=g;f++){for(var n=c[f],q=-1,x=-1,w=0;w<n.length;w++)if(null!=n[w]&&""!==n[w].g.trim()){q=w;break}for(w=n.length-1;0<=w;w--)if(null!=n[w]&&""!==n[w].g.trim()){x=w;break}if(-1===
229
+ q||-1===x)n=Dg(d,e),a.nestedCues.push(n);else{for(;q<=x;q++)if(w=n[q]){var v=w.l,y=w.i,D=w.j,C=w.h;if(v!=h||y!=k||D!=l||C!=m)p.payload&&a.nestedCues.push(p),p=Cg(d,e,v,y,D,C),h=v,k=y,l=D,m=C;p.payload+=w.g}else p.payload+=" ";p.payload&&a.nestedCues.push(p);f!==g&&(p=Dg(d,e),a.nestedCues.push(p));p=Cg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
230
+ function Cg(a,b,c,d,e,f){a=new ib(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Dg(a,b){var c=new ib(a,b,"");c.lineBreak=!0;return c}function Eg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Fg(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";Gg(this)}function Hg(a,b,c){return Bg(new ib(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function Gg(a){Ig(a,0,15);a.g=1}function Jg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Kg:d=Lg.has(c)?Lg.get(c):String.fromCharCode(c);break;case Mg:d=Ng.get(c);break;case Og:a.i[a.g].pop();d=Pg.get(c);break;case Qg:a.i[a.g].pop(),d=Rg.get(c)}d&&a.i[a.g].push(new Eg(d,a.m,a.j,a.o,a.l))}}
231
+ function Sg(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 Ig(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
232
+ var Kg=0,Mg=1,Og=2,Qg=3,Lg=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"]]),Ng=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"]]),Pg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
233
+ [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"]]),Rg=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
234
+ [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 Tg(a,b){this.h=Ug;this.o=new Fg(a,b);this.i=new Fg(a,b);this.l=new Fg(a,b);this.g=this.i;this.j=0;this.m=null}function Vg(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Wg&&a.h!==Xg&&(e=Hg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Ig(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Ig(c,0,15),d.g=15);a.h=Wg;d.h=b;return e}function Yg(a){a.h=Zg;a.g=a.l;a.g.h=0}function $g(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=Xg}
235
+ var Ug=0,Zg=1,Wg=3,Xg=4,ah="black green blue cyan red yellow magenta black".split(" "),bh="white green blue cyan red yellow magenta white_italics".split(" ");function ch(){this.l=!1;this.C=this.F=0;this.D=dh;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";eh(this)}function eh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(fh())}function fh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function gh(a,b){hh(a)&&(a.i[a.h][a.g]=new Eg(b,a.u,a.o,a.m,a.s),a.g++)}function hh(a){var b=a.g<a.C&&0<=a.g;return a.h<a.F&&0<=a.h&&b}ch.prototype.isVisible=function(){return this.l};
236
+ function ih(a,b,c){var d=new ib(a.j,b,"");d.textAlign=a.D===jh?"left":a.D===kh?"right":mb;if(c=Bg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var jh=0,kh=1,dh=2;function lh(){this.i=[];this.h=null;this.g=0}function mh(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 nh(a.h)),a.h=null,a.g=0))}function nh(a){this.g=0;this.h=a}nh.prototype.na=function(){return this.g<this.h.length};nh.prototype.aa=function(){return this.g};function oh(a){if(!a.na())throw new N(2,2,3E3);return a.h[a.g++]}nh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function ph(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
237
+ function qh(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=oh(b).value;b=null;c=t(rh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=ih(e,d,a.i)),eh(e);return b}if(137===c)for(b=oh(b).value,b=t(rh(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=oh(b).value;b=null;c=t(rh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=ih(e,d,a.i)),e.l=!1;return b}if(139===c){c=oh(b).value;
238
+ b=null;c=t(rh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=ih(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=oh(b).value,sh(a,b,d);if(143===c)return d=sh(a,255,d),th(a),d;if(144===c)b.skip(1),d=oh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=oh(b).value,c=oh(b).value,b.skip(1),a.g&&(b=uh((c&48)>>4,(c&12)>>2,c&3),a.g.s=uh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=oh(b).value,b=oh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
239
+ b.skip(1),d=oh(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new ch;f.j=d;a.h[c]=f}d=oh(b).value;oh(b);oh(b);f=oh(b).value;var g=oh(b).value;b=oh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.F=(f&15)+1;b.C=(g&63)+1;a.g=a.h[c]}}}return null}function rh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
240
+ function sh(a,b,c){var d=null;b=t(rh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=ih(f,c,a.i));a.h[e]=null}return d}function th(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function uh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return vh[a<<2|b<<1|c]}
241
+ var wh=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"]]),vh="black blue green cyan red magenta yellow white".split(" ");function xh(){this.h=[];this.g=[];this.i=new lh;this.l=0;this.s=new Map([["CC1",new Tg(0,0)],["CC2",new Tg(0,1)],["CC3",new Tg(1,0)],["CC4",new Tg(1,1)]]);this.o=this.m=0;this.j=new Map;yh(this)}function yh(a){a.m=0;a.o=0;a=t(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Gg(b.i),Gg(b.l),Gg(b.o)}
242
+ function zh(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=Ah(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())mh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=Bh(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
243
+ function Ah(a,b){var c=b.type;if(16===(b.ya&112)){var d=b.ya>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.ya&&255===b.Oa||!b.ya&&!b.Oa||!Ch(b.ya)||!Ch(b.Oa))return 45<=++a.l&&yh(a),null;a.l=0;b.ya&=127;b.Oa&=127;if(!b.ya&&!b.Oa)return null;d=null;if(16===(b.ya&112))a:{var e=b.ya;d=b.Oa;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=bh[f]:7===f&&(h=!0);
244
+ d=1===(d&1);if(c.h!==Xg){f=c.g;if(c.h===Wg&&e!==f.g){var k=1+e-f.h;Sg(f,k,1+f.g-f.h,f.h);Ig(f,0,k-1);Ig(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.o="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Jg(c.g,Kg,32),g=!1,e=bh[(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=ah[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))Jg(c.g,Mg,d);else if(18===
245
+ (e&246)&&32===(d&224))Jg(c.g,e&1?Qg:Og,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Oa){case 32:Yg(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Vg(c,2,d);break;case 38:e=Vg(c,3,d);break;case 39:e=Vg(c,4,d);break;case 40:Jg(c.g,Kg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Gg(c.o);$g(c);break;case 43:$g(c);break;case 44:e=c.i;g=null;c.h!==Xg&&(g=Hg(e,c.j,d));Ig(e,0,15);e=g;break;case 45:e=c.g;c.h!==Wg?e=null:(g=Hg(e,c.j,d),h=e.g-e.h+1,Sg(e,h-1,h,e.h),Ig(e,
246
+ 0,h-1),Ig(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Ig(c.l,0,15);break;case 47:e=null,c.h!==Xg&&(e=Hg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Yg(c),c.j=d}d=e;break a}d=null}else e=b.Oa,Jg(c.g,Kg,b.ya),Jg(c.g,Kg,e);return d}
247
+ function Bh(a,b){var c=[];try{for(;b.na();){var d=oh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=oh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new ph(e));for(var g=a.j.get(e),h=b.aa();b.aa()-h<f;){e=b;var k=oh(e),l=k.value,m=k.pts;if(16===l){var p=oh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!hh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.C-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=ih(q,n,g.i));if(q.h+1>=q.F){n=q;for(var x=0,w=1;15>w;w++,
248
+ x++)n.i[x]=n.i[w];for(w=0;1>w;w++,x++)n.i[x]=fh()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=ih(q,n,g.i));q.i[q.h]=fh();q.g=0;break;case 12:q.isVisible()&&(e=ih(q,n,g.i)),eh(q),n=q,n.h=0,n.g=0}var v=e}else v=null}else if(128<=l&&159>=l)v=qh(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?gh(g.g,"\u266a"):gh(g.g,
249
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&gh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(wh.has(e)){var y=wh.get(e);gh(g.g,y)}else gh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?gh(g.g,"_"):gh(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Ch(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Dh(a,b){var c=null,d=null,e=a.N();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:e,ne:c,df:d}}function Eh(a,b){return{he:1==b?a.Jb():a.N()}}function Fh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
250
+ function Gh(a,b,c){var d=a.N(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Rd:null,sampleSize:null,$c:null};c&256&&(g.Rd=a.N());c&512&&(g.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(g.$c=0==b?a.N():a.Fe());e.push(g)}return{bh:d,He:e}};function Hh(){this.i=new Map;this.h=this.g=0}
251
+ Hh.prototype.init=function(a){var b=this,c=[],d=[];(new og).box("moov",sg).box("mvex",sg).U("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.N();f=f.N();b.g=e;b.h=f}).box("trak",sg).U("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.N();c.push(e)}).box("mdia",sg).U("mdhd",function(e){e=Fh(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])})};
252
+ Hh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new og).box("moof",sg).box("traf",sg).U("trun",function(k){f=Gh(k.reader,k.version,k.flags).He}).U("tfhd",function(k){k=Dh(k.reader,k.flags);d=k.ne||b.g;e=k.df||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=Eh(k.reader,k.version).he}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,p=d,n=e,q=f,x=0,w=n;for(q.length&&(w=q[0].sampleSize||n);k.na();){var v=k.N();if(6==
253
+ (k.Ta()&31)){var y=0;q.length>x&&(y=q[x].$c||0);y=(l+y)/m;for(var D=[],C,A=k.ab(v-1),G=C=0;G<A.length;)2==C&&3==A[G]?(C=0,A=[].concat(ia(A)),A.splice(G,1),A=new Uint8Array(A)):0==A[G]?C++:C=0,G++;C=A;for(G=0;G<C.length;){for(A=0;255==C[G];)A+=255,G++;A+=C[G++];for(var E=0;255==C[G];)E+=255,G++;E+=C[G++];4==A&&D.push(C.subarray(G,G+E));G+=E}D=t(D);for(C=D.next();!C.done;C=D.next())c.push({Rf:C.value,pts:y})}else try{k.skip(v-1)}catch(H){break}w-=v+4;0==w&&(l=q.length>x?l+(q[x].Rd||p):l+p,x++,w=q.length>
254
+ x?q[x].sampleSize||n:n)}}).parse(a,!1);return c};function Ih(){this.h=new Hh;this.g=new xh}Ih.prototype.init=function(a){this.h.init(a)};
255
+ function Jh(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=Gb(e.Rf);if(0<f.length&&(d=a.g,e=e.pts,f=new lg(f,0),181===f.Ta()&&49===f.Nd()&&1195456820===f.N()&&3===f.Ta())){var g=f.Ta();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Ta(),l=(k&4)>>2,m=f.Ta(),p=f.Ta();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,ya:m,Oa:p,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:p,order:d.g.length})))}}}}return zh(a.g)}
256
+ ;function Kh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function Lh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Mh(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
257
+ function Nh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(Oh(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}function Ph(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Oh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Oh(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Qh(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.M={};this.K={};this.g=null;this.F=!1;this.T=d||function(){};this.i={};this.o=new hf;this.u={};this.C=b;this.G=new nc;this.l=Rh(this,this.G);this.D=new ff(function(){return Sh(e)});this.I="";this.s=!1;this.O=new nc}function Rh(a,b){var c=new MediaSource;a.o.pa(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=Th(c);a.j.src=a.I;return c}r=Qh.prototype;r.destroy=function(){return this.D.destroy()};
258
+ function Sh(a){var b,c,d,e,f,g,h,k;return L(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](cc)),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.m&&b.push(a.m.destroy());for(k in a.u)b.push(a.u[k].destroy());return u(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.u={};a.C=null;a.i=
255
259
  {};z(l)})}
256
- r.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return K(function(p){if(1==p.g)return e=mc,u(p,d.G,2);f={};g=t(a.keys());for(h=g.next();!h.done;f={oa:f.oa},h=g.next())f.oa=h.value,k=a.get(f.oa),l=Kc(k.mimeType,k.codecs),f.oa==e.X?Ph(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!Fc(l,f.oa)||(d.s[f.oa]=new Ec,l=Hc(f.oa,l)),m=d.m.addSourceBuffer(l),c&&(m.mode=Qh),d.o.B(m,"error",function(n){return function(){d.i[n.oa][0].p.reject(new N(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.o.B(m,
257
- "updateend",function(n){return function(){return Rh(d,n.oa)}}(f)),d.h[f.oa]=m,d.K[f.oa]=l,d.i[f.oa]=[],d.J[f.oa]=!!k.drmInfos.length);z(p)})};function Ph(a,b,c){a.g||(a.g=new Oc(a.l));var d=a.g;a=a.D;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,Qc[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Va('Text parsers should have a "setSequenceMode" method!'),d.u=a)}function Sh(a){return a.m?"ended"==a.m.readyState:!0}
258
- function Th(a,b){if(b==lc)var c=a.g.g;else c=Uh(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 Vh(a,b){return b==lc?a.g.h:Gh(Uh(a,b))}function Wh(a,b,c){if(b==lc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Uh(a,b);return Ih(a,c)}
259
- r.$a=function(){var a={total:Jh(this.j.buffered),audio:Jh(Uh(this,"audio")),video:Jh(Uh(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 Uh(a,b){try{return a.h[b].buffered}catch(c){return null}}
260
- function Xh(a,b,c,d,e,f,g,h){var k,l,m,p,n,q,v,x,w;return K(function(y){if(1==y.g){k=mc;null!=d&&h&&b!=k.X&&g&&(l=d,Yh(a,b,function(){var D=l;0>D&&(D+=.001);a.h[b].timestampOffset=D;Rh(a,b)}));if(b==k.X)return u(y,Rc(a.g,c,d,e),0);if(a.s[b])return u(y,Ic(a.s[b],c),10);if(f)return a.g||Ph(a,"text/vtt",h||!1),null==d&&null==e?a.u.init(c):(m=Fh(a.u,c),m.length&&(p=a.h[k.Oa].timestampOffset,Wc(a.g,m,d,e,p))),c=Zh(a,c,d,b),u(y,Yh(a,b,function(){a.h[b].appendBuffer(c)}),0);c=Zh(a,c,d,b);return u(y,Yh(a,
261
- b,function(){a.h[b].appendBuffer(c)}),0)}n=y.h;a.g||Ph(a,"text/vtt",h||!1);n.metadata&&(q=a.h[b].timestampOffset,a.M(n.metadata,q,e));n.captions&&n.captions.length&&(v=a.h[k.Oa].timestampOffset,x=Uc(n.captions),Wc(a.g,x,d,e,v));w=n.data;w=Zh(a,w,d,b);return u(y,Yh(a,b,function(){a.h[b].appendBuffer(w)}),0)})}function $h(a,b){var c=Vh(a,"video")||0;Tc(a.g,b,c)}function ai(a){a.g&&Tc(a.g,"",0)}
262
- r.remove=function(a,b,c){var d=this,e;return K(function(f){e=mc;return a==e.X?u(f,d.g.remove(b,c),0):u(f,Yh(d,a,function(){c<=b?Rh(d,a):d.h[a].remove(b,c)}),0)})};function bi(a,b){var c;return K(function(d){c=mc;return b==c.X?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,Yh(a,b,function(){var e=a.m.duration;0>=e?Rh(a,b):a.h[b].remove(0,e)}),0)})}r.flush=function(a){var b=this,c;return K(function(d){c=mc;return a==c.X?d["return"]():u(d,Yh(b,a,function(){b.j.currentTime-=.001;Rh(b,a)}),0)})};
263
- function ci(a,b,c,d,e,f){var g;return K(function(h){g=mc;return b==g.X?(f||(a.g.s=c),Sc(a.g,d,e),h["return"]()):u(h,Promise.all([Yh(a,b,function(){var k=a.h[b].appendWindowStart,l=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=k;a.h[b].appendWindowEnd=l;Rh(a,b)}),f?Promise.resolve():Yh(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;Rh(a,b)}),Yh(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Rh(a,b)})]),0)})}
264
- r.endOfStream=function(a){var b=this;return K(function(c){return u(c,di(b,function(){Sh(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};r.Ka=function(a){var b=this;return K(function(c){return u(c,di(b,function(){b.m.duration=a}),0)})};r.getDuration=function(){return this.m.duration};function Rh(a,b){var c=a.i[b][0];c&&(c.p.resolve(),ei(a,b))}function Yh(a,b,c){cf(a.C);c={start:c,p:new nc};a.i[b].push(c);1==a.i[b].length&&fi(a,b);return c.p}
265
- function di(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:cf(a.C);c=[];d={};for(e in a.h)d.Sb=new nc,f={start:function(l){return function(){return l.Sb.resolve()}}(d),p:d.Sb},a.i[e].push(f),c.push(d.Sb),1==a.i[e].length&&f.start(),d={Sb:d.Sb};B(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=E(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)ei(a,h)}z(k)}})}function ei(a,b){a.i[b].shift();fi(a,b)}
266
- function fi(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)),ei(a,b)}}function Zh(a,b,c,d){var e=a.J[d];null==c&&e&&(pd()||qd("Xbox One"))&&"mp4"==a.K[d].split(";")[0].split("/")[1]&&(b=tg(b));return b}var Oh=window.URL.createObjectURL,Qh="sequence",gi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function hi(a,b,c,d){this.ya=a;this.Ba=b;this.la=c;this.Bd=void 0===d?null:d}hi.prototype.hc=function(){return this.Ba};hi.prototype.bc=function(){return this.la};function ii(a,b){return a&&b?a.hc()==b.hc()&&a.bc()==b.bc()&&gb(a.ya(),b.ya()):a==b}M("shaka.media.InitSegmentReference",hi);hi.prototype.getEndByte=hi.prototype.bc;hi.prototype.getStartByte=hi.prototype.hc;
267
- function ji(a,b,c,d,e,f,g,h,k,l,m,p,n,q){l=void 0===l?[]:l;q=void 0===q?ki:q;this.startTime=a;this.j=this.endTime=b;this.i=c;this.Ba=d;this.la=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.ua=l;this.tilesLayout=void 0===m?"":m;this.h=void 0===p?null:p;this.W=void 0===n?null:n;this.status=q}r=ji.prototype;r.ya=function(){return this.i()};r.getStartTime=function(){return this.startTime};r.cf=function(){return this.endTime};r.hc=function(){return this.Ba};
268
- r.bc=function(){return this.la};r.vf=function(){return this.tilesLayout};r.uf=function(){return this.h};r.od=function(){return this.status};r.Cf=function(){this.status=li};M("shaka.media.SegmentReference",ji);ji.prototype.markAsUnavailable=ji.prototype.Cf;ji.prototype.getStatus=ji.prototype.od;ji.prototype.getTileDuration=ji.prototype.uf;ji.prototype.getTilesLayout=ji.prototype.vf;ji.prototype.getEndByte=ji.prototype.bc;ji.prototype.getStartByte=ji.prototype.hc;ji.prototype.getEndTime=ji.prototype.cf;
269
- ji.prototype.getStartTime=ji.prototype.getStartTime;ji.prototype.getUris=ji.prototype.ya;var ki=0,li=1;ji.Status={ig:ki,Mg:li,wg:2};function T(a,b,c){this.l=a;this.Tc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.C=void 0===c?!0:c;this.D=0}r=T.prototype;r.getDuration=function(){return this.i};r.jf=function(){return this.g};r.Ka=function(a){this.i=a};r.pf=function(){return this.l};r.De=function(a){this.o=a};r.sc=function(a){this.s=a};r.Vd=function(a){this.m=a};r.Zf=function(a){this.Tc=a};r.bf=function(){return this.Tc};
270
- r.Gb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Fd(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.C&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.Fd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Ed=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};r.T=function(){return Infinity==this.i&&!this.s};
271
- r.lb=function(){return Infinity!=this.i&&!this.s};r.Ra=function(){return Math.max(this.u,this.hb()-this.m)};r.Ee=function(a){this.u=a};r.hb=function(){return this.T()||this.lb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};r.fc=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.hb()-this.m+a,this.Qa()))};r.Cb=function(){return this.fc(0)};
272
- r.Qa=function(){return Math.max(0,this.hb()-(this.T()||this.lb()?this.Tc:0))};r.He=function(){return null==this.l||null!=this.h&&this.C?!1:!0};r.Ce=function(a){this.D=a};M("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.Ce;T.prototype.usingPresentationStartTime=T.prototype.He;T.prototype.getSeekRangeEnd=T.prototype.Qa;T.prototype.getSeekRangeStart=T.prototype.Cb;T.prototype.getSafeSeekRangeStart=T.prototype.fc;T.prototype.getSegmentAvailabilityEnd=T.prototype.hb;
273
- T.prototype.setUserSeekStart=T.prototype.Ee;T.prototype.getSegmentAvailabilityStart=T.prototype.Ra;T.prototype.isInProgress=T.prototype.lb;T.prototype.isLive=T.prototype.T;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Ed;T.prototype.notifyMinSegmentStartTime=T.prototype.Fd;T.prototype.notifySegments=T.prototype.Gb;T.prototype.getDelay=T.prototype.bf;T.prototype.setDelay=T.prototype.Zf;T.prototype.setSegmentAvailabilityDuration=T.prototype.Vd;
274
- T.prototype.setStatic=T.prototype.sc;T.prototype.setClockOffset=T.prototype.De;T.prototype.getPresentationStartTime=T.prototype.pf;T.prototype.setDuration=T.prototype.Ka;T.prototype.getMaxSegmentDuration=T.prototype.jf;T.prototype.getDuration=T.prototype.getDuration;function mi(a,b){this.j=a;this.m=ni(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}mi.prototype.release=function(){this.j=null;this.i=function(){}};function oi(a,b){a.i=b}function pi(a){this.g=a}function ni(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(Jh(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 qi(a,b,c,d){var e=this;this.g=a;this.o=b;this.u=c;this.i=new df;this.m=!1;this.s=a.readyState;this.h=d;this.l=!1;this.i.B(a,"waiting",function(){return ri(e)});this.j=(new R(function(){ri(e)})).Ca(.25)}qi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.o=null};qi.prototype.Hd=function(){this.l=!0;ri(this)};
275
- function ri(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.s&&(a.s=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=ni(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Kh(c,b,a.u.gapDetectionThreshold),null==d||0==d&&!a.l||(e=c.start(d),e>=a.o.Qa()||
276
- .001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e)))}}};function si(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=ti.value().get(b),c.sa(a,b,d))}var ti=new oc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function ui(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new df;this.i=new vi(a);si(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){wi(d,d.j)})}ui.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 xi(a){return a.m?a.g.currentTime:a.j}function yi(a,b){0<a.g.readyState?zi(a.i,b):si(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){wi(a,a.j)})}
277
- function wi(a,b){.001>Math.abs(a.g.currentTime-b)?Ai(a):(a.h.sa(a.g,"seeking",function(){Ai(a)}),zi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Ai(a){a.m=!0;a.h.B(a.g,"seeking",function(){return a.l()})}function vi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new R(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}vi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
278
- function zi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function Bi(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.sa(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 df;si(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}Bi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};Bi.prototype.o=function(a){this.h=this.j?this.h:a};Bi.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};Bi.prototype.D=function(){};
279
- function Ci(a,b,c,d,e){var f=this;this.i=a;this.g=b.presentationTimeline;this.G=b.minBufferTime||0;this.l=c;this.C=e;this.u=null;this.j=new qi(a,b.presentationTimeline,c,Di(a,c));this.h=new ui(a,function(){a:{var g=f.j;g.m=!0;g.l=!1;var h=xi(f.h);g=Ei(f,h);if(.001<Math.abs(g-h)&&(h=Date.now()/1E3,!f.u||f.u<h-1)){f.u=h;yi(f.h,g);g=void 0;break a}f.C();g=void 0}return g},Fi(this,d));this.s=(new R(function(){if(0!=f.i.readyState&&!f.i.paused){var g=xi(f.h),h=f.g.Cb(),k=f.g.Qa();3>k-h&&(h=k-3);g<h&&(g=
280
- Ei(f,g),f.i.currentTime=g)}})).Ca(.25)}Ci.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.s&&(this.s.stop(),this.s=null);this.i=this.h=this.g=this.l=null;this.C=function(){}};Ci.prototype.o=function(a){yi(this.h,a)};Ci.prototype.m=function(){var a=xi(this.h);return 0<this.i.readyState&&!this.i.paused?Gi(this,a):a};function Fi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Cb():a.g.Qa():0>b&&(b=a.g.Qa()+b);return Hi(a,Gi(a,b))}
281
- Ci.prototype.D=function(){this.j.Hd()};function Hi(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Ei(a,b){var c=Math.max(a.G,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Cb(),f=a.g.Qa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.fc(c),k=a.g.fc(d);c=a.g.fc(c+d);return b>=g?Hi(a,b):b>f?f:b<e?Hh(a.i.buffered,k)?k:c:b>=h||Hh(a.i.buffered,b)?b:c}function Gi(a,b){var c=a.g.Cb();if(b<c)return c;c=a.g.Qa();return b>c?c:b}
282
- function Di(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new mi(new pi(a),b.stallThreshold);oi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Ii(a){this.L=a;this.g=null;this.h=0;this.i=!1}r=Ii.prototype;r.release=function(){this.i||(this.L=[],this.g&&this.g.stop(),this.g=null)};r.Df=function(){this.i=!0};function Ji(a,b){for(var c=t(a.L),d=c.next();!d.done;d=c.next())b(d.value)}r.find=function(a){for(var b=this.L.length-1,c=b;0<=c;--c){var d=this.L[c],e=c<b?this.L[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.L.length&&a<this.L[0].startTime?this.h:null};
283
- r.get=function(a){if(0==this.L.length)return null;a-=this.h;return 0>a||a>=this.L.length?null:this.L[a]};r.offset=function(a){if(!this.i)for(var b=t(this.L),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};r.kc=function(a){!this.i&&a.length&&(this.L=this.L.filter(function(b){return b.startTime<a[0].startTime}),this.L.push.apply(this.L,ia(a)))};
284
- r.Fb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.L.length||d.endTime>c.L[0].startTime)});this.kc(a);this.fb(b)};r.fb=function(a){if(!this.i){var b=this.L.length;this.L=this.L.filter(function(c){return c.endTime>a});this.h+=b-this.L.length}};
285
- r.Za=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.L.length;)if(this.L[this.L.length-1].startTime>=b)this.L.pop();else break;for(;this.L.length;)if(this.L[0].endTime<=a)this.L.shift(),c||this.h++;else break;0!=this.L.length&&(a=this.L[this.L.length-1],this.L[this.L.length-1]=new ji(a.startTime,b,a.i,a.Ba,a.la,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.ua,a.tilesLayout,a.h,a.W))}};
286
- r.Vc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new R(function(){var d=b();d?c.L.push.apply(c.L,ia(d)):(c.g.stop(),c.g=null)}),this.g.Ca(a))};Ii.prototype[Symbol.iterator]=function(){return this.dc(0)};Ii.prototype.dc=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.ua.length)for(var e=c.ua.length-1;0<=e;--e){var f=c.ua[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Ki(this,b,d)};
287
- function Li(a,b,c){return new Ii([new ji(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",Ii);Ii.forSingleSegment=Li;Ii.prototype.getIteratorForTime=Ii.prototype.dc;Ii.prototype.updateEvery=Ii.prototype.Vc;Ii.prototype.fit=Ii.prototype.Za;Ii.prototype.evict=Ii.prototype.fb;Ii.prototype.mergeAndEvict=Ii.prototype.Fb;Ii.prototype.offset=Ii.prototype.offset;Ii.prototype.get=Ii.prototype.get;Ii.prototype.find=Ii.prototype.find;Ii.prototype.markImmutable=Ii.prototype.Df;
288
- Ii.prototype.release=Ii.prototype.release;function Ki(a,b,c){this.i=a;this.h=b;this.g=c}Ki.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.ua.length&&a.ya().length&&this.g>=a.ua.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.ua.length?a.ua[this.g]:a};Ki.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.ua.length?(this.g++,a.ya().length&&this.g==a.ua.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};
289
- M("shaka.media.SegmentIterator",Ki);Ki.prototype.next=Ki.prototype.next;Ki.prototype.current=Ki.prototype.current;function Mi(){Ii.call(this,[]);this.j=[]}qa(Mi,Ii);r=Mi.prototype;r.clone=function(){var a=new Mi;a.j=this.j.slice();return a};r.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};r.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.L.length}return null};
290
- r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.L.length}return null};r.offset=function(){};r.kc=function(){};r.fb=function(){};r.Fb=function(){};r.Za=function(){};r.Vc=function(){};M("shaka.media.MetaSegmentIndex",Mi);Mi.prototype.updateEvery=Mi.prototype.Vc;Mi.prototype.fit=Mi.prototype.Za;Mi.prototype.mergeAndEvict=Mi.prototype.Fb;Mi.prototype.evict=Mi.prototype.fb;Mi.prototype.merge=Mi.prototype.kc;
291
- Mi.prototype.offset=Mi.prototype.offset;Mi.prototype.get=Mi.prototype.get;Mi.prototype.find=Mi.prototype.find;Mi.prototype.release=Mi.prototype.release;function Ni(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Mc();this.h=new R(function(){b.g.ue(.25*b.i)})}Ni.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ni.prototype.set=function(a){this.i=a;Oi(this)};Ni.prototype.Ic=function(){return this.g.Ic()};function Oi(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Mc()!=b&&a.g.Ud(b);return}catch(c){}a.h.Ca(.25);0!=a.g.Mc()&&a.g.Ud(0)};function Pi(a){var b=this;this.h=a;this.g=new Set;this.i=(new R(function(){Qi(b,!1)})).Ca(.25)}Pi.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Qi(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Ri(a){Me.call(this);this.g=new Map;this.h=a}qa(Ri,Me);Ri.prototype.release=function(){this.g.clear();Me.prototype.release.call(this)};function Si(a,b){var c=a.g.get(b);c||(c={mc:[],fe:null,contentType:b},a.g.set(b,c));return c}function Ti(a,b,c){var d=Si(a,b.contentType);Ui(a,d);a={Bd:b,position:c};d=d.mc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
292
- Ri.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.mc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Bd;break a}}d=null}if(e=d)e=c.fe,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
293
- if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.fe=d,JSON.stringify(d),c=new S("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Ui(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.mc;b.mc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.mc=[]};function Vi(a){Me.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new R(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 S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}qa(Vi,Me);Vi.prototype.release=function(){this.g.clear();this.h.stop();Me.prototype.release.call(this)};function Wi(a){Me.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{sb:null,rb:Xi,kb:function(c,d){return Yi(b,"enter",c,d)}},{sb:Zi,rb:Xi,kb:function(c,d){return Yi(b,"enter",c,d)}},{sb:$i,rb:Xi,kb:function(c,d){return Yi(b,"enter",c,d)}},{sb:Xi,rb:Zi,kb:function(c,d){return Yi(b,"exit",c,d)}},{sb:Xi,rb:$i,kb:function(c,d){return Yi(b,"exit",c,d)}},{sb:Zi,rb:$i,kb:function(c,d){return Yi(b,"skip",c,d)}},{sb:$i,rb:Zi,kb:function(c,d){return Yi(b,"skip",c,d)}}];this.h=new df;this.h.B(this.i,"regionremove",
294
- function(c){b.g["delete"](c.region)})}qa(Wi,Me);Wi.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Me.prototype.release.call(this)};Wi.prototype.j=function(a,b){for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Zi:a>d.endTime?$i:Xi;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.sb==e&&h.rb==f&&h.kb(d,b)}};
295
- function Yi(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Zi=1,Xi=2,$i=3;function aj(a,b,c,d,e){a=Ve(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function bj(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.u=1;this.o=this.l=null;this.h=new Map;this.C=!1;this.D=null;this.s=!1;this.j=new bf(function(){return cj(c)})}bj.prototype.destroy=function(){return this.j.destroy()};function cj(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,dj(e),b.push(ej(e));return u(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.i=null;z(f)})}
296
- bj.prototype.configure=function(a){this.i=a;this.D=new Be({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)};bj.prototype.start=function(){var a=this;return K(function(b){if(1==b.g)return u(b,fj(a),2);cf(a.j);a.C=!0;z(b)})};
297
- function gj(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=mc,B(k,2),u(k,bi(a.g.O,c.X),4);case 4:va(k,3);break;case 2:if(d=E(k),a.g)a.g.onError(d);case 3:e=Kc(b.mimeType,b.codecs);Ph(a.g.O,e,a.m.sequenceMode);f=a.g.O.l;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=hj(b),a.h.set(c.X,h),ij(a,h,0);z(k)}})}function jj(a){var b=a.h.get(lc);b&&(dj(b),ej(b)["catch"](function(){}),a.h["delete"](lc));a.o=null}
298
- function kj(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.ob&&(lj(a,e,!1,0,!1),c.ob=d)}else if(d=c.ob)c.ob=null,lj(a,d,!0,0,!1)}}function mj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.C&&(b.video&&lj(a,b.video,c,d,e),b.audio&&lj(a,b.audio,c,d,e))}function nj(a,b){a.o=b;a.C&&lj(a,b,!0,0,!1)}
299
- function lj(a,b,c,d,e){var f=a.h.get(b.type);f||b.type!=lc?f&&(f.ob&&(b.trickModeVideo?(f.ob=b,b=b.trickModeVideo):f.ob=null),f.stream!=b||e)&&(b.type==lc&&Ph(a.g.O,Kc(b.mimeType,b.codecs),a.m.sequenceMode),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ca=null,c&&(f.$b?f.Xc=!0:f.Ja?(f.qb=!0,f.Cc=d,f.Xc=!0):(dj(f),oj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),pj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):gj(a,b)}
300
- function pj(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.ta)return e["return"]();c=b.stream;d=b.ta;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.ta!=d||b.stream!=c)return e["return"]();var f=a.g.Lc();var g=Vh(a.g.O,b.type),h=b.stream.segmentIndex.find(b.za?b.za.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.la?k.la-k.Ba:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.la?k.la-k.Ba:null)||0),k=a.g.getBandwidthEstimate(),
260
+ r.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return L(function(p){if(1==p.g)return e=mc,u(p,d.G,2);d.s=c;f={};g=t(a.keys());for(h=g.next();!h.done;f={qa:f.qa},h=g.next())f.qa=h.value,k=a.get(f.qa),l=Kc(k.mimeType,k.codecs),f.qa==e.Y?Uh(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!Fc(l,f.qa)||(d.u[f.qa]=new Ec,l=Hc(f.qa,l)),m=d.l.addSourceBuffer(l),d.o.B(m,"error",function(n){return function(){d.i[n.qa][0].p.reject(new N(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.o.B(m,"updateend",
261
+ function(n){return function(){return Vh(d,n.qa)}}(f)),d.h[f.qa]=m,d.M[f.qa]=l,d.i[f.qa]=[],d.K[f.qa]=!!k.drmInfos.length);z(p)})};function Uh(a,b,c){a.g||(a.g=new Pc(a.m));var d=a.g;a=a.F;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,Rc[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Va('Text parsers should have a "setSequenceMode" method!'),d.u=a)}function Wh(a){return a.l?"ended"==a.l.readyState:!0}function Xh(a,b){return b==lc?a.g.g:Kh(Yh(a,b))}
262
+ function Zh(a,b){return b==lc?a.g.h:Lh(Yh(a,b))}function $h(a,b,c){if(b==lc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Yh(a,b);return Nh(a,c)}r.Pa=function(){var a={total:Oh(this.j.buffered),audio:Oh(Yh(this,"audio")),video:Oh(Yh(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 Yh(a,b){try{return a.h[b].buffered}catch(c){return null}}
263
+ function ai(a,b,c,d,e,f,g){var h,k,l,m,p,n,q,x,w,v,y,D,C,A,G,E;return L(function(H){switch(H.g){case 1:h=mc;if(b!=h.Y){H.A(2);break}if(!a.s){H.A(3);break}return u(H,a.O,4);case 4:k=H.h,a.g.s=k;case 3:return u(H,Sc(a.g,c,d,e),5);case 5:return H["return"]();case 2:if(!a.u[b]){f&&(a.g||Uh(a,"text/vtt",a.s),null==d&&null==e?a.C.init(c):(l=Jh(a.C,c),l.length&&(m=a.h[h.wa].timestampOffset,Xc(a.g,l,d,e,m))));H.A(6);break}return u(H,Ic(a.u[b],c),7);case 7:p=H.h,a.g||Uh(a,"text/vtt",a.s),p.metadata&&(n=a.h[b].timestampOffset,
264
+ a.T(p.metadata,n,e)),p.captions&&p.captions.length&&(q=a.h[h.wa].timestampOffset,x=Vc(p.captions),Xc(a.g,x,d,e,q)),c=p.data;case 6:c=bi(a,c,d,b);w=a.h[b];v=ci;if(!a.s||w.mode==v||null==d){H.A(8);break}y=b==h.wa||!(h.wa in a.h);if(!y){H.A(9);break}D=[w.appendWindowStart,w.appendWindowEnd];w.appendWindowStart=0;w.appendWindowEnd=Infinity;C=w.timestampOffset;w.timestampOffset=0;return u(H,di(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return w.timestampOffset=C,w.appendWindowStart=D[0],w.appendWindowEnd=
265
+ D[1],A=Kh(Yh(a,b)),G=(d||0)-(A||0),a.O.resolve(G),u(H,di(a,b,function(){return ei(a,b,0,a.l.duration)}),9);case 9:w.mode=v;case 8:return null!=d&&a.s&&b!=h.Y&&g&&(E=d,di(a,b,function(){var J=E;0>J&&(J+=.001);a.h[b].timestampOffset=J;Vh(a,b)})),u(H,di(a,b,function(){a.h[b].appendBuffer(c)}),0)}})}function fi(a,b){var c=Zh(a,"video")||0;Uc(a.g,b,c)}function gi(a){a.g&&Uc(a.g,"",0)}
266
+ r.remove=function(a,b,c){var d=this,e;return L(function(f){e=mc;return a==e.Y?u(f,d.g.remove(b,c),0):u(f,di(d,a,function(){return ei(d,a,b,c)}),0)})};function hi(a,b){var c;return L(function(d){c=mc;return b==c.Y?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,di(a,b,function(){return ei(a,b,0,a.l.duration)}),0)})}r.flush=function(a){var b=this,c;return L(function(d){c=mc;return a==c.Y?d["return"]():u(d,di(b,a,function(){b.j.currentTime-=.001;Vh(b,a)}),0)})};
267
+ function ii(a,b,c,d,e,f){var g;return L(function(h){g=mc;return b==g.Y?(f||(a.g.s=c),Tc(a.g,d,e),h["return"]()):u(h,Promise.all([di(a,b,function(){var k=a.h[b].appendWindowStart,l=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=k;a.h[b].appendWindowEnd=l;Vh(a,b)}),f?Promise.resolve():di(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;Vh(a,b)}),di(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Vh(a,b)})]),0)})}
268
+ r.endOfStream=function(a){var b=this;return L(function(c){return u(c,ji(b,function(){Wh(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Ka=function(a){var b=this;return L(function(c){return u(c,ji(b,function(){b.l.duration=a}),0)})};r.getDuration=function(){return this.l.duration};function ei(a,b,c,d){d<=c?Vh(a,b):a.h[b].remove(c,d)}function Vh(a,b){var c=a.i[b][0];c&&(c.p.resolve(),ki(a,b))}
269
+ function di(a,b,c){gf(a.D);c={start:c,p:new nc};a.i[b].push(c);1==a.i[b].length&&li(a,b);return c.p}
270
+ function ji(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:gf(a.D);c=[];d={};for(e in a.h)d.Sb=new nc,f={start:function(l){return function(){return l.Sb.resolve()}}(d),p:d.Sb},a.i[e].push(f),c.push(d.Sb),1==a.i[e].length&&f.start(),d={Sb:d.Sb};B(k,2);return u(k,Promise.all(c),4);case 4:va(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)ki(a,h)}z(k)}})}function ki(a,b){a.i[b].shift();li(a,b)}
271
+ function li(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)),ki(a,b)}}function bi(a,b,c,d){var e=a.K[d];null==c&&e&&(sd()||qd())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=xg(b));return b}var Th=window.URL.createObjectURL,ci="sequence",mi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function ni(a,b,c,d){this.za=a;this.Ca=b;this.ma=c;this.Ed=void 0===d?null:d}ni.prototype.ic=function(){return this.Ca};ni.prototype.dc=function(){return this.ma};function oi(a,b){return a&&b?a.ic()==b.ic()&&a.dc()==b.dc()&&gb(a.za(),b.za()):a==b}M("shaka.media.InitSegmentReference",ni);ni.prototype.getEndByte=ni.prototype.dc;ni.prototype.getStartByte=ni.prototype.ic;
272
+ function pi(a,b,c,d,e,f,g,h,k,l,m,p,n,q){l=void 0===l?[]:l;q=void 0===q?qi:q;this.startTime=a;this.j=this.endTime=b;this.i=c;this.Ca=d;this.ma=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.ua=l;this.tilesLayout=void 0===m?"":m;this.h=void 0===p?null:p;this.X=void 0===n?null:n;this.status=q}r=pi.prototype;r.za=function(){return this.i()};r.getStartTime=function(){return this.startTime};r.lf=function(){return this.endTime};r.ic=function(){return this.Ca};
273
+ r.dc=function(){return this.ma};r.Df=function(){return this.tilesLayout};r.Cf=function(){return this.h};r.Pc=function(){return this.status};r.Kf=function(){this.status=ri};M("shaka.media.SegmentReference",pi);pi.prototype.markAsUnavailable=pi.prototype.Kf;pi.prototype.getStatus=pi.prototype.Pc;pi.prototype.getTileDuration=pi.prototype.Cf;pi.prototype.getTilesLayout=pi.prototype.Df;pi.prototype.getEndByte=pi.prototype.dc;pi.prototype.getStartByte=pi.prototype.ic;pi.prototype.getEndTime=pi.prototype.lf;
274
+ pi.prototype.getStartTime=pi.prototype.getStartTime;pi.prototype.getUris=pi.prototype.za;var qi=0,ri=1;pi.Status={qg:qi,Wg:ri,Fg:2};function T(a,b,c){this.l=a;this.Zc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.C=void 0===c?!0:c;this.D=0}r=T.prototype;r.getDuration=function(){return this.i};r.tf=function(){return this.g};r.Ka=function(a){this.i=a};r.yf=function(){return this.l};r.Le=function(a){this.o=a};r.uc=function(a){this.s=a};r.Zd=function(a){this.m=a};r.gg=function(a){this.Zc=a};r.kf=function(){return this.Zc};
275
+ r.Gb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Id(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.C&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.Id=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Hd=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};r.V=function(){return Infinity==this.i&&!this.s};
276
+ r.kb=function(){return Infinity!=this.i&&!this.s};r.Ra=function(){return Math.max(this.u,this.hb()-this.m)};r.Me=function(a){this.u=a};r.hb=function(){return this.V()||this.kb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};r.hc=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.hb()-this.m+a,this.Qa()))};r.Cb=function(){return this.hc(0)};
277
+ r.Qa=function(){return Math.max(0,this.hb()-(this.V()||this.kb()?this.Zc:0))};r.Pe=function(){return null==this.l||null!=this.h&&this.C?!1:!0};r.Ke=function(a){this.D=a};M("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.Ke;T.prototype.usingPresentationStartTime=T.prototype.Pe;T.prototype.getSeekRangeEnd=T.prototype.Qa;T.prototype.getSeekRangeStart=T.prototype.Cb;T.prototype.getSafeSeekRangeStart=T.prototype.hc;T.prototype.getSegmentAvailabilityEnd=T.prototype.hb;
278
+ T.prototype.setUserSeekStart=T.prototype.Me;T.prototype.getSegmentAvailabilityStart=T.prototype.Ra;T.prototype.isInProgress=T.prototype.kb;T.prototype.isLive=T.prototype.V;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Hd;T.prototype.notifyMinSegmentStartTime=T.prototype.Id;T.prototype.notifySegments=T.prototype.Gb;T.prototype.getDelay=T.prototype.kf;T.prototype.setDelay=T.prototype.gg;T.prototype.setSegmentAvailabilityDuration=T.prototype.Zd;
279
+ T.prototype.setStatic=T.prototype.uc;T.prototype.setClockOffset=T.prototype.Le;T.prototype.getPresentationStartTime=T.prototype.yf;T.prototype.setDuration=T.prototype.Ka;T.prototype.getMaxSegmentDuration=T.prototype.tf;T.prototype.getDuration=T.prototype.getDuration;function si(a,b,c){this.l=c;this.j=a;this.s=ti(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}si.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function ui(a,b){a.i=b}function vi(a){this.g=a}function ti(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Oh(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function wi(a,b,c,d,e){var f=this;this.o=e;this.g=a;this.s=b;this.D=c;this.i=new hf;this.m=!1;this.C=a.readyState;this.u=0;this.h=d;this.l=!1;this.i.B(a,"waiting",function(){return xi(f)});this.j=(new R(function(){xi(f)})).Da(.25)}wi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.s=this.o=null};wi.prototype.Ld=function(){this.l=!0;xi(this)};
280
+ function xi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.C&&(a.C=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=ti(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new S("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Ph(c,b,a.D.gapDetectionThreshold),null==
281
+ d||0==d&&!a.l||(e=c.start(d),e>=a.s.Qa()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.u++,a.o(new S("gapjumped")))))}}};function yi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=zi.value().get(b),c.pa(a,b,d))}var zi=new oc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ai(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new hf;this.i=new Bi(a);yi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ci(d,d.j)})}Ai.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):yi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ci(a,a.j)})}
282
+ function Ci(a,b){.001>Math.abs(a.g.currentTime-b)?Gi(a):(a.h.pa(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.B(a.g,"seeking",function(){return a.l()})}function Bi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new R(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Bi.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.Da(.1)};function Hi(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.pa(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 hf;yi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}r=Hi.prototype;r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.td=function(a){this.h=this.j?this.h:a};r.Cc=function(){return(this.j?this.g.currentTime:this.h)||0};r.ge=function(){return 0};r.fe=function(){return 0};
284
+ r.Be=function(){};
285
+ function Ii(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.C=b.minBufferTime||0;this.l=c;this.s=e;this.o=null;this.u=Ji(a,c,f);this.j=new wi(a,b.presentationTimeline,c,this.u,f);this.h=new Ai(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=Di(g.h);h=Ki(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.o||g.o<k-1)){g.o=k;Ei(g.h,h);h=void 0;break a}g.s();h=void 0}return h},Li(this,d));this.m=(new R(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Di(g.h),k=g.g.Cb(),l=g.g.Qa();3>
286
+ l-k&&(k=l-3);h<k&&(h=Ki(g,h),g.i.currentTime=h)}})).Da(.25)}r=Ii.prototype;r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.s=function(){}};r.td=function(a){Ei(this.h,a)};r.Cc=function(){var a=Di(this.h);return 0<this.i.readyState&&!this.i.paused?Mi(this,a):a};r.ge=function(){return this.u.o};r.fe=function(){return this.j.u};
287
+ function Li(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Cb():a.g.Qa():0>b&&(b=a.g.Qa()+b);return Ni(a,Mi(a,b))}r.Be=function(){this.j.Ld()};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.C,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Cb(),f=a.g.Qa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.hc(c),k=a.g.hc(d);c=a.g.hc(c+d);return b>=g?Ni(a,b):b>f?f:b<e?Mh(a.i.buffered,k)?k:c:b>=h||Mh(a.i.buffered,b)?b:c}
288
+ function Mi(a,b){var c=a.g.Cb();if(b<c)return c;c=a.g.Qa();return b>c?c:b}function Ji(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new si(new vi(a),b.stallThreshold,c);ui(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Oi(a){this.L=a;this.g=null;this.h=0;this.i=!1}r=Oi.prototype;r.release=function(){this.i||(this.L=[],this.g&&this.g.stop(),this.g=null)};r.Lf=function(){this.i=!0};function Pi(a,b){for(var c=t(a.L),d=c.next();!d.done;d=c.next())b(d.value)}r.find=function(a){for(var b=this.L.length-1,c=b;0<=c;--c){var d=this.L[c],e=c<b?this.L[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.L.length&&a<this.L[0].startTime?this.h:null};
289
+ r.get=function(a){if(0==this.L.length)return null;a-=this.h;return 0>a||a>=this.L.length?null:this.L[a]};r.offset=function(a){if(!this.i)for(var b=t(this.L),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};r.lc=function(a){!this.i&&a.length&&(this.L=this.L.filter(function(b){return b.startTime<a[0].startTime}),this.L.push.apply(this.L,ia(a)))};
290
+ r.Fb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.L.length||d.endTime>c.L[0].startTime)});this.lc(a);this.fb(b)};r.fb=function(a){if(!this.i){var b=this.L.length;this.L=this.L.filter(function(c){return c.endTime>a});this.h+=b-this.L.length}};
291
+ r.Za=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.L.length;)if(this.L[this.L.length-1].startTime>=b)this.L.pop();else break;for(;this.L.length;)if(this.L[0].endTime<=a)this.L.shift(),c||this.h++;else break;0!=this.L.length&&(a=this.L[this.L.length-1],this.L[this.L.length-1]=new pi(a.startTime,b,a.i,a.Ca,a.ma,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.ua,a.tilesLayout,a.h,a.X))}};
292
+ r.ad=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new R(function(){var d=b();d?c.L.push.apply(c.L,ia(d)):(c.g.stop(),c.g=null)}),this.g.Da(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.ua.length)for(var e=c.ua.length-1;0<=e;--e){var f=c.ua[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Qi(this,b,d)};
293
+ function Ri(a,b,c){return new Oi([new pi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",Oi);Oi.forSingleSegment=Ri;Oi.prototype.getIteratorForTime=Oi.prototype.Bb;Oi.prototype.updateEvery=Oi.prototype.ad;Oi.prototype.fit=Oi.prototype.Za;Oi.prototype.evict=Oi.prototype.fb;Oi.prototype.mergeAndEvict=Oi.prototype.Fb;Oi.prototype.offset=Oi.prototype.offset;Oi.prototype.get=Oi.prototype.get;Oi.prototype.find=Oi.prototype.find;Oi.prototype.markImmutable=Oi.prototype.Lf;
294
+ Oi.prototype.release=Oi.prototype.release;function Qi(a,b,c){this.i=a;this.h=b;this.g=c}Qi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.ua.length&&a.za().length&&this.g>=a.ua.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.ua.length?a.ua[this.g]:a};Qi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.ua.length?(this.g++,a.za().length&&this.g==a.ua.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};
295
+ M("shaka.media.SegmentIterator",Qi);Qi.prototype.next=Qi.prototype.next;Qi.prototype.current=Qi.prototype.current;function Si(){Oi.call(this,[]);this.j=[]}qa(Si,Oi);r=Si.prototype;r.clone=function(){var a=new Si;a.j=this.j.slice();return a};r.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};r.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.L.length}return null};
296
+ r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.L.length}return null};r.offset=function(){};r.lc=function(){};r.fb=function(){};r.Fb=function(){};r.Za=function(){};r.ad=function(){};M("shaka.media.MetaSegmentIndex",Si);Si.prototype.updateEvery=Si.prototype.ad;Si.prototype.fit=Si.prototype.Za;Si.prototype.mergeAndEvict=Si.prototype.Fb;Si.prototype.evict=Si.prototype.fb;Si.prototype.merge=Si.prototype.lc;
297
+ Si.prototype.offset=Si.prototype.offset;Si.prototype.get=Si.prototype.get;Si.prototype.find=Si.prototype.find;Si.prototype.release=Si.prototype.release;function Ti(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Oc();this.h=new R(function(){b.g.Ae(.25*b.i)})}Ti.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ti.prototype.set=function(a){this.i=a;Ui(this)};Ti.prototype.Kc=function(){return this.g.Kc()};function Ui(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Oc()!=b&&a.g.Yd(b);return}catch(c){}a.h.Da(.25);0!=a.g.Oc()&&a.g.Yd(0)};function Vi(a){var b=this;this.h=a;this.g=new Set;this.i=(new R(function(){Wi(b,!1)})).Da(.25)}Vi.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Wi(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Xi(a){Qe.call(this);this.g=new Map;this.h=a}qa(Xi,Qe);Xi.prototype.release=function(){this.g.clear();Qe.prototype.release.call(this)};function Yi(a,b){var c=a.g.get(b);c||(c={nc:[],le:null,contentType:b},a.g.set(b,c));return c}function Zi(a,b,c){var d=Yi(a,b.contentType);$i(a,d);a={Ed:b,position:c};d=d.nc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
298
+ Xi.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.nc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Ed;break a}}d=null}if(e=d)e=c.le,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
299
+ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.le=d,JSON.stringify(d),c=new S("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function $i(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.nc;b.nc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.nc=[]};function aj(a){Qe.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new R(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 S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Da(2)}qa(aj,Qe);aj.prototype.release=function(){this.g.clear();this.h.stop();Qe.prototype.release.call(this)};function bj(a){Qe.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{rb:null,qb:cj,jb:function(c,d){return dj(b,"enter",c,d)}},{rb:ej,qb:cj,jb:function(c,d){return dj(b,"enter",c,d)}},{rb:fj,qb:cj,jb:function(c,d){return dj(b,"enter",c,d)}},{rb:cj,qb:ej,jb:function(c,d){return dj(b,"exit",c,d)}},{rb:cj,qb:fj,jb:function(c,d){return dj(b,"exit",c,d)}},{rb:ej,qb:fj,jb:function(c,d){return dj(b,"skip",c,d)}},{rb:fj,qb:ej,jb:function(c,d){return dj(b,"skip",c,d)}}];this.h=new hf;this.h.B(this.i,"regionremove",
300
+ function(c){b.g["delete"](c.region)})}qa(bj,Qe);bj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Qe.prototype.release.call(this)};bj.prototype.j=function(a,b){for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?ej:a>d.endTime?fj:cj;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.rb==e&&h.qb==f&&h.jb(d,b)}};
301
+ function dj(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var ej=1,cj=2,fj=3;function gj(a,b,c,d,e){a=Ze(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function hj(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.u=1;this.o=this.l=null;this.h=new Map;this.C=!1;this.D=null;this.s=!1;this.j=new ff(function(){return ij(c)})}hj.prototype.destroy=function(){return this.j.destroy()};function ij(a){var b,c,d,e;return L(function(f){if(1==f.g){b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,jj(e),b.push(kj(e));return u(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.i=null;z(f)})}
302
+ hj.prototype.configure=function(a){this.i=a;this.D=new Ee({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)};hj.prototype.start=function(){var a=this;return L(function(b){if(1==b.g)return u(b,lj(a),2);gf(a.j);a.C=!0;z(b)})};
303
+ function mj(a,b){var c,d,e,f,g,h;L(function(k){switch(k.g){case 1:return c=mc,B(k,2),u(k,hi(a.g.P,c.Y),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=Kc(b.mimeType,b.codecs);Uh(a.g.P,e,a.m.sequenceMode);f=a.g.P.m;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=nj(b),a.h.set(c.Y,h),oj(a,h,0);z(k)}})}function pj(a){var b=a.h.get(lc);b&&(jj(b),kj(b)["catch"](function(){}),a.h["delete"](lc));a.o=null}
304
+ function qj(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.nb&&(rj(a,e,!1,0,!1),c.nb=d)}else if(d=c.nb)c.nb=null,rj(a,d,!0,0,!1)}}function sj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.C&&(b.video&&rj(a,b.video,c,d,e),b.audio&&rj(a,b.audio,c,d,e))}function tj(a,b){a.o=b;a.C&&rj(a,b,!0,0,!1)}
305
+ function rj(a,b,c,d,e){var f=a.h.get(b.type);f||b.type!=lc?f&&(f.nb&&(b.trickModeVideo?(f.nb=b,b=b.trickModeVideo):f.nb=null),f.stream!=b||e)&&(b.type==lc&&Uh(a.g.P,Kc(b.mimeType,b.codecs),a.m.sequenceMode),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ca=null,c&&(f.ac?f.cd=!0:f.Ja?(f.pb=!0,f.Fc=d,f.cd=!0):(jj(f),uj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),vj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):mj(a,b)}
306
+ function vj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.ta)return e["return"]();c=b.stream;d=b.ta;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.ta!=d||b.stream!=c)return e["return"]();var f=a.g.Nc();var g=Zh(a.g.P,b.type),h=b.stream.segmentIndex.find(b.Aa?b.Aa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ma?k.ma-k.Ca:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.ma?k.ma-k.Ca:null)||0),k=a.g.getBandwidthEstimate(),
301
307
  f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.ta.h.g>h?!0:!1):f=!1;f&&b.ta.abort();z(e)})}
302
- bj.prototype.pc=function(){for(var a=this.g.Lc(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);c.ca=null;var e=this.g.O;d==lc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Uh(e,d),e=Hh(e,a));if(!e){(null!=Vh(this.g.O,d)||c.Ja)&&qj(this,c);c.ta&&(c.ta.abort(),c.ta=null);if(d===lc)for(d=this.g.O.u.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,uh(d),d=t(d.j.values()),e=d.next();!e.done;e=d.next())ph(e.value);c.pc=!0}}};
303
- function qj(a,b){b.$b||b.qb||(b.Ja?(b.qb=!0,b.Cc=0):null==Th(a.g.O,b.type)?null==b.Ma&&ij(a,b,0):(dj(b),oj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
304
- function fj(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){if(1==p.g){b=mc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.eb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Oa,a.l.video),d.add(a.l.video));a.o&&(c.set(b.X,a.o),d.add(a.o));e=a.g.O;f=a.i.forceTransmuxTS;return u(p,e.init(c,f,a.m.sequenceMode),2)}cf(a.j);var n=a.m.presentationTimeline.getDuration();Infinity>n?a.g.O.Ka(n):a.g.O.Ka(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),
305
- a.h.has(k)||(m=hj(l),a.h.set(k,m),ij(a,m,0));z(p)})}function hj(a){return{stream:a,type:a.type,ca:null,za:null,Nc:null,yd:null,xd:null,wd:null,ob:null,endOfStream:!1,Ja:!1,Ma:null,qb:!1,Cc:0,Xc:!1,$b:!1,pc:!0,Kd:!1,ic:!1,ta:null}}
306
- function rj(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:cf(a.j);if(b.Ja||null==b.Ma||b.$b)return h["return"]();b.Ma=null;if(!b.qb){h.A(2);break}return u(h,oj(a,b,b.Xc,b.Cc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.A(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.Ma&&ij(a,b,0),h["return"]();case 4:B(h,6);d=sj(a,b);null!=d&&(ij(a,b,d),b.ic=!1);va(h,7);break;case 6:return e=
307
- E(h),u(h,tj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.h.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.O.endOfStream(),10);case 10:cf(a.j),g=a.g.O.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ka(g),z(h)}})}
308
- function sj(a,b){if(uj(b))return $h(a.g.O,b.stream.originalId||""),null;b.type==lc&&ai(a.g.O);var c=a.g.Lc(),d=b.za?b.za.endTime:c,e=Wh(a.g.O,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.u;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.h.get(lc))&&uj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=Vh(a.g.O,b.type);e=vj(a,b,c,e);if(!e)return a.i.updateIntervalSeconds;f=Infinity;
309
- var g=Array.from(a.h.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,uj(h)||h.ca&&!h.ca.current()||(f=Math.min(f,h.za?h.za.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;wj(a,b,c,e)["catch"](function(){});return null}
310
- function vj(a,b,c,d){if(b.ca)return b.ca.current();if(b.za||d)return b.ca=b.stream.segmentIndex.dc(b.za?b.za.endTime:d),b.ca&&b.ca.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ca=b.stream.segmentIndex.dc(d),e=b.ca&&b.ca.next().value);e||(b.ca=b.stream.segmentIndex.dc(c),e=b.ca&&b.ca.next().value);return e}
311
- function wj(a,b,c,d){var e,f,g,h,k,l,m,p,n,q,v,x;return K(function(w){switch(w.g){case 1:return e=mc,f=b.stream,g=b.ca,b.Ja=!0,B(w,2),u(w,xj(a,b,d),4);case 4:cf(a.j);if(a.s)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h)return p=new Uint8Array(0),n=function(y){var D,C,A;return K(function(F){cf(a.j);if(a.s)return F["return"]();p=yj(p,y);D=!1;C=0;(new kg).box("mdat",function(G){C=G.size+G.start;D=!0}).parse(p,!1,!0);if(!D)return F.A(0);
312
- A=p.subarray(0,C);p=p.subarray(C);return u(F,zj(a,b,c,f,d,A),0)})},u(w,Aj(a,b,d,n),6);l=Aj(a,b,d);return u(w,l,7);case 7:return m=w.h,cf(a.j),a.s?w["return"]():b.qb?(b.Ja=!1,ij(a,b,0),w["return"]()):u(w,zj(a,b,c,f,d,m),6);case 6:cf(a.j);if(a.s)return w["return"]();b.za=d;g.next();b.Ja=!1;b.Kd=!1;q=a.g.O.$a();v=q[b.type];$a(JSON.stringify(v));b.qb||a.g.Hd();ij(a,b,0);va(w,0);break;case 2:x=E(w);cf(a.j,x);if(a.s)return w["return"]();b.Ja=!1;if(7001==x.code)b.Ja=!1,b.Ma=null,ij(a,b,0),w.A(0);else if(b.type==
313
- e.X&&a.i.ignoreTextStreamFailures)a.h["delete"](e.X),w.A(0);else if(3017==x.code)Bj(a,b,x),w.A(0);else if(1001==x.code&&x.data&&404==x.data[1])b.Ja=!1,b.Ma=null,ij(a,b,1),w.A(0);else return b.ic=!0,x.severity=2,u(w,tj(a,x),0)}})}function yj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
314
- function Bj(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.Kd})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.ic=!0;a.s=!0;a.g.onError(c);return}b.Kd=!0}ij(a,b,4)}
315
- function xj(a,b,c){var d,e,f,g,h,k,l;return K(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.yd||e!=b.xd||f!=b.wd)h=function(){var p;return K(function(n){if(1==n.g)return B(n,2),b.xd=e,b.wd=f,b.yd=g,u(n,ci(a.g.O,b.type,g,e,f,a.m.sequenceMode),4);if(2!=n.g)return va(n,0);p=E(n);b.xd=null;b.wd=null;b.yd=null;throw p;})},d.push(h());!ii(c.g,b.Nc)&&(b.Nc=c.g)&&(k=Aj(a,b,c.g),l=function(){var p,n,q;return K(function(v){switch(v.g){case 1:return B(v,
316
- 2),u(v,k,4);case 4:return p=v.h,cf(a.j),n=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,Xh(a.g.O,b.type,p,null,null,n),5);case 5:va(v,0);break;case 2:throw q=E(v),b.Nc=null,q;}})},a.g.Hf(c.startTime,c.g),d.push(l()));return u(m,Promise.all(d),0)})}
317
- function zj(a,b,c,d,e,f){var g,h;return K(function(k){if(1==k.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes)&&(new kg).S("emsg",function(l){var m=d.emsgSchemeIdUris;if(0===l.version){var p=l.reader.nc();var n=l.reader.nc();var q=l.reader.N();var v=l.reader.N();var x=l.reader.N();var w=l.reader.N();var y=e.startTime+v/q}else q=l.reader.N(),y=l.reader.Jb()/q+e.timestampOffset,v=y-e.startTime,x=l.reader.N(),w=l.reader.N(),
318
- p=l.reader.nc(),n=l.reader.nc();l=l.reader.ab(l.reader.P.byteLength-l.reader.aa());if(m&&m.includes(p)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==p?a.g.If():(m=(new Map).set("detail",{startTime:y,endTime:y+x/q,schemeIdUri:p,value:n,timescale:q,presentationTimeDelta:v,eventDuration:x,id:w,messageData:l}),m=new S(Cj,m),a.g.onEvent(m))}).parse(f),u(k,Dj(a,b,c),2);if(3!=k.g)return cf(a.j),h=b.pc,b.pc=!1,u(k,Xh(a.g.O,b.type,f,null==e.W?e.startTime:e.W,e.endTime,g,h,a.m.sequenceMode),3);cf(a.j);
319
- z(k)})}function Dj(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=Th(a.g.O,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.O.remove(b.type,e,e+g),2)}cf(a.j);z(h)})}function uj(a){return a&&a.type==lc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
320
- function Aj(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=af,f=aj(c.ya(),c.Ba,c.la,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof hi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.mb.request(e,f),b.ta=h,u(l,h.promise,2);k=l.h;b.ta=null;return l["return"](k.data)})}
321
- function oj(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.qb=!1,b.Xc=!1,b.Cc=0,b.$b=!0,b.za=null,b.Nc=null,b.ca=null,d?(e=a.g.Lc(),f=a.g.O.getDuration(),u(g,a.g.O.remove(b.type,e+d,f),3)):u(g,bi(a.g.O,b.type),4);if(3!=g.g)return cf(a.j),c?u(g,a.g.O.flush(b.type),3):g.A(3);cf(a.j);b.$b=!1;b.endOfStream=!1;ij(a,b,0);z(g)})}
322
- function ij(a,b,c){var d=b.type;if(d!=lc||a.h.has(d))b.Ma=(new hd(function(){var e;return K(function(f){if(1==f.g)return B(f,2),u(f,rj(a,b),4);if(2!=f.g)return va(f,0);e=E(f);if(a.g)a.g.onError(e);z(f)})})).R(c)}function dj(a){null!=a.Ma&&(a.Ma.stop(),a.Ma=null)}function ej(a){return K(function(b){return a.ta?u(b,a.ta.abort(),0):b.A(0)})}function tj(a,b){return K(function(c){if(1==c.g)return u(c,De(a.D),2);cf(a.j);a.g.onError(b);b.handled||a.i.failureCallback(b);z(c)})};function Ej(a,b){var c=Fj(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Gj(d)});this.s=new bf(function(){return Hj(d)})}Ej.prototype.destroy=function(){return this.s.destroy()};function Hj(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),Ij(a),u(e,a.u,2);a.g&&a.g.Ia.nb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ia.nb();a.g=null;a.m=[];a.j=null;z(e)})}
323
- function Jj(a,b){var c={Hb:function(){},Pc:function(){},nb:function(){},onError:function(){},Rc:function(){},Rg:function(){}};a.m.push({create:b,Ia:c});a.h&&a.h.abort();Ij(a);return c}
324
- function Gj(a){return K(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.jb)var c=!1;else{a.g&&(a.g.Ia.nb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ia.Hb(),a.g={node:d.node,payload:d.payload,jb:d.jb,Ia:c.Ia}):c.Ia.Rc();c=!0}c?c=Promise.resolve():a.g?c=Kj(a):(a.j.Gf(a.i),a.o=new nc,c=a.o);b=u(b,c,1)}return b})}
325
- function Kj(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.lf(a.i,a.l,a.g.node,a.g.payload),B(d,2),a.h=a.j.Xe(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.Ia.Pc(),a.g=null);va(d,0);break;case 2:b=E(d);if(7001==b.code)a.g.Ia.nb();else a.g.Ia.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 Ij(a){a.o&&(a.o.resolve(),a.o=null)};function Lj(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}r=Lj.prototype;r.remove=function(a,b){if(!this.g)return!1;Mj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
308
+ hj.prototype.rc=function(){for(var a=this.g.Nc(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);c.ca=null;var e=this.g.P;d==lc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Yh(e,d),e=Mh(e,a));if(!e){(null!=Zh(this.g.P,d)||c.Ja)&&wj(this,c);c.ta&&(c.ta.abort(),c.ta=null);if(d===lc)for(d=this.g.P.C.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,yh(d),d=t(d.j.values()),e=d.next();!e.done;e=d.next())th(e.value);c.rc=!0}}};
309
+ function wj(a,b){b.ac||b.pb||(b.Ja?(b.pb=!0,b.Fc=0):null==Xh(a.g.P,b.type)?null==b.Ma&&oj(a,b,0):(jj(b),uj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
310
+ function lj(a){var b,c,d,e,f,g,h,k,l,m;return L(function(p){if(1==p.g){b=mc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.eb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.wa,a.l.video),d.add(a.l.video));a.o&&(c.set(b.Y,a.o),d.add(a.o));e=a.g.P;f=a.i.forceTransmuxTS;return u(p,e.init(c,f,a.m.sequenceMode),2)}gf(a.j);var n=a.m.presentationTimeline.getDuration();Infinity>n?a.g.P.Ka(n):a.g.P.Ka(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),
311
+ a.h.has(k)||(m=nj(l),a.h.set(k,m),oj(a,m,0));z(p)})}function nj(a){return{stream:a,type:a.type,ca:null,Aa:null,Tc:null,Cd:null,Bd:null,zd:null,nb:null,endOfStream:!1,Ja:!1,Ma:null,pb:!1,Fc:0,cd:!1,ac:!1,rc:!0,Pd:!1,jc:!1,ta:null}}
312
+ function xj(a,b){var c,d,e,f,g;return L(function(h){switch(h.g){case 1:gf(a.j);if(b.Ja||null==b.Ma||b.ac)return h["return"]();b.Ma=null;if(!b.pb){h.A(2);break}return u(h,uj(a,b,b.cd,b.Fc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.A(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.Ma&&oj(a,b,0),h["return"]();case 4:B(h,6);d=yj(a,b);null!=d&&(oj(a,b,d),b.jc=!1);va(h,7);break;case 6:return e=
313
+ F(h),u(h,zj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.h.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.P.endOfStream(),10);case 10:gf(a.j),g=a.g.P.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ka(g),z(h)}})}
314
+ function yj(a,b){if(Aj(b))return fi(a.g.P,b.stream.originalId||""),null;b.type==lc&&gi(a.g.P);var c=a.g.Nc(),d=b.Aa?b.Aa.endTime:c,e=$h(a.g.P,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.u;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.h.get(lc))&&Aj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=Zh(a.g.P,b.type);e=Bj(a,b,c,e);if(!e)return a.i.updateIntervalSeconds;f=Infinity;
315
+ var g=Array.from(a.h.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,Aj(h)||h.ca&&!h.ca.current()||(f=Math.min(f,h.Aa?h.Aa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;Cj(a,b,c,e)["catch"](function(){});return null}
316
+ function Bj(a,b,c,d){if(b.ca)return b.ca.current();if(b.Aa||d)return b.ca=b.stream.segmentIndex.Bb(b.Aa?b.Aa.endTime:d),b.ca&&b.ca.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ca=b.stream.segmentIndex.Bb(d),e=b.ca&&b.ca.next().value);e||(b.ca=b.stream.segmentIndex.Bb(c),e=b.ca&&b.ca.next().value);return e}
317
+ function Cj(a,b,c,d){var e,f,g,h,k,l,m,p,n,q,x,w;return L(function(v){switch(v.g){case 1:e=mc;f=b.stream;g=b.ca;b.Ja=!0;B(v,2);if(2==d.Pc())throw new N(1,1,1011);return u(v,Dj(a,b,d),4);case 4:gf(a.j);if(a.s)return v["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h)return p=new Uint8Array(0),n=function(y){var D,C,A;return L(function(G){gf(a.j);if(a.s)return G["return"]();p=Ej(p,y);D=!1;C=0;(new og).box("mdat",function(E){C=E.size+E.start;
318
+ D=!0}).parse(p,!1,!0);if(!D)return G.A(0);A=p.subarray(0,C);p=p.subarray(C);return u(G,Fj(a,b,c,f,d,A),0)})},u(v,Gj(a,b,d,n),6);l=Gj(a,b,d);return u(v,l,7);case 7:return m=v.h,gf(a.j),a.s?v["return"]():b.pb?(b.Ja=!1,oj(a,b,0),v["return"]()):u(v,Fj(a,b,c,f,d,m),6);case 6:gf(a.j);if(a.s)return v["return"]();b.Aa=d;g.next();b.Ja=!1;b.Pd=!1;q=a.g.P.Pa();x=q[b.type];$a(JSON.stringify(x));b.pb||a.g.Ld();oj(a,b,0);va(v,0);break;case 2:w=F(v);gf(a.j,w);if(a.s)return v["return"]();b.Ja=!1;if(7001==w.code)b.Ja=
319
+ !1,b.Ma=null,oj(a,b,0),v.A(0);else if(b.type==e.Y&&a.i.ignoreTextStreamFailures)a.h["delete"](e.Y),v.A(0);else if(3017==w.code)Hj(a,b,w),v.A(0);else if(1001==w.code&&w.data&&404==w.data[1])b.Ja=!1,b.Ma=null,oj(a,b,1),v.A(0);else return b.jc=!0,w.severity=2,u(v,zj(a,w),0)}})}function Ej(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
320
+ function Hj(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.Pd})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.jc=!0;a.s=!0;a.g.onError(c);return}b.Pd=!0}oj(a,b,4)}
321
+ function Dj(a,b,c){var d,e,f,g,h,k,l;return L(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Cd||e!=b.Bd||f!=b.zd)h=function(){var p;return L(function(n){if(1==n.g)return B(n,2),b.Bd=e,b.zd=f,b.Cd=g,u(n,ii(a.g.P,b.type,g,e,f,a.m.sequenceMode),4);if(2!=n.g)return va(n,0);p=F(n);b.Bd=null;b.zd=null;b.Cd=null;throw p;})},d.push(h());!oi(c.g,b.Tc)&&(b.Tc=c.g)&&(k=Gj(a,b,c.g),l=function(){var p,n,q;return L(function(x){switch(x.g){case 1:return B(x,
322
+ 2),u(x,k,4);case 4:return p=x.h,gf(a.j),n=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(x,ai(a.g.P,b.type,p,null,null,n),5);case 5:va(x,0);break;case 2:throw q=F(x),b.Tc=null,q;}})},a.g.Pf(c.startTime,c.g),d.push(l()));return u(m,Promise.all(d),0)})}
323
+ function Fj(a,b,c,d,e,f){var g,h;return L(function(k){if(1==k.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes)&&(new og).U("emsg",function(l){var m=d.emsgSchemeIdUris;if(0===l.version){var p=l.reader.oc();var n=l.reader.oc();var q=l.reader.N();var x=l.reader.N();var w=l.reader.N();var v=l.reader.N();var y=e.startTime+x/q}else q=l.reader.N(),y=l.reader.Jb()/q+e.timestampOffset,x=y-e.startTime,w=l.reader.N(),v=l.reader.N(),
324
+ p=l.reader.oc(),n=l.reader.oc();l=l.reader.ab(l.reader.R.byteLength-l.reader.aa());if(m&&m.includes(p)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==p?a.g.Qf():(m=(new Map).set("detail",{startTime:y,endTime:y+w/q,schemeIdUri:p,value:n,timescale:q,presentationTimeDelta:x,eventDuration:w,id:v,messageData:l}),m=new S("emsg",m),a.g.onEvent(m))}).parse(f),u(k,Ij(a,b,c),2);if(3!=k.g)return gf(a.j),h=b.rc,b.rc=!1,u(k,ai(a.g.P,b.type,f,null==e.X?e.startTime:e.X,e.endTime,g,h),3);gf(a.j);z(k)})}
325
+ function Ij(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=Xh(a.g.P,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.P.remove(b.type,e,e+g),2)}gf(a.j);z(h)})}function Aj(a){return a&&a.type==lc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
326
+ function Gj(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=ef,f=gj(c.za(),c.Ca,c.ma,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof ni,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.lb.request(e,f),b.ta=h,u(l,h.promise,2);k=l.h;b.ta=null;return l["return"](k.data)})}
327
+ function uj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.pb=!1,b.cd=!1,b.Fc=0,b.ac=!0,b.Aa=null,b.Tc=null,b.ca=null,d?(e=a.g.Nc(),f=a.g.P.getDuration(),u(g,a.g.P.remove(b.type,e+d,f),3)):u(g,hi(a.g.P,b.type),4);if(3!=g.g)return gf(a.j),c?u(g,a.g.P.flush(b.type),3):g.A(3);gf(a.j);b.ac=!1;b.endOfStream=!1;oj(a,b,0);z(g)})}
328
+ function oj(a,b,c){var d=b.type;if(d!=lc||a.h.has(d))b.Ma=(new id(function(){var e;return L(function(f){if(1==f.g)return B(f,2),u(f,xj(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);z(f)})})).S(c)}function jj(a){null!=a.Ma&&(a.Ma.stop(),a.Ma=null)}function kj(a){return L(function(b){return a.ta?u(b,a.ta.abort(),0):b.A(0)})}function zj(a,b){return L(function(c){if(1==c.g)return u(c,Ge(a.D),2);gf(a.j);a.g.onError(b);b.handled||a.i.failureCallback(b);z(c)})};function Jj(a,b){var c=Kj(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Lj(d)});this.s=new ff(function(){return Mj(d)})}Jj.prototype.destroy=function(){return this.s.destroy()};function Mj(a){var b,c,d;return L(function(e){if(1==e.g)return a.h&&a.h.abort(),Nj(a),u(e,a.u,2);a.g&&a.g.Ia.mb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ia.mb();a.g=null;a.m=[];a.j=null;z(e)})}
329
+ function Oj(a,b){var c={Hb:function(){},Vc:function(){},mb:function(){},onError:function(){},Xc:function(){},ah:function(){}};a.m.push({create:b,Ia:c});a.h&&a.h.abort();Nj(a);return c}
330
+ function Lj(a){return L(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.ib)var c=!1;else{a.g&&(a.g.Ia.mb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ia.Hb(),a.g={node:d.node,payload:d.payload,ib:d.ib,Ia:c.Ia}):c.Ia.Xc();c=!0}c?c=Promise.resolve():a.g?c=Pj(a):(a.j.Of(a.i),a.o=new nc,c=a.o);b=u(b,c,1)}return b})}
331
+ function Pj(a){var b,c;return L(function(d){switch(d.g){case 1:return a.i=a.j.vf(a.i,a.l,a.g.node,a.g.payload),B(d,2),a.h=a.j.ef(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.Ia.Vc(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ia.mb();else a.g.Ia.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 Nj(a){a.o&&(a.o.resolve(),a.o=null)};function Qj(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}r=Qj.prototype;r.remove=function(a,b){if(!this.g)return!1;Rj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
326
332
  r.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(p,n){return p+"<"+n+">"},"");h=h.reduceRight(function(p,n){return p+"</"+n+">"},"");return g.lineBreak?"\n":g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):
327
- [];var e={};c=t(c);for(var f=c.next();!f.done;e={ub:e.ub},f=c.next())e.ub=f.value,a.some(function(g){return function(h){return h.startTime==g.ub.startTime&&h.endTime==g.ub.endTime&&h.text==g.ub.payload?!0:!1}}(e))||(f=Nj(e.ub))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=t(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};
328
- r.destroy=function(){this.g&&(Mj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
329
- function Nj(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}
330
- function Mj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",Lj);Lj.prototype.setTextVisibility=Lj.prototype.setTextVisibility;Lj.prototype.isTextVisible=Lj.prototype.isTextVisible;Lj.prototype.destroy=Lj.prototype.destroy;Lj.prototype.append=Lj.prototype.append;Lj.prototype.remove=Lj.prototype.remove;function Oj(){}function Pj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Oj);Oj.removeAllChildren=Pj;function Qj(a,b){var c=this;this.j=!1;this.i=[];this.u=a;this.m=b;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.s=(new R(function(){Rj(c)})).Ca(.25);this.h=new Map;this.o=new df;this.o.B(document,"fullscreenchange",function(){Rj(c,!0)});this.l=null;"ResizeObserver"in
331
- window&&(this.l=new ResizeObserver(function(){Rj(c,!0)}),this.l.observe(this.g))}r=Qj.prototype;r.append=function(a){var b=[].concat(ia(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={uc:c.uc},d=a.next())c.uc=d.value,b.some(function(e){return function(f){return tb(f,e.uc)}}(c))||this.i.push(c.uc);Rj(this)};
332
- r.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.s&&this.s.stop();this.h.clear();this.o&&(this.o.release(),this.o=null);this.l&&(this.l.disconnect(),this.l=null)};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Rj(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
333
- function Sj(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,p=l?l.Ie:null;l&&(g.push(l.ee),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Tj(a,k,e),l=a.h.get(k),p=l.Ie,f=!0));0<k.nestedCues.length&&p&&Sj(a,k.nestedCues,p,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(n,q){return n.startTime!=q.startTime?n.startTime-q.startTime:n.endTime-q.endTime});
334
- h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),c.appendChild(d.ee)}}function Rj(a,b){if(a.g){var c=a.u.currentTime;(!a.j||(void 0===b?0:b))&&0<a.h.size&&(Pj(a.g),a.h.clear());if(a.j){for(var d=new Map,e=t(a.h.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));Sj(a,a.i,a.g,c,[])}}}
335
- function Tj(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Uj(a,f,b,c,d);c=f;d&&(c=document.createElement("span"),c.classList.add("shaka-text-wrapper"),c.style.backgroundColor=b.backgroundColor,f.appendChild(c));a.h.set(b,{ee:f,Ie:c})}
336
- function Uj(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Vj(c.linePadding,c,a.m);f.paddingRight=Vj(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
337
- "contain",f.backgroundPosition="center";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Wj(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?
338
- "center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Vj(c.fontSize,c,a.m);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==nb?(f.width="100%",c.lineAlign==pb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==pb?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height=
339
- "100%",c.lineAlign==pb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Ab?"%":"px",d=c.region.viewportAnchorUnits==Ab?"%":"px",f.height=c.region.height+(c.region.heightUnits==Ab?"%":"px"),f.width=c.region.width+a,f.position="absolute",f.top=c.region.viewportAnchorY+d,f.left=c.region.viewportAnchorX+d);f.lineHeight=c.lineHeight;c.position&&(c.writingMode==nb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat=
340
- "left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==nb?f.width=c.size+"%":f.height=c.size+"%")}
341
- function Vj(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 Wj(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Qj);Qj.prototype.setTextVisibility=Qj.prototype.setTextVisibility;
342
- Qj.prototype.isTextVisible=Qj.prototype.isTextVisible;Qj.prototype.remove=Qj.prototype.remove;Qj.prototype.destroy=Qj.prototype.destroy;Qj.prototype.append=Qj.prototype.append;function Xj(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,p=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");p&&k.push("u");l=k.reduce(function(n,q){return n+"<"+q+">"},
333
+ [];var e={};c=t(c);for(var f=c.next();!f.done;e={sb:e.sb},f=c.next())e.sb=f.value,a.some(function(g){return function(h){return h.startTime==g.sb.startTime&&h.endTime==g.sb.endTime&&h.text==g.sb.payload?!0:!1}}(e))||(f=Sj(e.sb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=t(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};
334
+ r.destroy=function(){this.g&&(Rj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
335
+ function Sj(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}
336
+ function Rj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",Qj);Qj.prototype.setTextVisibility=Qj.prototype.setTextVisibility;Qj.prototype.isTextVisible=Qj.prototype.isTextVisible;Qj.prototype.destroy=Qj.prototype.destroy;Qj.prototype.append=Qj.prototype.append;Qj.prototype.remove=Qj.prototype.remove;function Tj(){}function Uj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Tj);Tj.removeAllChildren=Uj;function Vj(a,b){var c=this;this.j=!1;this.i=[];this.u=a;this.m=b;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.s=(new R(function(){Wj(c)})).Da(.25);this.h=new Map;this.o=new hf;this.o.B(document,"fullscreenchange",function(){Wj(c,!0)});this.l=null;"ResizeObserver"in
337
+ window&&(this.l=new ResizeObserver(function(){Wj(c,!0)}),this.l.observe(this.g))}r=Vj.prototype;r.append=function(a){var b=[].concat(ia(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={xc:c.xc},d=a.next())c.xc=d.value,b.some(function(e){return function(f){return tb(f,e.xc)}}(c))||this.i.push(c.xc);Wj(this)};
338
+ r.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.s&&this.s.stop();this.h.clear();this.o&&(this.o.release(),this.o=null);this.l&&(this.l.disconnect(),this.l=null)};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Wj(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
339
+ function Xj(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,p=l?l.Qe:null;l&&(g.push(l.ke),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Yj(a,k,e),l=a.h.get(k),p=l.Qe,f=!0));0<k.nestedCues.length&&p&&Xj(a,k.nestedCues,p,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(n,q){return n.startTime!=q.startTime?n.startTime-q.startTime:n.endTime-q.endTime});
340
+ h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),c.appendChild(d.ke)}}function Wj(a,b){if(a.g){var c=a.u.currentTime;(!a.j||(void 0===b?0:b))&&0<a.h.size&&(Uj(a.g),a.h.clear());if(a.j){for(var d=new Map,e=t(a.h.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));Xj(a,a.i,a.g,c,[])}}}
341
+ function Yj(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Zj(a,f,b,c,d);c=f;d&&(c=document.createElement("span"),c.classList.add("shaka-text-wrapper"),c.style.backgroundColor=b.backgroundColor,f.appendChild(c));a.h.set(b,{ke:f,Qe:c})}
342
+ function Zj(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=ak(c.linePadding,c,a.m);f.paddingRight=ak(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
343
+ "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=bk(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?
344
+ "flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=ak(c.fontSize,c,a.m);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==nb?(f.width="100%",c.lineAlign==pb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==pb?f.left=c.line+"%":"end"==
345
+ c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==pb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Bb?"%":"px",d=c.region.viewportAnchorUnits==Bb?"%":"px",f.height=c.region.height+(c.region.heightUnits==Bb?"%":"px"),f.width=c.region.width+a,f.position="absolute",f.top=c.region.viewportAnchorY+d,f.left=c.region.viewportAnchorX+d);f.lineHeight=c.lineHeight;c.position&&(c.writingMode==nb?f.paddingLeft=c.position:f.paddingTop=
346
+ 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==nb?f.width=c.size+"%":f.height=c.size+"%")}
347
+ function ak(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 bk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Vj);Vj.prototype.setTextVisibility=Vj.prototype.setTextVisibility;
348
+ Vj.prototype.isTextVisible=Vj.prototype.isTextVisible;Vj.prototype.remove=Vj.prototype.remove;Vj.prototype.destroy=Vj.prototype.destroy;Vj.prototype.append=Vj.prototype.append;function ck(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,p=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");p&&k.push("u");l=k.reduce(function(n,q){return n+"<"+q+">"},
343
349
  "");k=k.reduceRight(function(n,q){return n+"</"+q+">"},"");return h.lineBreak?"\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");break;case "right":k.push("align:right");break;case mb:k.push("align:middle");
344
- break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}M("shaka.text.WebVttGenerator",function(){});function Yj(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function Zj(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?ak:bk};d.ot=ck(c);var e=d.ot===dk||d.ot===ek||d.ot===fk||d.ot===gk;e&&(d.bl=hk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==gk&&(d.tb=ik(a,d.ot)/1E3);jk(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
345
- function kk(a,b,c){try{if(!a.g.enabled)return b;var d=lk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=fk;break a;case "application/x-mpegurl":e=mk;break a}e=void 0}d.ot=e;d.su=!0;var f=nk(d);return ok(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function lk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
346
- function jk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,lk(a));c.pr=a.h.Kc();var e=c.ot===dk||c.ot===fk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=pk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=nk(c);f&&(b.uris=b.uris.map(function(g){return ok(g,f)}))}}}
347
- function ck(a){var b=a.type;if(a.init)return qk;if("video"==b)return a.codecs.includes(",")?fk:dk;if("audio"==b)return ek;if("text"==b)return"application/mp4"===a.mimeType?gk:rk}function hk(a,b){var c=a.h.$a()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
348
- function ik(a,b){var c=a.h.ib();if(!c.length)return NaN;var d=c[0];c=t(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case dk:return d.videoBandwidth||NaN;case ek:return d.audioBandwidth||NaN;default:return d.bandwidth}}
349
- function nk(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
350
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function pk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=nk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
351
- function ok(a,b){if(!b||a.includes("offline:"))return a;var c=new Ob(a);c.g.set("CMCD",b);return c.toString()}var mk="m",ek="a",dk="v",fk="av",qk="i",rk="c",gk="tt",bk="v",ak="l";M("shaka.util.CmcdManager.StreamingFormat",{mg:"d",tg:"h",Dg:"s",zg:"o"});function sk(){}
352
- function tk(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Ne(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ne(l)),k=tk(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
353
- k),g=!1)}return g}function uk(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}M("shaka.util.ConfigUtils",sk);sk.convertToConfigObject=uk;sk.mergeConfigObjects=tk;function vk(){}
354
- function wk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ce(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Ce(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
355
- ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"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",
356
- "urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return g}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'}},d={retryParameters:Ce(),failureCallback:function(g){return[g]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,
357
- startAtSegmentBoundary:!1,gapDetectionThreshold:.1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||pd()||rd())d.gapDetectionThreshold=.5;if(qd("Web0S")||pd()||rd())d.stallSkip=0;var e={trackSelectionCallback:function(g){return K(function(h){return h["return"](g)})},
358
- downloadSizeCallback:function(g){var h;return K(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return[g,h]},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new le},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,
359
- bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],
360
- 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},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return K(function(h){return h["return"](xk(g,f.preferredAudioLanguage))})};return f}
361
- function yk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return tk(a,b,c||wk(),d,"")}
362
- function xk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=ed(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return O(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!=lc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",vk);vk.mergeConfigObjects=yk;vk.createDefault=wk;function zk(){this.g=null;this.h=[]}function Ak(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 Bk(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 Ck(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 Dk(){this.i=this.h=null;this.g=[]}function Ek(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 Fk(){this.o=this.s=this.G=this.C=this.m=this.j=this.D=this.l=this.i=this.H=this.J=this.K=this.u=this.M=NaN;this.g=new zk;this.h=new Dk};function U(a,b){Me.call(this);var c=this;this.m=Gk;this.Ac=this.g=null;this.ia=!1;this.l=new df;this.pd=this.u=this.Vb=this.i=this.Gc=this.J=this.j=this.qa=this.Y=this.Hc=this.M=this.Ec=this.H=this.xb=this.D=this.K=this.o=this.G=null;this.ve=1E9;this.h=Hk(this);this.vd={width:Infinity,height:Infinity};this.s=null;this.Na=new te(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.vb=this.h.preferredTextLanguage;this.Xb=this.h.preferredTextRole;this.Mb=
365
- this.h.preferForcedSubs;this.Wb=[];this.Zb=null;b&&b(this);this.G=Ik(this);this.G.Sd(this.h.streaming.forceHTTPS);this.C=null;Jk&&(this.C=Jk());this.l.B(window,"online",function(){c.Md()});this.V={name:"detach"};this.Z={name:"attach"};this.fa={name:"unload"};this.zd={name:"manifest-parser"};this.ud={name:"manifest"};this.wb={name:"media-source"};this.qd={name:"drm-engine"};this.da={name:"load"};this.Dd={name:"src-equals-drm-engine"};this.yb={name:"src-equals"};var d=new Map;d.set(this.Z,function(e,
366
- f){return Ie(Kk(c,e,f))});d.set(this.V,function(e){e.F&&(c.l.Da(e.F,"error"),e.F=null);c.C&&c.C.release();c.g=null;e=Promise.resolve();return Ie(e)});d.set(this.fa,function(e){return Ie(Lk(c,e))});d.set(this.wb,function(e){e=Mk(c,e);return Ie(e)});d.set(this.zd,function(e,f){var g=Nk(c,e,f);return Ie(g)});d.set(this.ud,function(e){return Ok(c,e)});d.set(this.qd,function(e){e=Pk(c,e);return Ie(e)});d.set(this.da,function(e,f){return Ie(Qk(c,e,f))});d.set(this.Dd,function(e,f){var g=Rk(c,e,f);return Ie(g)});
367
- d.set(this.yb,function(e,f){return Sk(c,e,f)});this.Ga=new Ej(this.V,{lf:function(e,f,g,h){var k=null;e==c.V&&(k=g==c.V?c.V:c.Z);e==c.Z&&(k=g==c.V||f.F!=h.F?c.V:g==c.Z?c.Z:g==c.wb||g==c.da?c.wb:g==c.yb?c.Dd:null);e==c.wb&&(k=g==c.da&&f.F==h.F?c.zd:c.fa);e==c.zd&&(k=Tk(c.da,c.ud,c.fa,g,f,h));e==c.ud&&(k=Tk(c.da,c.qd,c.fa,g,f,h));e==c.qd&&(k=Tk(c.da,c.da,c.fa,g,f,h));e==c.Dd&&(k=g==c.yb&&f.F==h.F?c.yb:c.fa);if(e==c.da||e==c.yb)k=c.fa;e==c.fa&&(k=h.F&&f.F==h.F?c.Z:c.V);return k},Xe:function(e,f,g){c.dispatchEvent(Uk(Vk,
368
- (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?u(f,Lk(c,e),2):f["return"](e.F?c.Z:c.V)})},Gf:function(e){c.dispatchEvent(Uk(Wk,(new Map).set("state",e.name)))}});a&&this.Yb(a,!0)}qa(U,Me);function Uk(a,b){return new S(a,b)}r=U.prototype;
369
- r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.m==Xk)return c["return"]();a.m=Xk;b=Jj(a.Ga,function(){return{node:a.V,payload:Fj(),jb:!1}});return u(c,new Promise(function(d){b.Hb=function(){};b.Pc=function(){d()};b.nb=function(){d()};b.onError=function(){d()};b.Rc=function(){d()}}),2);case 2:return u(c,a.Ga.destroy(),3);case 3:a.l&&(a.l.release(),a.l=null);a.pd=null;a.u=null;a.h=null;a.s=null;a.Ac=null;a.Y=null;if(!a.G){c.A(4);break}return u(c,a.G.destroy(),5);case 5:a.G=
370
- null;case 4:Me.prototype.release.call(a),z(c)}})};r.Yb=function(a,b){b=void 0===b?!0:b;if(this.m==Xk)return Promise.reject(Yk());var c=Fj();c.F=a;id()||(b=!1);var d=b?this.wb:this.Z,e=Jj(this.Ga,function(){return{node:d,payload:c,jb:!1}});e.Hb=function(){};return Zk(e)};r.detach=function(){var a=this;if(this.m==Xk)return Promise.reject(Yk());var b=Jj(this.Ga,function(){return{node:a.V,payload:Fj(),jb:!1}});b.Hb=function(){};return Zk(b)};
371
- r.Zd=function(a){var b=this;a=void 0===a?!0:a;if(this.m==Xk)return Promise.reject(Yk());id()||(a=!1);var c=Fj(),d=Jj(this.Ga,function(e){var f=e.F&&a?b.wb:e.F?b.Z:b.V;c.F=e.F;return{node:f,payload:c,jb:!1}});d.Hb=function(){};return Zk(d)};r.gg=function(a){this.Zb=a};
372
- r.load=function(a,b,c){var d=this;this.Zb=null;if(this.m==Xk)return Promise.reject(Yk());this.dispatchEvent(Uk($k));var e=Fj();e.uri=a;e.Wd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=al(this,e)?this.yb:this.da,g=Jj(this.Ga,function(h){if(null==h.F)return null;e.F=h.F;return{node:f,payload:e,jb:!0}});this.s=new Fk;this.Y=bl(this);g.Hb=function(){};return new Promise(function(h,k){g.Rc=function(){return k(new N(2,7,7002))};g.Pc=function(){h();d.dispatchEvent(Uk(cl))};g.nb=function(){return k(Yk())};
373
- g.onError=function(l){return k(l)}})};function al(a,b){if(!id())return!0;var c=b.mimeType,d=b.uri||"";c||(c=eg(d),c=dl[c]);if(c){if(""==(b.F||kd()).canPlayType(c))return!1;if(!id()||!(c in dg||eg(d)in fg)||a.h.streaming.preferNativeHls)return!0;if(sd())return a.h.streaming.useNativeHlsOnSafari}return!1}function Kk(a,b,c){null==b.F&&(b.F=c.F,a.l.B(b.F,"error",function(){var d=el(a);d&&fl(a,d)}));a.g=b.F;return Promise.resolve()}
374
- function Lk(a,b){var c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return a.m!=Xk&&(a.m=Gk),c=a.Wb.map(function(n){return n()}),a.Wb=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent(Uk(gl));b.mimeType=null;b.startTime=null;b.uri=null;b.F&&(a.l.Da(b.F,"loadedmetadata"),a.l.Da(b.F,"playing"),a.l.Da(b.F,"pause"),a.l.Da(b.F,"ended"),a.l.Da(b.F,"ratechange"));a.xb&&(a.xb.release(),a.xb=null);a.Ec&&(a.Ec.stop(),a.Ec=null);if(!a.J){p.A(3);break}return u(p,a.J.stop(),4);case 4:a.J=null,a.Gc=null;
375
- case 3:if(!a.u){p.A(5);break}return u(p,a.u.stop(),5);case 5:if(!a.j){p.A(7);break}return u(p,a.j.destroy(),8);case 8:a.j=null;case 7:a.H&&(a.H.release(),a.H=null);a.D&&(a.D.release(),a.D=null);if(!a.K){p.A(9);break}return u(p,a.K.destroy(),10);case 10:a.K=null;case 9:if(a.C)a.C.onAssetUnload();if(!b.F||!b.F.src){p.A(11);break}return u(p,new Promise(function(n){return(new R(n)).R(.1)}),12);case 12:for(b.F.removeAttribute("src"),b.F.load();b.F.lastChild;)b.F.removeChild(b.F.firstChild);case 11:if(!a.o){p.A(13);
376
- break}return u(p,a.o.destroy(),14);case 14:a.o=null;case 13:a.Vb=null;a.M=null;if(a.i){d=t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.s=new Fk;a.td=null;hl(a);z(p)}})}
377
- function Mk(a,b){var c,d,e,f,g,h;return K(function(k){if(1==k.g)return c=new Eh,d=a.h.textDisplayFactory,e=d(),a.td=d,f=il(b.F,c,e,function(l,m,p){l=t(l);for(var n=l.next();!n.done;n=l.next())if(n=n.value,n.data&&n.cueTime&&n.frames){for(var q=n.cueTime+m,v=p,x=t(n.frames),w=x.next();!w.done;w=x.next())jl(a,q,v,"ID3",w.value);if(a.C)a.C.onHlsTimedMetadata(n,q)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.D=h,u(k,f.G,2);a.K=f;z(k)})}
378
- function Nk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.G,a.Vb=d,f=a,u(h,cg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Gc=h.h;a.J=a.Gc();g=Ne(a.h.manifest);c.F&&"AUDIO"===c.F.nodeName&&(g.disableVideo=!0);a.J.configure(g);z(h)})}
379
- function Ok(a,b){var c=b.uri,d=a.G;a.Hc=new Vi(function(){return a.oc()});a.Hc.addEventListener("regionadd",function(g){g=g.region;kl(a,ll,g);if(a.C)a.C.onDashTimedMetadata(g)});a.qa=null;a.h.streaming.observeQualityChanges&&(a.qa=new Ri(function(){return a.$a()}),a.qa.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
380
- mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(Uk(ml,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.Y;try{k.g.enabled&&(k.o=h.format,jk(k,g,{ot:mk,su:!k.i}))}catch(l){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){Zj(a.Y,g,h)},filter:function(g){return nl(a,g)},makeTextStreamsForClosedCaptions:function(g){return ol(a,g)},
381
- onTimelineRegionAdded:function(g){var h=a.Hc;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new S("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return fl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
382
- enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Ee(function(){var g,h,k,l;return K(function(m){if(1==m.g)return g=a,u(m,a.J.start(c,e),2);g.i=m.h;h=Uk(pl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);ql(a.i);k=Date.now()/1E3;l=k-f;a.s.D=l;z(m)})}(),function(){return a.J.stop()})}
383
- function Pk(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.o=rl(a,{mb:a.G,onError:function(f){fl(a,f)},Qc:function(f){sl(a,f)},onExpirationUpdated:function(f,g){tl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==ul&&d&&(d=!1,a.s.j=Date.now()/1E3-c)}}),a.o.configure(a.h.drm),u(e,vf(a.o,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.o.Yb(b.F),3):u(e,nl(a,a.i),0)})}
384
- function Qk(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v;return K(function(x){switch(x.g){case 1:b.startTime=c.startTime;null!=a.Zb&&(b.startTime=a.Zb,a.Zb=null);d=b.F;e=b.uri;a.Vb=e;a.H=new Ni({Mc:function(){return b.F.playbackRate},Ic:function(){return b.F.defaultPlaybackRate},Ud:function(w){b.F.playbackRate=w},ue:function(w){b.F.currentTime+=w}});f=function(){return vl(a)};g=function(){return wl(a)};a.l.B(d,"playing",f);a.l.B(d,"pause",f);a.l.B(d,"ended",f);a.l.B(d,"ratechange",g);h=a.h.abrFactory;a.u&&
385
- a.pd==h||(a.pd=h,a.u=h(),a.u.configure(a.h.abr));a.Na=new te(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.vb=a.h.preferredTextLanguage;a.Xb=a.h.preferredTextRole;a.Mb=a.h.preferForcedSubs;xl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(w,y,D){a.j&&w!=a.j.l&&yl(a,w,!0,void 0===y?!1:y,void 0===D?0:D)});a.D=zl(a,b.startTime);a.xb=Al(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Bl(a,k);wd(a.i,a.h.preferredVideoCodecs,
386
- a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Cl(a);a.j.configure(a.h.streaming);a.m=Dl;a.dispatchEvent(Uk(El));l=null;if(m=a.ib().find(function(w){return w.active})){x.A(2);break}l=Fl(a)?a.u.chooseVariant():null;yl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){x.A(3);break}p=a.D.m();return u(x,Gl(l,p),4);case 4:n=x.h,a.D.o(n);case 3:Hl(a,null,Yd(l));case 2:return q=a.Db().find(function(w){return w.active}),q||((v=ie(a.i.textStreams,a.vb,a.Xb,
387
- a.Mb)[0]||null)&&Ek(a.s.h,v,!0),l&&(v?(l.audio&&Il(a,l.audio,v)&&(a.ia=!0),a.ia&&a.K.l.setTextVisibility(!0),Jl(a)):a.ia=!1),v&&(a.h.streaming.alwaysStreamText||a.sd())&&nj(a.j,v)),u(x,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),Kl(a)),Md(a.j?a.j.l:null,a.i),Ll(a.i),Ml(a),Fl(a),a.i.variants.some(function(w){return w.primary}),a.l.sa(d,"loadedmetadata",function(){a.s.l=Date.now()/1E3-c.Wd}),z(x)}})}
388
- function Rk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=mc,e=Date.now()/1E3,f=!0,a.o=rl(a,{mb:a.G,onError:function(p){fl(a,p)},Qc:function(p){sl(a,p)},onExpirationUpdated:function(p,n){tl(a,p,n)},onEvent:function(p){a.dispatchEvent(p);p.type==ul&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.o.configure(a.h.drm),g=c.uri||"",h=eg(g),k=dl[h],"application/x-mpegurl"==k&&sd()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
389
- createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Nc(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Oa,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.o.Z=!0,u(m,vf(a.o,[l],[]),2)):u(m,a.o.Yb(b.F),
390
- 0)})}
391
- function Sk(a,b,c){function d(){return vl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Vb=b.uri;a.D=new Bi(b.F);var e=!1;a.Wb.push(function(){e=!0});null!=b.startTime&&a.D.o(b.startTime);a.H=new Ni({Mc:function(){return b.F.playbackRate},Ic:function(){return b.F.defaultPlaybackRate},Ud:function(h){b.F.playbackRate=h},ue:function(h){b.F.currentTime+=h}});Bl(a,a.h.streaming.rebufferingGoal);a.l.B(b.F,"playing",d);a.l.B(b.F,"pause",d);a.l.B(b.F,"ended",d);a.l.B(b.F,"ratechange",function(){return wl(a)});"none"!=
392
- a.g.preload&&a.l.sa(a.g,"loadedmetadata",function(){a.s.l=Date.now()/1E3-c.Wd});a.g.audioTracks&&(a.l.B(a.g.audioTracks,"addtrack",function(){return Ml(a)}),a.l.B(a.g.audioTracks,"removetrack",function(){return Ml(a)}),a.l.B(a.g.audioTracks,"change",function(){return Ml(a)}));a.g.textTracks&&(a.l.B(a.g.textTracks,"addtrack",function(h){if(!e&&h.track)switch(h=h.track,h.kind){case "metadata":Nl(a,h);break;case "chapters":Ol(a,h);break;default:Ml(a)}}),a.l.B(a.g.textTracks,"removetrack",function(){return Ml(a)}),
393
- a.l.B(a.g.textTracks,"change",function(){return Ml(a)}));var f=eg(b.uri);b.F.src=kk(a.Y,b.uri,dl[f]);(pd()||qd("Web0S"))&&b.F.load();a.m=Pl;a.dispatchEvent(Uk(El));var g=new nc;si(a.g,HTMLMediaElement.HAVE_METADATA,a.l,function(){g.resolve()});si(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.l,function(){var h;return K(function(k){if(1==k.g){if(e)return k["return"]();Ql(a);h=Rl(a);return h.find(function(l){return"disabled"!=l.mode})?k.A(2):u(k,new Promise(function(l){a.l.sa(a.g.textTracks,"change",l);
394
- (new R(l)).R(1)}),2)}if(e)return k["return"]();Sl(a);z(k)})});a.g.error?g.reject(el(a)):"none"==a.g.preload&&(Va('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.l.sa(a.g,"error",function(){g.reject(el(a))});return new Ee(g,function(){g.reject(new N(2,7,7001));return Promise.resolve()})}
395
- function Ql(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Pd(b);var c=a.h.preferredVariantRole;""!=c&&a.Pd(b,c)}}function Sl(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Qd(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Qd(b,d,c)}}
396
- function Nl(a,b){if("metadata"==b.kind){b.mode="hidden";a.l.B(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,jl(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value)});var c=(new R(function(){var d=Tl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Lb().R(.5);a.Wb.push(function(){c.stop()})}}
397
- function jl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Uk(Ul,b))}function Ol(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new R(function(){var d=Vl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Lb().R(.5);a.Wb.push(function(){c.stop()})}}function ql(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))}
398
- function rl(a,b){return new of(b,a.h.drm.updateExpirationTime)}function Ik(a){return new Re(function(b,c){a.u&&a.u.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Uk(Wl,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Uk(Xl,b))})}function zl(a,b){return new Ci(a.g,a.i,a.h.streaming,b,function(){a.xb&&Qi(a.xb,!0);a.j&&a.j.pc();a.M&&Yl(a)})}
399
- function Al(a){var b=new Wi(a.Hc);b.addEventListener("enter",function(d){kl(a,Zl,d.region)});b.addEventListener("exit",function(d){kl(a,$l,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(kl(a,Zl,e),kl(a,$l,e))});var c=new Pi(a.g);c.g.add(b);a.qa&&c.g.add(a.qa);return c}function Bl(a,b){a.M=new xe;a.M.g=ze;Ae(a.M,b,Math.min(.5,b/2));hl(a);a.Ec=(new R(function(){Yl(a)})).Ca(.25)}
400
- function Yl(a){switch(a.m){case Pl:if(a.g.ended)var b=!0;else{var c=Gh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Dl:a:if(a.g.ended||Sh(a.K))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.hb();var d=Gh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ih(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?ye:ze;c.g=d;b!=d&&hl(a)}function il(a,b,c,d){return new Lh(a,b,c,d)}
401
- function bl(a){return new Yj({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},$a:function(){return a.$a()},getCurrentTime:function(){return a.g?a.g.currentTime:0},ib:function(){return a.ib()},Kc:function(){return a.Kc()},T:function(){return a.T()}},a.h.cmcd)}
402
- function Cl(a){return new bj(a.i,{Lc:function(){return a.D.m()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Zj(a.Y,b,c)},O:a.K,mb:a.G,onError:function(b){return fl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},If:function(){a.J&&a.J.update&&a.J.update()},Hd:function(){a.D&&a.D.D();Yl(a)},Hf:function(b,c){var d=c.Bd;d&&a.qa&&Ti(a.qa,d,b)}})}
403
- r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=uk(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=yk(this.h,a,Hk(this));am(this);return c};
404
- function am(a){if(a.J){var b=Ne(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.o&&a.o.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{bm(a,a.i)}catch(f){fl(a,f)}a.u&&Fl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||cm(a)}a.G&&a.G.Sd(a.h.streaming.forceHTTPS);if(a.K&&(a.K.D=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.td!=b)){var c=b(),d=a.K,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=
405
- c);a.td=b;a.j&&(b=a.j,(c=b.h.get(lc))&&lj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),Kl(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ae(a.M,b,Math.min(.5,b/2)));a.i&&xl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=Hk(this);yk(a,this.h,Hk(this));return a};
406
- r.$e=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.oc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.Sf=function(){for(var a in this.h)delete this.h[a];yk(this.h,Hk(this),Hk(this));am(this)};r.ff=function(){return this.m};r.kf=function(){return this.g};r.ec=function(){return this.G};r.nd=function(){return this.Vb};
407
- r.le=function(){return this.C?this.C:null};r.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};r.lb=function(){return this.i?this.i.presentationTimeline.lb():!1};r.zf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
408
- r.oc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Cb(),end:a.Qa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.xf=function(){this.T()&&(this.g.currentTime=this.oc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.o?this.o.g:null};r.cc=function(){return this.o?this.o.cc():Infinity};r.Jc=function(){return this.o?this.o.Jc():{}};
409
- r.rd=function(){return this.M?this.M.g==ze:!1};r.Kc=function(){return this.g?this.H?this.H.i:1:0};r.bg=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.m==Dl&&(this.u.playbackRateChanged(a),kj(this.j,1<Math.abs(a))))};r.Re=function(){var a=this.H.Ic();this.m==Pl&&this.H.set(a);this.m==Dl&&(this.H.set(a),this.u.playbackRateChanged(a),kj(this.j,!1))};
410
- r.ib=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,fe(e)){var f=Yd(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 ee(g)}):[]};
411
- r.Db=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Zd(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Rl(this).map(function(f){return ce(f)}):[]};r.df=function(){return this.i?this.i.imageStreams.map(function(a){return $d(a)}):[]};
412
- r.tf=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,q,v,x,w,y,D,C,A;return K(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.A(3):u(F,d.createSegmentIndex(),3):F["return"](null):F.A(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;q=l/p;
413
- v=m*p;x=f.j-f.startTime;w=f.h||x/v;y=f.startTime;C=D=0;1<v&&(A=Math.floor((b-f.startTime)/w),y=f.startTime+A*w,D=A%m*n,C=Math.floor(A/m)*q);return F["return"]({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:C,startTime:y,duration:w,uris:f.ya(),width:n})}return F["return"](null)})};
414
- r.Ae=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Ek(this.s.h,b,!1),nj(this.j,b),dm(this),this.vb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Rl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ae(c)==a.id?c.mode=this.ia?"showing":"hidden":c.mode="disabled";dm(this)}};
415
- r.Be=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&&Va("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&&fe(d)&&(yl(this,d,!1,b,c),this.Na=new se(d),Fl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
416
- ae(c)==a.id){em(this,c);break}};r.Ze=function(){return fm(this.ib())};r.rf=function(){return fm(this.Db())};r.Ye=function(){return Array.from(gm(this.ib()))};r.qf=function(){return Array.from(gm(this.Db()))};
417
- r.Pd=function(a,b){if(this.i&&this.D){this.Na=new te(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.Na.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=Yd(f),this.Be(c,!0)):cm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=O(a);f=d=null;e=
418
- t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ee(g);O(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?em(this,f):d&&em(this,d)}};
419
- r.Qd=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.D){if(this.vb=a,this.Xb=b||"",this.Mb=c,(a=ie(this.i.textStreams,this.vb,this.Xb,this.Mb)[0]||null)&&a!=this.j.o&&(Ek(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.sd()))nj(this.j,a),dm(this)}else{var d=O(a);(a=this.Db().find(function(e){return O(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Ae(a)}};
420
- r.Uf=function(a){if(this.i&&this.D){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Na=new te(b.language,"",0,a),cm(this))}};r.sd=function(){var a=this.ia;return this.K?this.K.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Rl(this).some(function(b){return"showing"==b.mode}):a};r.me=function(){return this.g&&this.g.src&&this.g.textTracks?Vl(this).map(function(a){return ce(a)}):[]};
421
- r.af=function(a){var b=O(a),c=Vl(this).filter(function(f){return O(f.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function Rl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
422
- function Tl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Vl(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
423
- r.$f=function(a){a=!!a;if(this.ia!=a){this.ia=a;if(this.m==Dl)this.K.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=ie(this.i.textStreams,this.vb,this.Xb,this.Mb),0<a.length&&(nj(this.j,a[0]),dm(this))):jj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Rl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Jl(this)}};
424
- r.nf=function(){if(!this.T())return null;var a=this.Ga.l,b=0;if(this.D)b=this.D.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
425
- r.ne=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.$a=function(){if(this.m==Dl)return this.K.$a();var a={total:[],audio:[],video:[],text:[]};this.m==Pl&&(a.total=Jh(this.g.buffered));return a};
426
- r.getStats=function(){if(this.m!=Dl&&this.m!=Pl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};vl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?
427
- b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.s,b=Number(a.totalVideoFrames),c.K=Number(a.droppedVideoFrames),c.J=b,this.s.H=Number(a.corruptedVideoFrames));this.o?(a=this.o,a=a.J?a.J:NaN):a=NaN;this.s.m=a;if(this.m==Dl){if(a=this.j.l)this.s.s=(this.H?this.H.i:1)*a.bandwidth;a&&a.video&&(c=this.s,b=a.video.height||NaN,c.M=a.video.width||NaN,c.u=b);this.T()&&(a=this.ne().valueOf()+1E3*this.oc().end,this.s.C=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
428
- (this.s.G=this.i.presentationTimeline.g);a=this.u.getBandwidthEstimate();this.s.o=a}var d=this.s;a=d.M;c=d.u;b=d.s;var e=d.J,f=d.K,g=d.H,h=d.o,k=d.i,l=d.l,m=d.D,p=d.j,n=Bk(d.g,"playing"),q=Bk(d.g,"paused"),v=Bk(d.g,"buffering"),x=d.m,w=d.C,y=d.G,D=Ck(d.g),C=[];d=t(d.h.g);for(var A=d.next();!A.done;A=d.next())A=A.value,C.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
429
- estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:p,playTime:n,pauseTime:q,bufferingTime:v,licenseTime:x,liveLatency:w,maxSegmentDuration:y,stateHistory:D,switchHistory:C}};
430
- r.Ne=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,q,v,x,w,y,D;return K(function(C){switch(C.g){case 1:if(h.m!=Dl&&h.m!=Pl)throw new N(1,7,7004);if(d){C.A(2);break}return u(C,hm(h,a),3);case 3:d=C.h;case 2:k=[];if(h.C)try{k=h.C.getServerSideCuePoints()}catch(A){}if(h.m!=Pl){C.A(4);break}g&&(c="forced");return u(C,im(h,a,b,c,d,f||"",k),5);case 5:l=h.Db();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Ml(h),C["return"](m);throw new N(1,2,2012);case 4:p=
431
- mc;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new N(1,4,4033);if(!k.length){C.A(6);break}return u(C,jm(h,a,h.G,h.h.streaming.retryParameters),7);case 7:q=C.h,v=km(h,q,d,k),x=new Blob([v],{type:"text/vtt"}),a=Oh(x),d="text/vtt";case 6:w={id:h.ve++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Li(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.X,primary:!1,trickModeVideo:null,
432
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};y=Kc(w.mimeType,w.codecs);D=Pc(y);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(w);Ml(h);return C["return"](Zd(w))}})};
433
- r.Me=function(a,b,c){var d=this,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:if(d.m!=Dl&&d.m!=Pl)throw new N(1,7,7004);if(c){p.A(2);break}return u(p,hm(d,a),3);case 3:c=p.h;case 2:e=[];if(d.C)try{e=d.C.getServerSideCuePoints()}catch(n){}return u(p,im(d,a,b,"chapters",c,"",e),4);case 4:f=d.me();if(g=f.find(function(n){return n.language==b})){h=Vl(d);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,Ol(d,m);return p["return"](g)}throw new N(1,2,2012);}})};
434
- function hm(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=eg(b);if(d=lm[c])return e["return"](d);B(e,2);return u(e,gg(b,a.G,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:E(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
435
- function im(a,b,c,d,e,f,g){var h,k,l,m;return K(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,jm(a,b,a.G,a.h.streaming.retryParameters),3):p.A(2);2!=p.g&&(h=p.h,k=km(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Oh(l),e="text/vtt");m=document.createElement("track");var n=a.Y,q=b;try{if(n.g.enabled){var v=lk(n);v.ot=rk;v.su=!0;var x=nk(v);var w=ok(q,x)}else w=q}catch(y){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",y),w=q}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
436
- a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);z(p)})}function jm(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=af;f=Ve([b],d);f.method="GET";var k=a.Y;try{k.g.enabled&&jk(k,f,{ot:rk,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}
437
- function km(a,b,c,d){var e=Qc[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Gb(b),b=c.parseMedia(b,a),Xj(b,d);throw new N(2,2,2014,c);}r.Td=function(a,b){this.vd.width=a;this.vd.height=b};r.Md=function(){if(this.m==Dl){var a=this.j;if(a.j.g)a=!1;else if(a.s)a=!1;else{for(var b=t(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,c.ic&&(c.ic=!1,ij(a,c,.1));a=!0}}else a=!1;return a};
438
- r.gf=function(){Va("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};r.hf=function(){return this.Gc};
439
- function Hk(a){var b=wk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.T()&&d.includes(c.code)&&(c.severity=1,a.Md())};b.textDisplayFactory=function(){return a.Ac?new Qj(a.g,a.Ac):new Lj(a.g)};return b}r.Fe=function(a){this.Ac=a};
440
- function ol(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 Mi;h={id:a.ve++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
441
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:lc,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 nl(a,b){return K(function(c){if(1==c.g)return u(c,mm(a,b),2);bm(a,b);z(c)})}
442
- function mm(a,b){var c;return K(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Kd(c,b),2);Ll(b);z(d)})}
443
- function bm(a,b){if(a.m!=Xk){for(var c=a.h.restrictions,d=a.vd,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Jd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Ml(a);if((c=a.o?a.o.g:null)&&a.o.s)for(d=t(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=t(f.initData||[]),g=f.next();!g.done;g=
444
- f.next())g=g.value,Gf(a.o,g.initDataType,g.initData);nm(a,b)}}
445
- function Gl(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p;return K(function(n){if(1==n.g)return k?u(n,k.createSegmentIndex(),2):n["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return n["return"](null);p=m.startTime;return n["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)})}
446
- function hl(a){var b=a.rd();if(a.s&&a.M&&a.D){var c=a.H;c.j=b;Oi(c);a.Y&&(c=a.Y,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);vl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Uk(om,b))}function wl(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Uk(pm),a.dispatchEvent(b))}function vl(a){if(a.s&&a.M){var b=a.s.g;a.M.g==ze?Ak(b,"buffering"):a.g.paused?Ak(b,"paused"):a.g.ended?Ak(b,"ended"):Ak(b,"playing")}}
447
- function Fl(a){try{nm(a,a.i)}catch(c){return fl(a,c),!1}var b=a.i.variants.filter(function(c){return fe(c)});b=a.Na.create(b);a.u.setVariants(Array.from(b.values()));return!0}function cm(a){var b;(b=Fl(a)?a.u.chooseVariant():null)&&yl(a,b,!0,!0,0)}
448
- function yl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&mj(a.j,b,d,e,!0);else{var g=a.s.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));mj(a.j,b,d,e);d=null;f&&(d=Yd(f));b=Yd(b);c?Hl(a,d,b):qm(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=ee(c);var d=ee(b);qm(a,c,d)}
449
- function Il(a,b,c){a=O(a.h.preferredTextLanguage);b=O(b.language);c=O(c.language);return Yc(c,a)&&!Yc(b,c)}function Hl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Uk(rm,b);sm(a,b)}function Ml(a){var b=Uk(tm);sm(a,b)}function qm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Uk(um,b);sm(a,b)}function dm(a){var b=Uk(vm);sm(a,b)}function Jl(a){var b=Uk(wm);sm(a,b)}function Kl(a){var b=(new Map).set("newStatus",a.h.abr.enabled);sm(a,Uk(xm,b))}
450
- function fl(a,b){if(a.m!=Xk){var c=Uk(ym,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function kl(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(Uk(b,c))}
451
- function el(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)}
452
- function sl(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&&!zm.includes(l)}h!=f.allowedByKeySystem&&
453
- (e=!0)}}}e&&Fl(a);(d=a.j.l)&&!d.allowedByKeySystem&&cm(a);e&&Ml(a)}}function tl(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=Uk(Am);a.dispatchEvent(b)}function xl(a,b,c){0<b&&(a.T()||a.Ee(b));b=a.getDuration();c<b&&(a.T()||a.Ka(c))}
454
- function nm(a,b){var c=a.o?a.o.Jc():{},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 p=m.next();!p.done;p=m.next())if(p=p.value,p.keyIds.size){p=t(p.keyIds);for(var n=p.next();!n.done;n=p.next()){n=n.value;var q=c[d?"00":n];q?zm.includes(q)&&h.add(q):g.add(n)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
455
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function Ll(a){if(!a.variants.some(fe))throw new N(2,4,4032);}function sm(a,b){K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.m!=Xk&&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(O(c.language)):b.add("und");return b}
456
- 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=O(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),p=m.next();!p.done;p=m.next()){p=p.value;var n=null;c.has(l)&&c.get(l).has(p)&&(n=c.get(l).get(p));
457
- h.push({language:l,role:p,label:n})}});return h}function Yk(){return new N(2,7,7E3)}function Tk(a,b,c,d,e,f){return d==a&&e.F==f.F&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Fj(){return{F:null,mimeType:null,startTime:null,Wd:NaN,uri:null}}function Zk(a){return new Promise(function(b,c){a.nb=function(){return c(Yk())};a.Pc=function(){return b()};a.onError=function(d){return c(d)};a.Rc=function(){return c(Yk())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Fe;
458
- U.prototype.getManifestParserFactory=U.prototype.hf;U.prototype.getManifest=U.prototype.gf;U.prototype.retryStreaming=U.prototype.Md;U.prototype.setMaxHardwareResolution=U.prototype.Td;U.prototype.addChaptersTrack=U.prototype.Me;U.prototype.addTextTrackAsync=U.prototype.Ne;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.$a;U.prototype.getPresentationStartTimeAsDate=U.prototype.ne;U.prototype.getPlayheadTimeAsDate=U.prototype.nf;
459
- U.prototype.setTextTrackVisibility=U.prototype.$f;U.prototype.getChapters=U.prototype.af;U.prototype.getChaptersTracks=U.prototype.me;U.prototype.isTextTrackVisible=U.prototype.sd;U.prototype.selectVariantsByLabel=U.prototype.Uf;U.prototype.selectTextLanguage=U.prototype.Qd;U.prototype.selectAudioLanguage=U.prototype.Pd;U.prototype.getTextLanguages=U.prototype.qf;U.prototype.getAudioLanguages=U.prototype.Ye;U.prototype.getTextLanguagesAndRoles=U.prototype.rf;
460
- U.prototype.getAudioLanguagesAndRoles=U.prototype.Ze;U.prototype.selectVariantTrack=U.prototype.Be;U.prototype.selectTextTrack=U.prototype.Ae;U.prototype.getThumbnails=U.prototype.tf;U.prototype.getImageTracks=U.prototype.df;U.prototype.getTextTracks=U.prototype.Db;U.prototype.getVariantTracks=U.prototype.ib;U.prototype.cancelTrickPlay=U.prototype.Re;U.prototype.trickPlay=U.prototype.bg;U.prototype.getPlaybackRate=U.prototype.Kc;U.prototype.isBuffering=U.prototype.rd;U.prototype.getKeyStatuses=U.prototype.Jc;
461
- U.prototype.getExpiration=U.prototype.cc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.xf;U.prototype.seekRange=U.prototype.oc;U.prototype.isAudioOnly=U.prototype.zf;U.prototype.isInProgress=U.prototype.lb;U.prototype.isLive=U.prototype.T;U.prototype.getAdManager=U.prototype.le;U.prototype.getAssetUri=U.prototype.nd;U.prototype.getNetworkingEngine=U.prototype.ec;U.prototype.getMediaElement=U.prototype.kf;
462
- U.prototype.getLoadMode=U.prototype.ff;U.prototype.resetConfiguration=U.prototype.Sf;U.prototype.getBufferFullness=U.prototype.$e;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.gg;U.prototype.unload=U.prototype.Zd;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Yb;
463
- U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?u(h,Xf(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(id()){for(var l in dg)k[l]=!0;for(var m in fg)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 p=m.next();!p.done;p=m.next())p=p.value,k[p]=id()?!!dg[p]:jd(p);for(var n in l)k[n]=
464
- id()?!!fg[n]:jd(l[n]);c=k;n='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(",").concat(ia(gi));
465
- k={};n=t(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=id()?Pc(l)?!0:MediaSource.isTypeSupported(l)||Fc(l):jd(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Bm;for(g in f)e[g]=f[g]();return h["return"](e)})};
466
- U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Va("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||qd("Trident/"))return!1;var a=td();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
467
- !1:id()?!0:jd("application/x-mpegurl")};U.setAdManagerFactory=function(a){Jk=a};U.registerSupportPlugin=function(a,b){Bm[a]=b};U.prototype.destroy=U.prototype.destroy;
468
- var xm="abrstatuschanged",rm="adaptation",om="buffering",Xl="downloadfailed",Wl="downloadheadersreceived",ul="drmsessionupdate",Cj="emsg",ym="error",Am="expirationupdated",cl="loaded",$k="loading",pl="manifestparsed",ml="mediaqualitychanged",Ul="metadata",Vk="onstatechange",Wk="onstateidle",pm="ratechange",El="streaming",vm="textchanged",wm="texttrackvisibility",ll="timelineregionadded",Zl="timelineregionenter",$l="timelineregionexit",tm="trackschanged",gl="unloading",um="variantchanged",Cm={jg:xm,
469
- kg:rm,lg:om,ng:Xl,og:Wl,pg:ul,rg:Cj,Error:ym,sg:Am,ug:cl,vg:$k,xg:pl,yg:ml,Metadata:Ul,Ag:Vk,Bg:Wk,Cg:pm,Eg:"sessiondata",Fg:El,Gg:vm,Hg:wm,Ig:ll,Jg:Zl,Kg:$l,Lg:tm,Ng:gl,Og:um},Xk=0,Gk=1,Dl=2,Pl=3;U.LoadMode={DESTROYED:Xk,NOT_LOADED:Gk,MEDIA_SOURCE:Dl,SRC_EQUALS:Pl};U.version="v4.0.0";
470
- var zm=["output-restricted","internal-error"],Bm={},Jk=null,dl={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"},lm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
471
- ssa:"text/x-ssa",ass:"text/x-ssa"};function Dm(){this.h=[];this.j=this.i=this.g=0};function V(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new df;this.j.B(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.B(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=V.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
350
+ break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}M("shaka.text.WebVttGenerator",function(){});function dk(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function ek(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.V()?fk:gk};d.ot=hk(c);var e=d.ot===ik||d.ot===jk||d.ot===kk||d.ot===lk;e&&(d.bl=mk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==lk&&(d.tb=nk(a,d.ot)/1E3);ok(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
351
+ function pk(a,b,c){try{if(!a.g.enabled)return b;var d=qk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=kk;break a;case "application/x-mpegurl":e=rk;break a}e=void 0}d.ot=e;d.su=!0;var f=sk(d);return tk(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function qk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
352
+ function ok(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,qk(a));c.pr=a.h.Mc();var e=c.ot===ik||c.ot===kk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=uk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=sk(c);f&&(b.uris=b.uris.map(function(g){return tk(g,f)}))}}}
353
+ function hk(a){var b=a.type;if(a.init)return vk;if("video"==b)return a.codecs.includes(",")?kk:ik;if("audio"==b)return jk;if("text"==b)return"application/mp4"===a.mimeType?lk:wk}function mk(a,b){var c=a.h.Pa()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
354
+ function nk(a,b){var c=a.h.$a();if(!c.length)return NaN;var d=c[0];c=t(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case ik:return d.videoBandwidth||NaN;case jk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
355
+ function sk(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
356
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function uk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=sk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
357
+ function tk(a,b){if(!b||a.includes("offline:"))return a;var c=new Ob(a);c.g.set("CMCD",b);return c.toString()}var rk="m",jk="a",ik="v",kk="av",vk="i",wk="c",lk="tt",gk="v",fk="l";M("shaka.util.CmcdManager.StreamingFormat",{ug:"d",Cg:"h",Mg:"s",Ig:"o"});function xk(){}
358
+ function yk(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Re(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Re(l)),k=yk(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
359
+ k),g=!1)}return g}function zk(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Ak(a,b){return a&&b}M("shaka.util.ConfigUtils",xk);xk.convertToConfigObject=zk;xk.mergeConfigObjects=yk;function Bk(){}
360
+ function Ck(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Fe(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){return Ak([g,h,k],g)},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{}},c={retryParameters:Fe(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",
361
+ ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,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:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
362
+ "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return Ak([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'}},d={retryParameters:Fe(),failureCallback:function(g){return Ak([g],void 0)},
363
+ rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30};if(navigator.userAgent.match(/Edge\//)||
364
+ sd()||td())d.gapDetectionThreshold=.5;if(rd("Web0S")||sd()||td())d.stallSkip=0;var e={trackSelectionCallback:function(g){return L(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return L(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return Ak([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},
365
+ f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new oe},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",
366
+ 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},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=
367
+ function(g){return L(function(h){return h["return"](Dk(g,f.preferredAudioLanguage))})};return f}function Ek(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return yk(a,b,c||Ck(),d,"")}
368
+ function Dk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=fd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return O(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/
369
+ 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!=lc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",Bk);Bk.mergeConfigObjects=Ek;Bk.createDefault=Ck;function Fk(){this.g=null;this.h=[]}function Gk(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 Hk(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}
370
+ function Ik(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 Jk(){this.i=this.h=null;this.g=[]}function Kk(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 Lk(){this.o=this.s=this.F=this.C=this.m=this.j=this.D=this.l=this.i=this.M=this.O=this.G=this.I=this.K=this.u=this.T=NaN;this.g=new Fk;this.h=new Jk};function U(a,b){Qe.call(this);var c=this;this.l=Mk;this.Hc=this.g=null;this.ia=!1;this.Qc=new hf;this.Wb=new hf;this.o=new hf;this.xd=this.u=this.Vb=this.i=this.Rc=this.I=this.j=this.ja=this.T=this.Sc=this.M=this.Ic=this.G=this.wb=this.C=this.K=this.m=this.F=null;this.Ee=1E9;this.h=Nk(this);this.$b={width:Infinity,height:Infinity};this.s=null;this.Na=new we(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.ub=this.h.preferredTextLanguage;this.Zb=this.h.preferredTextRole;
371
+ this.Xb=this.h.preferForcedSubs;this.Mb=[];this.cc=null;b&&b(this);this.F=Ok(this);this.F.Wd(this.h.streaming.forceHTTPS);this.D=null;Pk&&(this.D=Pk());this.Qc.B(window,"online",function(){c.Qd()});this.O={name:"detach"};this.Z={name:"attach"};this.fa={name:"unload"};this.Jd={name:"manifest-parser"};this.Gd={name:"manifest"};this.vb={name:"media-source"};this.yd={name:"drm-engine"};this.da={name:"load"};this.Md={name:"src-equals-drm-engine"};this.xb={name:"src-equals"};var d=new Map;d.set(this.Z,
372
+ function(e,f){return Le(Qk(c,e,f))});d.set(this.O,function(e){e.J&&(c.Wb.pc(),e.J=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Le(e)});d.set(this.fa,function(e){return Le(Rk(c,e))});d.set(this.vb,function(e){e=Sk(c,e);return Le(e)});d.set(this.Jd,function(e,f){var g=Tk(c,e,f);return Le(g)});d.set(this.Gd,function(e){return Uk(c,e)});d.set(this.yd,function(e){e=Vk(c,e);return Le(e)});d.set(this.da,function(e,f){return Le(Wk(c,e,f))});d.set(this.Md,function(e,f){var g=Xk(c,e,f);return Le(g)});
373
+ d.set(this.xb,function(e,f){return Yk(c,e,f)});this.Ga=new Jj(this.O,{vf:function(e,f,g,h){var k=null;e==c.O&&(k=g==c.O?c.O:c.Z);e==c.Z&&(k=g==c.O||f.J!=h.J?c.O:g==c.Z?c.Z:g==c.vb||g==c.da?c.vb:g==c.xb?c.Md:null);e==c.vb&&(k=g==c.da&&f.J==h.J?c.Jd:c.fa);e==c.Jd&&(k=Zk(c.da,c.Gd,c.fa,g,f,h));e==c.Gd&&(k=Zk(c.da,c.yd,c.fa,g,f,h));e==c.yd&&(k=Zk(c.da,c.da,c.fa,g,f,h));e==c.Md&&(k=g==c.xb&&f.J==h.J?c.xb:c.fa);if(e==c.da||e==c.xb)k=c.fa;e==c.fa&&(k=h.J&&f.J==h.J?c.Z:c.O);return k},ef:function(e,f,g){c.dispatchEvent($k("onstatechange",
374
+ (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,Rk(c,e),2):f["return"](e.J?c.Z:c.O)})},Of:function(e){c.dispatchEvent($k("onstateidle",(new Map).set("state",e.name)))}});this.De=new R(function(){Md(c.i.variants,c.h.restrictions,c.$b)&&al(c)});a&&this.Yb(a,!0)}qa(U,Qe);function $k(a,b){return new S(a,b)}r=U.prototype;
375
+ r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==bl)return c["return"]();a.l=bl;b=Oj(a.Ga,function(){return{node:a.O,payload:Kj(),ib:!1}});return u(c,new Promise(function(d){b.Hb=function(){};b.Vc=function(){d()};b.mb=function(){d()};b.onError=function(){d()};b.Xc=function(){d()}}),2);case 2:return u(c,a.Ga.destroy(),3);case 3:a.Qc&&(a.Qc.release(),a.Qc=null);a.Wb&&(a.Wb.release(),a.Wb=null);a.o&&(a.o.release(),a.o=null);a.xd=null;a.u=null;a.h=null;a.s=null;a.Hc=null;
376
+ a.T=null;if(!a.F){c.A(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:Qe.prototype.release.call(a),z(c)}})};r.Yb=function(a,b){b=void 0===b?!0:b;if(this.l==bl)return Promise.reject(cl());var c=Kj();c.J=a;jd()||(b=!1);var d=b?this.vb:this.Z,e=Oj(this.Ga,function(){return{node:d,payload:c,ib:!1}});e.Hb=function(){};return dl(e)};r.detach=function(){var a=this;if(this.l==bl)return Promise.reject(cl());var b=Oj(this.Ga,function(){return{node:a.O,payload:Kj(),ib:!1}});b.Hb=function(){};return dl(b)};
377
+ r.ce=function(a){var b=this;a=void 0===a?!0:a;if(this.l==bl)return Promise.reject(cl());jd()||(a=!1);var c=Kj(),d=Oj(this.Ga,function(e){var f=e.J&&a?b.vb:e.J?b.Z:b.O;c.J=e.J;return{node:f,payload:c,ib:!1}});d.Hb=function(){};return dl(d)};r.og=function(a){this.cc=a};
378
+ r.load=function(a,b,c){var d=this;this.cc=null;if(this.l==bl)return Promise.reject(cl());this.dispatchEvent($k("loading"));var e=Kj();e.uri=a;e.$d=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=el(this,e)?this.xb:this.da,g=Oj(this.Ga,function(h){if(null==h.J)return null;e.J=h.J;return{node:f,payload:e,ib:!0}});this.s=new Lk;this.T=fl(this);g.Hb=function(){};return new Promise(function(h,k){g.Xc=function(){return k(new N(2,7,7002))};g.Vc=function(){h();d.dispatchEvent($k("loaded"))};
379
+ g.mb=function(){return k(cl())};g.onError=function(l){return k(l)}})};function el(a,b){if(!jd())return!0;var c=b.mimeType,d=b.uri||"";c||(c=ig(d),c=gl[c]);if(c){if(""==(b.J||pd()).canPlayType(c))return!1;if(!jd()||!(c in hg||ig(d)in jg)||a.h.streaming.preferNativeHls)return!0;if(ud())return a.h.streaming.useNativeHlsOnSafari}return!1}function Qk(a,b,c){null==b.J&&(b.J=c.J,a.Wb.B(b.J,"error",function(){var d=hl(a);d&&il(a,d)}));a.g=b.J;return Promise.resolve()}
380
+ function Rk(a,b){var c,d,e,f,g,h,k,l,m;return L(function(p){switch(p.g){case 1:return a.l!=bl&&(a.l=Mk),c=a.Mb.map(function(n){return n()}),a.Mb=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent($k("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;b.J&&a.o.pc();a.De.stop();a.wb&&(a.wb.release(),a.wb=null);a.Ic&&(a.Ic.stop(),a.Ic=null);if(!a.I){p.A(3);break}return u(p,a.I.stop(),4);case 4:a.I=null,a.Rc=null;case 3:if(!a.u){p.A(5);break}return u(p,a.u.stop(),5);case 5:if(!a.j){p.A(7);break}return u(p,
381
+ a.j.destroy(),8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.C&&(a.C.release(),a.C=null);if(!a.K){p.A(9);break}return u(p,a.K.destroy(),10);case 10:a.K=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.J||!b.J.src){p.A(11);break}return u(p,new Promise(function(n){return(new R(n)).S(.1)}),12);case 12:for(b.J.removeAttribute("src"),b.J.load();b.J.lastChild;)b.J.removeChild(b.J.firstChild);case 11:if(!a.m){p.A(13);break}return u(p,a.m.destroy(),14);case 14:a.m=null;case 13:a.Vb=null;a.M=null;if(a.i){d=
382
+ t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.s=new Lk;a.Dd=null;jl(a);z(p)}})}
383
+ function Sk(a,b){var c,d,e,f,g,h;return L(function(k){if(1==k.g)return c=new Ih,d=a.h.textDisplayFactory,e=d(),a.Dd=d,f=kl(b.J,c,e,function(l,m,p){l=t(l);for(var n=l.next();!n.done;n=l.next())if(n=n.value,n.data&&n.cueTime&&n.frames){for(var q=n.cueTime+m,x=p,w=t(n.frames),v=w.next();!v.done;v=w.next())ll(a,q,x,"ID3",v.value);if(a.D)a.D.onHlsTimedMetadata(n,q)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.F=h,u(k,f.G,2);a.K=f;z(k)})}
384
+ function Tk(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.Vb=d,f=a,u(h,gg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Rc=h.h;a.I=a.Rc();g=Re(a.h.manifest);c.J&&"AUDIO"===c.J.nodeName&&(g.disableVideo=!0);a.I.configure(g);z(h)})}
385
+ function Uk(a,b){var c=b.uri,d=a.F;a.Sc=new aj(function(){return a.qc()});a.Sc.addEventListener("regionadd",function(g){g=g.region;ml(a,"timelineregionadded",g);if(a.D)a.D.onDashTimedMetadata(g)});a.ja=null;a.h.streaming.observeQualityChanges&&(a.ja=new Xi(function(){return a.Pa()}),a.ja.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,
386
+ height:h.height,mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent($k("mediaqualitychanged",h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.T;try{k.g.enabled&&(k.o=h.format,ok(k,g,{ot:rk,su:!k.i}))}catch(l){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){ek(a.T,g,h)},filter:function(g){return nl(a,g)},makeTextStreamsForClosedCaptions:function(g){return ol(a,
387
+ g)},onTimelineRegionAdded:function(g){var h=a.Sc;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new S("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return il(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
388
+ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new He(function(){var g,h,k,l;return L(function(m){if(1==m.g)return g=a,u(m,a.I.start(c,e),2);g.i=m.h;h=$k("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);pl(a.i);k=Date.now()/1E3;l=k-f;a.s.D=l;z(m)})}(),function(){return a.I.stop()})}
389
+ function Vk(a,b){var c,d;return L(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=ql(a,{lb:a.F,onError:function(f){il(a,f)},Wc:function(f){rl(a,f)},onExpirationUpdated:function(f,g){sl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.s.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.Yb(b.J),3):u(e,nl(a,a.i),0)})}
390
+ function Wk(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,x;return L(function(w){switch(w.g){case 1:b.startTime=c.startTime;null!=a.cc&&(b.startTime=a.cc,a.cc=null);d=b.J;e=b.uri;a.Vb=e;a.G=new Ti({Oc:function(){return d.playbackRate},Kc:function(){return d.defaultPlaybackRate},Yd:function(v){d.playbackRate=v},Ae:function(v){d.currentTime+=v}});f=function(){return tl(a)};g=function(){return ul(a)};a.o.B(d,"playing",f);a.o.B(d,"pause",f);a.o.B(d,"ended",f);a.o.B(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.xd==h||
391
+ (a.xd=h,a.u=h(),a.u.configure(a.h.abr));a.Na=new we(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.ub=a.h.preferredTextLanguage;a.Zb=a.h.preferredTextRole;a.Xb=a.h.preferForcedSubs;vl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(v,y,D){a.j&&v!=a.j.l&&wl(a,v,!0,void 0===y?!1:y,void 0===D?0:D)});a.C=xl(a,b.startTime);a.wb=yl(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);zl(a,k);yd(a.i,a.h.preferredVideoCodecs,
392
+ a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Al(a);a.j.configure(a.h.streaming);a.l=Bl;d.textTracks&&a.o.B(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "chapters":Cl(a,v)}});a.dispatchEvent($k("streaming"));l=null;if(m=a.$a().find(function(v){return v.active})){w.A(2);break}l=al(a);wl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){w.A(3);break}p=a.C.Cc();return u(w,Dl(l,p),4);case 4:n=w.h,a.C.td(n);case 3:El(a,
393
+ null,ae(l));case 2:return q=a.Db().find(function(v){return v.active}),q||((x=le(a.i.textStreams,a.ub,a.Zb,a.Xb)[0]||null)&&Kk(a.s.h,x,!0),l&&(x?(l.audio&&Fl(a,l.audio,x)&&(a.ia=!0),a.ia&&a.K.m.setTextVisibility(!0),Gl(a)):a.ia=!1),x&&(a.h.streaming.alwaysStreamText||a.wd())&&tj(a.j,x)),u(w,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),Hl(a)),Pd(a.j?a.j.l:null,a.i),Il(a.i),Jl(a),Kl(a),a.i.variants.some(function(v){return v.primary}),a.o.pa(d,"loadedmetadata",function(){a.s.l=Date.now()/1E3-
394
+ c.$d}),z(w)}})}
395
+ function Xk(a,b,c){var d,e,f,g,h,k,l;return L(function(m){return 1==m.g?(d=mc,e=Date.now()/1E3,f=!0,a.m=ql(a,{lb:a.F,onError:function(p){il(a,p)},Wc:function(p){rl(a,p)},onExpirationUpdated:function(p,n){sl(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=ig(g),k=gl[h],"application/x-mpegurl"==k&&ud()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,primary:!1,
396
+ audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Oc(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.wa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
397
+ a.m.Z=!0,u(m,zf(a.m,[l],[]),2)):u(m,a.m.Yb(b.J),0)})}
398
+ function Yk(a,b,c){function d(){return tl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Vb=b.uri;var e=b.J;a.C=new Hi(e);var f=!1;a.Mb.push(function(){f=!0});null!=b.startTime&&a.C.td(b.startTime);a.G=new Ti({Oc:function(){return e.playbackRate},Kc:function(){return e.defaultPlaybackRate},Yd:function(k){e.playbackRate=k},Ae:function(k){e.currentTime+=k}});zl(a,a.h.streaming.rebufferingGoal);a.o.B(e,"playing",d);a.o.B(e,"pause",d);a.o.B(e,"ended",d);a.o.B(e,"ratechange",function(){return ul(a)});"none"!=
399
+ e.preload&&a.o.pa(e,"loadedmetadata",function(){a.s.l=Date.now()/1E3-c.$d});e.audioTracks&&(a.o.B(e.audioTracks,"addtrack",function(){return Jl(a)}),a.o.B(e.audioTracks,"removetrack",function(){return Jl(a)}),a.o.B(e.audioTracks,"change",function(){return Jl(a)}));e.textTracks&&(a.o.B(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Ll(a,k);break;case "chapters":Cl(a,k);break;default:Jl(a)}}),a.o.B(e.textTracks,"removetrack",function(){return Jl(a)}),a.o.B(e.textTracks,
400
+ "change",function(){return Jl(a)}));var g=ig(b.uri);e.src=pk(a.T,b.uri,gl[g]);(sd()||rd("Web0S"))&&e.load();a.l=Ml;a.dispatchEvent($k("streaming"));var h=new nc;yi(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){h.resolve()});yi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var k;return L(function(l){if(1==l.g)return Nl(a),k=Ol(a),k.find(function(m){return"disabled"!=m.mode})?l.A(2):u(l,new Promise(function(m){a.o.pa(e.textTracks,"change",m);(new R(m)).S(1)}),2);if(f)return l["return"]();Pl(a);
401
+ z(l)})});e.error?h.reject(hl(a)):"none"==e.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.o.pa(e,"error",function(){h.reject(hl(a))});return new He(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
402
+ function Nl(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Td(b);var c=a.h.preferredVariantRole;""!=c&&a.Td(b,c)}}function Pl(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Ud(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Ud(b,d,c)}}
403
+ function Ll(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.B(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,ll(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new R(function(){var d=Ql(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Lb().S(.5);a.Mb.push(function(){c.stop()})}}
404
+ function ll(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent($k("metadata",b))}function Cl(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new R(function(){b.mode="hidden"})).Lb().S(.5);a.Mb.push(function(){c.stop()})}}function pl(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 ql(a,b){return new sf(b,a.h.drm.updateExpirationTime)}
405
+ function Ok(a){return new Ve(function(b,c){a.u&&a.u.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent($k("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent($k("downloadfailed",b))})}
406
+ function xl(a,b){return new Ii(a.g,a.i,a.h.streaming,b,function(){a.wb&&Wi(a.wb,!0);a.j&&a.j.rc();a.M&&Rl(a)},function(c){return a.dispatchEvent(c)})}
407
+ function yl(a){var b=new bj(a.Sc);b.addEventListener("enter",function(d){ml(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){ml(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(ml(a,"timelineregionenter",e),ml(a,"timelineregionexit",e))});var c=new Vi(a.g);c.g.add(b);a.ja&&c.g.add(a.ja);return c}function zl(a,b){a.M=new Ae;a.M.g=Ce;De(a.M,b,Math.min(.5,b/2));jl(a);a.Ic=(new R(function(){Rl(a)})).Da(.25)}
408
+ function Rl(a){switch(a.l){case Ml:if(a.g.ended)var b=!0;else{var c=Lh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Bl:a:if(a.g.ended||Wh(a.K))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.hb();var d=Lh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Nh(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Be:Ce;c.g=d;b!=d&&jl(a)}function kl(a,b,c,d){return new Qh(a,b,c,d)}
409
+ function fl(a){return new dk({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Pa:function(){return a.Pa()},getCurrentTime:function(){return a.g?a.g.currentTime:0},$a:function(){return a.$a()},Mc:function(){return a.Mc()},V:function(){return a.V()}},a.h.cmcd)}
410
+ function Al(a){return new hj(a.i,{Nc:function(){return a.C.Cc()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){ek(a.T,b,c)},P:a.K,lb:a.F,onError:function(b){return il(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Qf:function(){a.I&&a.I.update&&a.I.update()},Ld:function(){a.C&&a.C.Be();Rl(a)},Pf:function(b,c){var d=c.Ed;d&&a.ja&&Zi(a.ja,d,b)}})}
411
+ r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=zk(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Ek(this.h,a,Nk(this));Sl(this);return c};
412
+ function Sl(a){if(a.I){var b=Re(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{Tl(a,a.i)}catch(f){il(a,f)}a.u&&Kl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Ul(a)}a.F&&a.F.Wd(a.h.streaming.forceHTTPS);if(a.K&&(a.K.F=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Dd!=b)){var c=b(),d=a.K,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=
413
+ c);a.Dd=b;a.j&&(b=a.j,(c=b.h.get(lc))&&rj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),Hl(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),De(a.M,b,Math.min(.5,b/2)));a.i&&vl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=Nk(this);Ek(a,this.h,Nk(this));return a};
414
+ r.hf=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.qc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.$f=function(){for(var a in this.h)delete this.h[a];Ek(this.h,Nk(this),Nk(this));Sl(this)};r.pf=function(){return this.l};r.uf=function(){return this.g};r.fc=function(){return this.F};r.ud=function(){return this.Vb};
415
+ r.re=function(){return this.D?this.D:null};r.V=function(){return this.i?this.i.presentationTimeline.V():this.g&&this.g.src?Infinity==this.g.duration:!1};r.kb=function(){return this.i?this.i.presentationTimeline.kb():!1};r.Hf=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};
416
+ r.qc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Cb(),end:a.Qa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Ff=function(){this.V()&&(this.g.currentTime=this.qc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.ec=function(){return this.m?this.m.ec():Infinity};r.Lc=function(){return this.m?this.m.Lc():{}};
417
+ r.vd=function(){return this.M?this.M.g==Ce:!1};r.Mc=function(){return this.g?this.G?this.G.i:1:0};r.jg=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.G.set(a),this.l==Bl&&(this.u.playbackRateChanged(a),qj(this.j,1<Math.abs(a))))};r.Ze=function(){var a=this.G.Kc();this.l==Ml&&this.G.set(a);this.l==Bl&&(this.G.set(a),this.u.playbackRateChanged(a),qj(this.j,!1))};
418
+ r.$a=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,je(e)){var f=ae(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 ie(g)}):[]};
419
+ r.Db=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=be(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Ol(this).map(function(f){return fe(f)}):[]};r.mf=function(){return this.i?this.i.imageStreams.map(function(a){return ce(a)}):[]};
420
+ r.Bf=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,q,x,w,v,y,D,C,A;return L(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.A(3):u(G,d.createSegmentIndex(),3):G["return"](null):G.A(2);if(2!=G.g){e=d.segmentIndex.find(b);if(null==e)return G["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return G["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;q=l/p;
421
+ x=m*p;w=f.j-f.startTime;v=f.h||w/x;y=f.startTime;C=D=0;1<x&&(A=Math.floor((b-f.startTime)/v),y=f.startTime+A*v,D=A%m*n,C=Math.floor(A/m)*q);return G["return"]({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:C,startTime:y,duration:v,uris:f.za(),width:n})}return G["return"](null)})};
422
+ r.Ie=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Kk(this.s.h,b,!1),tj(this.j,b),Vl(this),this.ub=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Ol(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,de(c)==a.id?c.mode=this.ia?"showing":"hidden":c.mode="disabled";Vl(this)}};
423
+ r.Je=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&&Va("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&&je(d)&&(wl(this,d,!1,b,c),this.Na=new ve(d),Kl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
424
+ de(c)==a.id){Wl(this,c);break}};r.gf=function(){return Xl(this.$a())};r.Af=function(){return Xl(this.Db())};r.ff=function(){return Array.from(Yl(this.$a()))};r.zf=function(){return Array.from(Yl(this.Db()))};
425
+ r.Td=function(a,b){if(this.i&&this.C){this.Na=new we(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.Na.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=ae(f),this.Je(c,!0)):Ul(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=O(a);f=d=null;e=
426
+ t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ie(g);O(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Wl(this,f):d&&Wl(this,d)}};
427
+ r.Ud=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.ub=a,this.Zb=b||"",this.Xb=c,(a=le(this.i.textStreams,this.ub,this.Zb,this.Xb)[0]||null)&&a!=this.j.o&&(Kk(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.wd()))tj(this.j,a),Vl(this)}else{var d=O(a);(a=this.Db().find(function(e){return O(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Ie(a)}};
428
+ r.bg=function(a){if(this.i&&this.C){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.Na=new we(b.language,"",0,a),Ul(this))}};r.wd=function(){var a=this.ia;return this.K?this.K.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Ol(this).some(function(b){return"showing"==b.mode}):a};r.se=function(){return this.g&&this.g.src&&this.g.textTracks?Zl(this).map(function(a){return fe(a)}):[]};
429
+ r.jf=function(a){var b=O(a),c=Zl(this).filter(function(g){return O(g.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;var f=e.id;f&&""!=f||(f=e.startTime+"-"+e.endTime+"-"+e.text);a.push({id:f,title:e.text,startTime:e.startTime,endTime:e.endTime})}}return a};
430
+ function Ol(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Ql(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Zl(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
431
+ r.hg=function(a){a=!!a;if(this.ia!=a){this.ia=a;if(this.l==Bl)this.K.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=le(this.i.textStreams,this.ub,this.Zb,this.Xb),0<a.length&&(tj(this.j,a[0]),Vl(this))):pj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Ol(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")}Gl(this)}};
432
+ r.xf=function(){if(!this.V())return null;var a=this.Ga.l,b=0;if(this.C)b=this.C.Cc();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};
433
+ r.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};r.Pa=function(){if(this.l==Bl)return this.K.Pa();var a={total:[],audio:[],video:[],text:[]};this.l==Ml&&(a.total=Oh(this.g.buffered));return a};
434
+ r.getStats=function(){if(this.l!=Bl&&this.l!=Ml)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped: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:[]};tl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=
435
+ Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.M=this.C.fe(),this.s.O=this.C.ge());a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.s,b=Number(a.totalVideoFrames),c.K=Number(a.droppedVideoFrames),c.I=b,this.s.G=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.I?a.I:NaN):a=NaN;this.s.m=a;if(this.l==Bl){if(a=this.j.l)this.s.s=(this.G?this.G.i:1)*a.bandwidth;a&&a.video&&(c=this.s,b=a.video.height||NaN,c.T=a.video.width||NaN,c.u=b);this.V()&&(a=this.te().valueOf()+
436
+ 1E3*this.qc().end,this.s.C=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&(this.s.F=this.i.presentationTimeline.g);a=this.u.getBandwidthEstimate();this.s.o=a}var d=this.s;a=d.T;c=d.u;b=d.s;var e=d.I,f=d.K,g=d.G,h=d.O,k=d.M,l=d.o,m=d.i,p=d.l,n=d.D,q=d.j,x=Hk(d.g,"playing"),w=Hk(d.g,"paused"),v=Hk(d.g,"buffering"),y=d.m,D=d.C,C=d.F,A=Ik(d.g),G=[];d=t(d.h.g);for(var E=d.next();!E.done;E=d.next())E=E.value,G.push({timestamp:E.timestamp,id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});
437
+ return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:p,manifestTimeSeconds:n,drmTimeSeconds:q,playTime:x,pauseTime:w,bufferingTime:v,licenseTime:y,liveLatency:D,maxSegmentDuration:C,stateHistory:A,switchHistory:G}};
438
+ r.Ve=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,q,x,w,v,y,D;return L(function(C){switch(C.g){case 1:if(h.l!=Bl&&h.l!=Ml)throw new N(1,7,7004);if(d){C.A(2);break}return u(C,$l(h,a),3);case 3:d=C.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(A){}if(h.l!=Ml){C.A(4);break}g&&(c="forced");return u(C,am(h,a,b,c,d,f||"",k),5);case 5:l=h.Db();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Jl(h),C["return"](m);throw new N(1,2,2012);case 4:p=
439
+ mc;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new N(1,4,4033);if(!k.length){C.A(6);break}return u(C,bm(h,a,h.F,h.h.streaming.retryParameters),7);case 7:q=C.h,x=cm(h,q,d,k),w=new Blob([x],{type:"text/vtt"}),a=Th(w),d="text/vtt";case 6:v={id:h.Ee++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ri(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.Y,primary:!1,trickModeVideo:null,
440
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};y=Kc(v.mimeType,v.codecs);D=Qc(y);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(v);Jl(h);return C["return"](be(v))}})};
441
+ r.Ue=function(a,b,c){var d=this,e,f,g,h;return L(function(k){switch(k.g){case 1:if(d.l!=Bl&&d.l!=Ml)throw new N(1,7,7004);if(c){k.A(2);break}return u(k,$l(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,am(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.se();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.o.pa(f,"load",l);d.o.pa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
442
+ case 5:throw new N(1,2,2012);}})};function $l(a,b){var c,d;return L(function(e){switch(e.g){case 1:c=ig(b);if(d=dm[c])return e["return"](d);B(e,2);return u(e,kg(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
443
+ function am(a,b,c,d,e,f,g){var h,k,l,m;return L(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,bm(a,b,a.F,a.h.streaming.retryParameters),3):p.A(2);2!=p.g&&(h=p.h,k=cm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Th(l),e="text/vtt");m=document.createElement("track");var n=a.T,q=b;try{if(n.g.enabled){var x=qk(n);x.ot=wk;x.su=!0;var w=sk(x);var v=tk(q,w)}else v=q}catch(y){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",y),v=q}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
444
+ a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p["return"](m)})}function bm(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){e=ef;f=Ze([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&ok(k,f,{ot:wk,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}
445
+ function cm(a,b,c,d){var e=Rc[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Gb(b),b=c.parseMedia(b,a),ck(b,d);throw new N(2,2,2014,c);}r.Xd=function(a,b){this.$b.width=a;this.$b.height=b};r.Qd=function(){if(this.l==Bl){var a=this.j;if(a.j.g)a=!1;else if(a.s)a=!1;else{for(var b=t(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,c.jc&&(c.jc=!1,oj(a,c,.1));a=!0}}else a=!1;return a};
446
+ r.qf=function(){Va("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};r.rf=function(){return this.Rc};
447
+ function Nk(a){var b=Ck();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.V()&&d.includes(c.code)&&(c.severity=1,a.Qd())};b.textDisplayFactory=function(){return a.Hc?new Vj(a.g,a.Hc):new Qj(a.g)};return b}r.Ne=function(a){this.Hc=a};
448
+ function ol(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 Si;h={id:a.Ee++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
449
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:lc,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 nl(a,b){return L(function(c){if(1==c.g)return u(c,em(a,b),2);Tl(a,b);z(c)})}
450
+ function em(a,b){var c;return L(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Nd(c,b),2);Il(b);z(d)})}
451
+ function Tl(a,b){if(a.l!=bl){Md(b.variants,a.h.restrictions,a.$b)&&a.j&&Jl(a);var c=a.m?a.m.g:null;if(c&&a.m.s)for(var d=t(b.variants),e=d.next();!e.done;e=d.next()){e=e.value;e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem){f=t(f.initData||[]);for(var g=f.next();!g.done;g=f.next())g=g.value,Kf(a.m,g.initDataType,g.initData)}}fm(a,b)}}
452
+ function Dl(a,b){var c,d,e,f,g;return L(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return L(function(q){if(1==q.g)return k?u(q,k.createSegmentIndex(),2):q["return"](null);p=(m=k.segmentIndex.Bb(l))?m.next().value:null;if(!p)return q["return"](null);n=p.startTime;return q["return"](n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
453
+ function jl(a){var b=a.vd();if(a.s&&a.M&&a.C){var c=a.G;c.j=b;Ui(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);tl(a)}b=(new Map).set("buffering",b);a.dispatchEvent($k("buffering",b))}function ul(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=$k("ratechange"),a.dispatchEvent(b))}function tl(a){if(a.s&&a.M){var b=a.s.g;a.M.g==Ce?Gk(b,"buffering"):a.g.paused?Gk(b,"paused"):a.g.ended?Gk(b,"ended"):Gk(b,"playing")}}
454
+ function Kl(a){try{fm(a,a.i)}catch(c){return il(a,c),!1}var b=a.i.variants.filter(function(c){return je(c)});b=a.Na.create(b);a.u.setVariants(Array.from(b.values()));return!0}function al(a){return Kl(a)?a.u.chooseVariant():null}function Ul(a){var b=al(a);b&&wl(a,b,!0,!0,0)}
455
+ function wl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&sj(a.j,b,d,e,!0);else{var g=a.s.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));sj(a.j,b,d,e);d=null;f&&(d=ae(f));b=ae(b);c?El(a,d,b):gm(a,d,b)}}function Wl(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=ie(c);var d=ie(b);gm(a,c,d)}
456
+ function Fl(a,b,c){a=O(a.h.preferredTextLanguage);b=O(b.language);c=O(c.language);return Zc(c,a)&&!Zc(b,c)}function El(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=$k("adaptation",b);hm(a,b)}function Jl(a){var b=$k("trackschanged");hm(a,b)}function gm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=$k("variantchanged",b);hm(a,b)}function Vl(a){var b=$k("textchanged");hm(a,b)}function Gl(a){var b=$k("texttrackvisibility");hm(a,b)}
457
+ function Hl(a){var b=(new Map).set("newStatus",a.h.abr.enabled);hm(a,$k("abrstatuschanged",b))}
458
+ function im(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;for(var d=a.$a().find(function(h){return h.active}),e=a.i,f=t(e.variants),g=f.next();!g.done;g=f.next())g=g.value,g.id===d.id&&(g.disabledUntilTime=Date.now()/1E3+c);Md(e.variants,a.h.restrictions,a.$b);d=al(a);if(!d)return!1;e=a.Pa().video.reduce(function(h,k){return h+k.end-k.start},0);wl(a,d,!1,!0,e);a.De.S(c);return!0}
459
+ function il(a,b){if(a.l!=bl)if(im(a,b))b.handled=!0;else{var c=$k("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function ml(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($k(b,c))}
460
+ function hl(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)}
461
+ function rl(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&&!jm.includes(l)}h!=f.allowedByKeySystem&&
462
+ (e=!0)}}}if(!e||Kl(a))(d=a.j.l)&&!d.allowedByKeySystem&&Ul(a),e&&Jl(a)}}function sl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=$k("expirationupdated");a.dispatchEvent(b)}function vl(a,b,c){0<b&&(a.V()||a.Me(b));b=a.getDuration();c<b&&(a.V()||a.Ka(c))}
463
+ function fm(a,b){var c=a.m?a.m.Lc():{},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 p=m.next();!p.done;p=m.next())if(p=p.value,p.keyIds.size){p=t(p.keyIds);for(var n=p.next();!n.done;n=p.next()){n=n.value;var q=c[d?"00":n];q?jm.includes(q)&&h.add(q):g.add(n)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
464
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function Il(a){if(!a.variants.some(je))throw new N(2,4,4032);}function hm(a,b){L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=bl&&a.dispatchEvent(b);z(c)})}function Yl(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(O(c.language)):b.add("und");return b}
465
+ function Xl(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=O(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),p=m.next();!p.done;p=m.next()){p=p.value;var n=null;c.has(l)&&c.get(l).has(p)&&(n=c.get(l).get(p));
466
+ h.push({language:l,role:p,label:n})}});return h}function cl(){return new N(2,7,7E3)}function Zk(a,b,c,d,e,f){return d==a&&e.J==f.J&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Kj(){return{J:null,mimeType:null,startTime:null,$d:NaN,uri:null}}function dl(a){return new Promise(function(b,c){a.mb=function(){return c(cl())};a.Vc=function(){return b()};a.onError=function(d){return c(d)};a.Xc=function(){return c(cl())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Ne;
467
+ U.prototype.getManifestParserFactory=U.prototype.rf;U.prototype.getManifest=U.prototype.qf;U.prototype.retryStreaming=U.prototype.Qd;U.prototype.setMaxHardwareResolution=U.prototype.Xd;U.prototype.addChaptersTrack=U.prototype.Ue;U.prototype.addTextTrackAsync=U.prototype.Ve;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Pa;U.prototype.getPresentationStartTimeAsDate=U.prototype.te;U.prototype.getPlayheadTimeAsDate=U.prototype.xf;
468
+ U.prototype.setTextTrackVisibility=U.prototype.hg;U.prototype.getChapters=U.prototype.jf;U.prototype.getChaptersTracks=U.prototype.se;U.prototype.isTextTrackVisible=U.prototype.wd;U.prototype.selectVariantsByLabel=U.prototype.bg;U.prototype.selectTextLanguage=U.prototype.Ud;U.prototype.selectAudioLanguage=U.prototype.Td;U.prototype.getTextLanguages=U.prototype.zf;U.prototype.getAudioLanguages=U.prototype.ff;U.prototype.getTextLanguagesAndRoles=U.prototype.Af;
469
+ U.prototype.getAudioLanguagesAndRoles=U.prototype.gf;U.prototype.selectVariantTrack=U.prototype.Je;U.prototype.selectTextTrack=U.prototype.Ie;U.prototype.getThumbnails=U.prototype.Bf;U.prototype.getImageTracks=U.prototype.mf;U.prototype.getTextTracks=U.prototype.Db;U.prototype.getVariantTracks=U.prototype.$a;U.prototype.cancelTrickPlay=U.prototype.Ze;U.prototype.trickPlay=U.prototype.jg;U.prototype.getPlaybackRate=U.prototype.Mc;U.prototype.isBuffering=U.prototype.vd;U.prototype.getKeyStatuses=U.prototype.Lc;
470
+ U.prototype.getExpiration=U.prototype.ec;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Ff;U.prototype.seekRange=U.prototype.qc;U.prototype.isAudioOnly=U.prototype.Hf;U.prototype.isInProgress=U.prototype.kb;U.prototype.isLive=U.prototype.V;U.prototype.getAdManager=U.prototype.re;U.prototype.getAssetUri=U.prototype.ud;U.prototype.getNetworkingEngine=U.prototype.fc;U.prototype.getMediaElement=U.prototype.uf;
471
+ U.prototype.getLoadMode=U.prototype.pf;U.prototype.resetConfiguration=U.prototype.$f;U.prototype.getBufferFullness=U.prototype.hf;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.og;U.prototype.unload=U.prototype.ce;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Yb;
472
+ U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return L(function(h){if(1==h.g)return b={},a?u(h,ag(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(jd()){for(var l in hg)k[l]=!0;for(var m in jg)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 p=m.next();!p.done;p=m.next())p=p.value,k[p]=jd()?!!hg[p]:od(p);for(var n in l)k[n]=
473
+ jd()?!!jg[n]:od(l[n]);c=k;n='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(",").concat(ia(mi));
474
+ k={};n=t(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=jd()?Qc(l)?!0:MediaSource.isTypeSupported(l)||Fc(l):od(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=km;for(g in f)e[g]=f[g]();return h["return"](e)})};
475
+ U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Va("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||rd("Trident/"))return!1;var a=vd();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
476
+ !1:jd()?!0:od("application/x-mpegurl")};U.setAdManagerFactory=function(a){Pk=a};U.registerSupportPlugin=function(a,b){km[a]=b};U.prototype.destroy=U.prototype.destroy;var bl=0,Mk=1,Bl=2,Ml=3;U.LoadMode={DESTROYED:bl,NOT_LOADED:Mk,MEDIA_SOURCE:Bl,SRC_EQUALS:Ml};U.version="v4.1.0";
477
+ var jm=["output-restricted","internal-error"],km={},Pk=null,gl={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"},dm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
478
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function lm(){this.h=[];this.j=this.i=this.g=0};function V(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new hf;this.j.B(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.B(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=V.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
472
479
  r.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.g.getAdSkippableState()};r.skip=function(){return this.g.skip()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.resume()};r.getVolume=function(){return this.g.getVolume()};r.setVolume=function(a){return this.g.setVolume(a)};r.isMuted=function(){return 0==this.g.getVolume()};
473
480
  r.isLinear=function(){return this.h.isLinear()};r.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};r.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
474
481
  r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=null};M("shaka.ads.ClientSideAd",V);V.prototype.release=V.prototype.release;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isLinear=V.prototype.isLinear;V.prototype.isMuted=V.prototype.isMuted;
475
482
  V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;
476
- V.prototype.getDuration=V.prototype.getDuration;function Em(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.j=d;this.m=null;this.h=new df;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.0.0");this.g=null;this.h.sa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Fm(e,f)});this.h.B(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
477
- function(f){Gm(e,f)});this.i.onended=function(){e.l.contentComplete()}}Em.prototype.stop=function(){this.g&&this.g.stop();this.o&&Pj(this.o)};Em.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Gm(a,b){b.getError();Hm(a,null);a.j(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
478
- function Fm(a,b){a.j(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.j(new S("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 S("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Im(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Jm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.B(a.i,"loadeddata",
479
- function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Jm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Jm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.g.start()}catch(f){Hm(a,null)}}function Jm(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
480
- function Im(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new S(d,e))}a.h.B(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Gm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Km(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.STARTED,function(c){Km(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.B(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.B(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
481
- function(c){b(c,"ad-third-quartile")});a.h.B(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.B(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Hm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Hm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.B(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.B(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
483
+ V.prototype.getDuration=V.prototype.getDuration;function mm(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.j=d;this.m=null;this.h=new hf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.1.0");this.g=null;this.h.pa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){nm(e,f)});this.h.B(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
484
+ function(f){om(e,f)});this.i.onended=function(){e.l.contentComplete()}}mm.prototype.stop=function(){this.g&&this.g.stop();this.o&&Uj(this.o)};mm.prototype.release=function(){this.stop();this.s&&this.s.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 S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
485
+ function nm(a,b){a.j(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.j(new S("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 S("ad-cue-points-changed",(new Map).set("cuepoints",d)))}qm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,rm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.B(a.i,"loadeddata",
486
+ function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,rm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,rm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.g.start()}catch(f){pm(a,null)}}function rm(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
487
+ function qm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new S(d,e))}a.h.B(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){om(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){sm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.STARTED,function(c){sm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.B(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.B(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
488
+ function(c){b(c,"ad-third-quartile")});a.h.B(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.B(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){pm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){pm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.B(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.B(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
482
489
  a.h.B(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.m.i=!0;b(c,"ad-paused")});a.h.B(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.m.i=!1;b(c,"ad-resumed")});a.h.B(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.B(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.B(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.B(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.B(a.g,
483
490
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.B(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.B(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.B(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.B(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.B(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.B(a.g,google.ima.AdEvent.Type.AD_METADATA,
484
- function(c){b(c,"ad-metadata")});a.h.B(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.B(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.B(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Km(a,b){var c=b.getAd();a.m=new V(c,a.g,a.i);c=(new Map).set("ad",a.m).set("sdkAdObject",c).set("originalEvent",b);a.j(new S("ad-started",c));a.m.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())}
485
- function Hm(a,b){a.j(new S("ad-stopped",(new Map).set("originalEvent",b)));a.m.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}r=W.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
491
+ function(c){b(c,"ad-metadata")});a.h.B(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.B(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.B(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function sm(a,b){var c=b.getAd();a.m=new V(c,a.g,a.i);c=(new Map).set("ad",a.m).set("sdkAdObject",c).set("originalEvent",b);a.j(new S("ad-started",c));a.m.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())}
492
+ function pm(a,b){a.j(new S("ad-stopped",(new Map).set("originalEvent",b)));a.m.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}r=W.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
486
493
  r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};
487
494
  r.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;
488
495
  W.prototype.isLinear=W.prototype.isLinear;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;
489
- W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function Lm(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.H=NaN;this.i=d;this.G=!1;this.u=this.m=this.o=null;this.C="";this.D=[];this.h=new df;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new S("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Mm(e,f)});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length?
496
+ W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function tm(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.F=!1;this.u=this.m=this.o=null;this.C="";this.D=[];this.h=new hf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new S("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){um(e,f)});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length?
490
497
  e.j.resolve(e.C):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new W(f,e.l);e.u&&(e.m.h=e.u);e.i(new S("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
491
498
  var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.u=f.getStreamData().adProgressData;e.m&&(e.m.h=e.u)});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new S("ad-first-quartile"))});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new S("ad-midpoint"))});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new S("ad-third-quartile"))});
492
499
  this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new S("ad-complete"));e.i(new S("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new S("ad-skipped"));e.i(new S("ad-stopped"))});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.D=
493
- f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Lm.prototype.stop=function(){this.C="";this.o=null;this.D=[]};Lm.prototype.release=function(){this.stop();this.h&&this.h.release()};Lm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
494
- function Mm(a,b){a.i(new S("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.B(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.o=d,a.l.currentTime=e.start)}})};function X(){Me.call(this);this.g=this.i=null;this.h=new Dm;this.j=navigator.language}qa(X,Me);r=X.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new Em(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)})};
495
- r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Me.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.h=new Dm};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.l.requestAds(a)};
496
- r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new Lm(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
- r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('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="v4.0.0";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
498
- (c.G=!0),c.j=new nc,c.g.requestStream(a),c.C=d||"",c.H=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Va('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="v4.0.0";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
500
+ f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}tm.prototype.stop=function(){this.C="";this.o=null;this.D=[]};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)}};
501
+ function um(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.F||a.h.B(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.o=d,a.l.currentTime=e.start)}})};function X(){Qe.call(this);this.g=this.i=null;this.h=new lm;this.j=navigator.language}qa(X,Qe);r=X.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new 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)})};
502
+ r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Qe.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.h=new lm};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.l.requestAds(a)};
503
+ r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new 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)})};
504
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('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="v4.1.0";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
505
+ (c.F=!0),c.j=new nc,c.g.requestStream(a),c.C=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Va('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="v4.1.0";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
499
506
  r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",X);
500
507
  X.prototype.onCueMetadataChange=X.prototype.onCueMetadataChange;X.prototype.onHlsTimedMetadata=X.prototype.onHlsTimedMetadata;X.prototype.onDashTimedMetadata=X.prototype.onDashTimedMetadata;X.prototype.getStats=X.prototype.getStats;X.prototype.getServerSideCuePoints=X.prototype.getServerSideCuePoints;X.prototype.replaceServerSideAdTagParameters=X.prototype.replaceServerSideAdTagParameters;X.prototype.requestServerSideStream=X.prototype.requestServerSideStream;X.prototype.initServerSide=X.prototype.initServerSide;
501
508
  X.prototype.requestClientSideAds=X.prototype.requestClientSideAds;X.prototype.onAssetUnload=X.prototype.onAssetUnload;X.prototype.release=X.prototype.release;X.prototype.initClientSide=X.prototype.initClientSide;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";X.AD_MIDPOINT="ad-midpoint";X.AD_THIRD_QUARTILE="ad-third-quartile";X.AD_COMPLETE="ad-complete";X.AD_STOPPED="ad-stopped";X.AD_SKIPPED="ad-skipped";
502
509
  X.AD_VOLUME_CHANGED="ad-volume-changed";X.AD_MUTED="ad-muted";X.AD_PAUSED="ad-paused";X.AD_RESUMED="ad-resumed";X.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";X.CUEPOINTS_CHANGED="ad-cue-points-changed";X.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";X.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";X.AD_CLICKED="ad-clicked";X.AD_PROGRESS="ad-progress";X.AD_BUFFERING="ad-buffering";X.AD_IMPRESSION="ad-impression";X.AD_DURATION_CHANGED="ad-duration-changed";X.AD_CLOSED="ad-closed";
503
- X.AD_LOADED="ad-loaded";X.ALL_ADS_COMPLETED="all-ads-completed";X.AD_LINEAR_CHANGED="ad-linear-changed";X.AD_METADATA="ad-metadata";X.AD_RECOVERABLE_ERROR="ad-recoverable-error";X.AD_BREAK_READY="ad-break-ready";X.AD_INTERACTION="ad-interaction";Jk=function(){return new X};function Nm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof S){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
504
- TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(Jh(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}})}
505
- function Om(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=Pm(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})}
506
- function Pm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
507
- var Qm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Rm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Sm=["loop","playbackRate"],Tm=["pause","play"],Um={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
508
- getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Vm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Wm=[["getConfiguration","configure"]],Xm=[["isTextTrackVisible","setTextTrackVisibility"]],Ym="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
509
- Zm=["attach","detach","load","unload"];function $m(a,b,c,d,e,f){var g=this;this.H=a;this.j=new R(b);this.V=c;this.u=!1;this.s=d;this.G=e;this.K=f;this.h=this.m=!1;this.M="";this.o=null;this.C=function(){return an(g)};this.D=function(h,k){var l=Om(k);switch(l.type){case "event":var m=l.targetName;l=Le(l.event);g.s(m,l);break;case "update":m=l.update;for(var p in m){l=g.g[p]||{};for(var n in m[p])l[n]=m[p][n]}g.u&&(g.V(),g.u=!1);break;case "asyncComplete":if(p=l.id,l=l.error,n=g.i[p],delete g.i[p],n)if(l){p=new N(l.severity,l.category,l.code);
510
- for(m in l)p[m]=l[m];n.reject(p)}else n.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;bn.add(this)}r=$m.prototype;r.destroy=function(){bn["delete"](this);cn(this);dn&&en(this);this.j&&(this.j.stop(),this.j=null);this.G=this.s=null;this.h=this.m=!1;this.D=this.C=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.ra=function(){return this.h};r.Jd=function(){return this.M};
511
- r.init=function(){if(this.H.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Lb();var a=new chrome.cast.SessionRequest(this.H);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(bn),d=c.next();!d.done;d=c.next())fn(d.value,b)},function(b){for(var c=t(bn),d=c.next();!d.done;d=c.next())d=d.value,gn="available"==b,d.j.Lb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});gn&&this.j.R(hn);(a=dn)&&a.status!=chrome.cast.SessionStatus.STOPPED?fn(this,
512
- a):dn=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=jn),window.__onGCastApiAvailable!=jn&&Va("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};r.Rd=function(a){this.o=a;this.h&&kn(this,{type:"appData",appData:this.o})};
513
- r.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new N(1,8,8E3);if(!gn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new nc;chrome.cast.requestSession(function(d){return ln(b,a,d)},function(d){return mn(b,d)});return u(c,b.l,0)})};function nn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return ln(a,b,c)},function(c){return mn(a,c)})}}r.Ab=function(){if(this.h){cn(this);if(dn){en(this);try{dn.stop(function(){},function(){})}catch(a){}dn=null}an(this)}};
514
- r.get=function(a,b){var c=this;if("video"==a){if(Tm.includes(b))return function(){return c.ye.apply(c,[a,b].concat(ia(Ga.apply(0,arguments))))}}else if("player"==a){if(Vm[b]&&!this.get("player","isLive")())return function(){};if(Ym.includes(b))return function(){return c.ye.apply(c,[a,b].concat(ia(Ga.apply(0,arguments))))};if(Zm.includes(b))return function(){return c.Pf.apply(c,[a,b].concat(ia(Ga.apply(0,arguments))))};if(Um[b])return function(){return c.g[a][b]}}return this.g[a][b]};
515
- r.set=function(a,b,c){this.g[a][b]=c;kn(this,{type:"set",targetName:a,property:b,value:c})};function ln(a,b,c){dn=c;c.addUpdateListener(a.C);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);an(a);kn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function mn(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))}
516
- r.ye=function(a,b){kn(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};r.Pf=function(a,b){var c=Ga.apply(2,arguments),d=new nc,e=this.J.toString();this.J++;this.i[e]=d;try{kn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function fn(a,b){var c=a.K();a.l=new nc;a.u=!0;ln(a,c,b)}function en(a){var b=dn;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
517
- function an(a){var b=dn?"connected"==dn.status:!1;if(a.h&&!b){a.G();for(var c in a.g)a.g[c]={};cn(a)}a.h=b;a.M=b?dn.receiver.friendlyName:"";a.j.Lb()}function cn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function kn(a,b){var c=Nm(b),d=dn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Ya)}catch(e){throw c=new N(2,8,8005,e),d=new S("error",(new Map).set("detail",c)),a.s("player",d),a.Ab(),c;}}var hn=.02,gn=!1,dn=null,bn=new Set;
518
- function jn(a){if(a){a=t(bn);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function on(a,b,c){Me.call(this);var d=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.u=new Map;this.g=new $m(c,function(){return pn(d)},function(){return rn(d)},function(e,f){return sn(d,e,f)},function(){return tn(d)},function(){return un(d)});vn(this)}qa(on,Me);r=on.prototype;
519
- r.destroy=function(a){a&&this.g.Ab();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;Me.prototype.release.call(this);return Promise.all(a)};r.wf=function(){return this.l};r.mf=function(){return this.s};r.Pe=function(){return this.g.m&&gn};r.ra=function(){return this.g.ra()};r.Jd=function(){return this.g.Jd()};
520
- r.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=un(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Zd(),0):c["return"]()})};r.Rd=function(a){this.g.Rd(a)};r.ag=function(){nn(this.g)};r.Ab=function(){this.g.Ab()};
521
- r.Se=function(a){var b=this;return K(function(c){if(1==c.g){if(a==b.C)return c["return"]();b.C=a;b.g.Ab();return u(c,b.g.destroy(),2)}b.g=null;b.g=new $m(a,function(){return pn(b)},function(){return rn(b)},function(d,e){return sn(b,d,e)},function(){return tn(b)},function(){return un(b)});b.g.init();z(c)})};
522
- function vn(a){a.g.init();a.m=new df;for(var b=t(Qm),c=b.next();!c.done;c=b.next())a.m.B(a.i,c.value,function(f){a.g.ra()||(f=Le(f),a.j.dispatchEvent(f))});for(var d in Cm)a.m.B(a.h,Cm[d],function(f){a.g.ra()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Qb=e,Object.defineProperty(a.l,b.Qb,{configurable:!1,enumerable:!0,get:function(f){return function(){return wn(a,f.Qb)}}(b),set:function(f){return function(g){var h=f.Qb;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Qb:b.Qb};a.s={};xn(a,
523
- function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return yn(a,f)}})});zn(a);a.j=new Me;a.j.Fc=a.l;a.o=new Me;a.o.Fc=a.s}function zn(a){var b=new Map;xn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.u.set(c,e):a.u.set(e,c)}else b.set(d,c)})}
524
- function xn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
525
- function un(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.nd(),startTime:null};a.i.pause();for(var c=t(Sm),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(Wm);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(Xm);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 pn(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
526
- function rn(a){var b=new S(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
527
- function tn(a){for(var b=t(Wm),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(Sm);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(Sm),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(Xm);for(k=
528
- 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 S(ym,h);a.h.dispatchEvent(h)})}
529
- function wn(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.ra()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ra()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
530
- function yn(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.ec()};if("getDrmEngine"==b)return function(){return a.h.o};if("getAdManager"==b)return function(){return a.h.le()};
531
- if("setVideoContainer"==b)return function(c){return a.h.Fe(c)};if(a.g.ra()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ra()&&0==Object.keys(a.g.g.video).length&&Um[b]||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}function sn(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}
532
- M("shaka.cast.CastProxy",on);on.prototype.changeReceiverId=on.prototype.Se;on.prototype.forceDisconnect=on.prototype.Ab;on.prototype.suggestDisconnect=on.prototype.ag;on.prototype.setAppData=on.prototype.Rd;on.prototype.cast=on.prototype.cast;on.prototype.receiverName=on.prototype.Jd;on.prototype.isCasting=on.prototype.ra;on.prototype.canCast=on.prototype.Pe;on.prototype.getPlayer=on.prototype.mf;on.prototype.getVideo=on.prototype.wf;on.prototype.destroy=on.prototype.destroy;function An(a,b,c,d){Me.call(this);var e=this;this.g=a;this.h=b;this.j=new df;this.J={video:a,player:b};this.D=c||function(){};this.K=d||function(f){return f};this.i=null;this.G=!1;this.o=!0;this.m=0;this.C=!1;this.u=!0;this.s=this.l=null;this.H=new R(function(){Bn(e)});Cn(this)}qa(An,Me);r=An.prototype;r.isConnected=function(){return this.G};r.Af=function(){return this.o};r.Xf=function(a){this.i=a};r.Ve=function(){this.i=null};
533
- r.Yf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Wf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Vf=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
534
- r.destroy=function(){var a=this,b,c;return K(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.J=null,a.D=null,a.G=!1,a.o=!0,a.l=null,a.s=null,Me.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
535
- function Cn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Dn(a)};b.onSenderDisconnected=function(){return Dn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&En(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);En(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return Fn(a,
536
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Gn(a,e)};b.start();b=t(Qm);for(var c=b.next();!c.done;c=b.next())a.j.B(a.g,c.value,function(e){return Hn(a,"video",e)});for(var d in Cm)a.j.B(a.h,Cm[d],function(e){return Hn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Td(3840,2160):a.h.Td(1920,1080);a.j.B(a.g,"loadeddata",function(){a.C=!0});a.j.B(a.h,"loading",function(){a.o=
537
- !1;In(a)});a.j.B(a.g,"playing",function(){a.o=!1;In(a)});a.j.B(a.g,"pause",function(){In(a)});a.j.B(a.h,"unloading",function(){a.o=!0;In(a)});a.j.B(a.g,"ended",function(){(new R(function(){a.g&&a.g.ended&&(a.o=!0,In(a))})).R(Jn)})}function Dn(a){a.m=0;a.u=!0;a.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;In(a)}
538
- function In(a){var b;K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new S("caststatuschanged");a.dispatchEvent(b);Kn(a)||Ln(a);z(c)})}
539
- function Mn(a,b,c){var d,e,f,g,h,k,l,m,p,n,q;K(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,B(v,5),u(v,a.h.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=E(v),h=ym,k=(new Map).set("detail",g),l=new S(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)p=b.video[m],a.g[m]=p;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],
540
- a.h[n](q);a.g.autoplay=f;b.manifest&&(a.g.play(),Ln(a));z(v)}})}function Hn(a,b,c){a.h&&(Bn(a),En(a,{type:"event",targetName:b,event:c},a.l))}
541
- function Bn(a){a.H.R(Nn);for(var b={video:{},player:{}},c=t(Rm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in Vm)0==a.m%Vm[e]&&(b.player[e]=a.h[e]());for(var f in Um)0==a.m%Um[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.C&&(a.m+=1);En(a,{type:"update",update:b},a.l);Kn(a)}function Kn(a){return a.u&&(a.g.duration||a.h.T())?(On(a),a.u=!1,!0):!1}
542
- function On(a,b){var c={contentId:a.h.nd(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Ln(a,void 0===b?0:b,c)}
543
- function Gn(a,b){var c=Om(b.data);switch(c.type){case "init":a.m=0;a.C=!1;a.u=!0;Mn(a,c.initState,c.appData);Bn(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
544
- c.methodName;"player"==d&&"load"==e&&(a.m=0,a.C=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return Pn(a,h,g,null)},function(k){return Pn(a,h,g,k)})}}
545
- function Fn(a,b){var c=Om(b.data);switch(c.type){case "PLAY":a.g.play();Ln(a);break;case "PAUSE":a.g.pause();Ln(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(),Ln(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Ln(a));break;case "STOP":a.h.Zd().then(function(){a.h&&Ln(a)});break;case "GET_STATUS":On(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));
546
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||Ln(a);break;case "LOAD":a.m=0;a.C=!1;a.u=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.D(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&On(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");En(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:En(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
547
- function Pn(a,b,c,d){a.h&&En(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function En(a,b,c,d){a.G&&(a=Nm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Ln(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Qn:a.h.rd()?Rn:a.g.paused?Sn:Tn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);En(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
548
- M("shaka.cast.CastReceiver",An);An.prototype.destroy=An.prototype.destroy;An.prototype.setContentArtist=An.prototype.Vf;An.prototype.setContentImage=An.prototype.Wf;An.prototype.setContentTitle=An.prototype.Yf;An.prototype.clearContentMetadata=An.prototype.Ve;An.prototype.setContentMetadata=An.prototype.Xf;An.prototype.isIdle=An.prototype.Af;An.prototype.isConnected=An.prototype.isConnected;var Nn=.5,Jn=5,Qn="IDLE",Tn="PLAYING",Rn="BUFFERING",Sn="PAUSED";function Un(a){var b=this;this.g=[];this.h=[];this.data=[];(new kg).box("moov",og).S("pssh",function(c){if(!(1<c.version)){var d=Gb(c.reader.P,-12,c.size);b.data.push(d);b.g.push(Bc(c.reader.ab(16)));if(0<c.version){d=c.reader.N();for(var e=0;e<d;e++){var f=Bc(c.reader.ab(16));b.h.push(f)}}}}).parse(a)}
549
- function Vn(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Jb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Ac(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Wn(a,b){var c=Xn(a,b);return 1!=c.length?null:c[0]}function Yn(a,b,c){a=Zn(a,b,c);return 1!=a.length?null:a[0]}function Xn(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 $n(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
550
- function Zn(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 ao(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function bo(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 co(a){return Array.from(a.childNodes).every(eo)?a.textContent.trim():null}
551
- function eo(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function fo(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 go(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:a/1E3}
552
- function ho(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}
553
- function io(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 jo(a){a=Number(a);return 0===a%1?a:null}function ko(a){a=Number(a);return 0===a%1&&0<a?a:null}function lo(a){a=Number(a);return 0===a%1&&0<=a?a:null}function mo(a){a=Number(a);return isNaN(a)?null:a}function no(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
554
- function oo(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 po(a,b){try{var c=qc(a);return oo(c,b)}catch(d){return null}};function qo(a,b,c){var d=ro(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.Od?(e=h.init||e,!1):!0}),f.length&&(a=so(e,f,c,g),0==a.length&&(a=[hc("",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(hc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
555
- t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{ge:g,Pg:e,drmInfos:a,ke:!0}}function to(a,b,c,d){var e=qo(a,c,d);if(b.ke){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.ke=!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.ge||b.ge}
556
- function uo(a){var b=0,c=Jb(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=Gb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
557
- function vo(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 wo(a){a=Yn(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=zc(a.textContent);a=uo(a).filter(function(b){return b.type===xo})[0];if(!a)return"";a=rc(a.value,!0);return(a=oo(a,"WRMHEADER"))?vo(a):""}
558
- function so(a,b,c,d){var e=[];b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Od];if(g){var h;if(h=Yn(f.node,"urn:microsoft:playready","pro")){h=zc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Vn(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Od)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
559
- 226,251,75]),m=new Uint8Array([]);k=[{initData:Vn(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=hc(g,f.init||a||h||k);if(g=yo.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function ro(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=zo(c.value))&&b.push(c);return b}
560
- function zo(a){var b=a.getAttribute("schemeIdUri"),c=ao(a,"urn:mpeg:cenc:2013","default_KID"),d=Zn(a,"urn:mpeg:cenc:2013","pssh").map(co);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:zc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,Od:b,keyId:c,init:0<e.length?e:null}}
561
- var xo=1,yo=(new Map).set("com.widevine.alpha",function(a){return(a=Yn(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",wo).set("com.microsoft.playready.recommendation",wo).set("com.microsoft.playready.software",wo).set("com.microsoft.playready.hardware",wo).set("org.w3.clearkey",function(a){return(a=Yn(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Ao(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=
510
+ X.AD_LOADED="ad-loaded";X.ALL_ADS_COMPLETED="all-ads-completed";X.AD_LINEAR_CHANGED="ad-linear-changed";X.AD_METADATA="ad-metadata";X.AD_RECOVERABLE_ERROR="ad-recoverable-error";X.AD_BREAK_READY="ad-break-ready";X.AD_INTERACTION="ad-interaction";Pk=function(){return new X};function vm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof S){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
511
+ TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(Oh(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
512
+ 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})}
513
+ function xm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
514
+ 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,
515
+ 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 addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
516
+ Hm=["attach","detach","load","unload"];function Im(a,b,c,d,e,f,g){var h=this;this.G=a;this.O=g;this.j=new R(b);this.T=c;this.u=!1;this.s=d;this.F=e;this.K=f;this.h=this.m=!1;this.M="";this.o=null;this.C=function(){return Jm(h)};this.D=function(k,l){var m=wm(l);switch(m.type){case "event":var p=m.targetName;m=Oe(m.event);h.s(p,m);break;case "update":p=m.update;for(var n in p){m=h.g[n]||{};for(var q in p[n])m[q]=p[n][q]}h.u&&(h.T(),h.u=!1);break;case "asyncComplete":if(n=m.id,m=m.error,q=h.i[n],delete h.i[n],q)if(m){n=new N(m.severity,m.category,
517
+ m.code);for(p in m)n[p]=m[p];q.reject(n)}else q.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;Km.add(this)}r=Im.prototype;r.destroy=function(){Km["delete"](this);Lm(this);Mm&&Nm(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.C=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.sa=function(){return this.h};r.Od=function(){return this.M};
518
+ r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Lb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.O,null);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.Lb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Pm&&this.j.S(Qm);(a=Mm)&&a.status!=chrome.cast.SessionStatus.STOPPED?
519
+ Om(this,a):Mm=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Rm),window.__onGCastApiAvailable!=Rm&&Va("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};r.Vd=function(a){this.o=a;this.h&&Sm(this,{type:"appData",appData:this.o})};
520
+ r.cast=function(a){var b=this;return L(function(c){if(!b.m)throw new N(1,8,8E3);if(!Pm)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new nc;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.K();chrome.cast.requestSession(function(c){return Tm(a,b,c)},function(c){return Um(a,c)})}}r.zb=function(){if(this.h){Lm(this);if(Mm){Nm(this);try{Mm.stop(function(){},function(){})}catch(a){}Mm=null}Jm(this)}};
521
+ r.get=function(a,b){var c=this;if("video"==a){if(Bm.includes(b))return function(){return c.Ge.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))}}else if("player"==a){if(Dm[b]&&!this.get("player","isLive")())return function(){};if(Gm.includes(b))return function(){return c.Ge.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(Hm.includes(b))return function(){return c.Xf.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(Cm[b])return function(){return c.g[a][b]}}return this.g[a][b]};
522
+ r.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.C);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);Jm(a);Sm(a,{type:"init",initState:b,appData:a.o});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 N(2,8,c,b))}
523
+ r.Ge=function(a,b){Sm(this,{type:"call",targetName:a,methodName:b,args:Ia.apply(2,arguments)})};r.Xf=function(a,b){var c=Ia.apply(2,arguments),d=new nc,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.K();a.l=new nc;a.u=!0;Tm(a,c,b)}function Nm(a){var b=Mm;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
524
+ function Jm(a){var b=Mm?"connected"==Mm.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Lm(a)}a.h=b;a.M=b?Mm.receiver.friendlyName:"";a.j.Lb()}function Lm(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(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(){},Ya)}catch(e){throw c=new N(2,8,8005,e),d=new S("error",(new Map).set("detail",c)),a.s("player",d),a.zb(),c;}}var Qm=.02,Pm=!1,Mm=null,Km=new Set;
525
+ function Rm(a){if(a){a=t(Km);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Xm(a,b,c,d){d=void 0===d?!1:d;Qe.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.D=c;this.C=d;this.u=new Map;this.g=new Im(c,function(){return Ym(e)},function(){return Zm(e)},function(f,g){return $m(e,f,g)},function(){return an(e)},function(){return bn(e)},d);cn(this)}qa(Xm,Qe);r=Xm.prototype;
526
+ r.destroy=function(a){a&&this.g.zb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;Qe.prototype.release.call(this);return Promise.all(a)};r.Ef=function(){return this.l};r.wf=function(){return this.s};r.Xe=function(){return this.g.m&&Pm};r.sa=function(){return this.g.sa()};r.Od=function(){return this.g.Od()};
527
+ r.cast=function(){var a=this,b;return L(function(c){return 1==c.g?(b=bn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.ce(),0):c["return"]()})};r.Vd=function(a){this.g.Vd(a)};r.ig=function(){Vm(this.g)};r.zb=function(){this.g.zb()};
528
+ r.$e=function(a,b){b=void 0===b?!1:b;var c=this;return L(function(d){if(1==d.g){if(a==c.D&&b==c.C)return d["return"]();c.D=a;c.C=b;c.g.zb();return u(d,c.g.destroy(),2)}c.g=null;c.g=new Im(a,function(){return Ym(c)},function(){return Zm(c)},function(e,f){return $m(c,e,f)},function(){return an(c)},function(){return bn(c)},b);c.g.init();z(d)})};
529
+ function cn(a){a.g.init();a.m=new hf;for(var b=t(ym),c=b.next();!c.done;c=b.next())a.m.B(a.i,c.value,function(f){a.g.sa()||(f=Oe(f),a.j.dispatchEvent(f))});for(var d in Pe)a.m.B(a.h,Pe[d],function(f){a.g.sa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Qb=e,Object.defineProperty(a.l,b.Qb,{configurable:!1,enumerable:!0,get:function(f){return function(){return dn(a,f.Qb)}}(b),set:function(f){return function(g){var h=f.Qb;a.g.sa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Qb:b.Qb};a.s={};en(a,
530
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return fn(a,f)}})});gn(a);a.j=new Qe;a.j.Jc=a.l;a.o=new Qe;a.o.Jc=a.s}function gn(a){var b=new Map;en(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.u.set(c,e):a.u.set(e,c)}else b.set(d,c)})}
531
+ function en(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)}}
532
+ function bn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.ud(),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 Ym(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
533
+ function Zm(a){var b=new S(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
534
+ function an(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=
535
+ 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 S("error",h);a.h.dispatchEvent(h)})}
536
+ function dn(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.sa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.sa()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
537
+ function fn(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.fc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.re()};
538
+ if("setVideoContainer"==b)return function(c){return a.h.Ne(c)};if(a.g.sa()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.g.sa()&&0==Object.keys(a.g.g.video).length&&Cm[b]||!a.g.sa()?a.h[b].bind(a.h):a.g.get("player",b)}function $m(a,b,c){a.g.sa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}
539
+ M("shaka.cast.CastProxy",Xm);Xm.prototype.changeReceiverId=Xm.prototype.$e;Xm.prototype.forceDisconnect=Xm.prototype.zb;Xm.prototype.suggestDisconnect=Xm.prototype.ig;Xm.prototype.setAppData=Xm.prototype.Vd;Xm.prototype.cast=Xm.prototype.cast;Xm.prototype.receiverName=Xm.prototype.Od;Xm.prototype.isCasting=Xm.prototype.sa;Xm.prototype.canCast=Xm.prototype.Xe;Xm.prototype.getPlayer=Xm.prototype.wf;Xm.prototype.getVideo=Xm.prototype.Ef;Xm.prototype.destroy=Xm.prototype.destroy;function hn(a,b,c,d){Qe.call(this);var e=this;this.g=a;this.h=b;this.j=new hf;this.I={video:a,player:b};this.D=c||function(){};this.K=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.C=!1;this.u=!0;this.s=this.l=null;this.G=new R(function(){jn(e)});kn(this)}qa(hn,Qe);r=hn.prototype;r.isConnected=function(){return this.F};r.If=function(){return this.o};r.eg=function(a){this.i=a};r.cf=function(){this.i=null};
540
+ r.fg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.dg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.cg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
541
+ r.destroy=function(){var a=this,b,c;return L(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.I=null,a.D=null,a.F=!1,a.o=!0,a.l=null,a.s=null,Qe.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
542
+ function kn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return ln(a)};b.onSenderDisconnected=function(){return ln(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&mn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);mn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return nn(a,
543
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return on(a,e)};b.start();b=t(ym);for(var c=b.next();!c.done;c=b.next())a.j.B(a.g,c.value,function(e){return pn(a,"video",e)});for(var d in Pe)a.j.B(a.h,Pe[d],function(e){return pn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Xd(3840,2160):a.h.Xd(1920,1080);a.j.B(a.g,"loadeddata",function(){a.C=!0});a.j.B(a.h,"loading",function(){a.o=
544
+ !1;qn(a)});a.j.B(a.g,"playing",function(){a.o=!1;qn(a)});a.j.B(a.g,"pause",function(){qn(a)});a.j.B(a.h,"unloading",function(){a.o=!0;qn(a)});a.j.B(a.g,"ended",function(){(new R(function(){a.g&&a.g.ended&&(a.o=!0,qn(a))})).S(rn)})}function ln(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;qn(a)}
545
+ function qn(a){var b;L(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new S("caststatuschanged");a.dispatchEvent(b);sn(a)||tn(a);z(c)})}
546
+ function un(a,b,c){var d,e,f,g,h,k,l,m,p,n;L(function(q){switch(q.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,B(q,5),u(q,a.h.load(b.manifest,b.startTime),7)):u(q,Promise.resolve(),3);case 7:va(q,3);break;case 5:return g=F(q),h=(new Map).set("detail",g),k=new S("error",h),a.h&&a.h.dispatchEvent(k),q["return"]();case 3:if(!a.h)return q["return"]();for(l in b.video)m=b.video[l],a.g[l]=m;for(p in b.playerAfterLoad)n=b.playerAfterLoad[p],
547
+ a.h[p](n);a.g.autoplay=f;b.manifest&&(a.g.play(),tn(a));z(q)}})}function pn(a,b,c){a.h&&(jn(a),mn(a,{type:"event",targetName:b,event:c},a.l))}
548
+ function jn(a){a.G.S(vn);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.C&&(a.m+=1);mn(a,{type:"update",update:b},a.l);sn(a)}function sn(a){return a.u&&(a.g.duration||a.h.V())?(wn(a),a.u=!1,!0):!1}
549
+ function wn(a,b){var c={contentId:a.h.ud(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);tn(a,void 0===b?0:b,c)}
550
+ function on(a,b){var c=wm(b.data);switch(c.type){case "init":a.m=0;a.C=!1;a.u=!0;un(a,c.initState,c.appData);jn(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.I[d][e]=c;break;case "call":d=a.I[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
551
+ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.C=!1);var g=c.id,h=b.senderId;f=a.I[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return xn(a,h,g,null)},function(k){return xn(a,h,g,k)})}}
552
+ function nn(a,b){var c=wm(b.data);switch(c.type){case "PLAY":a.g.play();tn(a);break;case "PAUSE":a.g.pause();tn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),tn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),tn(a));break;case "STOP":a.h.ce().then(function(){a.h&&tn(a)});break;case "GET_STATUS":wn(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
553
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||tn(a);break;case "LOAD":a.m=0;a.C=!1;a.u=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.D(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&wn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");mn(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:mn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
554
+ function xn(a,b,c,d){a.h&&mn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function mn(a,b,c,d){a.F&&(a=vm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function tn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?yn:a.h.vd()?zn:a.g.paused?An:Bn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);mn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
555
+ M("shaka.cast.CastReceiver",hn);hn.prototype.destroy=hn.prototype.destroy;hn.prototype.setContentArtist=hn.prototype.cg;hn.prototype.setContentImage=hn.prototype.dg;hn.prototype.setContentTitle=hn.prototype.fg;hn.prototype.clearContentMetadata=hn.prototype.cf;hn.prototype.setContentMetadata=hn.prototype.eg;hn.prototype.isIdle=hn.prototype.If;hn.prototype.isConnected=hn.prototype.isConnected;var vn=.5,rn=5,yn="IDLE",Bn="PLAYING",zn="BUFFERING",An="PAUSED";function Cn(a){var b=this;this.g=[];this.h=[];this.data=[];(new og).box("moov",sg).U("pssh",function(c){if(!(1<c.version)){var d=Gb(c.reader.R,-12,c.size);b.data.push(d);b.g.push(Bc(c.reader.ab(16)));if(0<c.version){d=c.reader.N();for(var e=0;e<d;e++){var f=Bc(c.reader.ab(16));b.h.push(f)}}}}).parse(a)}
556
+ function Dn(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Jb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Ac(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};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})}
557
+ 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}
558
+ 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:a/1E3}
559
+ 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}
560
+ 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}
561
+ 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=qc(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 N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Sd?(e=h.init||e,!1):!0}),f.length&&(a=$n(e,f,c,g),0==a.length&&(a=[hc("",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(hc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
562
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{me:g,Zg:e,drmInfos:a,qe:!0}}function ao(a,b,c,d){var e=Yn(a,c,d);if(b.qe){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.qe=!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.me||b.me}
563
+ function bo(a){var b=0,c=Jb(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=Gb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
564
+ 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=zc(a.textContent);a=bo(a).filter(function(b){return b.type===fo})[0];if(!a)return"";a=rc(a.value,!0);return(a=Wn(a,"WRMHEADER"))?co(a):""}
565
+ function $n(a,b,c,d){var e=[];b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Sd];if(g){var h;if(h=Gn(f.node,"urn:microsoft:playready","pro")){h=zc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Dn(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Sd)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
566
+ 226,251,75]),m=new Uint8Array([]);k=[{initData:Dn(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=hc(g,f.init||a||h||k);if(g=go.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}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}
567
+ 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 N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:zc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,Sd:b,keyId:c,init:0<e.length?e:null}}
568
+ 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).set("org.w3.clearkey",function(a){return(a=Gn(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});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=
562
569
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
563
- function Bo(a,b){var c=Co(a,b,"timescale"),d=1;c&&(d=ko(c)||1);var e=Co(a,b,"duration");c=ko(e||"");"image"==a.I.contentType&&(c=mo(e||""));c&&(c/=d);var f=Co(a,b,"startNumber");e=Number(Co(a,b,"presentationTimeOffset"))||0;var g=lo(f||"");if(null==f||null==g)g=1;var h=Do(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.U.duration||Infinity;h=Xn(h,"S");for(var l=[],m=-e,p=0;p<h.length;++p){var n=h[p],q=h[p+1],v=fo(n,"t",lo),x=fo(n,"d",lo);n=fo(n,"r",jo);null!=v&&(v-=e);if(!x)break;v=null!=v?v:m;n=
564
- n||0;if(0>n)if(q){q=fo(q,"t",lo);if(null==q)break;else if(v>=q)break;n=Math.ceil((q-v)/x)-1}else{if(Infinity==k)break;else if(v/f>=k)break;n=Math.ceil((k*f-v)/x)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=n;++q)m=v+x,l.push({start:v/f,end:m/f,eg:v}),v=m}f=l}return{timescale:d,ha:c,Kb:g,Ua:e/d||0,$d:e,timeline:f}}function Co(a,b,c){return[b(a.I),b(a.ja),b(a.ba)].filter(dc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
565
- function Do(a,b,c){return[b(a.I),b(a.ja),b(a.ba)].filter(dc).map(function(d){return Wn(d,c)}).reduce(function(d,e){return d||e})}
566
- function Eo(a,b,c,d,e,f){for(var g=ao(a,"http://www.w3.org/1999/xlink","href"),h=ao(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 Fe(new N(2,4,4028));if("onLoad"!=h)return Fe(new N(2,4,4027));var m=ec([d],[g]);return e.request(0,Ve(m,b)).$(function(p){p=po(p.data,a.tagName);if(!p)return Fe(new N(2,4,4001,g));
567
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=t(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return Fo(a,b,c,m[0],e,f+1)})}
568
- function Fo(a,b,c,d,e,f){f=void 0===f?0:f;if(ao(a,"http://www.w3.org/1999/xlink","href")){var g=Eo(a,b,c,d,e,f);c&&(g=g.$(void 0,function(){return Fo(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"==ao(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Fo(k,b,c,d,e,f)));return Je(g).$(function(){return a})};function Go(a,b,c,d,e,f,g){var h,k=(new kg).S("sidx",function(l){h=Ho(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
569
- function Ho(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Jb(),m=g.reader.Jb();g.reader.skip(2);var p=g.reader.Id();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.N(),q=(n&2147483648)>>>31;n&=2147483647;var v=g.reader.N();g.reader.skip(4);if(1==q)throw new N(2,3,3006);h.push(new ji(l/k+c,(l+v)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=v;a+=n}g.parser.stop();return h};function Io(a){this.h=Jb(a);this.g=new hg(this.h,0)}Io.prototype.ma=function(){return this.g.ma()};
570
- function Jo(a){var b=Ko(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=Ko(a);a:{d=t(Lo);for(var e=d.next();!e.done;e=d.next())if(Eb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.aa();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.aa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.aa();d=Jb(a.h,a.g.aa(),b);a.g.skip(b);return new Mo(c,
571
- d)}function Ko(a){var b=a.g.aa(),c=a.g.Ta();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Gb(a.h,b,c)}var Lo=[[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 Mo(a,b){this.id=a;this.g=b}
572
- function No(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 Oo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Io(a.g);for(var p=null,n=null;a.ma();){var q=Jo(a);if(187==q.id){var v=Po(q);v&&(q=c*v.fg,v=b+v.Of,null!=p&&m.push(new ji(p+g,q+g,l,n,v-1,f,g,h,k)),p=q,n=v)}}null!=p&&m.push(new ji(p+g,d+g,l,n,null,f,g,h,k));return m}
573
- function Po(a){var b=new Io(a.g);a=Jo(b);if(179!=a.id)throw new N(2,3,3013);a=No(a);b=Jo(b);if(183!=b.id)throw new N(2,3,3012);b=new Io(b.g);for(var c=0;b.ma();){var d=Jo(b);if(241==d.id){c=No(d);break}}return{fg:a,Of:c}};function Qo(a,b){var c=Do(a,b,"Initialization");if(!c)return null;var d=a.I.wa,e=c.getAttribute("sourceURL");e&&(d=ec(a.I.wa,[e]));e=0;var f=null;if(c=fo(c,"range",io))e=c.start,f=c.end;return new hi(function(){return d},e,f,Ro(a))}
574
- function So(a,b){var c=Number(Co(a,To,"presentationTimeOffset"))||0,d=Co(a,To,"timescale"),e=1;d&&(e=ko(d)||1);var f=c/e||0,g=Qo(a,To);Uo(a,g);var h=Oe(a);return{Bb:function(){var k=Do(h,To,"RepresentationIndex"),l=h.I.wa;k&&(k=k.getAttribute("sourceURL"))&&(l=ec(h.I.wa,[k]));k=Vo(h);return Wo(h,b,g,l,k.start,k.end,f)}}}
575
- function Wo(a,b,c,d,e,f,g){var h,k,l,m,p,n,q,v,x,w,y,D,C,A,F;return K(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Ya||!a.U.re,l=a.U.start,m=a.U.duration,p=a.I.mimeType.split("/")[1],n=b,q=null,v=[n(d,e,f),"webm"==p?n(c.ya(),c.Ba,c.la):null],n=null,u(G,Promise.all(v),2);x=G.h;w=x[0];y=x[1]||null;D=null;C=l-g;A=l;F=m?l+m:Infinity;if("mp4"==p)var H=Go(w,e,d,c,C,A,F);else{H=new Io(y);if(440786851!=Jo(H).id)throw new N(2,3,3008);var L=Jo(H);if(408125543!=L.id)throw new N(2,3,3009);H=L.g.byteOffset;
576
- L=new Io(L.g);for(var I=null;L.ma();){var J=Jo(L);if(357149030==J.id){I=J;break}}if(!I)throw new N(2,3,3010);I=new Io(I.g);J=1E6;for(L=null;I.ma();){var P=Jo(I);if(2807729==P.id)J=No(P);else if(17545==P.id)if(4==P.g.byteLength)L=P.g.getFloat32(0);else if(8==P.g.byteLength)L=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==L)throw new N(2,3,3011);I=J/1E9;L*=I;J=Jo(new Io(w));if(475249515!=J.id)throw new N(2,3,3007);H=Oo(J,H,I,L,d,c,C,A,F)}D=H;h.Gb(D);q=new Ii(D);k&&q.Za(A,F,!0);return G["return"](q)})}
577
- function To(a){return a.qc}function Vo(a){var b=Do(a,To,"RepresentationIndex");a=Co(a,To,"indexRange");a=io(a||"");b&&(a=fo(b,"range",io,a));return a}function Uo(a,b){Xo(a,b);if(!Vo(a))throw new N(2,4,4002);}function Xo(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=lc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
578
- function Ro(a){var b=a.I;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Oc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Yo(a,b){var c=Qo(a,Zo),d=$o(a);if(!d.ha&&!d.timeline&&1<d.Eb.length)throw new N(2,4,4002);if(!d.ha&&!a.U.duration&&!d.timeline&&1==d.Eb.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.ba.id&&a.I.id&&(f=b[a.ba.id+","+a.I.id])&&(e=f.segmentIndex);var g=ap(a.U.start,a.U.duration,a.I.wa,d,c);c=!e;e?e.Fb(g,a.presentationTimeline.Ra()):e=new Ii(g);a.presentationTimeline.Gb(g);a.Ya&&a.U.re||e.Za(a.U.start,a.U.duration?a.U.start+a.U.duration:
579
- Infinity,c);f&&(f.segmentIndex=e);return{Bb:function(){e&&0!=e.L.length||e.kc(g);return Promise.resolve(e)}}}function Zo(a){return a.bb}function $o(a){var b=bp(a);a=Bo(a,Zo);var c=a.Kb;0==c&&(c=1);var d=0;a.ha?d=a.ha*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ha:a.ha,startTime:d,Kb:c,Ua:a.Ua,timeline:a.timeline,Eb:b}}
580
- function ap(a,b,c,d,e){var f=d.Eb.length;d.timeline&&d.timeline.length!=d.Eb.length&&(f=Math.min(d.timeline.length,d.Eb.length));for(var g=a-d.Ua,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={cd:m.cd},p++){var n=d.Eb[p];m.cd=ec(c,[n.Ff]);var q=void 0;q=null!=d.ha?l+d.ha:d.timeline?d.timeline[p].end:l+b;k.push(new ji(a+l,a+q,function(v){return function(){return v.cd}}(m),n.start,n.end,e,g,a,h));l=q}return k}
581
- function bp(a){return[a.I.bb,a.ja.bb,a.ba.bb].filter(dc).map(function(b){return Xn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.pe&&(a.pe=!0);var c=b.getAttribute("media");b=fo(b,"mediaRange",io,{start:0,end:null});return{Ff:c,start:b.start,end:b.end}})};function cp(a,b,c,d,e,f){var g=dp(a),h=ep(a);fp(h);var k=Oe(a);if(h.jc)return Xo(a,g),{Bb:function(){var q=Ao(h.jc,k.I.id,null,k.bandwidth||null,null);q=ec(k.I.wa,[q]);return Wo(k,b,g,q,0,null,h.Ua)}};if(h.ha)return d||(a.presentationTimeline.Ed(h.ha),a.presentationTimeline.Fd(a.U.start)),{Bb:function(){return gp(k,h,e,g,f)}};var l=null;d=d=null;a.ba.id&&a.I.id&&(d=a.ba.id+","+a.I.id,d=c[d])&&(l=d.segmentIndex);var m=hp(k,h,g);c=a.U.start;var p=a.U.duration?a.U.start+a.U.duration:Infinity,n=Infinity!=
582
- p;l?(n&&(new Ii(m)).Za(c,p,!0),l.Fb(m,a.presentationTimeline.Ra())):l=new Ii(m);a.presentationTimeline.Gb(m);n&&l.Za(c,p);d&&a.Ya&&(d.segmentIndex=l);return{Bb:function(){l&&0!=l.L.length||l.kc(m);return Promise.resolve(l)}}}function ip(a){return a.rc}function ep(a){var b=Bo(a,ip),c=Co(a,ip,"media");a=Co(a,ip,"index");return{ha:b.ha,timescale:b.timescale,Kb:b.Kb,Ua:b.Ua,$d:b.$d,timeline:b.timeline,Cd:c,jc:a}}
583
- function fp(a){var b=a.jc?1:0;b+=a.timeline?1:0;b+=a.ha?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.jc&&(a.timeline=null),a.ha=null);if(!a.jc&&!a.Cd)throw new N(2,4,4002);}
584
- function gp(a,b,c,d,e){function f(I){var J=(I-q)*n,P=J+b.Ua,Q=J+l;J=Q+n;var ca=Math.min(J,h());Q=new ji(Q,ca,function(){var Y=Ao(x,y,I,w,P*v);return ec(D,[Y])},0,null,d,C,l,h());Q.j=J;return Q}function g(){var I=[Math.max(k.Ra(),l),Math.min(k.hb(),h())].map(function(J){return J-l});return[Math.ceil(I[0]/n),Math.ceil(I[1]/n)-1].map(function(J){return J+q})}function h(){var I=null!=m&&e[m]||p;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.U.start,m=a.ba.id,p=a.U.duration,n=b.ha,q=b.Kb,v=b.timescale,
585
- x=b.Cd,w=a.bandwidth||null,y=a.I.id,D=a.I.wa,C=l-b.Ua,A=g();a=a.Ya?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var F=a;F<=A;++F){var G=f(F);c.push(G)}var H=new Ii(c);c=k.hb()<h();F=k.T();if(c||F){var L=Math.max(a,A+1);H.Vc(n,function(){var I=k.Ra();H.fb(I);var J=t(g());J.next();J=J.next().value;for(var P=[];L<=J;){var Q=f(L);P.push(Q);L++}return I>h()&&!P.length?null:P})}return Promise.resolve(H)}
586
- function hp(a,b,c){var d=a.U.start,e=a.U.duration,f=d-b.Ua;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={bd:h.bd,fd:h.fd,jd:h.jd,Zc:h.Zc,ld:h.ld,$c:h.$c},k++){var l=b.timeline[k],m=l.start,p=l.eg;l=l.end;h.jd=k+b.Kb;h.ld=p+b.$d;h.fd=a.I.id;h.Zc=a.bandwidth||null;h.bd=b.Cd;h.$c=a.I.wa;g.push(new ji(d+m,d+l,function(n){return function(){var q=Ao(n.bd,n.fd,n.jd,n.Zc||null,n.ld);return ec(n.$c,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
587
- function dp(a){var b=Co(a,ip,"initialization");if(!b)return null;var c=a.I.id,d=a.bandwidth||null,e=a.I.wa;return new hi(function(){var f=Ao(b,c,null,d,null);return ec(e,[f])},0,null,Ro(a))};function jp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}jp.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=[]};
588
- function kp(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,x,w,y,D,C,A,F,G,H,L,I,J,P,Q,ca,Y,ja,Ha;return K(function(za){switch(za.g){case 1:d=mc;lp(b);mp(b);np(b);op(b);if(!c&&1==b.length){e=b[0];a.g=e.zc;a.h=e.Wc;a.j=e.textStreams;a.i=e.imageStreams;za.A(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 za["return"]();k=b.map(function(Ia){return Ia.zc});l=b.map(function(Ia){return Ia.Wc});m=b.map(function(Ia){return Ia.textStreams});p=b.map(function(Ia){return Ia.imageStreams});
589
- n=t(m);for(q=n.next();!q.done;q=n.next())v=q.value,v.push(pp(d.X));x=t(p);for(w=x.next();!w.done;w=x.next())y=w.value,y.push(pp(d.Ub));return u(za,qp(a.g,k,f,rp,sp),3);case 3:return u(za,qp(a.h,l,f,rp,sp),4);case 4:return u(za,qp(a.j,m,f,rp,sp),5);case 5:return u(za,qp(a.i,p,f,rp,sp),2);case 2:D=0;C=[];if(a.h.length&&a.g.length)for(I=t(a.g),J=I.next();!J.done;J=I.next())for(P=J.value,Q=t(a.h),ca=Q.next();!ca.done;ca=Q.next())Y=ca.value,ja=$f(P.drmInfos,Y.drmInfos),P.drmInfos.length&&Y.drmInfos.length&&
590
- !ja.length||(Ha=D++,C.push({id:Ha,language:P.language,primary:P.primary,audio:P,video:Y,bandwidth:(P.bandwidth||0)+(Y.bandwidth||0),drmInfos:ja,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),F=t(A),G=F.next();!G.done;G=F.next())H=G.value,L=D++,C.push({id:L,language:H.language,primary:H.primary,audio:H.type==d.eb?H:null,video:H.type==d.Oa?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
591
- a.l=C;z(za)}})}function lp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.zc),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&&fb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.zc=c}}
592
- function np(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&&fb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
593
- function mp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Wc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&fb(e.roles,h.roles)&&nf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Wc=c}}
594
- function op(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}}
595
- function tp(a){var b,c,d,e,f,g,h,k,l,m,p,n,q,v,x,w,y,D,C,A,F,G,H,L,I,J,P;return K(function(Q){switch(Q.g){case 1:b=mc;if(1==a.length)return Q["return"](a[0]);c=a.map(function(ca){return ca.filter(function(Y){return Y.type==b.eb})});d=a.map(function(ca){return ca.filter(function(Y){return Y.type==b.Oa})});e=a.map(function(ca){return ca.filter(function(Y){return Y.type==b.X})});f=a.map(function(ca){return ca.filter(function(Y){return Y.type==b.Ub})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
596
- k.push(up(b.X));l=t(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(up(b.Ub));return u(Q,qp([],c,0,vp,wp),2);case 2:return n=Q.h,u(Q,qp([],d,0,vp,wp),3);case 3:return q=Q.h,u(Q,qp([],e,0,vp,wp),4);case 4:return v=Q.h,u(Q,qp([],f,0,vp,wp),5);case 5:x=Q.h;w=0;if(q.length&&n.length)for(F=t(n),G=F.next();!G.done;G=F.next())for(H=G.value,L=t(q),I=L.next();!I.done;I=L.next())J=I.value,P=w++,J.variantIds.push(P),H.variantIds.push(P);else for(y=q.concat(n),D=t(y),C=D.next();!C.done;C=D.next())A=C.value,
597
- A.variantIds=[w++];return Q["return"](q.concat(n).concat(v).concat(x))}})}
598
- function qp(a,b,c,d,e){var f,g,h,k,l,m,p,n,q,v,x,w,y,D,C,A,F,G,H,L,I;return K(function(J){switch(J.g){case 1:f=mc;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){J.A(4);break}m=l.value;return u(J,xp(m,b,c,e,g),5);case 5:p=J.h;if(!p)throw new N(2,4,4037);l=k.next();J.A(2);break;case 4:n=t(g);for(q=n.next();!q.done;q=n.next())for(v=q.value,x=t(v),w=x.next();!w.done;w=x.next())y=w.value,(D=yp(y,b,d,e,g))&&a.push(D);C=t(g);for(q=C.next();!q.done;q=
599
- C.next())for(A=q.value,F={},G=t(A),w=G.next();!w.done;F={Xa:F.Xa},w=G.next())if(F.Xa=w.value,H=F.Xa.type==f.X&&!F.Xa.language,L=F.Xa.type==f.Ub&&!F.Xa.tilesLayout,!H&&!L&&(I=a.some(function(P){return function(Q){return Q.mimeType==P.Xa.mimeType&&Mc(Q.codecs)==Mc(P.Xa.codecs)}}(F))))throw new N(2,4,4037);return J["return"](a)}})}
600
- function xp(a,b,c,d,e){return K(function(f){if(1==f.g)return zp(b,a),a.matchedStreams?a.segmentIndex?u(f,Ap(a,c),2):f.A(2):f["return"](!1);Bp(a,c,d,e);return f["return"](!0)})}
601
- function Ap(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Mi)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);z(l)})}
602
- function yp(a,b,c,d,e){var f=c(a);zp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new Mi;return u(g,Ap(f,0),0)})});if(!f.matchedStreams)return null;Bp(f,0,d,e);return f}function Bp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==bd(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
603
- function rp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
604
- function vp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
605
- function sp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=$f(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||
606
- (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)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=rp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),sp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&sp(a.trickModeVideo,b)}
607
- function wp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=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)}}}
608
- function zp(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Cp,video:Cp,text:Dp,image:Ep}[f.type],h={audio:Fp,video:Gp,text:Hp,image:Ip}[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;c.push(f)}b.matchedStreams=c}function Cp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Mc(b.codecs)!=Mc(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<$f(c,d).length:1)}return c?!1:!0}
609
- function Dp(a,b){return a.language?b.language?0==bd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Ep(a){return a.tilesLayout?!0:!1}
610
- function Fp(a,b,c){if(a.id==c.id)return!0;var d=bd(a.language,b.language),e=bd(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;
611
- d=Jp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Kp)return!0;if(d==Lp)return!1;d=Jp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Kp?!0:d==Lp?!1:a.bandwidth&&Mp(a.bandwidth,b.bandwidth,c.bandwidth)==Kp?!0:!1}
612
- function Gp(a,b,c){if(a.id==c.id)return!0;var d=Jp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Kp)return!0;if(d==Lp)return!1;if(a.frameRate){d=Jp(a.frameRate,b.frameRate,c.frameRate);if(d==Kp)return!0;if(d==Lp)return!1}return a.bandwidth&&Mp(a.bandwidth,b.bandwidth,c.bandwidth)==Kp?!0:!1}
613
- function Hp(a,b,c){if(a.id==c.id)return!0;var d=bd(a.language,b.language),e=bd(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!=
614
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Ip(a,b,c){return a.id==c.id?!0:Jp(a.width*a.height,b.width*b.height,c.width*c.height)==Kp?!0:!1}function up(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}}
615
- function pp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ii([]),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}}
616
- function Jp(a,b,c){if(b==a&&a!=c)return Lp;if(c==a&&a!=b)return Kp;if(b>a){if(c<=a||c-a<b-a)return Kp;if(c-a>b-a)return Lp}else{if(c>a)return Lp;if(a-c<a-b)return Kp;if(a-c>a-b)return Lp}return Np}function Mp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Kp:b<a?Lp:Np}var Kp=1,Np=0,Lp=-1;function Op(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.H=1;this.l={};this.M={};this.j=new jp;this.G=0;this.J=new Pa(5);this.D=new R(function(){Pp(a)});this.o=new Pe;this.s=null;this.K=[];this.u=Infinity;this.C=!1}r=Op.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.C=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,Qp(c),2);d=e.h;c.h&&Rp(c,d);if(!c.h)throw new N(2,7,7001);return e["return"](c.i)})};
617
- r.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return B(c,2),u(c,Qp(a),4);if(2!=c.g)return va(c,0);b=E(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};r.onExpirationUpdated=function(){};
618
- function Qp(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=Ve(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Qe(a.o,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,Sp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k["return"](h)})}
619
- function Sp(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=po(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Tp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Fo(d,a.g.retryParameters,f,c,a.h.networkingEngine);Qe(a.o,g);return u(k,g.promise,2)}h=k.h;return k["return"](Tp(a,h,c))})}
620
- function Tp(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,x,w,y,D,C,A,F,G,H,L,I,J,P,Q,ca,Y,ja,Ha,za,Ia;return K(function(Da){switch(Da.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Xn(b,"Location").map(co).filter(dc);0<f.length&&(g=ec(e,f),e=a.m=g);h=Xn(b,"BaseURL");k=h.map(co);l=ec(e,k);m=0;h&&h.length&&(m=fo(h[0],"availabilityTimeOffset",mo)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=fo(b,"minBufferTime",ho)||0);a.G=fo(b,"minimumUpdatePeriod",ho,-1);q=fo(b,"availabilityStartTime",go);v=fo(b,
621
- "timeShiftBufferDepth",ho);x=a.g.dash.ignoreSuggestedPresentationDelay;w=null;x||(w=fo(b,"suggestedPresentationDelay",ho));y=a.g.dash.ignoreMaxSegmentDuration;D=null;y||(D=fo(b,"maxSegmentDuration",ho));C=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,F=t(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.fb(A.Ra());else L=a.g.defaultPresentationDelay||1.5*n,I=null!=w?w:L,A=new T(q,I,a.g.dash.autoCorrectDrift);A.sc("static"==C);(J=A.T())&&
622
- !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.Vd(v);P=b.getAttribute("profiles")||"";Q={Ya:"static"!=C,presentationTimeline:A,ba:null,U:null,ja:null,I:null,bandwidth:0,pe:!1,zb:m,profiles:P.split(",")};ca=Up(a,Q,l,b);Y=ca.duration;ja=ca.periods;"static"!=C&&ca.ie||A.Ka(Y||Infinity);a.u&&!a.C&&(Ha=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());a.C?A.Ce(a.u):a.u&&Va("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.");
623
- A.Ed(D||1);return u(Da,kp(a.j,ja,Q.Ya),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);Da.A(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!A.He()){Da.A(3);break}za=Xn(b,"UTCTiming");return u(Da,Vp(a,l,za),5);case 5:Ia=Da.h;if(!a.h)return Da["return"]();A.De(Ia);case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Da)}})}
624
- function Up(a,b,c,d){var e=fo(d,"mediaPresentationDuration",ho),f=[],g=0;d=Xn(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=fo(k,"start",ho,g),p=k.id,n=fo(k,"duration",ho),q=null;if(l){var v=fo(l,"start",ho);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=n);if(!(null!==a.s&&null!==p&&null!==m&&m<a.s)||a.K.includes(p)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=Wp(a,b,c,{start:m,duration:q,node:k,re:null==q||!l});f.push(g);b.ba.id&&q&&(a.M[b.ba.id]=q);if(null==q){g=
625
- null;break}g=m+q}}a.K=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,ie:!1}:{periods:f,duration:g,ie:!0}}
626
- function Wp(a,b,c,d){b.ba=Xp(d.node,null,c);b.U=d;b.ba.zb=b.zb;b.ba.id||(b.ba.id="__shaka_period_"+d.start);var e=Xn(d.node,"EventStream");c=b.presentationTimeline.Ra();e=t(e);for(var f=e.next();!f.done;f=e.next())Yp(a,d.start,d.duration,f.value,c);c=Xn(d.node,"AdaptationSet").map(function(m){return Zp(a,b,m)}).filter(dc);if(b.Ya){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Rf);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);
627
- }d=c.filter(function(m){return!m.Yd});c=c.filter(function(m){return m.Yd});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Yd.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={yc:h.yc},l=k.next())h.yc=l.value,h.yc.trickModeVideo=e.streams.find(function(m){return function(p){return Mc(m.yc.codecs)==Mc(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:$p(d,"audio");g=a.g.disableVideo?[]:$p(d,"video");f=a.g.disableText?
628
- []:$p(d,lc);c=a.g.disableThumbnails?[]:$p(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,ia(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.ba.id,zc:d,Wc:e,textStreams:g,imageStreams:f}}
629
- function $p(a,b){return a.filter(function(c){return c.contentType==b})}
630
- function Zp(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.ja=Xp(c,b.ba,null);var e=!1,f=Xn(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(dc),h=void 0,k=b.ja.contentType==lc;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=
631
- l}}var p;m=Xn(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var q=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?p=d(parseInt(n.getAttribute("value"),10)):l=!0}m=Xn(c,"SupplementalProperty");m=t(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),
632
- 10)));m=Xn(c,"Accessibility");var v=new Map;m=t(m);for(n=m.next();!n.done;n=m.next())if(q=n.value,n=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=q){q=q.split(";");for(var x=t(q),w=x.next();!w.done;w=x.next()){var y=w.value,D=w=void 0;y.includes("=")?(y=y.split("="),w=y[0].startsWith("CC")?y[0]:"CC"+y[0],D=y[1]||"und"):(w="CC"+n,2==q.length?n+=2:n++,D=y);v.set(w,O(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
633
- 1,null!=q)for(q=t(q.split(";")),w=q.next();!w.done;w=q.next())w=w.value,y=x=void 0,w.includes("=")?(w=w.split("="),x="svc"+w[0],y=w[1].split(",")[0].split(":").pop()):(x="svc"+n,n++,y=w),v.set(x,O(y));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=Xn(c,"ContentProtection");var C=qo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=O(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=Xn(c,"Label"))&&l.length&&
634
- (l=l[0],l.textContent&&(F=l.textContent));l=Xn(c,"Representation");c=l.map(function(G){if(G=aq(a,b,C,h,A,F,e,g,v,G))G.hdr=G.hdr||p;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.ja.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ja.contentType||"application"==b.ja.contentType)for(b.ja.contentType=bq(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ja.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
635
- m.value,n=t(C.drmInfos),q=n.next();!q.done;q=n.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ia(q.keyIds),ia(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(dc);return{id:b.ja.id||"__fake__"+a.H++,contentType:b.ja.contentType,language:A,Qg:e,streams:c,drmInfos:C.drmInfos,Yd:f,Rf:k}}
636
- function aq(a,b,c,d,e,f,g,h,k,l){b.I=Xp(l,b.ja,null);a.u=Math.min(a.u,b.I.zb);if(!cq(b.I))return null;var m=b.U.start;b.bandwidth=fo(l,"bandwidth",ko)||0;var p=b.I.contentType,n=p==lc||"application"==p;p="image"==p;try{var q=function(H,L,I){return dq(a,H,L,I)};if(b.I.qc)var v=So(b,q);else if(b.I.bb)v=Yo(b,a.l);else if(b.I.rc)v=cp(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var x=b.I.wa,w=b.U.duration||0;v={Bb:function(){return Promise.resolve(Li(m,w,x))}}}}catch(H){if((n||p)&&4002==H.code)return null;
637
- throw H;}q=Xn(l,"ContentProtection");q=to(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var y=!1;Xn(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(y=!0);var D=!1;n&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var C;if(p&&((l=Xn(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
638
- (C=l.getAttribute("value")),!C))return null;var A;l=b.I.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(A="PQ");var F=b.I.id?b.ba.id+","+b.I.id:"",G={id:a.H++,originalId:b.I.id,createSegmentIndex:function(){var H,L,I;return K(function(J){if(1==J.g){L=(H=F&&b.Ya&&a.l[F])?a.l[F]:G;if(L.segmentIndex)return J.A(0);I=L;return u(J,v.Bb(),3)}I.segmentIndex=J.h;z(J)})},closeSegmentIndex:function(){G.segmentIndex&&
639
- (G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:b.I.codecs,frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ja.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.I.Oc,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:y,closedCaptions:k,
640
- hdr:A,tilesLayout:C,matchedStreams:[]};F&&b.Ya&&!a.l[F]&&(a.l[F]=G);return G}function Pp(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,B(d,2),u(d,Qp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=E(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();Rp(a,b);z(d)}})}function Rp(a,b){0>a.G||a.D.R(Math.max(3,a.G-b,Qa(a.J)))}
641
- function Xp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Oc:null,audioSamplingRate:null,zb:0};c=c||b.wa;var d=Xn(a,"BaseURL"),e=d.map(co),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=fo(a,"frameRate",no)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Xn(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=t(m);for(var n=m.next();!n.done;n=
642
- m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Xn(a,"AudioChannelConfiguration");m=eq(m)||b.Oc;n=fo(a,"audioSamplingRate",lo)||b.audioSamplingRate;f||(f=bq(g,h));var q=Wn(a,"SegmentBase"),v=Wn(a,"SegmentTemplate"),x=q?fo(q,"availabilityTimeOffset",mo)||0:0,w=v?fo(v,"availabilityTimeOffset",mo)||0:0;d=d&&d.length?fo(d[0],"availabilityTimeOffset",mo)||0:0;d=b.zb+d+x+w;return{wa:ec(c,e),qc:q||b.qc,bb:Wn(a,"SegmentList")||b.bb,rc:v||b.rc,width:fo(a,"width",lo)||b.width,height:fo(a,
643
- "height",lo)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),Oc:m,audioSamplingRate:n,zb:d}}
644
- function eq(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=
645
- 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 cq(a){var b=a.qc?1:0;b+=a.bb?1:0;b+=a.rc?1:0;if(0==b)return a.contentType==lc||"application"==a.contentType?!0:!1;1!=b&&(a.qc&&(a.bb=null),a.rc=null);return!0}
646
- function fq(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=ec(b,[c]),f=Ve(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Qe(a.o,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=qc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
647
- function Vp(a,b,c){var d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.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){p.A(4);break}h=g.value;B(p,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 p.A(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 p.A(8);
648
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p["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":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}p.A(9);break;case 7:return u(p,fq(a,b,l,"HEAD"),10);case 10:return p["return"](p.h);case 8:return u(p,fq(a,b,l,"GET"),11);case 11:return p["return"](p.h);
649
- case 9:va(p,3);break;case 5:E(p);case 3:g=f.next();p.A(2);break;case 4:return Va("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),p["return"](0)}})}
650
- function Yp(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=fo(d,"timescale",lo)||1;d=t(Xn(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=fo(k,"presentationTime",lo)||0,m=fo(k,"duration",lo)||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))}}
651
- function dq(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=af,f=aj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Qe(a.o,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function bq(a,b){return Pc(Kc(a,b))?lc:a.split("/")[0]}M("shaka.dash.DashParser",Op);fg.mpd=function(){return new Op};dg["application/dash+xml"]=function(){return new Op};dg["video/vnd.mpeg.dash.mpd"]=function(){return new Op};function gq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function hq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}hq.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};
652
- hq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function iq(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function jq(a,b,c){c=void 0===c?[]:c;this.i=b;this.h=a;this.g=c}function kq(a,b){this.name=a;this.value=b};function lq(a,b){return a.filter(function(c){return c.name==b})}function mq(a,b){return a.filter(function(c){return iq(c,"TYPE")==b})}function nq(a,b){var c=lq(a,b);return c.length?c[0]:null}function oq(a){var b=0;b=void 0===b?0:b;return(a=nq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b};function pq(a){this.h=a;this.g=0}function qq(a){rq(a,/[ \t]+/gm)}function rq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function sq(a){return a.g==a.h.length?null:(a=rq(a,/[^ \t\n]*/gm))?a[0]:null};function tq(){this.g=0}
653
- function uq(a,b,c){b=qc(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=vq(a,g),--a.g,wq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=vq(a,h);if(xq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
654
- 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=vq(a,m),wq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=ec([d],[m.trim()])[0],h&&g.push(h),e.push(new jq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new jq("",g,k)));return new gq(c,b,f,e)}f.push(h);
655
- "EXT-X-STREAM-INF"==h.name&&(h.g.push(new kq("URI",k)),e=!0)}}return new gq(c,b,f)}function vq(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 pq(f);var h;(h=rq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=rq(f,k);)d.push(new kq(h[1],h[2]||h[3])),qq(f)}return new hq(c,e,d,g)}
656
- var wq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),xq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function yq(){}function zq(a){try{var b=Aq(a);return He({uri:a,we:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Fe(c)}}function Aq(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=zc(a):e=uc(a);return{data:e,contentType:c}}
657
- M("shaka.net.DataUriPlugin",yq);yq.parse=zq;Se("data",zq);function Bq(){var a=this;this.h=this.j=null;this.qa=1;this.o=new Map;this.u=new Map;this.ia=new Set;this.g=new Map;this.i=null;this.M="";this.Z=new tq;this.fa=0;this.H=null;this.C=new R(function(){Cq(a)});this.l=Dq;this.J=null;this.ea=0;this.G=Infinity;this.Y=this.Na=0;this.D=new Pe;this.V=[];this.K=new Map;this.Ga=!1;this.s=new Map;this.da=new Map;this.m=!1}r=Bq.prototype;r.configure=function(a){this.h=a};
658
- r.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.j=b,c.m=b.isLowLatencyMode(),u(f,Eq(c,a),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,Fq(c,d.data,a),3);e=c.fa;0<e&&c.C.R(e);return f["return"](c.J)})};r.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.h=this.j=null;this.ia.clear();this.J=null;this.g.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
659
- r.update=function(){var a=this,b,c,d;return K(function(e){if(1==e.g){if(a.l==Dq)return e["return"]();b=[];c=Array.from(a.g.values());return c.length?u(e,Gq(a,c[0]),2):e.A(2)}for(d=1;d<c.length;d++)b.push(Gq(a,c[d]));return u(e,Promise.all(b),0)})};
660
- function Gq(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v;return K(function(x){if(1==x.g)return c=Hq,d=b.Le,e=new Ob(d),a.m&&b.Qe&&Rb(e,new Tb("_HLS_skip=YES")),u(x,Eq(a,e.toString()),2);f=x.h;g=uq(a.Z,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=lq(g.g,"EXT-X-DEFINE");k=Iq(a,h);l=b.stream;m=Jq(a,g,l.type,b.se,k);l.segmentIndex.Fb(m,a.i.Ra());m.length&&(p=oq(g.g),n=b.se.get(p),l.segmentIndex.fb(n));q=m[m.length-1];if(v=nq(g.g,"EXT-X-ENDLIST"))Kq(a,c.Ke),a.i.Ka(q.endTime);z(x)})}r.onExpirationUpdated=function(){};
661
- function Lq(a){if(null==a.H){for(var b=new Set,c=Infinity,d=t(a.g.values()),e=d.next();!e.done;e=d.next())(e=e.value.stream.segmentIndex)&&Ji(e,function(g){null!=g.W&&(c=Math.min(c,g.W),b.add(g))});if(0<b.size)for(a.H=-c,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;e.W+=a.H;e=t(e.ua);for(var f=e.next();!f.done;f=e.next())f.value.W+=a.H}}}
662
- function Fq(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,x,w,y,D,C,A,F,G,H,L,I,J,P,Q,ca,Y,ja,Ha,za,Ia,Da,Bb,ld,Cc,md,nd,ib,od,fc,ge;return K(function(Ra){switch(Ra.g){case 1:d=uq(a.Z,b,a.M);e=lq(d.g,"EXT-X-DEFINE");Mq(a,e);f=[];g=[];h=[];if(1==d.type)return F=a.h.hls.mediaPlaylistFullMimeType,G=F.split(";")[0],H=G.split("/")[0],L=Nc(F),I=new Map,u(Ra,Nq(a,d,c,c,L,H,"",!0,"Media Playlist",null,I,null,!1,!1,G),8);k=lq(d.g,"EXT-X-MEDIA");l=lq(d.g,"EXT-X-STREAM-INF");m=lq(d.g,"EXT-X-IMAGE-STREAM-INF");Oq(a,l);
663
- p=lq(d.g,"EXT-X-SESSION-DATA");n=t(p);for(q=n.next();!q.done;q=n.next())if(v=q.value,x=Z(v,"DATA-ID"),w=Z(v,"URI"),y=Z(v,"LANGUAGE"),D=Z(v,"VALUE"),C=(new Map).set("id",x),w&&C.set("uri",ec([a.M],[w])[0]),y&&C.set("language",y),D&&C.set("value",D),A=new S("sessiondata",C),a.j)a.j.onEvent(A);return u(Ra,Pq(a,k),4);case 4:return Qq(a,k),u(Ra,Rq(a,l),5);case 5:return f=Ra.h,u(Ra,Sq(a,k),6);case 6:return g=Ra.h,u(Ra,Tq(a,m),7);case 7:h=Ra.h;Ra.A(3);break;case 8:J=Ra.h,a.g.set(c,J),f.push({id:0,language:"und",
664
- primary:!0,audio:"audio"==H?J.stream:null,video:"video"==H?J.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.j)throw new N(2,7,7001);Lq(a);if(a.Ga&&0==f.length)throw new N(2,4,4034);Q=P=Infinity;ca=t(a.g.values());for(Y=ca.next();!Y.done;Y=ca.next())ja=Y.value,P=Math.min(P,ja.te),"text"!=ja.stream.type&&(Q=Math.min(Q,ja.Ef-ja.te));a.l!=Dq?(a.i=new T(0,a.h.defaultPresentationDelay?a.h.defaultPresentationDelay:a.Y?a.Y:3*a.ea),a.i.sc(!1)):(a.i=new T(null,
665
- 0),a.i.sc(!0));Uq(a);if(a.l!=Dq)a.fa=a.G,Ha=Hq,a.l==Ha.Je&&(za=a.i.Tc,isNaN(a.h.availabilityWindowOverride)||(za=a.h.availabilityWindowOverride),a.i.Vd(za));else for(a.i.Ka(Q),a.i.offset(-P),Ia=t(a.g.values()),Y=Ia.next();!Y.done;Y=Ia.next())Da=Y.value,Da.stream.segmentIndex.offset(-P),Da.stream.segmentIndex.Za(0,Q);a.V=[];Bb=[];ld=t(f);for(Cc=ld.next();!Cc.done;Cc=ld.next())for(md=Cc.value,nd=t([md.video,md.audio]),ib=nd.next();!ib.done;ib=nd.next())(od=ib.value)&&Bb.push(od);return u(Ra,Promise.all(Bb.map(function(Df){return K(function(Ef){return u(Ef,
666
- Df.createSegmentIndex(),0)})})),9);case 9:fc=t(Bb);for(ib=fc.next();!ib.done;ib=fc.next())ge=ib.value,a.V.push(ge.segmentIndex.L);Uq(a);a.J={presentationTimeline:a.i,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.j.makeTextStreamsForClosedCaptions(a.J);z(Ra)}})}function Mq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.o.has(d)||a.o.set(d,e))}}
667
- function Iq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.o.get(f))&&c.set(f,e)}return c}function Oq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=Vq(a,e);if(g){var h=jc(lc,e);a.s.set(g,h);eb(e,h)}f&&(g=ic("audio",e),a.s.set(f,g));d&&(f=ic("video",e),a.s.set(d,f))}}
668
- function Sq(a,b){var c,d,e,f,g,h,k,l,m,p,n,q;return K(function(v){if(1==v.g)return c=mq(b,"SUBTITLES"),d=c.map(function(x){var w,y,D;return K(function(C){if(1==C.g){if(w=a.h.disableText)return C["return"](null);B(C,2);return u(C,Wq(a,x),4)}if(2!=C.g)return y=C.h,C["return"](y.stream);D=E(C);if(a.h.hls.ignoreTextStreamFailures)return C["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=iq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(p=
669
- t(m),n=p.next();!n.done;n=p.next())q=n.value,q.stream.codecs=l;return v["return"](e.filter(function(x){return x}))})}
670
- function Tq(a,b){var c,d;return K(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return K(function(l){if(1==l.g){if(g=a.h.disableThumbnails)return l["return"](null);B(l,2);return u(l,Xq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=E(l);if(a.h.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}))})}
671
- function Pq(a,b){var c;return K(function(d){if(1==d.g)return b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f}),b.length?u(d,Wq(a,b[0]),2):d.A(2);c=b.slice(1).map(function(e){return Wq(a,e)});return u(d,Promise.all(c),0)})}
672
- function Rq(a,b){var c,d,e;return K(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,p,n,q,v;return K(function(x){if(1==x.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(iq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),p=m.next().value,n=m.next().value,q=Z(g,"VIDEO-RANGE"),u(x,Yq(a,g),2);if(v=x.h){for(var w=x["return"],y=v.audio,D=v.video,C=t(D),A=C.next();!A.done;A=C.next())if(A=A.value.stream)A.width=Number(p)||void 0,A.height=Number(n)||
673
- void 0,A.frameRate=Number(h)||void 0,A.hdr=q||void 0;C=a.h.disableAudio;if(!y.length||C)y=[null];C=a.h.disableVideo;if(!D.length||C)D=[null];C=[];y=t(y);for(A=y.next();!A.done;A=y.next()){A=A.value;for(var F=t(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=A?A.stream:null;var L=H?H.stream:null,I=A?A.stream.drmInfos:null,J=H?H.stream.drmInfos:null;H=(H?H.ae:"")+" - "+(A?A.ae:"");G&&L&&I.length&&J.length&&!(0<$f(I,J).length)||a.ia.has(H)||(G={id:a.qa++,language:G?G.language:"und",primary:!!G&&G.primary||
674
- !!L&&L.primary,audio:G,video:L,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},C.push(G),a.ia.add(H))}}x=w.call(x,C)}else x=x["return"]([]);return x})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(bc,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
675
- function Yq(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,x;return K(function(w){if(1==w.g)return c=mc,d=Vq(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.u.has(g)?a.u.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,p=iq(b,"URI"),n=k.audio.find(function(y){return y&&y.ae==p}),q=jc(c.Oa,d),(v=jc(c.eb,d))&&!q?l=c.eb:!h.length&&v&&q?(l=c.Oa,d=[[q,v].join()]):k.audio.length&&n?(l=c.eb,m=!0):l=k.video.length?c.eb:c.Oa,m?w.A(2):u(w,Zq(a,b,d,l),3);2!=w.g&&(x=w.h);if(x)k[x.stream.type]=[x];else if(null===x)return w["return"](null);
676
- $q(k);return w["return"](k)})}function Vq(a,b){var c=[];a.h.disableVideo||c.push(a.h.hls.defaultVideoCodec);a.h.disableAudio||c.push(a.h.hls.defaultAudioCodec);var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Mc(f);c.has(g)||(e.push(f),c.add(g))}return e}function ar(a){a=Z(a,"LANGUAGE")||"und";return O(a)}
677
- function $q(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Qq(a,b){var c=mq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=ar(e);var f=iq(e,"GROUP-ID");e=iq(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
678
- function Wq(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,x;return K(function(w){if(1==w.g){c=iq(b,"GROUP-ID");d="";var y=iq(b,"TYPE").toLowerCase();"subtitles"==y&&(y=lc);e=y;e!=lc&&c&&a.s.has(c)&&(d=a.s.get(c));f=br(iq(b,"URI"),a.o);if(a.g.has(f))return w["return"](a.g.get(f));g=ar(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?y=(y=Z(b,"CHANNELS"))?parseInt(y.split("/")[0],10):null:y=null;m=y;"audio"==e?y=(y=Z(b,"CHANNELS"))?y.includes("/JOC"):!1:y=!1;p=y;n=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
679
- v="YES"==q;return u(w,cr(a,f,d,e,g,l,h,m,null,n,v,p),2)}x=w.h;a.u.has(c)?a.u.get(c).push(x):a.u.set(c,[x]);if(null==x)return w["return"](null);if(a.g.has(f))return w["return"](a.g.get(f));a.g.set(f,x);return w["return"](x)})}
680
- function Xq(a,b){var c,d,e,f,g,h,k,l,m,p;return K(function(n){if(1==n.g){c=br(iq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.g.has(c))return n["return"](a.g.get(c));e=ar(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(n,cr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=n.h;if(null==h)return n["return"](null);if(a.g.has(c))return n["return"](a.g.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
570
+ 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.H.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.W.duration||Infinity;h=Fn(h,"S");for(var l=[],m=-e,p=0;p<h.length;++p){var n=h[p],q=h[p+1],x=Nn(n,"t",Tn),w=Nn(n,"d",Tn);n=Nn(n,"r",Rn);null!=x&&(x-=e);if(!w)break;x=null!=x?x:m;n=
571
+ n||0;if(0>n)if(q){q=Nn(q,"t",Tn);if(null==q)break;else if(x>=q)break;n=Math.ceil((q-x)/w)-1}else{if(Infinity==k)break;else if(x/f>=k)break;n=Math.ceil((k*f-x)/w)-1}0<l.length&&x!=m&&(l[l.length-1].end=x/f);for(q=0;q<=n;++q)m=x+w,l.push({start:x/f,end:m/f,mg:x}),x=m}f=l}return{timescale:d,ha:c,Kb:g,Ua:e/d||0,de:e,timeline:f}}function ko(a,b,c){return[b(a.H),b(a.ka),b(a.ba)].filter(dc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
572
+ function lo(a,b,c){return[b(a.H),b(a.ka),b(a.ba)].filter(dc).map(function(d){return En(d,c)}).reduce(function(d,e){return d||e})}
573
+ 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 Ie(new N(2,4,4028));if("onLoad"!=h)return Ie(new N(2,4,4027));var m=gc([d],[g]);return e.request(0,Ze(m,b)).$(function(p){p=Xn(p.data,a.tagName);if(!p)return Ie(new N(2,4,4001,g));
574
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=t(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return no(a,b,c,m[0],e,f+1)})}
575
+ 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.$(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 Me(g).$(function(){return a})};function oo(a,b,c,d,e,f,g){var h,k=(new og).U("sidx",function(l){h=po(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
576
+ function po(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Jb(),m=g.reader.Jb();g.reader.skip(2);var p=g.reader.Nd();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.N(),q=(n&2147483648)>>>31;n&=2147483647;var x=g.reader.N();g.reader.skip(4);if(1==q)throw new N(2,3,3006);h.push(new pi(l/k+c,(l+x)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=x;a+=n}g.parser.stop();return h};function qo(a){this.h=Jb(a);this.g=new lg(this.h,0)}qo.prototype.na=function(){return this.g.na()};
577
+ function ro(a){var b=so(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=so(a);a:{d=t(to);for(var e=d.next();!e.done;e=d.next())if(Eb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.aa();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.aa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.aa();d=Jb(a.h,a.g.aa(),b);a.g.skip(b);return new uo(c,
578
+ d)}function so(a){var b=a.g.aa(),c=a.g.Ta();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Gb(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}
579
+ function vo(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 wo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new qo(a.g);for(var p=null,n=null;a.na();){var q=ro(a);if(187==q.id){var x=xo(q);x&&(q=c*x.ng,x=b+x.Wf,null!=p&&m.push(new pi(p+g,q+g,l,n,x-1,f,g,h,k)),p=q,n=x)}}null!=p&&m.push(new pi(p+g,d+g,l,n,null,f,g,h,k));return m}
580
+ function xo(a){var b=new qo(a.g);a=ro(b);if(179!=a.id)throw new N(2,3,3013);a=vo(a);b=ro(b);if(183!=b.id)throw new N(2,3,3012);b=new qo(b.g);for(var c=0;b.na();){var d=ro(b);if(241==d.id){c=vo(d);break}}return{ng:a,Wf:c}};function yo(a,b){var c=lo(a,b,"Initialization");if(!c)return null;var d=a.H.xa,e=c.getAttribute("sourceURL");e&&(d=gc(a.H.xa,[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,zo(a))}
581
+ function Ao(a,b){var c=Number(ko(a,Bo,"presentationTimeOffset"))||0,d=ko(a,Bo,"timescale"),e=1;d&&(e=Sn(d)||1);var f=c/e||0,g=yo(a,Bo);Co(a,g);var h=Se(a);return{Ab:function(){var k=lo(h,Bo,"RepresentationIndex"),l=h.H.xa;k&&(k=k.getAttribute("sourceURL"))&&(l=gc(h.H.xa,[k]));k=Do(h);return Eo(h,b,g,l,k.start,k.end,f)}}}
582
+ function Eo(a,b,c,d,e,f,g){var h,k,l,m,p,n,q,x,w,v,y,D,C,A,G;return L(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Ya||!a.W.xe,l=a.W.start,m=a.W.duration,p=a.H.mimeType.split("/")[1],n=b,q=null,x=[n(d,e,f),"webm"==p?n(c.za(),c.Ca,c.ma):null],n=null,u(E,Promise.all(x),2);w=E.h;v=w[0];y=w[1]||null;D=null;C=l-g;A=l;G=m?l+m:Infinity;if("mp4"==p)var H=oo(v,e,d,c,C,A,G);else{H=new qo(y);if(440786851!=ro(H).id)throw new N(2,3,3008);var J=ro(H);if(408125543!=J.id)throw new N(2,3,3009);H=J.g.byteOffset;
583
+ J=new qo(J.g);for(var I=null;J.na();){var K=ro(J);if(357149030==K.id){I=K;break}}if(!I)throw new N(2,3,3010);I=new qo(I.g);K=1E6;for(J=null;I.na();){var P=ro(I);if(2807729==P.id)K=vo(P);else if(17545==P.id)if(4==P.g.byteLength)J=P.g.getFloat32(0);else if(8==P.g.byteLength)J=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==J)throw new N(2,3,3011);I=K/1E9;J*=I;K=ro(new qo(v));if(475249515!=K.id)throw new N(2,3,3007);H=wo(K,H,I,J,d,c,C,A,G)}D=H;h.Gb(D);q=new Oi(D);k&&q.Za(A,G,!0);return E["return"](q)})}
584
+ function Bo(a){return a.sc}function Do(a){var b=lo(a,Bo,"RepresentationIndex");a=ko(a,Bo,"indexRange");a=Qn(a||"");b&&(a=Nn(b,"range",Qn,a));return a}function Co(a,b){Fo(a,b);if(!Do(a))throw new N(2,4,4002);}function Fo(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=lc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
585
+ function zo(a){var b=a.H;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Uc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Go(a,b){var c=yo(a,Ho),d=Io(a);if(!d.ha&&!d.timeline&&1<d.Eb.length)throw new N(2,4,4002);if(!d.ha&&!a.W.duration&&!d.timeline&&1==d.Eb.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.ba.id&&a.H.id&&(f=b[a.ba.id+","+a.H.id])&&(e=f.segmentIndex);var g=Jo(a.W.start,a.W.duration,a.H.xa,d,c);c=!e;e?e.Fb(g,a.presentationTimeline.Ra()):e=new Oi(g);a.presentationTimeline.Gb(g);a.Ya&&a.W.xe||e.Za(a.W.start,a.W.duration?a.W.start+a.W.duration:
586
+ Infinity,c);f&&(f.segmentIndex=e);return{Ab:function(){e&&0!=e.L.length||e.lc(g);return Promise.resolve(e)}}}function Ho(a){return a.bb}function Io(a){var b=Ko(a);a=jo(a,Ho);var c=a.Kb;0==c&&(c=1);var d=0;a.ha?d=a.ha*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ha:a.ha,startTime:d,Kb:c,Ua:a.Ua,timeline:a.timeline,Eb:b}}
587
+ function Jo(a,b,c,d,e){var f=d.Eb.length;d.timeline&&d.timeline.length!=d.Eb.length&&(f=Math.min(d.timeline.length,d.Eb.length));for(var g=a-d.Ua,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={jd:m.jd},p++){var n=d.Eb[p];m.jd=gc(c,[n.Nf]);var q=void 0;q=null!=d.ha?l+d.ha:d.timeline?d.timeline[p].end:l+b;k.push(new pi(a+l,a+q,function(x){return function(){return x.jd}}(m),n.start,n.end,e,g,a,h));l=q}return k}
588
+ function Ko(a){return[a.H.bb,a.ka.bb,a.ba.bb].filter(dc).map(function(b){return Fn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.ve&&(a.ve=!0);var c=b.getAttribute("media");b=Nn(b,"mediaRange",Qn,{start:0,end:null});return{Nf:c,start:b.start,end:b.end}})};function Lo(a,b,c,d,e,f){var g=Mo(a),h=No(a);Oo(h);var k=Se(a);if(h.kc)return Fo(a,g),{Ab:function(){var q=io(h.kc,k.H.id,null,k.bandwidth||null,null);q=gc(k.H.xa,[q]);return Eo(k,b,g,q,0,null,h.Ua)}};if(h.ha)return d||(a.presentationTimeline.Hd(h.ha),a.presentationTimeline.Id(a.W.start)),{Ab:function(){return Po(k,h,e,g,f)}};var l=null;d=d=null;a.ba.id&&a.H.id&&(d=a.ba.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=Qo(k,h,g);c=a.W.start;var p=a.W.duration?a.W.start+a.W.duration:Infinity,n=Infinity!=
589
+ p;l?(n&&(new Oi(m)).Za(c,p,!0),l.Fb(m,a.presentationTimeline.Ra())):l=new Oi(m);a.presentationTimeline.Gb(m);n&&l.Za(c,p);d&&a.Ya&&(d.segmentIndex=l);return{Ab:function(){l&&0!=l.L.length||l.lc(m);return Promise.resolve(l)}}}function Ro(a){return a.tc}function No(a){var b=jo(a,Ro),c=ko(a,Ro,"media");a=ko(a,Ro,"index");return{ha:b.ha,timescale:b.timescale,Kb:b.Kb,Ua:b.Ua,de:b.de,timeline:b.timeline,Fd:c,kc:a}}
590
+ function Oo(a){var b=a.kc?1:0;b+=a.timeline?1:0;b+=a.ha?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.kc&&(a.timeline=null),a.ha=null);if(!a.kc&&!a.Fd)throw new N(2,4,4002);}
591
+ function Po(a,b,c,d,e){function f(I){var K=(I-q)*n,P=K+b.Ua,Q=K+l;K=Q+n;var ca=Math.min(K,h());Q=new pi(Q,ca,function(){var Y=io(w,y,I,v,P*x);return gc(D,[Y])},0,null,d,C,l,h());Q.j=K;return Q}function g(){var I=[Math.max(k.Ra(),l),Math.min(k.hb(),h())].map(function(K){return K-l});return[Math.ceil(I[0]/n),Math.ceil(I[1]/n)-1].map(function(K){return K+q})}function h(){var I=null!=m&&e[m]||p;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.W.start,m=a.ba.id,p=a.W.duration,n=b.ha,q=b.Kb,x=b.timescale,
592
+ w=b.Fd,v=a.bandwidth||null,y=a.H.id,D=a.H.xa,C=l-b.Ua,A=g();a=a.Ya?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var G=a;G<=A;++G){var E=f(G);c.push(E)}var H=new Oi(c);c=k.hb()<h();G=k.V();if(c||G){var J=Math.max(a,A+1);H.ad(n,function(){var I=k.Ra();H.fb(I);var K=t(g());K.next();K=K.next().value;for(var P=[];J<=K;){var Q=f(J);P.push(Q);J++}return I>h()&&!P.length?null:P})}return Promise.resolve(H)}
593
+ function Qo(a,b,c){var d=a.W.start,e=a.W.duration,f=d-b.Ua;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={hd:h.hd,md:h.md,pd:h.pd,ed:h.ed,rd:h.rd,fd:h.fd},k++){var l=b.timeline[k],m=l.start,p=l.mg;l=l.end;h.pd=k+b.Kb;h.rd=p+b.de;h.md=a.H.id;h.ed=a.bandwidth||null;h.hd=b.Fd;h.fd=a.H.xa;g.push(new pi(d+m,d+l,function(n){return function(){var q=io(n.hd,n.md,n.pd,n.ed||null,n.rd);return gc(n.fd,[q]).map(function(x){return x.toString()})}}(h),0,null,c,f,d,e))}return g}
594
+ function Mo(a){var b=ko(a,Ro,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.xa;return new ni(function(){var f=io(b,c,null,d,null);return gc(e,[f])},0,null,zo(a))};function So(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}So.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=[]};
595
+ function To(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,x,w,v,y,D,C,A,G,E,H,J,I,K,P,Q,ca,Y,ja,Ga;return L(function(za){switch(za.g){case 1:d=mc;Uo(b);Vo(b);Wo(b);Xo(b);if(!c&&1==b.length){e=b[0];a.g=e.Dc;a.h=e.bd;a.j=e.textStreams;a.i=e.imageStreams;za.A(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 za["return"]();k=b.map(function(Ha){return Ha.Dc});l=b.map(function(Ha){return Ha.bd});m=b.map(function(Ha){return Ha.textStreams});p=b.map(function(Ha){return Ha.imageStreams});
596
+ n=t(m);for(q=n.next();!q.done;q=n.next())x=q.value,x.push(Yo(d.Y));w=t(p);for(v=w.next();!v.done;v=w.next())y=v.value,y.push(Yo(d.Ub));return u(za,Zo(a.g,k,f,$o,ap),3);case 3:return u(za,Zo(a.h,l,f,$o,ap),4);case 4:return u(za,Zo(a.j,m,f,$o,ap),5);case 5:return u(za,Zo(a.i,p,f,$o,ap),2);case 2:D=0;C=[];if(a.h.length&&a.g.length)for(I=t(a.g),K=I.next();!K.done;K=I.next())for(P=K.value,Q=t(a.h),ca=Q.next();!ca.done;ca=Q.next())Y=ca.value,ja=dg(P.drmInfos,Y.drmInfos),P.drmInfos.length&&Y.drmInfos.length&&
597
+ !ja.length||(Ga=D++,C.push({id:Ga,language:P.language,primary:P.primary,audio:P,video:Y,bandwidth:(P.bandwidth||0)+(Y.bandwidth||0),drmInfos:ja,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),G=t(A),E=G.next();!E.done;E=G.next())H=E.value,J=D++,C.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.eb?H:null,video:H.type==d.wa?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
598
+ a.l=C;z(za)}})}function Uo(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Dc),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&&fb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Dc=c}}
599
+ function Wo(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&&fb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
600
+ function Vo(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.bd),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&&fb(e.roles,h.roles)&&rf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.bd=c}}
601
+ function Xo(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}}
602
+ function bp(a){var b,c,d,e,f,g,h,k,l,m,p,n,q,x,w,v,y,D,C,A,G,E,H,J,I,K,P;return L(function(Q){switch(Q.g){case 1:b=mc;if(1==a.length)return Q["return"](a[0]);c=a.map(function(ca){return ca.filter(function(Y){return Y.type==b.eb})});d=a.map(function(ca){return ca.filter(function(Y){return Y.type==b.wa})});e=a.map(function(ca){return ca.filter(function(Y){return Y.type==b.Y})});f=a.map(function(ca){return ca.filter(function(Y){return Y.type==b.Ub})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
603
+ k.push(cp(b.Y));l=t(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(cp(b.Ub));return u(Q,Zo([],c,0,dp,ep),2);case 2:return n=Q.h,u(Q,Zo([],d,0,dp,ep),3);case 3:return q=Q.h,u(Q,Zo([],e,0,dp,ep),4);case 4:return x=Q.h,u(Q,Zo([],f,0,dp,ep),5);case 5:w=Q.h;v=0;if(q.length&&n.length)for(G=t(n),E=G.next();!E.done;E=G.next())for(H=E.value,J=t(q),I=J.next();!I.done;I=J.next())K=I.value,P=v++,K.variantIds.push(P),H.variantIds.push(P);else for(y=q.concat(n),D=t(y),C=D.next();!C.done;C=D.next())A=C.value,
604
+ A.variantIds=[v++];return Q["return"](q.concat(n).concat(x).concat(w))}})}
605
+ function Zo(a,b,c,d,e){var f,g,h,k,l,m,p,n,q,x,w,v,y,D,C,A,G,E,H,J,I;return L(function(K){switch(K.g){case 1:f=mc;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){K.A(4);break}m=l.value;return u(K,fp(m,b,c,e,g),5);case 5:p=K.h;if(!p)throw new N(2,4,4037);l=k.next();K.A(2);break;case 4:n=t(g);for(q=n.next();!q.done;q=n.next())for(x=q.value,w=t(x),v=w.next();!v.done;v=w.next())y=v.value,(D=gp(y,b,d,e,g))&&a.push(D);C=t(g);for(q=C.next();!q.done;q=
606
+ C.next())for(A=q.value,G={},E=t(A),v=E.next();!v.done;G={Xa:G.Xa},v=E.next())if(G.Xa=v.value,H=G.Xa.type==f.Y&&!G.Xa.language,J=G.Xa.type==f.Ub&&!G.Xa.tilesLayout,!H&&!J&&(I=a.some(function(P){return function(Q){return Q.mimeType==P.Xa.mimeType&&Mc(Q.codecs)==Mc(P.Xa.codecs)}}(G))))throw new N(2,4,4037);return K["return"](a)}})}
607
+ function fp(a,b,c,d,e){return L(function(f){if(1==f.g)return hp(b,a),a.matchedStreams?a.segmentIndex?u(f,ip(a,c),2):f.A(2):f["return"](!1);jp(a,c,d,e);return f["return"](!0)})}
608
+ function ip(a,b){var c,d,e,f,g,h,k;return L(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Si)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);z(l)})}
609
+ function gp(a,b,c,d,e){var f=c(a);hp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return L(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new Si;return u(g,ip(f,0),0)})});if(!f.matchedStreams)return null;jp(f,0,d,e);return f}function jp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==cd(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
610
+ function $o(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
611
+ function dp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
612
+ function ap(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=dg(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||
613
+ (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)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=$o(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),ap(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&ap(a.trickModeVideo,b)}
614
+ function ep(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=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)}}}
615
+ function hp(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:kp,video:kp,text:lp,image:mp}[f.type],h={audio:np,video:op,text:pp,image:qp}[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;c.push(f)}b.matchedStreams=c}function kp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Mc(b.codecs)!=Mc(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<dg(c,d).length:1)}return c?!1:!0}
616
+ function lp(a,b){return a.language?b.language?0==cd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function mp(a){return a.tilesLayout?!0:!1}
617
+ function np(a,b,c){if(a.id==c.id)return!0;var d=cd(a.language,b.language),e=cd(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;
618
+ d=rp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==sp)return!0;if(d==tp)return!1;d=rp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==sp?!0:d==tp?!1:a.bandwidth&&up(a.bandwidth,b.bandwidth,c.bandwidth)==sp?!0:!1}
619
+ function op(a,b,c){if(a.id==c.id)return!0;var d=rp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==sp)return!0;if(d==tp)return!1;if(a.frameRate){d=rp(a.frameRate,b.frameRate,c.frameRate);if(d==sp)return!0;if(d==tp)return!1}return a.bandwidth&&up(a.bandwidth,b.bandwidth,c.bandwidth)==sp?!0:!1}
620
+ function pp(a,b,c){if(a.id==c.id)return!0;var d=cd(a.language,b.language),e=cd(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!=
621
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function qp(a,b,c){return a.id==c.id?!0:rp(a.width*a.height,b.width*b.height,c.width*c.height)==sp?!0:!1}function cp(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}}
622
+ function Yo(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}}
623
+ function rp(a,b,c){if(b==a&&a!=c)return tp;if(c==a&&a!=b)return sp;if(b>a){if(c<=a||c-a<b-a)return sp;if(c-a>b-a)return tp}else{if(c>a)return tp;if(a-c<a-b)return sp;if(a-c>a-b)return tp}return vp}function up(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?sp:b<a?tp:vp}var sp=1,vp=0,tp=-1;function wp(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.M={};this.j=new So;this.F=0;this.I=new Pa(5);this.D=new R(function(){xp(a)});this.o=new Te;this.s=null;this.K=[];this.u=Infinity;this.C=!1}r=wp.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return L(function(e){if(1==e.g)return c.C=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,yp(c),2);d=e.h;c.h&&zp(c,d);if(!c.h)throw new N(2,7,7001);return e["return"](c.i)})};
624
+ r.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};r.update=function(){var a=this,b;return L(function(c){if(1==c.g)return B(c,2),u(c,yp(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};r.onExpirationUpdated=function(){};
625
+ function yp(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=Ze(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Ue(a.o,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,Ap(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
626
+ function Ap(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g){d=Xn(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Bp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=no(d,a.g.retryParameters,f,c,a.h.networkingEngine);Ue(a.o,g);return u(k,g.promise,2)}h=k.h;return k["return"](Bp(a,h,c))})}
627
+ function Bp(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,x,w,v,y,D,C,A,G,E,H,J,I,K,P,Q,ca,Y,ja,Ga,za,Ha;return L(function(Da){switch(Da.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Fn(b,"Location").map(Ln).filter(dc);0<f.length&&(g=gc(e,f),e=a.m=g);h=Fn(b,"BaseURL");k=h.map(Ln);l=gc(e,k);m=0;h&&h.length&&(m=Nn(h[0],"availabilityTimeOffset",Un)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=Nn(b,"minBufferTime",Pn)||0);a.F=Nn(b,"minimumUpdatePeriod",Pn,-1);q=Nn(b,"availabilityStartTime",On);x=Nn(b,
628
+ "timeShiftBufferDepth",Pn);w=a.g.dash.ignoreSuggestedPresentationDelay;v=null;w||(v=Nn(b,"suggestedPresentationDelay",Pn));y=a.g.dash.ignoreMaxSegmentDuration;D=null;y||(D=Nn(b,"maxSegmentDuration",Pn));C=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,G=t(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.fb(A.Ra());else J=a.g.defaultPresentationDelay||1.5*n,I=null!=v?v:J,A=new T(q,I,a.g.dash.autoCorrectDrift);A.uc("static"==C);(K=A.V())&&
629
+ !isNaN(a.g.availabilityWindowOverride)&&(x=a.g.availabilityWindowOverride);null==x&&(x=Infinity);A.Zd(x);P=b.getAttribute("profiles")||"";Q={Ya:"static"!=C,presentationTimeline:A,ba:null,W:null,ka:null,H:null,bandwidth:0,ve:!1,yb:m,profiles:P.split(",")};ca=Cp(a,Q,l,b);Y=ca.duration;ja=ca.periods;"static"!=C&&ca.oe||A.Ka(Y||Infinity);a.u&&!a.C&&(Ga=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());a.C?A.Ke(a.u):a.u&&Va("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.");
630
+ A.Hd(D||1);return u(Da,To(a.j,ja,Q.Ya),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);Da.A(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!A.Pe()){Da.A(3);break}za=Fn(b,"UTCTiming");return u(Da,Dp(a,l,za),5);case 5:Ha=Da.h;if(!a.h)return Da["return"]();A.Le(Ha);case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Da)}})}
631
+ function Cp(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),p=k.id,n=Nn(k,"duration",Pn),q=null;if(l){var x=Nn(l,"start",Pn);null!=x&&(q=x-m)}else null!=e&&(q=e-m);null==q&&(q=n);if(!(null!==a.s&&null!==p&&null!==m&&m<a.s)||a.K.includes(p)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=Ep(a,b,c,{start:m,duration:q,node:k,xe:null==q||!l});f.push(g);b.ba.id&&q&&(a.M[b.ba.id]=q);if(null==q){g=
632
+ null;break}g=m+q}}a.K=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,oe:!1}:{periods:f,duration:g,oe:!0}}
633
+ function Ep(a,b,c,d){b.ba=Fp(d.node,null,c);b.W=d;b.ba.yb=b.yb;b.ba.id||(b.ba.id="__shaka_period_"+d.start);var e=Fn(d.node,"EventStream");c=b.presentationTimeline.Ra();e=t(e);for(var f=e.next();!f.done;f=e.next())Gp(a,d.start,d.duration,f.value,c);c=Fn(d.node,"AdaptationSet").map(function(m){return Hp(a,b,m)}).filter(dc);if(b.Ya){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Zf);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);
634
+ }d=c.filter(function(m){return!m.be});c=c.filter(function(m){return m.be});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.be.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Bc:h.Bc},l=k.next())h.Bc=l.value,h.Bc.trickModeVideo=e.streams.find(function(m){return function(p){return Mc(m.Bc.codecs)==Mc(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:Ip(d,"audio");g=a.g.disableVideo?[]:Ip(d,"video");f=a.g.disableText?
635
+ []:Ip(d,lc);c=a.g.disableThumbnails?[]:Ip(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,ia(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.ba.id,Dc:d,bd:e,textStreams:g,imageStreams:f}}
636
+ function Ip(a,b){return a.filter(function(c){return c.contentType==b})}
637
+ function Hp(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ka=Fp(c,b.ba,null);var e=!1,f=Fn(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(dc),h=void 0,k=b.ka.contentType==lc;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=
638
+ l}}var p;m=Fn(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var q=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?p=d(parseInt(n.getAttribute("value"),10)):l=!0}m=Fn(c,"SupplementalProperty");m=t(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),
639
+ 10)));m=Fn(c,"Accessibility");var x=new Map;m=t(m);for(n=m.next();!n.done;n=m.next())if(q=n.value,n=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=q){q=q.split(";");for(var w=t(q),v=w.next();!v.done;v=w.next()){var y=v.value,D=v=void 0;y.includes("=")?(y=y.split("="),v=y[0].startsWith("CC")?y[0]:"CC"+y[0],D=y[1]||"und"):(v="CC"+n,2==q.length?n+=2:n++,D=y);x.set(v,O(D))}}else x.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
640
+ 1,null!=q)for(q=t(q.split(";")),v=q.next();!v.done;v=q.next())v=v.value,y=w=void 0,v.includes("=")?(v=v.split("="),w="svc"+v[0],y=v[1].split(",")[0].split(":").pop()):(w="svc"+n,n++,y=v),x.set(w,O(y));else x.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=Fn(c,"ContentProtection");var C=Yn(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=O(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=Fn(c,"Label"))&&l.length&&
641
+ (l=l[0],l.textContent&&(G=l.textContent));l=Fn(c,"Representation");c=l.map(function(E){if(E=Jp(a,b,C,h,A,G,e,g,x,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.ka.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ka.contentType||"application"==b.ka.contentType)for(b.ka.contentType=Kp(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ka.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
642
+ m.value,n=t(C.drmInfos),q=n.next();!q.done;q=n.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ia(q.keyIds),ia(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(dc);return{id:b.ka.id||"__fake__"+a.G++,contentType:b.ka.contentType,language:A,$g:e,streams:c,drmInfos:C.drmInfos,be:f,Zf:k}}
643
+ function Jp(a,b,c,d,e,f,g,h,k,l){b.H=Fp(l,b.ka,null);a.u=Math.min(a.u,b.H.yb);if(!Lp(b.H))return null;var m=b.W.start;b.bandwidth=Nn(l,"bandwidth",Sn)||0;var p=b.H.contentType,n=p==lc||"application"==p;p="image"==p;try{var q=function(H,J,I){return Mp(a,H,J,I)};if(b.H.sc)var x=Ao(b,q);else if(b.H.bb)x=Go(b,a.l);else if(b.H.tc)x=Lo(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var w=b.H.xa,v=b.W.duration||0;x={Ab:function(){return Promise.resolve(Ri(m,v,w))}}}}catch(H){if((n||p)&&4002==H.code)return null;
644
+ throw H;}q=Fn(l,"ContentProtection");q=ao(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var y=!1;Fn(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(y=!0);var D=!1;n&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var C;if(p&&((l=Fn(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
645
+ (C=l.getAttribute("value")),!C))return null;var A;l=b.H.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(A="PQ");var G=b.H.id?b.ba.id+","+b.H.id:"",E={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,J,I;return L(function(K){if(1==K.g){J=(H=G&&b.Ya&&a.l[G])?a.l[G]:E;if(J.segmentIndex)return K.A(0);I=J;return u(K,x.Ab(),3)}I.segmentIndex=K.h;z(K)})},closeSegmentIndex:function(){E.segmentIndex&&
646
+ (E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ka.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.H.Uc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:y,closedCaptions:k,
647
+ hdr:A,tilesLayout:C,matchedStreams:[]};G&&b.Ya&&!a.l[G]&&(a.l[G]=E);return E}function xp(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,B(d,2),u(d,yp(a),4);case 4:b=d.h;va(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"]();zp(a,b);z(d)}})}function zp(a,b){0>a.F||a.D.S(Math.max(3,a.F-b,Qa(a.I)))}
648
+ function Fp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Uc:null,audioSamplingRate:null,yb:0};c=c||b.xa;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"),p=b.emsgSchemeIdUris.slice();m=t(m);for(var n=m.next();!n.done;n=
649
+ m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Fn(a,"AudioChannelConfiguration");m=Np(m)||b.Uc;n=Nn(a,"audioSamplingRate",Tn)||b.audioSamplingRate;f||(f=Kp(g,h));var q=En(a,"SegmentBase"),x=En(a,"SegmentTemplate"),w=q?Nn(q,"availabilityTimeOffset",Un)||0:0,v=x?Nn(x,"availabilityTimeOffset",Un)||0:0;d=d&&d.length?Nn(d[0],"availabilityTimeOffset",Un)||0:0;d=b.yb+d+w+v;return{xa:gc(c,e),sc:q||b.sc,bb:En(a,"SegmentList")||b.bb,tc:x||b.tc,width:Nn(a,"width",Tn)||b.width,height:Nn(a,
650
+ "height",Tn)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),Uc:m,audioSamplingRate:n,yb:d}}
651
+ function Np(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=
652
+ 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 Lp(a){var b=a.sc?1:0;b+=a.bb?1:0;b+=a.tc?1:0;if(0==b)return a.contentType==lc||"application"==a.contentType?!0:!1;1!=b&&(a.sc&&(a.bb=null),a.tc=null);return!0}
653
+ function Op(a,b,c,d){var e,f,g,h,k,l;return L(function(m){if(1==m.g)return e=gc(b,[c]),f=Ze(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Ue(a.o,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=qc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
654
+ function Dp(a,b,c){var d,e,f,g,h,k,l,m;return L(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.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){p.A(4);break}h=g.value;B(p,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 p.A(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 p.A(8);
655
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p["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":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}p.A(9);break;case 7:return u(p,Op(a,b,l,"HEAD"),10);case 10:return p["return"](p.h);case 8:return u(p,Op(a,b,l,"GET"),11);case 11:return p["return"](p.h);
656
+ case 9:va(p,3);break;case 5:F(p);case 3:g=f.next();p.A(2);break;case 4:return Va("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),p["return"](0)}})}
657
+ function Gp(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))}}
658
+ function Mp(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=ef,f=gj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Ue(a.o,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Kp(a,b){return Qc(Kc(a,b))?lc:a.split("/")[0]}M("shaka.dash.DashParser",wp);jg.mpd=function(){return new wp};hg["application/dash+xml"]=function(){return new wp};hg["video/vnd.mpeg.dash.mpd"]=function(){return new wp};function Pp(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Qp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Qp.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};
659
+ Qp.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Rp(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function Sp(a,b,c){c=void 0===c?[]:c;this.i=b;this.h=a;this.g=c}function Tp(a,b){this.name=a;this.value=b};function Up(a,b){return a.filter(function(c){return c.name==b})}function Vp(a,b){return a.filter(function(c){return Rp(c,"TYPE")==b})}function Wp(a,b){var c=Up(a,b);return c.length?c[0]:null}function Xp(a){var b=0;b=void 0===b?0:b;return(a=Wp(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b};function Yp(a){this.h=a;this.g=0}function Zp(a){$p(a,/[ \t]+/gm)}function $p(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 aq(a){return a.g==a.h.length?null:(a=$p(a,/[^ \t\n]*/gm))?a[0]:null};function bq(){this.g=0}
660
+ function cq(a,b,c){b=qc(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=dq(a,g),--a.g,eq.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=dq(a,h);if(fq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
661
+ 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=dq(a,m),eq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=gc([d],[m.trim()])[0],h&&g.push(h),e.push(new Sp(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Sp("",g,k)));return new Pp(c,b,f,e)}f.push(h);
662
+ "EXT-X-STREAM-INF"==h.name&&(h.g.push(new Tp("URI",k)),e=!0)}}return new Pp(c,b,f)}function dq(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 Yp(f);var h;(h=$p(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=$p(f,k);)d.push(new Tp(h[1],h[2]||h[3])),Zp(f)}return new Qp(c,e,d,g)}
663
+ var eq="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(" "),fq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function gq(){}function hq(a){try{var b=iq(a);return Ke({uri:a,Ce:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ie(c)}}function iq(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=zc(a):e=uc(a);return{data:e,contentType:c}}
664
+ M("shaka.net.DataUriPlugin",gq);gq.parse=hq;We("data",hq);function jq(){var a=this;this.h=this.j=null;this.Ga=1;this.o=new Map;this.u=new Map;this.ja=new Set;this.g=new Map;this.i=null;this.M="";this.Z=new bq;this.ia=0;this.G=null;this.C=new R(function(){kq(a)});this.m=lq;this.I=null;this.ea=0;this.F=Infinity;this.T=this.fa=0;this.D=new Te;this.O=[];this.K=new Map;this.Na=!1;this.s=new Map;this.da=new Map;this.l=!1}r=jq.prototype;r.configure=function(a){this.h=a};
665
+ r.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,mq(c,a),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,nq(c,d.data,a),3);e=c.ia;0<e&&c.C.S(e);return f["return"](c.I)})};r.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.h=this.j=null;this.ja.clear();this.I=null;this.g.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
666
+ r.update=function(){var a=this,b,c,d;return L(function(e){if(1==e.g){if(a.m==lq)return e["return"]();b=[];c=Array.from(a.g.values());return c.length?u(e,oq(a,c[0]),2):e.A(2)}for(d=1;d<c.length;d++)b.push(oq(a,c[d]));return u(e,Promise.all(b),0)})};
667
+ function oq(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,x;return L(function(w){if(1==w.g)return c=pq,d=b.Te,e=new Ob(d),a.l&&b.Ye&&Rb(e,new Tb("_HLS_skip=YES")),u(w,mq(a,e.toString()),2);f=w.h;g=cq(a.Z,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=Up(g.g,"EXT-X-DEFINE");k=qq(a,h);l=b.stream;m=rq(a,g,l.type,b.ye,k);l.segmentIndex.Fb(m,a.i.Ra());m.length&&(p=Xp(g.g),n=b.ye.get(p),l.segmentIndex.fb(n));q=m[m.length-1];if(x=Wp(g.g,"EXT-X-ENDLIST"))sq(a,c.Se),a.i.Ka(q.endTime);z(w)})}r.onExpirationUpdated=function(){};
668
+ function tq(a){if(null==a.G){for(var b=new Set,c=Infinity,d=t(a.g.values()),e=d.next();!e.done;e=d.next())(e=e.value.stream.segmentIndex)&&Pi(e,function(g){null!=g.X&&(c=Math.min(c,g.X),b.add(g))});if(0<b.size)for(a.G=-c,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;e.X+=a.G;e=t(e.ua);for(var f=e.next();!f.done;f=e.next())f.value.X+=a.G}}}
669
+ function nq(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,x,w,v,y,D,C,A,G,E,H,J,I,K,P,Q,ca,Y,ja,Ga,za,Ha,Da,Ab,kd,Dc,ld,md,hb,nd,ec,ge;return L(function(Ra){switch(Ra.g){case 1:d=cq(a.Z,b,a.M);e=Up(d.g,"EXT-X-DEFINE");uq(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.h.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],J=Oc(G),I=new Map,u(Ra,vq(a,d,c,c,J,H,"",!0,"Media Playlist",null,I,null,!1,!1,E),8);k=Up(d.g,"EXT-X-MEDIA");l=Up(d.g,"EXT-X-STREAM-INF");m=Up(d.g,"EXT-X-IMAGE-STREAM-INF");wq(a,l);
670
+ p=Up(d.g,"EXT-X-SESSION-DATA");n=t(p);for(q=n.next();!q.done;q=n.next())if(x=q.value,w=Z(x,"DATA-ID"),v=Z(x,"URI"),y=Z(x,"LANGUAGE"),D=Z(x,"VALUE"),C=(new Map).set("id",w),v&&C.set("uri",gc([a.M],[v])[0]),y&&C.set("language",y),D&&C.set("value",D),A=new S("sessiondata",C),a.j)a.j.onEvent(A);return u(Ra,xq(a,k),4);case 4:return yq(a,k),u(Ra,zq(a,l),5);case 5:return f=Ra.h,u(Ra,Aq(a,k),6);case 6:return g=Ra.h,u(Ra,Bq(a,m),7);case 7:h=Ra.h;Ra.A(3);break;case 8:K=Ra.h,a.g.set(c,K),f.push({id:0,language:"und",
671
+ disabledUntilTime:0,primary:!0,audio:"audio"==H?K.stream:null,video:"video"==H?K.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.j)throw new N(2,7,7001);tq(a);if(a.Na&&0==f.length)throw new N(2,4,4034);Q=P=Infinity;ca=t(a.g.values());for(Y=ca.next();!Y.done;Y=ca.next())ja=Y.value,P=Math.min(P,ja.ze),"text"!=ja.stream.type&&(Q=Math.min(Q,ja.Mf-ja.ze));a.m!=lq?(a.i=new T(0,a.h.defaultPresentationDelay?a.h.defaultPresentationDelay:a.T?a.T:3*a.ea),
672
+ a.i.uc(!1)):(a.i=new T(null,0),a.i.uc(!0));Cq(a);if(a.m!=lq)a.ia=a.F,Ga=pq,a.m==Ga.Re&&(za=a.i.Zc,isNaN(a.h.availabilityWindowOverride)||(za=a.h.availabilityWindowOverride),a.i.Zd(za));else for(a.i.Ka(Q),a.i.offset(-P),Ha=t(a.g.values()),Y=Ha.next();!Y.done;Y=Ha.next())Da=Y.value,Da.stream.segmentIndex.offset(-P),Da.stream.segmentIndex.Za(0,Q);a.O=[];Ab=[];kd=t(f);for(Dc=kd.next();!Dc.done;Dc=kd.next())for(ld=Dc.value,md=t([ld.video,ld.audio]),hb=md.next();!hb.done;hb=md.next())(nd=hb.value)&&Ab.push(nd);
673
+ return u(Ra,Promise.all(Ab.map(function(Ef){return L(function(Ff){return u(Ff,Ef.createSegmentIndex(),0)})})),9);case 9:ec=t(Ab);for(hb=ec.next();!hb.done;hb=ec.next())ge=hb.value,a.O.push(ge.segmentIndex.L);Cq(a);a.I={presentationTimeline:a.i,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.j.makeTextStreamsForClosedCaptions(a.I);z(Ra)}})}
674
+ function uq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.o.has(d)||a.o.set(d,e))}}function qq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.o.get(f))&&c.set(f,e)}return c}
675
+ function wq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=Dq(a,e);if(g){var h=jc(lc,e);a.s.set(g,h);eb(e,h)}f&&(g=ic("audio",e),a.s.set(f,g));d&&(f=ic("video",e),a.s.set(d,f))}}
676
+ function Aq(a,b){var c,d,e,f,g,h,k,l,m,p,n,q;return L(function(x){if(1==x.g)return c=Vp(b,"SUBTITLES"),d=c.map(function(w){var v,y,D;return L(function(C){if(1==C.g){if(v=a.h.disableText)return C["return"](null);B(C,2);return u(C,Eq(a,w),4)}if(2!=C.g)return y=C.h,C["return"](y.stream);D=F(C);if(a.h.hls.ignoreTextStreamFailures)return C["return"](null);throw D;})}),u(x,Promise.all(d),2);e=x.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Rp(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(p=
677
+ t(m),n=p.next();!n.done;n=p.next())q=n.value,q.stream.codecs=l;return x["return"](e.filter(function(w){return w}))})}
678
+ function Bq(a,b){var c,d;return L(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return L(function(l){if(1==l.g){if(g=a.h.disableThumbnails)return l["return"](null);B(l,2);return u(l,Fq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.h.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}))})}
679
+ function xq(a,b){var c;return L(function(d){if(1==d.g)return b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f}),b.length?u(d,Eq(a,b[0]),2):d.A(2);c=b.slice(1).map(function(e){return Eq(a,e)});return u(d,Promise.all(c),0)})}
680
+ function zq(a,b){var c,d,e;return L(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,p,n,q,x;return L(function(w){if(1==w.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(Rp(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),p=m.next().value,n=m.next().value,q=Z(g,"VIDEO-RANGE"),u(w,Gq(a,g),2);if(x=w.h){for(var v=w["return"],y=x.audio,D=x.video,C=t(D),A=C.next();!A.done;A=C.next())if(A=A.value.stream)A.width=Number(p)||void 0,A.height=Number(n)||
681
+ void 0,A.frameRate=Number(h)||void 0,A.hdr=q||void 0;C=a.h.disableAudio;if(!y.length||C)y=[null];C=a.h.disableVideo;if(!D.length||C)D=[null];C=[];y=t(y);for(A=y.next();!A.done;A=y.next()){A=A.value;for(var G=t(D),E=G.next();!E.done;E=G.next()){var H=E.value;E=A?A.stream:null;var J=H?H.stream:null,I=A?A.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.ee:"")+" - "+(A?A.ee:"");E&&J&&I.length&&K.length&&!(0<dg(I,K).length)||a.ja.has(H)||(E={id:a.Ga++,language:E?E.language:"und",primary:!!E&&E.primary||
682
+ !!J&&J.primary,audio:E,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},C.push(E),a.ja.add(H))}}w=v.call(w,C)}else w=w["return"]([]);return w})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(bc,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
683
+ function Gq(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,x,w;return L(function(v){if(1==v.g)return c=mc,d=Dq(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.u.has(g)?a.u.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,p=Rp(b,"URI"),n=k.audio.find(function(y){return y&&y.ee==p}),q=jc(c.wa,d),(x=jc(c.eb,d))&&!q?l=c.eb:!h.length&&x&&q?(l=c.wa,d=[[q,x].join()]):k.audio.length&&n?(l=c.eb,m=!0):l=k.video.length?c.eb:c.wa,m?v.A(2):u(v,Hq(a,b,d,l),3);2!=v.g&&(w=v.h);if(w)k[w.stream.type]=[w];else if(null===w)return v["return"](null);
684
+ Iq(k);return v["return"](k)})}function Dq(a,b){var c=[];a.h.disableVideo||c.push(a.h.hls.defaultVideoCodec);a.h.disableAudio||c.push(a.h.hls.defaultAudioCodec);var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Nc(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function Jq(a){a=Z(a,"LANGUAGE")||"und";return O(a)}
685
+ function Iq(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 yq(a,b){var c=Vp(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Jq(e);var f=Rp(e,"GROUP-ID");e=Rp(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
686
+ function Eq(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,x,w;return L(function(v){if(1==v.g){c=Rp(b,"GROUP-ID");d="";var y=Rp(b,"TYPE").toLowerCase();"subtitles"==y&&(y=lc);e=y;e!=lc&&c&&a.s.has(c)&&(d=a.s.get(c));f=Kq(Rp(b,"URI"),a.o);if(a.g.has(f))return v["return"](a.g.get(f));g=Jq(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?y=(y=Z(b,"CHANNELS"))?parseInt(y.split("/")[0],10):null:y=null;m=y;"audio"==e?y=(y=Z(b,"CHANNELS"))?y.includes("/JOC"):!1:y=!1;p=y;n=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
687
+ x="YES"==q;return u(v,Lq(a,f,d,e,g,l,h,m,null,n,x,p),2)}w=v.h;a.u.has(c)?a.u.get(c).push(w):a.u.set(c,[w]);if(null==w)return v["return"](null);if(a.g.has(f))return v["return"](a.g.get(f));a.g.set(f,w);return v["return"](w)})}
688
+ function Fq(a,b){var c,d,e,f,g,h,k,l,m,p;return L(function(n){if(1==n.g){c=Kq(Rp(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.g.has(c))return n["return"](a.g.get(c));e=Jq(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(n,Lq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=n.h;if(null==h)return n["return"](null);if(a.g.has(c))return n["return"](a.g.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
681
689
  Number(k.split("x")[1])*Number(m.split("x")[1]);if(p=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.g.set(c,h);return n["return"](h)})}
682
- function Zq(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=br(iq(b,"URI"),a.o);if(a.g.has(e))return k["return"](a.g.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.K.get(l):null;g=ic(d,c);return u(k,cr(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.g.has(e))return k["return"](a.g.get(e));a.g.set(e,h);return k["return"](h)})}
683
- function cr(a,b,c,d,e,f,g,h,k,l,m,p){var n,q,v;return K(function(x){if(1==x.g)return n=ec([a.M],[b])[0],u(x,Eq(a,n),2);q=x.h;n=q.uri;v=uq(a.Z,q.data,n);return x["return"](Nq(a,v,b,n,c,d,e,f,g,h,k,l,m,p))})}
684
- function Nq(a,b,c,d,e,f,g,h,k,l,m,p,n,q,v){var x,w,y,D,C,A,F,G,H,L,I,J,P,Q,ca,Y,ja,Ha,za,Ia,Da,Bb,ld,Cc,md,nd,ib,od,fc,ge,Ra,Df,Ef;return K(function(gc){if(1==gc.g){if(1!=b.type)throw new N(2,4,4017);x=lq(b.g,"EXT-X-DEFINE");w=Iq(a,x);dr(a,b);return v?gc.A(2):u(gc,er(a,f,e,b,w),3)}2!=gc.g&&(v=gc.h);y=[];if(b.segments)for(D=t(b.segments),C=D.next();!C.done;C=D.next())A=C.value,F=lq(A.i,"EXT-X-KEY"),y.push.apply(y,ia(F));G=!1;H=[];L=new Set;I=t(y);for(J=I.next();!J.done;J=I.next())if(P=J.value,Q=iq(P,
685
- "METHOD"),"NONE"!=Q){G=!0;if("AES-128"==Q)return a.Ga=!0,gc["return"](null);ca=iq(P,"KEYFORMAT");if(ja=(Y=fr[ca])?Y(P,v):null){if(ja.keyIds)for(Ha=t(ja.keyIds),za=Ha.next();!za.done;za=Ha.next())Ia=za.value,L.add(Ia);H.push(ja)}}if(G&&!H.length)throw new N(2,4,4026);gi.includes(v)&&(e="");Da=new Map;try{Bb=Jq(a,b,f,Da,w)}catch(qn){if(4035==qn.code)return Va("Skipping unsupported HLS stream",v,c),gc["return"](null);throw qn;}ld=Bb[0].startTime;Cc=Bb[Bb.length-1].endTime;md=new Ii(Bb);nd=f==lc?"subtitle":
686
- void 0;ib=[];if(p)for(od=t(p.split(",")),fc=od.next();!fc.done;fc=od.next())ge=fc.value,ib.push(ge);Df=(Ra=nq(b.g,"EXT-X-SERVER-CONTROL"))?null!=Ra.getAttribute("CAN-SKIP-UNTIL"):!1;Ef={id:a.qa++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:md,mimeType:v,codecs:e,kind:nd,encrypted:G,drmInfos:H,keyIds:L,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,
687
- roles:ib,forced:n,channelsCount:l,audioSamplingRate:null,spatialAudio:q,closedCaptions:m,hdr:void 0,tilesLayout:void 0};return gc["return"]({stream:Ef,ae:c,Le:d,te:ld,Ef:Cc,se:Da,Qe:Df})})}
688
- function dr(a,b){var c=nq(b.g,"EXT-X-PLAYLIST-TYPE"),d=nq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Kq(a,Dq);else{c?Kq(a,gr):Kq(a,hr);d=nq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=nq(b.g,"EXT-X-PART-INF");a.m&&c?(a.Na=Number(iq(c,"PART-TARGET")),a.G=Math.min(a.Na,a.G),c=nq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(iq(c,"PART-HOLD-BACK")):0):a.G=Math.min(d,a.G);a.ea=Math.max(d,a.ea)}}
689
- function ir(a,b,c,d){c=nq(c,"EXT-X-MAP");if(!c)return null;var e=iq(c,"URI");d=br(ec([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.da.has(b)||(c=jr(d,c),a.da.set(b,c));return a.da.get(b)}function jr(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new hi(function(){return[a]},c,d)}
690
- function kr(a,b,c,d,e,f,g,h){var k=d.i,l=br(d.h,f),m=nq(k,"EXTINF"),p=f=0,n=null;d.g.length&&!a.m&&Va("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.");var q=null;if(!a.h.hls.ignoreManifestProgramDateTime){var v=nq(k,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(q=go(v.value)+(a.H||0))}v=ki;nq(k,"EXT-X-GAP")&&(v=2);var x=[];if(a.m&&d.g.length){a={};for(var w=
691
- 0;w<d.g.length;a={dd:a.dd},w++){var y=d.g[w],D=0==w?c:x[x.length-1],C=0==w?e:D.endTime,A=Number(Z(y,"DURATION"));A=C+A;var F=0,G=null;"EXT-X-PRELOAD-HINT"==y.name?F=(D=Z(y,"BYTERANGE-START"))?Number(D):0:(F=Z(y,"BYTERANGE"),D=t(lr(D,F)),F=D.next().value,G=D.next().value);if(y=Z(y,"URI"))a.dd=ec([g],[y])[0],x.push(new ji(C,A,function(H){return function(){return[H.dd]}}(a),F,G,b,0,0,Infinity))}}else if(!m)throw new N(2,4,4024,"EXTINF");m?f=e+Number(m.value.split(",")[0]):f=x[x.length-1].endTime;(d=
692
- nq(k,"EXT-X-BYTERANGE"))?(n=t(lr(c,d.value)),p=n.next().value,n=n.next().value):x.length&&(p=x[0].Ba,n=x[x.length-1].la);c="";d=null;"image"==h&&(c="1x1",h=nq(k,"EXT-X-TILES"))&&(c=iq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(d=Number(h)));return new ji(e,f,function(){return l.length?[l]:[]},p,n,b,0,0,Infinity,x,c,d,q,v)}function lr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.la+1,d=c+d-1);return[c,d]}
693
- function Uq(a){if(a.i){for(var b=t(a.V),c=b.next();!c.done;c=b.next())a.i.Gb(c.value);a.V=[]}}
694
- function Jq(a,b,c,d,e){var f=b.segments,g=oq(b.g),h=nq(b.g,"EXT-X-SKIP");h=h?Number(Z(h,"SKIPPED-SEGMENTS")):0;var k=g+h;var l=0;a.l!=Dq&&d.has(k)&&(l=d.get(k));Za(f[0].h.split("/").pop());for(var m=[],p=0;p<f.length;p++){var n=f[p],q=m[m.length-1],v=0==p?l:q.endTime;k=g+h+p;d.set(k,v);k=ir(a,b.h,n.i,e);!a.m&&a.j.isAutoLowLatencyMode()&&(a.j.enableLowLatencyMode(),a.m=a.j.isLowLatencyMode());n=kr(a,k,q,n,v,e,b.h,c);m.push(n)}if(a=m.some(function(x){return null!=x.W}))for(b={},c=0;c<m.length;b={Pb:b.Pb,
695
- Ob:b.Ob,tc:b.tc,Va:b.Va,Nb:b.Nb},c++)if(b.Va=m[c],null==b.Va.W)for(b.Ob=0,b.Pb=c,d=function(x){return function(){var w=m[x.Pb];if(w){if(null!=w.W)return w.W+x.Ob;x.Ob-=w.endTime-w.startTime;x.Pb+=1}return null}}(b),b.Nb=0,b.tc=c,e=function(x){return function(){var w=m[x.tc];if(w){w!=x.Va&&(x.Nb+=w.endTime-w.startTime);if(null!=w.W)return w.W+x.Nb;--x.tc}return null}}(b);null==b.Va.W;)b.Va.W=e(),null==b.Va.W&&(b.Va.W=d());if(a)for(a=t(m),b=a.next();!b.done;b=a.next())for(c=b.value,b=c.W,c=t(c.ua),
696
- d=c.next();!d.done;d=c.next())d=d.value,d.W=b,b+=d.endTime-d.startTime;return m}function br(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}
697
- function er(a,b,c,d,e){var f,g,h,k,l,m,p,n,q,v,x;return K(function(w){if(1==w.g){f=mc;g=af;h=br(d.segments[0].h,e);k=new Ob(h);l=k.va.split(".").pop();m=mr[b];if(p=m[l])return w["return"](p);if(b==f.X){if("vtt"==c||"wvtt"==c)return w["return"]("text/vtt");if(c&&""!==c)return w["return"]("application/mp4")}if(b==f.Ub&&(!c||"jpeg"==c))return w["return"]("image/jpeg");n=Ve([h],a.h.retryParameters);n.method="HEAD";return u(w,nr(a,n,g),2)}q=w.h;v=q.headers["content-type"];if(!v){if(b==f.X)return w["return"]("text/vtt");
698
- x=m.mp4;return w["return"](x)}return w["return"](v.split(";")[0])})}function Eq(a,b){var c=Ve([b],a.h.retryParameters);a.j.modifyManifestRequest(c,{format:"h"});return nr(a,c,0)}function Cq(a){var b,c;K(function(d){if(1==d.g){if(!a.j)return d["return"]();B(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.fa,a.C.R(b),va(d,0);c=E(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.C.R(.1);z(d)})}function Kq(a,b){a.l=b;a.i&&a.i.sc(a.l==Dq);a.l!=Dq||a.C.stop()}
699
- function nr(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.j.networkingEngine.request(c,b);Qe(a.D,b);return b.promise}M("shaka.hls.HlsParser",Bq);
700
- var mr={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",vtt:"text/vtt",ttml:"application/ttml+xml"},
701
- image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},fr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new N(2,4,4040);return hc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=iq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=iq(a,"URI");b=Aq(b);b=Gb(b.data);b=hc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);
702
- if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=iq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=iq(a,"URI");a=Aq(a);a=Gb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Vn(a,b,new Set,0);return hc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Dq="VOD",hr="EVENT",gr="LIVE",Hq={Ke:Dq,qg:hr,Je:gr};
703
- qd("Tizen 3")||qd("Tizen 2")||qd("Web0S")&&qd("Chrome/38.0.2125.122 Safari/537.36")||(fg.m3u8=function(){return new Bq},dg["application/x-mpegurl"]=function(){return new Bq},dg["application/vnd.apple.mpegurl"]=function(){return new Bq});function or(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,we:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=tc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function pr(){}function qr(a,b,c,d,e){var f=new rr;lf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new sr,h={ce:!1,Ge:!1};a=tr(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Ee(a,function(){h.ce=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new R(function(){h.Ge=!0;g.abort()});k.R(b/1E3);a["finally"](function(){k.stop()})}return a}
704
- function tr(a,b,c,d,e,f,g){var h,k,l,m,p,n,q,v,x,w,y,D,C;return K(function(A){switch(A.g){case 1:return h=ur,k=vr,n=p=0,q=Date.now(),B(A,2),u(A,h(a,c),4);case 4:return l=A.h,f(wr(l.headers)),v=l.clone().body.getReader(),w=(x=l.headers.get("Content-Length"))?parseInt(x,10):0,y=function(F){function G(){var H,L;return K(function(I){switch(I.g){case 1:return B(I,2),u(I,v.read(),4);case 4:H=I.h;va(I,3);break;case 2:return E(I),I["return"]();case 3:if(H.done){I.A(5);break}p+=H.value.byteLength;if(!g){I.A(5);
705
- break}return u(I,g(H.value),5);case 5:L=Date.now();if(100<L-q||H.done)e(L-q,p-n,w-p),n=p,q=L;H.done?F.close():(F.enqueue(H.value),G());z(I)}})}G()},new k({start:y}),u(A,l.arrayBuffer(),5);case 5:m=A.h;va(A,3);break;case 2:D=E(A);if(d.ce)throw new N(1,1,7001,a,b);if(d.Ge)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return C=wr(l.headers),A["return"](or(C,m,l.status,a,l.url,b))}})}function wr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
706
- function xr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",pr);pr.isSupported=xr;pr.parse=qr;var ur=window.fetch,sr=window.AbortController,vr=window.ReadableStream,rr=window.Headers;xr()&&(Se("http",qr,2,!0),Se("https",qr,2,!0),Se("blob",qr,2,!0));function yr(){}
707
- function zr(a,b,c,d,e){var f=new Ar,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new N(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var q=Br(f);e(q);p=!0}};f.onload=function(){var q=Br(f),v=f.response;try{var x=or(q,v,f.status,a,f.responseURL,c);l(x)}catch(w){m(w)}};f.onerror=function(q){m(new N(1,1,1002,a,q,
708
- c))};f.ontimeout=function(){m(new N(1,1,1003,a,c))};f.onprogress=function(q){var v=Date.now();if(100<v-g||q.lengthComputable&&q.loaded==q.total)d(v-g,q.loaded-h,q.total-q.loaded),h=q.loaded,g=v};for(var n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new Ee(k,function(){f.abort();return Promise.resolve()})}
709
- function Br(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}M("shaka.net.HttpXHRPlugin",yr);yr.parse=zr;var Ar=window.XMLHttpRequest;Se("http",zr,1,!0);Se("https",zr,1,!0);Se("blob",zr,1,!0);function Cr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Dr(a){return a.ya().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ba+":"+a.la}function Er(a,b){return aj(a.g.ya(),a.g.Ba,a.g.la,b.streaming.retryParameters)};function Fr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Gr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Fr.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g["delete"](a);this.j+=c;this.h+=b}};function Hr(a){var b=this;this.o=a;this.j=new Map;this.i=new bf(function(){return Ir(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Fr}Hr.prototype.destroy=function(){return this.i.destroy()};function Jr(a,b,c){a.m=b;a.l=c}function Ir(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
710
- function Kr(a,b,c,d,e,f){cf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,q;return K(function(v){if(1==v.g)return u(v,Lr(a,c),2);h=v.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=Gb(h),l=new Un(k),l.data)p=Number(m),n=l.data[p],q=l.g[p],a.l(n,q);a.g.close(d,h.byteLength);var x=a.g;a.m(0==x.i?0:x.j/x.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function Mr(a){return K(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
711
- function Lr(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=af,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;eb(a.h,e);return g["return"](f.data)})};function Nr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new nc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Nr.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}B(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);E(b);z(b)})};
712
- function Or(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}Nr.prototype.store=function(){return this.h};Nr.prototype.promise=function(){return this.g};function Pr(a){this.h=a;this.g=[]}Pr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Qr(a,b){return Rr(a,b,"readwrite")}function Rr(a,b,c){c=a.h.transaction([b],c);var d=new Nr(c,b);a.g.push(d);d.promise().then(function(){eb(a.g,d)},function(){eb(a.g,d)});return d};function Sr(a,b,c){this.h=new Pr(a);this.i=b;this.g=c}r=Sr.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Tr(this.i)};r.removeSegments=function(a,b){return Ur(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,Vr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.de(e)}))})};r.addManifests=function(){return Tr(this.g)};
713
- r.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function Wr(a,b,c){a=Qr(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Qr(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Ur(this,this.g,a,b)};
714
- r.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,Vr(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.ac(e)})))})};r.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Rr(a.h,a.g,"readonly"),c=new Map,u(d,Or(b,function(e,f){var g;return K(function(h){if(1==h.g)return u(h,a.ac(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.de=function(a){return a};r.ac=function(a){return Promise.resolve(a)};
715
- function Tr(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Qr(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={xc:g.xc},k=h.next())l=k.value,g.xc=e.add(l),g.xc.onsuccess=function(p){return function(){f.push(p.xc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
716
- function Ur(a,b,c,d){a=Qr(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={wc:e.wc},f=c.next())e.wc=f.value,b["delete"](e.wc).onsuccess=function(g){return function(){return d(g.wc)}}(e);return a.promise()}
717
- function Vr(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Rr(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Tb:h.Tb,Rb:h.Rb},l=k.next())h.Rb=l.value,h.Tb=e.get(h.Rb),h.Tb.onsuccess=function(p){return function(){void 0==p.Tb.result&&g.push(p.Rb);f[p.Rb]=p.Tb.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(p){return f[p]}))})};function Xr(a){this.g=new Pr(a)}Xr.prototype.destroy=function(){return this.g.destroy()};Xr.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Rr(a.g,"session-ids","readonly"),c=[],u(d,Or(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};Xr.prototype.add=function(a){var b=Qr(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()};
718
- Xr.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Qr(b.g,"session-ids"),u(d,Or(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Yr(){this.g=new Map}Yr.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Yr.prototype.init=function(){var a=this;Zr.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
719
- function $r(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Aa:d,ka:f},ka:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function as(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Aa:d,ka:f},e)})})}
720
- function bs(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 cs(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function ds(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()}
721
- function es(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Zr,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function fs(a,b){Zr.set(a,b)}M("shaka.offline.StorageMuxer",Yr);Yr.unregister=function(a){Zr["delete"](a)};Yr.register=fs;Yr.prototype.destroy=Yr.prototype.destroy;var Zr=new Map;function gs(){Sr.apply(this,arguments)}qa(gs,Sr);gs.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=Qr(c.h,c.g);e=d.store();f=new nc;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)})};
722
- gs.prototype.ac=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=hs(a.periods[c],e),b.push(f);return u(h,tp(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,sequenceMode:!1})})};
723
- function hs(a,b){is(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return js(e,a.startTime,b)})}
724
- function js(a,b,c){var d=a.initSegmentUri?ks(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=ks(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
725
- dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}gs.prototype.de=function(a){return{data:a.data}};function ks(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);}
726
- function is(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++,
727
- f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function ls(){Sr.apply(this,arguments)}qa(ls,Sr);
728
- ls.prototype.ac=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(ms(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,tp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
690
+ function Hq(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){e=Kq(Rp(b,"URI"),a.o);if(a.g.has(e))return k["return"](a.g.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.K.get(l):null;g=ic(d,c);return u(k,Lq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.g.has(e))return k["return"](a.g.get(e));a.g.set(e,h);return k["return"](h)})}
691
+ function Lq(a,b,c,d,e,f,g,h,k,l,m,p){var n,q,x;return L(function(w){if(1==w.g)return n=gc([a.M],[b])[0],u(w,mq(a,n),2);q=w.h;n=q.uri;x=cq(a.Z,q.data,n);return w["return"](vq(a,x,b,n,c,d,e,f,g,h,k,l,m,p))})}
692
+ function vq(a,b,c,d,e,f,g,h,k,l,m,p,n,q,x){var w,v,y,D,C,A,G,E,H,J,I,K,P,Q,ca,Y,ja,Ga,za,Ha,Da,Ab,kd,Dc,ld,md,hb,nd,ec,ge,Ra,Ef,Ff;return L(function(fc){if(1==fc.g){if(1!=b.type)throw new N(2,4,4017);w=Up(b.g,"EXT-X-DEFINE");v=qq(a,w);Mq(a,b);return x?fc.A(2):u(fc,Nq(a,f,e,b,v),3)}2!=fc.g&&(x=fc.h);y=[];if(b.segments)for(D=t(b.segments),C=D.next();!C.done;C=D.next())A=C.value,G=Up(A.i,"EXT-X-KEY"),y.push.apply(y,ia(G));E=!1;H=[];J=new Set;I=t(y);for(K=I.next();!K.done;K=I.next())if(P=K.value,Q=Rp(P,
693
+ "METHOD"),"NONE"!=Q){E=!0;if("AES-128"==Q)return a.Na=!0,fc["return"](null);ca=Rp(P,"KEYFORMAT");if(ja=(Y=Oq[ca])?Y(P,x):null){if(ja.keyIds)for(Ga=t(ja.keyIds),za=Ga.next();!za.done;za=Ga.next())Ha=za.value,J.add(Ha);H.push(ja)}}if(E&&!H.length)throw new N(2,4,4026);mi.includes(x)&&(e="");Da=new Map;try{Ab=rq(a,b,f,Da,v)}catch(Wm){if(4035==Wm.code)return Va("Skipping unsupported HLS stream",x,c),fc["return"](null);throw Wm;}kd=Ab[0].startTime;Dc=Ab[Ab.length-1].endTime;ld=new Oi(Ab);md=f==lc?"subtitle":
694
+ void 0;hb=[];if(p)for(nd=t(p.split(",")),ec=nd.next();!ec.done;ec=nd.next())ge=ec.value,hb.push(ge);Ef=(Ra=Wp(b.g,"EXT-X-SERVER-CONTROL"))?null!=Ra.getAttribute("CAN-SKIP-UNTIL"):!1;Ff={id:a.Ga++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ld,mimeType:x,codecs:e,kind:md,encrypted:E,drmInfos:H,keyIds:J,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,
695
+ roles:hb,forced:n,channelsCount:l,audioSamplingRate:null,spatialAudio:q,closedCaptions:m,hdr:void 0,tilesLayout:void 0};return fc["return"]({stream:Ff,ee:c,Te:d,ze:kd,Mf:Dc,ye:Da,Ye:Ef})})}
696
+ function Mq(a,b){var c=Wp(b.g,"EXT-X-PLAYLIST-TYPE"),d=Wp(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)sq(a,lq);else{c?sq(a,Pq):sq(a,Qq);d=Wp(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Wp(b.g,"EXT-X-PART-INF");a.l&&c?(a.fa=Number(Rp(c,"PART-TARGET")),a.F=Math.min(a.fa,a.F),c=Wp(b.g,"EXT-X-SERVER-CONTROL"),a.T=c?Number(Rp(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ea=Math.max(d,a.ea)}}
697
+ function Rq(a,b,c,d){c=Wp(c,"EXT-X-MAP");if(!c)return null;var e=Rp(c,"URI");d=Kq(gc([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.da.has(b)||(c=Sq(d,c),a.da.set(b,c));return a.da.get(b)}function Sq(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new ni(function(){return[a]},c,d)}
698
+ function Tq(a,b,c,d,e,f,g,h){var k=d.i,l=Kq(d.h,f),m=Wp(k,"EXTINF"),p=f=0,n=null;d.g.length&&!a.l&&Va("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.");var q=null;if(!a.h.hls.ignoreManifestProgramDateTime){var x=Wp(k,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(q=On(x.value)+(a.G||0))}x=qi;Wp(k,"EXT-X-GAP")&&(x=2);if(!m){if(0==d.g.length)throw new N(2,4,
699
+ 4024,"EXTINF");if(!a.l)return null}var w=[];if(a.l)for(var v={},y=0;y<d.g.length;v={kd:v.kd},y++){var D=d.g[y],C=0==y?c:w[w.length-1],A=0==y?e:C.endTime,G=Number(Z(D,"DURATION"))||a.fa;if(G){G=A+G;var E=0,H=null;"EXT-X-PRELOAD-HINT"==D.name?E=(E=Z(D,"BYTERANGE-START"))?Number(E):0:(E=Z(D,"BYTERANGE"),H=t(Uq(C,E)),E=H.next().value,H=H.next().value);if(C=Z(D,"URI"))v.kd=gc([g],[C])[0],C=qi,"YES"==Z(D,"GAP")&&(C=2),w.push(new pi(A,G,function(J){return function(){return[J.kd]}}(v),E,H,b,0,0,Infinity,
700
+ [],"",null,null,C))}}m?f=e+Number(m.value.split(",")[0]):f=w[w.length-1].endTime;(a=Wp(k,"EXT-X-BYTERANGE"))?(n=t(Uq(c,a.value)),p=n.next().value,n=n.next().value):w.length&&(p=w[0].Ca,n=w[w.length-1].ma);c="";a=null;"image"==h&&(c="1x1",h=Wp(k,"EXT-X-TILES"))&&(c=Rp(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new pi(e,f,function(){return l.length?[l]:[]},p,n,b,0,0,Infinity,w,c,a,q,x)}
701
+ function Uq(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ma+1,d=c+d-1);return[c,d]}function Cq(a){if(a.i){for(var b=t(a.O),c=b.next();!c.done;c=b.next())a.i.Gb(c.value);a.O=[]}}
702
+ function rq(a,b,c,d,e){var f=b.segments,g=Xp(b.g),h=Wp(b.g,"EXT-X-SKIP");h=h?Number(Z(h,"SKIPPED-SEGMENTS")):0;var k=g+h;var l=0;a.m!=lq&&d.has(k)&&(l=d.get(k));Za(f[0].h.split("/").pop());for(var m=[],p=0;p<f.length;p++){var n=f[p],q=m[m.length-1],x=0==p?l:q.endTime;k=g+h+p;d.set(k,x);k=Rq(a,b.h,n.i,e);!a.l&&a.j.isAutoLowLatencyMode()&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());(n=Tq(a,k,q,n,x,e,b.h,c))&&m.push(n)}if(a=m.some(function(w){return null!=w.X}))for(b={},c=0;c<m.length;b=
703
+ {Pb:b.Pb,Ob:b.Ob,wc:b.wc,Va:b.Va,Nb:b.Nb},c++)if(b.Va=m[c],null==b.Va.X)for(b.Ob=0,b.Pb=c,d=function(w){return function(){var v=m[w.Pb];if(v){if(null!=v.X)return v.X+w.Ob;w.Ob-=v.endTime-v.startTime;w.Pb+=1}return null}}(b),b.Nb=0,b.wc=c,e=function(w){return function(){var v=m[w.wc];if(v){v!=w.Va&&(w.Nb+=v.endTime-v.startTime);if(null!=v.X)return v.X+w.Nb;--w.wc}return null}}(b);null==b.Va.X;)b.Va.X=e(),null==b.Va.X&&(b.Va.X=d());if(a)for(a=t(m),b=a.next();!b.done;b=a.next())for(c=b.value,b=c.X,c=
704
+ t(c.ua),d=c.next();!d.done;d=c.next())d=d.value,d.X=b,b+=d.endTime-d.startTime;return m}function Kq(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}
705
+ function Nq(a,b,c,d,e){var f,g,h,k,l,m,p,n,q,x,w;return L(function(v){if(1==v.g){f=mc;g=ef;h=Kq(d.segments[0].h,e);k=new Ob(h);l=k.va.split(".").pop();m=Vq[b];if(p=m[l])return v["return"](p);if(b==f.Y){if("vtt"==c||"wvtt"==c)return v["return"]("text/vtt");if(c&&""!==c)return v["return"]("application/mp4")}if(b==f.Ub&&(!c||"jpeg"==c))return v["return"]("image/jpeg");n=Ze([h],a.h.retryParameters);n.method="HEAD";return u(v,Wq(a,n,g),2)}q=v.h;x=q.headers["content-type"];if(!x){if(b==f.Y)return v["return"]("text/vtt");
706
+ w=m.mp4;return v["return"](w)}return v["return"](x.split(";")[0])})}function mq(a,b){var c=Ze([b],a.h.retryParameters);a.j.modifyManifestRequest(c,{format:"h"});return Wq(a,c,0)}function kq(a){var b,c;L(function(d){if(1==d.g){if(!a.j)return d["return"]();B(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ia,a.C.S(b),va(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.C.S(.1);z(d)})}function sq(a,b){a.m=b;a.i&&a.i.uc(a.m==lq);a.m!=lq||a.C.stop()}
707
+ function Wq(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.j.networkingEngine.request(c,b);Ue(a.D,b);return b.promise}M("shaka.hls.HlsParser",jq);
708
+ var Vq={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",vtt:"text/vtt",ttml:"application/ttml+xml"},
709
+ image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Oq={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new N(2,4,4040);return hc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Rp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Rp(a,"URI");b=iq(b);b=Gb(b.data);b=hc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);
710
+ if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Rp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Rp(a,"URI");a=iq(a);a=Gb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Dn(a,b,new Set,0);return hc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},lq="VOD",Qq="EVENT",Pq="LIVE",pq={Se:lq,yg:Qq,Re:Pq};
711
+ rd("Tizen 3")||rd("Tizen 2")||rd("Web0S")&&rd("Chrome/38.0.2125.122 Safari/537.36")||(jg.m3u8=function(){return new jq},hg["application/x-mpegurl"]=function(){return new jq},hg["application/vnd.apple.mpegurl"]=function(){return new jq});function Xq(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Ce:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=tc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Yq(){}function Zq(a,b,c,d,e){var f=new $q;pf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ar,h={ie:!1,Oe:!1};a=br(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new He(a,function(){h.ie=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new R(function(){h.Oe=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
712
+ function br(a,b,c,d,e,f,g){var h,k,l,m,p,n,q,x,w,v,y,D,C;return L(function(A){switch(A.g){case 1:return h=cr,k=dr,n=p=0,q=Date.now(),B(A,2),u(A,h(a,c),4);case 4:return l=A.h,f(er(l.headers)),x=l.clone().body.getReader(),v=(w=l.headers.get("Content-Length"))?parseInt(w,10):0,y=function(G){function E(){var H,J;return L(function(I){switch(I.g){case 1:return B(I,2),u(I,x.read(),4);case 4:H=I.h;va(I,3);break;case 2:return F(I),I["return"]();case 3:if(H.done){I.A(5);break}p+=H.value.byteLength;if(!g){I.A(5);
713
+ break}return u(I,g(H.value),5);case 5:J=Date.now();if(100<J-q||H.done)e(J-q,p-n,v-p),n=p,q=J;H.done?G.close():(G.enqueue(H.value),E());z(I)}})}E()},new k({start:y}),u(A,l.arrayBuffer(),5);case 5:m=A.h;va(A,3);break;case 2:D=F(A);if(d.ie)throw new N(1,1,7001,a,b);if(d.Oe)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return C=er(l.headers),A["return"](Xq(C,m,l.status,a,l.url,b))}})}function er(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
714
+ function fr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Yq);Yq.isSupported=fr;Yq.parse=Zq;var cr=window.fetch,ar=window.AbortController,dr=window.ReadableStream,$q=window.Headers;fr()&&(We("http",Zq,2,!0),We("https",Zq,2,!0),We("blob",Zq,2,!0));function gr(){}
715
+ function hr(a,b,c,d,e){var f=new ir,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new N(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var q=jr(f);e(q);p=!0}};f.onload=function(){var q=jr(f),x=f.response;try{var w=Xq(q,x,f.status,a,f.responseURL,c);l(w)}catch(v){m(v)}};f.onerror=function(q){m(new N(1,1,1002,a,q,
716
+ c))};f.ontimeout=function(){m(new N(1,1,1003,a,c))};f.onprogress=function(q){var x=Date.now();if(100<x-g||q.lengthComputable&&q.loaded==q.total)d(x-g,q.loaded-h,q.total-q.loaded),h=q.loaded,g=x};for(var n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new He(k,function(){f.abort();return Promise.resolve()})}
717
+ function jr(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}M("shaka.net.HttpXHRPlugin",gr);gr.parse=hr;var ir=window.XMLHttpRequest;We("http",hr,1,!0);We("https",hr,1,!0);We("blob",hr,1,!0);function kr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function lr(a){return a.za().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ca+":"+a.ma}function mr(a,b){return gj(a.g.za(),a.g.Ca,a.g.ma,b.streaming.retryParameters)};function nr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function or(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}nr.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 pr(a){var b=this;this.o=a;this.j=new Map;this.i=new ff(function(){return qr(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new nr}pr.prototype.destroy=function(){return this.i.destroy()};function rr(a,b,c){a.m=b;a.l=c}function qr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
718
+ function sr(a,b,c,d,e,f){gf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,q;return L(function(x){if(1==x.g)return u(x,tr(a,c),2);h=x.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=Gb(h),l=new Cn(k),l.data)p=Number(m),n=l.data[p],q=l.g[p],a.l(n,q);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return x["return"](f(h))})});a.j.set(b,g)}function ur(a){return L(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
719
+ function tr(a,b){var c,d,e,f;return L(function(g){if(1==g.g)return c=ef,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;eb(a.h,e);return g["return"](f.data)})};function vr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new nc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}vr.prototype.abort=function(){var a=this;return L(function(b){if(1==b.g){try{a.i.abort()}catch(c){}B(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);F(b);z(b)})};
720
+ function wr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return L(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}vr.prototype.store=function(){return this.h};vr.prototype.promise=function(){return this.g};function xr(a){this.h=a;this.g=[]}xr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function yr(a,b){return zr(a,b,"readwrite")}function zr(a,b,c){c=a.h.transaction([b],c);var d=new vr(c,b);a.g.push(d);d.promise().then(function(){eb(a.g,d)},function(){eb(a.g,d)});return d};function Ar(a,b,c){this.h=new xr(a);this.i=b;this.g=c}r=Ar.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Br(this.i)};r.removeSegments=function(a,b){return Cr(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,Dr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.je(e)}))})};r.addManifests=function(){return Br(this.g)};
721
+ r.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function Er(a,b,c){a=yr(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=yr(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Cr(this,this.g,a,b)};
722
+ r.getManifests=function(a){var b=this,c;return L(function(d){if(1==d.g)return u(d,Dr(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.bc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=zr(a.h,a.g,"readonly"),c=new Map,u(d,wr(b,function(e,f){var g;return L(function(h){if(1==h.g)return u(h,a.bc(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.je=function(a){return a};r.bc=function(a){return Promise.resolve(a)};
723
+ function Br(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=yr(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Ac:g.Ac},k=h.next())l=k.value,g.Ac=e.add(l),g.Ac.onsuccess=function(p){return function(){f.push(p.Ac.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
724
+ function Cr(a,b,c,d){a=yr(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={zc:e.zc},f=c.next())e.zc=f.value,b["delete"](e.zc).onsuccess=function(g){return function(){return d(g.zc)}}(e);return a.promise()}
725
+ function Dr(a,b,c){var d,e,f,g,h,k,l;return L(function(m){if(1==m.g){d=zr(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Tb:h.Tb,Rb:h.Rb},l=k.next())h.Rb=l.value,h.Tb=e.get(h.Rb),h.Tb.onsuccess=function(p){return function(){void 0==p.Tb.result&&g.push(p.Rb);f[p.Rb]=p.Tb.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(p){return f[p]}))})};function Fr(a){this.g=new xr(a)}Fr.prototype.destroy=function(){return this.g.destroy()};Fr.prototype.getAll=function(){var a=this,b,c;return L(function(d){return 1==d.g?(b=zr(a.g,"session-ids","readonly"),c=[],u(d,wr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};Fr.prototype.add=function(a){var b=yr(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()};
726
+ Fr.prototype.remove=function(a){var b=this,c;return L(function(d){return 1==d.g?(c=yr(b.g,"session-ids"),u(d,wr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Gr(){this.g=new Map}Gr.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)};Gr.prototype.init=function(){var a=this;Hr.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)};
727
+ function Ir(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ba:d,la:f},la:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function Jr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ba:d,la:f},e)})})}
728
+ function Kr(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 Lr(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Mr(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()}
729
+ function Nr(a){var b,c,d;return L(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Hr,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Or(a,b){Hr.set(a,b)}M("shaka.offline.StorageMuxer",Gr);Gr.unregister=function(a){Hr["delete"](a)};Gr.register=Or;Gr.prototype.destroy=Gr.prototype.destroy;var Hr=new Map;function Pr(){Ar.apply(this,arguments)}qa(Pr,Ar);Pr.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return L(function(g){d=yr(c.h,c.g);e=d.store();f=new nc;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)})};
730
+ Pr.prototype.bc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Qr(a.periods[c],e),b.push(f);return u(h,bp(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,sequenceMode:!1})})};
731
+ function Qr(a,b){Rr(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Sr(e,a.startTime,b)})}
732
+ function Sr(a,b,c){var d=a.initSegmentUri?Tr(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=Tr(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
733
+ dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}Pr.prototype.je=function(a){return{data:a.data}};function Tr(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);}
734
+ function Rr(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++,
735
+ f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Ur(){Ar.apply(this,arguments)}qa(Ur,Ar);
736
+ Ur.prototype.bc=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(Vr(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,bp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
729
737
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
730
- function ms(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,
731
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function ns(){Sr.apply(this,arguments)}qa(ns,Sr);r=ns.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Wr(this,a,b)};r.ac=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function os(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=os.prototype;
732
- r.init=function(){var a=this,b=new nc,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 gs(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new ls(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new ls(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
733
- e=e.contains("manifest-v5")&&e.contains("segment-v5")?new ns(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new Xr(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new N(2,9,9001,c.error));d.preventDefault()};return b};
734
- r.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
738
+ function Vr(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,
739
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Wr(){Ar.apply(this,arguments)}qa(Wr,Ar);r=Wr.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Er(this,a,b)};r.bc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Xr(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=Xr.prototype;
740
+ r.init=function(){var a=this,b=new nc,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 Pr(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Ur(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Ur(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
741
+ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Wr(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new Fr(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new N(2,9,9001,c.error));d.preventDefault()};return b};
742
+ r.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
735
743
  r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
736
- r.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,ps(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
737
- function ps(){var a=new nc,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}fs("idb",function(){return rd()||!window.indexedDB?null:new os});function qs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}qs.prototype.Aa=function(){return this.i};qs.prototype.ka=function(){return this.h};qs.prototype.key=function(){return this.l};qs.prototype.toString=function(){return this.j};
738
- function rs(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 qs(b,c,d,Number(a[4])):null};function ss(a,b){this.h=a;this.g=b}
739
- function ts(a,b){var c=new T(null,0);c.Ka(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=us(a,d,e,c);e=b.streams.filter(function(l){return l.type==lc}).map(function(l){return vs(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return vs(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=
744
+ r.erase=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,Yr(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
745
+ function Yr(){var a=new nc,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}Or("idb",function(){return td()||qd()||!window.indexedDB?null:new Xr});function Zr(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Zr.prototype.Ba=function(){return this.i};Zr.prototype.la=function(){return this.h};Zr.prototype.key=function(){return this.l};Zr.prototype.toString=function(){return this.j};
746
+ function $r(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 Zr(b,c,d,Number(a[4])):null};function as(a,b){this.h=a;this.g=b}
747
+ function bs(a,b){var c=new T(null,0);c.Ka(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=cs(a,d,e,c);e=b.streams.filter(function(l){return l.type==lc}).map(function(l){return ds(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ds(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=
740
748
  g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1}}
741
- function us(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=
742
- e.value,g=vs(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=vs(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}
743
- function vs(a,b,c){var d=b.segments.map(function(e){return ws(a,e)});c.Gb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ii(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,
744
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function ws(a,b){var c=new qs("segment",a.h,a.g,b.dataKey);return new ji(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?xs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
745
- function xs(a,b){var c=new qs("segment",a.h,a.g,b);return new hi(function(){return[c.toString()]},0,null)};function ys(){this.g=null}r=ys.prototype;r.configure=function(){};
746
- r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=rs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new Yr;ua(m);return u(m,e.init(),4);case 4:return u(m,bs(e,d.Aa(),d.ka()),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 ss(d.Aa(),d.ka()),l=ts(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};r.stop=function(){return Promise.resolve()};
747
- r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new Yr,B(m,2,3),u(m,e.init(),5);case 5:return u(m,bs(e,d.Aa(),d.ka()),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.A(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:E(m),m.A(3)}})};
748
- dg["application/x-offline-manifest"]=function(){return new ys};function zs(){}function As(a){var b=rs(a);b&&"manifest"==b.g?(a={uri:a,we:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=He(a)):a=b&&"segment"==b.g?Bs(b.key(),b):Fe(new N(2,1,9004,a));return a}
749
- function Bs(a,b){var c=new Yr;return He(void 0).$(function(){return c.init()}).$(function(){return bs(c,b.Aa(),b.ka())}).$(function(d){return d.getSegments([b.key()])}).$(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",zs);zs.plugin=As;Se("offline",As);function Cs(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],p=t(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var q=!1,v=t(m),x=v.next();!x.done;x=v.next())if(x=x.value,Ds(x.info,n)){x.sessionIds.push(n.sessionId);q=!0;break}q||m.push({info:n,sessionIds:[n.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=Es(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l["return"](d)}})}
750
- function Es(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new of({mb:b,onError:function(){},Qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),B(f,2),d.configure(a),u(f,wf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return E(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return B(f,6),u(f,Jf(d),8);case 8:va(f,7);break;case 6:return E(f),u(f,d.destroy(),
751
- 9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return B(h,2),u(h,Kf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);E(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
752
- function Ds(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fb(a.audioCapabilities,b.audioCapabilities,c)&&fb(a.videoCapabilities,b.videoCapabilities,c)};function Fs(a,b,c){var d=b.presentationTimeline.getDuration();b=Gs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Hs(a,b){var c=ts(new ss(a.Aa(),a.ka()),b),d=b.appMetadata||{};c=Gs(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
753
- function Gs(a){var b=[],c=he(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Yd(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Zd(c.value));return b};function Is(){this.g={}}function Js(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Ks(a,b){a.g[b.id]=b.bandwidth||2048}function Ls(a,b){var c=a.g[b];null==c&&(c=0);return c};function Ms(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.ec()):(this.h=wk(),this.g=new Re);this.i=[];this.j=[];var c=!a;this.l=new bf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Ir(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.A(4);break}return u(k,b.g.destroy(),4);
754
- case 4:b.h=null,b.g=null,z(k)}})})}function Ns(){if(id())a:{var a=t(Zr.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=Ms.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=uk(a,b));return yk(this.h,a)};r.getConfiguration=function(){var a=wk();yk(a,this.h,wk());return a};r.ec=function(){return this.g};
755
- r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Hr(this.g);this.j.push(f);b=Os(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return u(h,cg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h["return"](g())})},e,f);b=new Ee(b,function(){return Ir(f)});b["finally"](function(){eb(d.j,f)});return Ps(this,b)};
756
- function Os(a,b,c,d,e,f){var g,h,k,l,m,p,n,q,v,x,w,y,D,C;return K(function(A){switch(A.g){case 1:return Qs(),h=g=null,k=new Yr,p=m=l=null,B(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,Rs(a,b,g,e),6);case 6:n=A.h;Ss(a);q=!n.presentationTimeline.T()&&!n.presentationTimeline.lb();if(!q)throw new N(2,9,9005,b);return u(A,Ts(a,n,function(F){p=p||F},e),7);case 7:h=A.h;Ss(a);if(p)throw p;return u(A,Us(n,e),8);case 8:return u(A,k.init(),9);case 9:return Ss(a),u(A,$r(k),10);case 10:return l=A.h,Ss(a),v=Vs(h,
757
- n,b,c,e,f),x=v.Bf,w=v.Xd,u(A,l.ka.addManifests([x]),11);case 11:y=A.h;Ss(a);m=y[0];Ss(a);if(p)throw p;return u(A,Ws(a,w,m,x,f,e,l.ka,n,h),12);case 12:return Ss(a),D=new qs("manifest",l.path.Aa,l.path.ka,m),A["return"](Hs(D,x));case 3:return wa(A),u(A,k.destroy(),13);case 13:if(!g){A.A(14);break}return u(A,g.stop(),14);case 14:if(!h){A.A(16);break}return u(A,h.destroy(),16);case 16:xa(A,0);break;case 2:C=E(A);if(null==m){A.A(18);break}return u(A,Xs(m),18);case 18:throw p||C;}})}
758
- function Ws(a,b,c,d,e,f,g,h,k){var l,m,p,n,q,v,x,w,y,D;return K(function(C){switch(C.g){case 1:l={};m=0;p=function(A,F){var G,H,L,I,J,P,Q;return K(function(ca){if(1==ca.g){G={};H=t(A);for(L=H.next();!L.done;G={cb:G.cb},L=H.next())G.cb=L.value,I=Er(G.cb,f),J=G.cb.i,P=G.cb.h,Q=function(Y){return function(ja){var Ha,za,Ia;return K(function(Da){if(1==Da.g)return u(Da,g.addSegments([{data:ja}]),2);Ha=Da.h;Ss(a);za=Y.cb.g;Ia=Dr(za);l[Ia]=Ha[0];m+=ja.byteLength;z(Da)})}}(G),Kr(e,G.cb.groupId,I,J,P,Q);return u(ca,
759
- Mr(e),2)}if(!F)return ca.A(0);Ss(a);Ys(h,d,k,f);return u(ca,g.updateManifest(c,d),0)})};n=!1;B(C,2);if(!Zs(h)||!n||$s(h)){C.A(4);break}return u(C,p(b.filter(function(A){return A.h}),!0),5);case 5:return Ss(a),b=b.filter(function(A){return!A.h}),q=l,v=m,l={},m=0,u(C,at(g,c,d,q,v,function(){return Ss(a)}),6);case 6:Ss(a);case 4:if(n){C.A(7);break}return u(C,p(b,!1),8);case 8:return Ss(a),x=l,w=m,l={},m=0,u(C,at(g,c,d,x,w,function(){return Ss(a)}),9);case 9:Ss(a);case 7:va(C,0);break;case 2:return y=
760
- E(C),D=Object.values(l),u(C,g.removeSegments(D,function(){}),10);case 10:throw y;}})}function Xs(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new Yr,u(f,b.init(),2);case 2:return u(f,$r(b),3);case 3:return c=f.h,d=new qs("manifest",c.path.Aa,c.path.ka,a),u(f,b.destroy(),4);case 4:return e=new Ms,u(f,e.remove(d.toString()),0)}})}
761
- function at(a,b,c,d,e,f){var g,h,k,l,m,p,n,q,v,x,w;return K(function(y){switch(y.g){case 1:g=!1;B(y,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=t(m.segments),n=p.next();!n.done;n=p.next())q=n.value,v=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=v&&(q.dataKey=v,q.pendingSegmentRefId=void 0),v=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=v&&(q.initSegmentKey=v,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
762
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(y,a.updateManifest(b,c),4);case 4:g=!0;f();va(y,0);break;case 2:return x=E(y),u(y,Xs(b),5);case 5:if(g){y.A(6);break}w=Object.values(d);return u(y,a.removeSegments(w,function(){}),6);case 6:throw x;}})}
763
- function Us(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,x,w,y,D,C,A,F,G,H,L,I,J,P,Q,ca,Y;return K(function(ja){switch(ja.g){case 1:return c={width:Infinity,height:Infinity},Id(a,b.restrictions,c),u(ja,Ld(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;wd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(Yd(m));p=t(a.textStreams);for(n=p.next();!n.done;n=p.next())q=n.value,
764
- d.push(Zd(q));v=t(a.imageStreams);for(x=v.next();!x.done;x=v.next())w=x.value,d.push($d(w));return u(ja,b.offline.trackSelectionCallback(d),3);case 3:y=ja.h;D=a.presentationTimeline.getDuration();C=0;A=t(y);for(F=A.next();!F.done;F=A.next())G=F.value,H=G.bandwidth*D/8,C+=H;B(ja,4);return u(ja,b.offline.downloadSizeCallback(C),6);case 6:L=ja.h;if(!L)throw new N(2,9,9014);va(ja,5);break;case 4:I=E(ja);if(I instanceof N)throw I;throw new N(2,9,9015);case 5:J=new Set;P=new Set;Q=new Set;ca=t(y);for(F=
765
- ca.next();!F.done;F=ca.next())Y=F.value,"variant"==Y.type&&J.add(Y.id),"text"==Y.type&&P.add(Y.id),"image"==Y.type&&Q.add(Y.id);a.variants=a.variants.filter(function(Ha){return J.has(Ha.id)});a.textStreams=a.textStreams.filter(function(Ha){return P.has(Ha.id)});a.imageStreams=a.imageStreams.filter(function(Ha){return Q.has(Ha.id)});bt(a);z(ja)}})}
766
- function Vs(a,b,c,d,e,f){var g=Fs(c,b,d),h=e.offline.progressCallback;Jr(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&Gf(a,"cenc",q)});var k=Zs(b)&&!$s(b),l=null;k&&(l=ct.get(a.g.keySystem));for(var m=new Is,p=t(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=t(b.imageStreams);for(n=p.next();!n.done;n=p.next())Ks(m,n.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())Js(m,p.value);m=dt(f,m,b,e);f=m.streams;m=m.Xd;n=a.g;p=e.offline.usePersistentLicense;
767
- n&&p&&(n.initData=[]);return{Bf:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.cc(),streams:f,sessionIds:p?Of(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Xd:m}}function Zs(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
768
- function $s(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Ys(a,b,c,d){b.expiration=c.cc();c=Of(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Zs(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}r.remove=function(a){return et(this,ft(this,a))};
769
- function ft(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:Qs();c=rs(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new Yr;ua(k);return u(k,e.init(),4);case 4:return u(k,bs(e,d.Aa(),d.ka()),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([gt(a,h,e),ht(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
770
- function it(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:Kc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Kc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function gt(a,b,c){return K(function(d){return u(d,jt(a.g,a.h.drm,c,b),0)})}
771
- function ht(a,b,c){function d(){}var e=kt(c);Hs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Qf=function(){return et(this,lt(this))};
772
- function lt(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return Qs(),b=a.g,c=a.h.drm,d=new Yr,e=!1,ua(p),u(p,d.init(),4);case 4:f=[],cs(d,function(n){return f.push(n)}),g=t(f),h=g.next();case 5:if(h.done){p.A(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,Cs(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.A(5);break;case 2:return wa(p),u(p,d.destroy(),11);case 11:xa(p,3);break;case 3:return p["return"](!e)}})}
773
- r.list=function(){return et(this,mt())};function mt(){var a,b,c;return K(function(d){switch(d.g){case 1:return Qs(),a=[],b=new Yr,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),as(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Hs(new qs("manifest",e.Aa,e.ka,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
774
- function Rs(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),Ss(a),u(l,c.start(b,
775
- g),2);if(3!=l.g)return h=l.h,Ss(a),k=nt(h),u(l,Promise.all(jf(k,function(m){return m.createSegmentIndex()})),3);Ss(a);if(e)throw e;return l["return"](h)})}function Ts(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new of({mb:a.g,onError:c,Qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,tf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Jf(e),3);case 3:return u(f,If(e),4);case 4:return f["return"](e)}})}
776
- function dt(a,b,c,d){var e=new Map,f=nt(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=ot(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Xd:Array.from(e.values())}}
777
- function ot(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
778
- tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;pt(d,c.presentationTimeline.Ra(),function(l){var m=Dr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=Ls(b,d.id)*n;n=Gr(a.g,n);f.set(m,new Cr(l,n,k,!1))}l.g&&(p=Dr(l.g),f.has(p)||(n=.5*Ls(b,d.id),n=Gr(a.g,n),f.set(p,new Cr(l.g,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
779
- tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function pt(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Ss(a){if(a.l.g)throw new N(2,9,7001);}function Qs(){if(!Ns())throw new N(2,9,9E3);}function et(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);eb(a.i,b);return xa(c,0)})}
780
- function Ps(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){eb(a.i,c)})}function kt(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
781
- function jt(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=ds(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:it(d,!1),videoCapabilities:it(d,!0)}});return u(h,Cs(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
782
- function nt(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}
783
- function bt(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",Ms);Ms.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new Yr,ua(b),u(b,es(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};Ms.prototype.list=Ms.prototype.list;
784
- Ms.prototype.removeEmeSessions=Ms.prototype.Qf;Ms.prototype.remove=Ms.prototype.remove;Ms.prototype.store=Ms.prototype.store;Ms.prototype.getNetworkingEngine=Ms.prototype.ec;Ms.prototype.getConfiguration=Ms.prototype.getConfiguration;Ms.prototype.configure=Ms.prototype.configure;Ms.prototype.destroy=Ms.prototype.destroy;Ms.support=Ns;
785
- var ct=(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");
786
- Bm.offline=Ns;function qt(){}function rt(a,b){for(var c={priority:b||0,Oe:a},d=0;d<st.length;d++)if(st[d].priority<c.priority){st.splice(d,0,c);return}st.push(c)}M("shaka.polyfill",qt);qt.register=rt;qt.installAll=function(){for(var a=t(st),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Oe()}catch(c){Va("Error installing polyfill!",c)}}};var st=[];function tt(){}function ut(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())vt(b.value)}function vt(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)}})}qt.Aria=tt;tt.install=ut;rt(ut);function wt(){}function xt(){yt()}qt.EncryptionScheme=wt;wt.install=xt;rt(xt,-2);function zt(){}
787
- function At(){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}}),
788
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Bt);document.addEventListener("webkitfullscreenerror",Bt);document.addEventListener("mozfullscreenchange",Bt);document.addEventListener("mozfullscreenerror",Bt);document.addEventListener("MSFullscreenChange",Bt);document.addEventListener("MSFullscreenError",Bt)}}
789
- function Bt(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)}qt.Fullscreen=zt;zt.install=At;rt(At);function Ct(){}function Dt(){var a=!0;if(sd()||qd("PlayStation 5")||rd())a=!1;rd()&&qd("Android")&&(a=!0);a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Et=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Ft)}
790
- function Ft(a){var b,c,d,e,f,g,h,k,l,m,p,n,q,v,x,w;return K(function(y){switch(y.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return y["return"](b);if("media-source"==a.type){if(!id()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return y["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=jd(g),!h)||a.audio&&(k=a.audio.contentType,
791
- l=jd(k),!l))return y["return"](b)}else return y["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,y["return"](Promise.resolve(b));m=a.keySystemConfiguration;p=[];n=[];m.audio&&(q={robustness:m.audio.robustness||"",contentType:a.audio.contentType},p.push(q));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},n.push(v));x={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
792
- p.length&&(x.audioCapabilities=p);n.length&&(x.videoCapabilities=n);B(y,3);return u(y,navigator.requestMediaKeySystemAccess(m.keySystem,[x]),5);case 5:w=y.h;va(y,4);break;case 3:E(y);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return y["return"](b)}})}qt.MediaCapabilities=Ct;Ct.install=Dt;var Et=null;Ct.originalMcap=Et;rt(Dt,-1);function Gt(){}function Ht(){var a=td();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?It():a?12>=a?(Jt(),Kt()):Jt():(qd("Tizen 2")||qd("Tizen 3")||qd("Tizen 4"))&&Lt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Mt()}
793
- function Jt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function Kt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Lt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Mc(b)&&a(b)}}
794
- function It(){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)}}
795
- function Mt(){var a=MediaSource.isTypeSupported;qd("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}qt.MediaSource=Gt;Gt.install=Ht;rt(Ht);function Nt(){}function Ot(){screen.orientation||void 0!=window.orientation&&Pt()}function Pt(){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 Qt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}qt.Orientation=Nt;
796
- Nt.install=Ot;function Qt(){Me.call(this);this.type="";this.angle=0}qa(Qt,Me);
797
- Qt.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)};
798
- Qt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};rt(Ot);function Rt(){}function St(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Tt,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Ut,window.MediaKeys=Vt,window.MediaKeySystemAccess=Wt,window.shakaMediaKeysPolyfill=!0)}function Tt(){return Promise.reject(Error("The key system specified is not supported."))}
799
- function Ut(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}qt.PatchedMediaKeysNop=Rt;Rt.install=St;function Vt(){throw new TypeError("Illegal constructor.");}Vt.prototype.createSession=function(){};Vt.prototype.setServerCertificate=function(){};function Wt(){this.keySystem="";throw new TypeError("Illegal constructor.");}Wt.prototype.getConfiguration=function(){};Wt.prototype.createMediaKeys=function(){};rt(St,-10);function Xt(){}
800
- function Yt(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Zt="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=$t;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=au;window.MediaKeys=bu;window.MediaKeySystemAccess=cu;window.shakaMediaKeysPolyfill=!0}}
801
- function du(a){var b=Zt;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function $t(a,b){try{var c=new cu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function au(a){var b=this.mediaKeys;b&&b!=a&&eu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&eu(a,this);return Promise.resolve()}qt.PatchedMediaKeysWebkit=Xt;Xt.install=Yt;
802
- function cu(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),
749
+ function cs(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:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
750
+ b.next())for(e=e.value,g=ds(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=ds(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}
751
+ function ds(a,b,c){var d=b.segments.map(function(e){return es(a,e)});c.Gb(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,
752
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function es(a,b){var c=new Zr("segment",a.h,a.g,b.dataKey);return new pi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?fs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
753
+ function fs(a,b){var c=new Zr("segment",a.h,a.g,b);return new ni(function(){return[c.toString()]},0,null)};function gs(){this.g=null}r=gs.prototype;r.configure=function(){};
754
+ r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:d=$r(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new Gr;ua(m);return u(m,e.init(),4);case 4:return u(m,Kr(e,d.Ba(),d.la()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new as(d.Ba(),d.la()),l=bs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};r.stop=function(){return Promise.resolve()};
755
+ r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return L(function(m){switch(m.g){case 1:return d=c.g,e=new Gr,B(m,2,3),u(m,e.init(),5);case 5:return u(m,Kr(e,d.Ba(),d.la()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.A(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:F(m),m.A(3)}})};
756
+ hg["application/x-offline-manifest"]=function(){return new gs};function hs(){}function is(a){var b=$r(a);b&&"manifest"==b.g?(a={uri:a,Ce:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ke(a)):a=b&&"segment"==b.g?js(b.key(),b):Ie(new N(2,1,9004,a));return a}
757
+ function js(a,b){var c=new Gr;return Ke(void 0).$(function(){return c.init()}).$(function(){return Kr(c,b.Ba(),b.la())}).$(function(d){return d.getSegments([b.key()])}).$(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",hs);hs.plugin=is;We("offline",is);function ks(a,b,c){var d,e,f,g,h,k;return L(function(l){switch(l.g){case 1:d=[];for(var m=[],p=t(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var q=!1,x=t(m),w=x.next();!w.done;w=x.next())if(w=w.value,ls(w.info,n)){w.sessionIds.push(n.sessionId);q=!0;break}q||m.push({info:n,sessionIds:[n.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=ms(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l["return"](d)}})}
758
+ function ms(a,b,c){var d,e;return L(function(f){switch(f.g){case 1:return d=new sf({lb:b,onError:function(){},Wc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),B(f,2),d.configure(a),u(f,Af(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return B(f,6),u(f,Nf(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
759
+ 9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return L(function(h){if(1==h.g)return B(h,2),u(h,Of(d,g),4);if(2!=h.g)return e.push(g),va(h,0);F(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
760
+ function ls(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fb(a.audioCapabilities,b.audioCapabilities,c)&&fb(a.videoCapabilities,b.videoCapabilities,c)};function ns(a,b,c){var d=b.presentationTimeline.getDuration();b=os(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function ps(a,b){var c=bs(new as(a.Ba(),a.la()),b),d=b.appMetadata||{};c=os(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
761
+ function os(a){var b=[],c=ke(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(ae(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(be(c.value));return b};function qs(){this.g={}}function rs(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function ss(a,b){a.g[b.id]=b.bandwidth||2048}function ts(a,b){var c=a.g[b];null==c&&(c=0);return c};function us(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.fc()):(this.h=Ck(),this.g=new Ve);this.i=[];this.j=[];var c=!a;this.l=new ff(function(){var d,e,f,g,h;return L(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return qr(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.A(4);break}return u(k,b.g.destroy(),4);
762
+ case 4:b.h=null,b.g=null,z(k)}})})}function vs(){if(jd())a:{var a=t(Hr.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=us.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=zk(a,b));return Ek(this.h,a)};r.getConfiguration=function(){var a=Ck();Ek(a,this.h,Ck());return a};r.fc=function(){return this.g};
763
+ r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new pr(this.g);this.j.push(f);b=ws(this,a,b||{},function(){var g;return L(function(h){if(1==h.g)return u(h,gg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h["return"](g())})},e,f);b=new He(b,function(){return qr(f)});b["finally"](function(){eb(d.j,f)});return xs(this,b)};
764
+ function ws(a,b,c,d,e,f){var g,h,k,l,m,p,n,q,x,w,v,y,D,C;return L(function(A){switch(A.g){case 1:return ys(),h=g=null,k=new Gr,p=m=l=null,B(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,zs(a,b,g,e),6);case 6:n=A.h;As(a);q=!n.presentationTimeline.V()&&!n.presentationTimeline.kb();if(!q)throw new N(2,9,9005,b);return u(A,Bs(a,n,function(G){p=p||G},e),7);case 7:h=A.h;As(a);if(p)throw p;return u(A,Cs(n,e),8);case 8:return u(A,k.init(),9);case 9:return As(a),u(A,Ir(k),10);case 10:return l=A.h,As(a),x=Ds(h,
765
+ n,b,c,e,f),w=x.Jf,v=x.ae,u(A,l.la.addManifests([w]),11);case 11:y=A.h;As(a);m=y[0];As(a);if(p)throw p;return u(A,Es(a,v,m,w,f,e,l.la,n,h),12);case 12:return As(a),D=new Zr("manifest",l.path.Ba,l.path.la,m),A["return"](ps(D,w));case 3:return wa(A),u(A,k.destroy(),13);case 13:if(!g){A.A(14);break}return u(A,g.stop(),14);case 14:if(!h){A.A(16);break}return u(A,h.destroy(),16);case 16:xa(A,0);break;case 2:C=F(A);if(null==m){A.A(18);break}return u(A,Fs(m),18);case 18:throw p||C;}})}
766
+ function Es(a,b,c,d,e,f,g,h,k){var l,m,p,n,q,x,w,v,y,D;return L(function(C){switch(C.g){case 1:l={};m=0;p=function(A,G){var E,H,J,I,K,P,Q;return L(function(ca){if(1==ca.g){E={};H=t(A);for(J=H.next();!J.done;E={cb:E.cb},J=H.next())E.cb=J.value,I=mr(E.cb,f),K=E.cb.i,P=E.cb.h,Q=function(Y){return function(ja){var Ga,za,Ha;return L(function(Da){if(1==Da.g)return u(Da,g.addSegments([{data:ja}]),2);Ga=Da.h;As(a);za=Y.cb.g;Ha=lr(za);l[Ha]=Ga[0];m+=ja.byteLength;z(Da)})}}(E),sr(e,E.cb.groupId,I,K,P,Q);return u(ca,
767
+ ur(e),2)}if(!G)return ca.A(0);As(a);Gs(h,d,k,f);return u(ca,g.updateManifest(c,d),0)})};n=!1;B(C,2);if(!Hs(h)||!n||Is(h)){C.A(4);break}return u(C,p(b.filter(function(A){return A.h}),!0),5);case 5:return As(a),b=b.filter(function(A){return!A.h}),q=l,x=m,l={},m=0,u(C,Js(g,c,d,q,x,function(){return As(a)}),6);case 6:As(a);case 4:if(n){C.A(7);break}return u(C,p(b,!1),8);case 8:return As(a),w=l,v=m,l={},m=0,u(C,Js(g,c,d,w,v,function(){return As(a)}),9);case 9:As(a);case 7:va(C,0);break;case 2:return y=
768
+ F(C),D=Object.values(l),u(C,g.removeSegments(D,function(){}),10);case 10:throw y;}})}function Fs(a){var b,c,d,e;return L(function(f){switch(f.g){case 1:return b=new Gr,u(f,b.init(),2);case 2:return u(f,Ir(b),3);case 3:return c=f.h,d=new Zr("manifest",c.path.Ba,c.path.la,a),u(f,b.destroy(),4);case 4:return e=new us,u(f,e.remove(d.toString()),0)}})}
769
+ function Js(a,b,c,d,e,f){var g,h,k,l,m,p,n,q,x,w,v;return L(function(y){switch(y.g){case 1:g=!1;B(y,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=t(m.segments),n=p.next();!n.done;n=p.next())q=n.value,x=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=x&&(q.dataKey=x,q.pendingSegmentRefId=void 0),x=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=x&&(q.initSegmentKey=x,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
770
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(y,a.updateManifest(b,c),4);case 4:g=!0;f();va(y,0);break;case 2:return w=F(y),u(y,Fs(b),5);case 5:if(g){y.A(6);break}v=Object.values(d);return u(y,a.removeSegments(v,function(){}),6);case 6:throw w;}})}
771
+ function Cs(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,x,w,v,y,D,C,A,G,E,H,J,I,K,P,Q,ca,Y;return L(function(ja){switch(ja.g){case 1:return c={width:Infinity,height:Infinity},Kd(a,b.restrictions,c),u(ja,Od(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;yd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(ae(m));p=t(a.textStreams);for(n=p.next();!n.done;n=p.next())q=n.value,
772
+ d.push(be(q));x=t(a.imageStreams);for(w=x.next();!w.done;w=x.next())v=w.value,d.push(ce(v));return u(ja,b.offline.trackSelectionCallback(d),3);case 3:y=ja.h;D=a.presentationTimeline.getDuration();C=0;A=t(y);for(G=A.next();!G.done;G=A.next())E=G.value,H=E.bandwidth*D/8,C+=H;B(ja,4);return u(ja,b.offline.downloadSizeCallback(C),6);case 6:J=ja.h;if(!J)throw new N(2,9,9014);va(ja,5);break;case 4:I=F(ja);if(I instanceof N)throw I;throw new N(2,9,9015);case 5:K=new Set;P=new Set;Q=new Set;ca=t(y);for(G=
773
+ ca.next();!G.done;G=ca.next())Y=G.value,"variant"==Y.type&&K.add(Y.id),"text"==Y.type&&P.add(Y.id),"image"==Y.type&&Q.add(Y.id);a.variants=a.variants.filter(function(Ga){return K.has(Ga.id)});a.textStreams=a.textStreams.filter(function(Ga){return P.has(Ga.id)});a.imageStreams=a.imageStreams.filter(function(Ga){return Q.has(Ga.id)});Ks(a);z(ja)}})}
774
+ function Ds(a,b,c,d,e,f){var g=ns(c,b,d),h=e.offline.progressCallback;rr(f,function(q,x){g.size=x;h(g,q)},function(q,x){k&&e.offline.usePersistentLicense&&l==x&&Kf(a,"cenc",q)});var k=Hs(b)&&!Is(b),l=null;k&&(l=Ls.get(a.g.keySystem));for(var m=new qs,p=t(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=t(b.imageStreams);for(n=p.next();!n.done;n=p.next())ss(m,n.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())rs(m,p.value);m=Ms(f,m,b,e);f=m.streams;m=m.ae;n=a.g;p=e.offline.usePersistentLicense;
775
+ n&&p&&(n.initData=[]);return{Jf:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ec(),streams:f,sessionIds:p?Sf(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},ae:m}}function Hs(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
776
+ function Is(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Gs(a,b,c,d){b.expiration=c.ec();c=Sf(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Hs(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}r.remove=function(a){return Ns(this,Os(this,a))};
777
+ function Os(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:ys();c=$r(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new Gr;ua(k);return u(k,e.init(),4);case 4:return u(k,Kr(e,d.Ba(),d.la()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([Ps(a,h,e),Qs(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
778
+ function Rs(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:Kc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Kc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Ps(a,b,c){return L(function(d){return u(d,Ss(a.g,a.h.drm,c,b),0)})}
779
+ function Qs(a,b,c){function d(){}var e=Ts(c);ps(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Yf=function(){return Ns(this,Us(this))};
780
+ function Us(a){var b,c,d,e,f,g,h,k,l,m;return L(function(p){switch(p.g){case 1:return ys(),b=a.g,c=a.h.drm,d=new Gr,e=!1,ua(p),u(p,d.init(),4);case 4:f=[],Lr(d,function(n){return f.push(n)}),g=t(f),h=g.next();case 5:if(h.done){p.A(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,ks(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.A(5);break;case 2:return wa(p),u(p,d.destroy(),11);case 11:xa(p,3);break;case 3:return p["return"](!e)}})}
781
+ r.list=function(){return Ns(this,Vs())};function Vs(){var a,b,c;return L(function(d){switch(d.g){case 1:return ys(),a=[],b=new Gr,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Jr(b,function(e,f){c=c.then(function(){var g;return L(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=ps(new Zr("manifest",e.Ba,e.la,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
782
+ function zs(a,b,c,d){var e,f,g,h,k;return L(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),As(a),u(l,c.start(b,
783
+ g),2);if(3!=l.g)return h=l.h,As(a),k=Ws(h),u(l,Promise.all(nf(k,function(m){return m.createSegmentIndex()})),3);As(a);if(e)throw e;return l["return"](h)})}function Bs(a,b,c,d){var e;return L(function(f){switch(f.g){case 1:return e=new sf({lb:a.g,onError:c,Wc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,xf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Nf(e),3);case 3:return u(f,Mf(e),4);case 4:return f["return"](e)}})}
784
+ function Ms(a,b,c,d){var e=new Map,f=Ws(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Xs(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),ae:Array.from(e.values())}}
785
+ function Xs(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
786
+ tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;Ys(d,c.presentationTimeline.Ra(),function(l){var m=lr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=ts(b,d.id)*n;n=or(a.g,n);f.set(m,new kr(l,n,k,!1))}l.g&&(p=lr(l.g),f.has(p)||(n=.5*ts(b,d.id),n=or(a.g,n),f.set(p,new kr(l.g,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
787
+ tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Ys(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 As(a){if(a.l.g)throw new N(2,9,7001);}function ys(){if(!vs())throw new N(2,9,9E3);}function Ns(a,b){return L(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);eb(a.i,b);return xa(c,0)})}
788
+ function xs(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){eb(a.i,c)})}function Ts(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
789
+ function Ss(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Mr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Rs(d,!1),videoCapabilities:Rs(d,!0)}});return u(h,ks(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)})}
790
+ function Ws(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}
791
+ function Ks(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",us);us.deleteAll=function(){var a;return L(function(b){return 1==b.g?(a=new Gr,ua(b),u(b,Nr(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};us.prototype.list=us.prototype.list;
792
+ us.prototype.removeEmeSessions=us.prototype.Yf;us.prototype.remove=us.prototype.remove;us.prototype.store=us.prototype.store;us.prototype.getNetworkingEngine=us.prototype.fc;us.prototype.getConfiguration=us.prototype.getConfiguration;us.prototype.configure=us.prototype.configure;us.prototype.destroy=us.prototype.destroy;us.support=vs;
793
+ var Ls=(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");
794
+ km.offline=vs;function Zs(){}function $s(a,b){for(var c={priority:b||0,We:a},d=0;d<at.length;d++)if(at[d].priority<c.priority){at.splice(d,0,c);return}at.push(c)}M("shaka.polyfill",Zs);Zs.register=$s;Zs.installAll=function(){for(var a=t(at),b=a.next();!b.done;b=a.next()){b=b.value;try{b.We()}catch(c){Va("Error installing polyfill!",c)}}};var at=[];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)}})}Zs.Aria=bt;bt.install=ct;$s(ct);function et(){}function ft(){gt()}Zs.EncryptionScheme=et;et.install=ft;$s(ft,-2);function ht(){}
795
+ 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}}),
796
+ 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)}}
797
+ 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)}Zs.Fullscreen=ht;ht.install=it;$s(it);function kt(){}function lt(){var a=!0;if(ud()||rd("PlayStation 5")||td())a=!1;td()&&rd("Android")&&(a=!0);a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),mt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=nt)}
798
+ function nt(a){var b,c,d,e,f,g,h,k,l,m,p,n,q,x,w,v;return L(function(y){switch(y.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return y["return"](b);if("media-source"==a.type){if(!jd()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return y["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=od(g),!h)||a.audio&&(k=a.audio.contentType,
799
+ l=od(k),!l))return y["return"](b)}else return y["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,y["return"](Promise.resolve(b));m=a.keySystemConfiguration;p=[];n=[];m.audio&&(q={robustness:m.audio.robustness||"",contentType:a.audio.contentType},p.push(q));m.video&&(x={robustness:m.video.robustness||"",contentType:a.video.contentType},n.push(x));w={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
800
+ p.length&&(w.audioCapabilities=p);n.length&&(w.videoCapabilities=n);B(y,3);return u(y,navigator.requestMediaKeySystemAccess(m.keySystem,[w]),5);case 5:v=y.h;va(y,4);break;case 3:F(y);case 4:v&&(b.supported=!0,b.keySystemAccess=v);case 2:return y["return"](b)}})}Zs.MediaCapabilities=kt;kt.install=lt;var mt=null;kt.originalMcap=mt;$s(lt,-1);function ot(){}function pt(){var a=vd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?qt():a?12>=a?(rt(),st()):rt():(rd("Tizen 2")||rd("Tizen 3")||rd("Tizen 4"))&&tt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&ut()}
801
+ function rt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ia.apply(0,arguments));b.abort=function(){};return b}}function st(){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"opus"!=Nc(b)[0]&&a(b)}}
802
+ function qt(){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)}}
803
+ function ut(){var a=MediaSource.isTypeSupported;rd("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Zs.MediaSource=ot;ot.install=pt;$s(pt);function vt(){}function wt(){screen.orientation||void 0!=window.orientation&&xt()}function xt(){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 yt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}Zs.Orientation=vt;
804
+ vt.install=wt;function yt(){Qe.call(this);this.type="";this.angle=0}qa(yt,Qe);
805
+ yt.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)};
806
+ yt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};$s(wt);function zt(){}function At(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Bt,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Ct,window.MediaKeys=Dt,window.MediaKeySystemAccess=Et,window.shakaMediaKeysPolyfill=!0)}function Bt(){return Promise.reject(Error("The key system specified is not supported."))}
807
+ function Ct(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Zs.PatchedMediaKeysNop=zt;zt.install=At;function Dt(){throw new TypeError("Illegal constructor.");}Dt.prototype.createSession=function(){};Dt.prototype.setServerCertificate=function(){};function Et(){this.keySystem="";throw new TypeError("Illegal constructor.");}Et.prototype.getConfiguration=function(){};Et.prototype.createMediaKeys=function(){};$s(At,-10);function Ft(){}
808
+ function Gt(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Ht="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=It;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Jt;window.MediaKeys=Kt;window.MediaKeySystemAccess=Lt;window.shakaMediaKeysPolyfill=!0}}
809
+ function Mt(a){var b=Ht;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function It(a,b){try{var c=new Lt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Jt(a){var b=this.mediaKeys;b&&b!=a&&Nt(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Nt(a,this);return Promise.resolve()}Zs.PatchedMediaKeysWebkit=Ft;Ft.install=Gt;
810
+ function Lt(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),
803
811
  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"]):
804
- 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;}cu.prototype.createMediaKeys=function(){var a=new bu(this.g);return Promise.resolve(a)};cu.prototype.getConfiguration=function(){return this.h};function bu(a){this.l=a;this.h=null;this.g=new df;this.i=[];this.j=new Map}
805
- function eu(a,b){a.h=b;a.g.Ld();var c=Zt;b&&(a.g.B(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Hb(d.initData);a.h.dispatchEvent(e)}),a.g.B(b,c+"keymessage",function(d){var e=fu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.od()?"licenserequest":"licenserenewal").set("message",d.message),d=new S("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.B(b,c+"keyadded",function(d){if(d=fu(a,d.sessionId))gu(d,"usable"),
806
- d.g&&d.g.resolve(),d.g=null}),a.g.B(b,c+"keyerror",function(d){var e=fu(a,d.sessionId);e&&e.handleError(d)}))}bu.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 hu(b,this.l,a);this.i.push(a);return a};bu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
807
- function fu(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 hu(a,b,c){Me.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 nc;this.keyStatuses=new iu}qa(hu,Me);r=hu.prototype;
808
- r.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?gu(this,"output-restricted"):1==b?gu(this,"expired"):gu(this,"internal-error"))};
809
- function ju(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=Gb(uc("LOAD_SESSION|"+c));else{var e=uc("PERSISTENT|");d=Dc(e,b)}else d=Gb(b)}catch(g){return Promise.reject(g)}a.h=new nc;var f=du("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new R(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).R(.01)}return a.h}
810
- function ku(a,b,c){if(a.g)a.g.then(function(){return ku(a,b,c)})["catch"](function(){return ku(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=qc(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=zc(e.keys[0].k);e=zc(e.keys[0].kid)}else d=Gb(c),e=null;var f=du("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
811
- function gu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new S("keystatuseschange");a.dispatchEvent(c)}r.generateRequest=function(a,b){return ju(this,b,null)};r.load=function(a){return"persistent-license"==this.l?ju(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new nc;ku(this,b,a);return b};
812
- r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=du("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function iu(){this.size=0;this.g=void 0}r=iu.prototype;r.od=function(){return this.g};
813
- r.forEach=function(a){this.g&&a(this.g,ag.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=ag.value();return this.g&&Eb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var Zt="";rt(Yt);function lu(){}function mu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=nu,Object.defineProperty(a,"disablePictureInPicture",{get:ou,set:pu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=qu,document.addEventListener("webkitpresentationmodechanged",ru,!0))}}
814
- function ru(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)}
815
- function nu(){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 qu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
816
- function ou(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function pu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}qt.PiPWebkit=lu;lu.install=mu;rt(mu);function su(){}function tu(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=uu))}function uu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}qt.RandomUUID=su;su.install=tu;rt(tu);function vu(){}function wu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=xu)}function xu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}qt.StorageEstimate=vu;vu.install=wu;rt(wu);function yu(){}function zu(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Au})}function Au(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}qt.Symbol=yu;yu.install=zu;rt(zu);function Bu(){}function Cu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}qt.VideoPlayPromise=Bu;Bu.install=Cu;rt(Cu);function Du(){}function Eu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Fu)}}function Fu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}qt.VideoPlaybackQuality=Du;Du.install=Eu;rt(Eu);function Gu(){}function Hu(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Iu;else if(6==b)a=Ju;else{try{var c=!!Iu(1,2,"")}catch(d){c=!1}c&&(a=Iu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Iu(a,b,c){return new window.TextTrackCue(a,b,c)}function Ju(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}qt.VTTCue=Gu;Gu.install=Hu;rt(Hu);function Ku(){}Ku.prototype.parseInit=function(){};Ku.prototype.setSequenceMode=function(){};Ku.prototype.parseMedia=function(a,b){var c=null,d=[],e=qc(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=Lu.exec(f))){var g=Mu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new hb(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};M("shaka.text.LrcTextParser",Ku);Ku.prototype.parseMedia=Ku.prototype.parseMedia;
817
- Ku.prototype.setSequenceMode=Ku.prototype.setSequenceMode;Ku.prototype.parseInit=Ku.prototype.parseInit;var Lu=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Mu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Qc["application/x-subtitle-lrc"]=function(){return new Ku};function Nu(){}Nu.prototype.parseInit=function(){};Nu.prototype.setSequenceMode=function(){};
818
- Nu.prototype.parseMedia=function(a,b){var c=qc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(C){throw new N(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new N(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new N(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=bo(g,Ou,"frameRate"),k=bo(g,Ou,"subFrameRate"),l=bo(g,Ou,"frameRateMultiplier"),
819
- m=bo(g,Ou,"tickRate"),p=bo(g,Ou,"cellResolution");c=g.getAttribute("xml:space")||"default";e=bo(g,Pu,"extent");if("default"!=c&&"preserve"!=c)throw new N(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Qu(h,k,l,m);p=p?(p=/^(\d+) (\d+)$/.exec(p))?{columns:parseInt(p[1],10),rows:parseInt(p[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?$n(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var n=t(g),q=n.next();!q.done;q=
820
- n.next()){var v=q.value;q=new kb;var x=v.getAttribute("xml:id");if(x){q.id=x;var w=null;e&&(w=Ru.exec(e)||Su.exec(e));x=w?Number(w[1]):null;w=w?Number(w[2]):null;var y,D;if(y=Tu(v,l,"extent"))y=(D=Ru.exec(y))||Su.exec(y),null!=y&&(q.width=Number(y[1]),q.height=Number(y[2]),D||(null!=x&&(q.width=100*q.width/x),null!=w&&(q.height=100*q.height/w)),q.widthUnits=D||null!=x?Ab:0,q.heightUnits=D||null!=w?Ab:0);if(v=Tu(v,l,"origin"))y=(D=Ru.exec(v))||Su.exec(v),null!=y&&(q.viewportAnchorX=Number(y[1]),q.viewportAnchorY=
821
- Number(y[2]),D||(null!=w&&(q.viewportAnchorY=100*q.viewportAnchorY/w),null!=x&&(q.viewportAnchorX=100*q.viewportAnchorX/x)),q.viewportAnchorUnits=D||null!=x?Ab:0)}else q=null;q&&m.push(q)}if(Xn(f,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=t(Xn(f,"div"));for(n=e.next();!n.done;n=e.next())if(Xn(n.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");(f=Uu(f,b.periodStart,h,k,l,g,m,c,p,null,!1))&&d.push(f)}return d};
822
- function Uu(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var q=null,v=t(Vu),x=v.next();!x.done&&!(q=Wu(n,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=m;if("p"==a.nodeName||q)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));x=Array.from(n.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
823
- a=[];if(!x)for(var w=t(n.childNodes),y=w.next();!y.done;y=w.next())(y=Uu(y.value,b,c,d,e,f,g,h,k,n,m))&&a.push(y);d=null!=l;w=/\S/.test(n.textContent);var D=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(D||w||"br"==n.tagName||0!=a.length||d&&!h))return null;y=Xu(n,c);w=y.start;for(y=y.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)y=Yu(p,c,w,y),w=y.start,y=y.end,p=p.parentNode;null==w&&(w=0);w+=b;y=null==y?Infinity:y+b;if(!D&&0<a.length)for(w=Infinity,y=0,b=t(a),
824
- c=b.next();!c.done;c=b.next())c=c.value,w=Math.min(w,c.startTime),y=Math.max(y,c.endTime);if("br"==n.tagName)return e=new hb(w,y,""),e.lineBreak=!0,e;b="";x&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hb(w,y,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Wu(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var C=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==C})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&
825
- (g=Wu(l,"region",f,"")[0]);Zu(b,n,g,q,e,v,0==a.length);return b}
826
- function Zu(a,b,c,d,e,f,g){f=f||g;"rtl"==$u(b,c,e,"direction",f)&&(a.direction="rtl");g=$u(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=jb);(g=$u(b,c,e,"textAlign",!0))?(a.positionAlign=av[g],a.lineAlign=bv[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=mb;if(g=$u(b,c,e,"displayAlign",!0))a.displayAlign=vb[g.toUpperCase()];if(g=$u(b,c,e,"color",f))a.color=g;if(g=$u(b,c,e,"backgroundColor",
827
- f))a.backgroundColor=g;if(g=$u(b,c,e,"border",f))a.border=g;if(g=$u(b,c,e,"fontFamily",f))a.fontFamily=g;(g=$u(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=$u(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=$u(b,c,e,"lineHeight",f))&&g.match(cv)&&(a.lineHeight=g);(g=$u(b,c,e,"fontSize",f))&&(g.match(cv)||g.match(dv))&&(a.fontSize=g);if(g=$u(b,c,e,"fontStyle",f))a.fontStyle=zb[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
828
- d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=$u(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(cv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(cv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=$u(b,c,e,"letterSpacing",f))&&d.match(cv)&&(a.letterSpacing=d);(d=$u(b,c,e,"linePadding",f))&&d.match(cv)&&(a.linePadding=d);if(f=$u(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Tu(c,e,"textDecoration"))&&ev(a,c);(b=
829
- fv(b,e,"textDecoration"))&&ev(a,b)}
830
- function ev(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")&&eb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&eb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
831
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&eb(a.textDecoration,"overline")}}function $u(a,b,c,d,e){e=void 0===e?!0:e;return(a=fv(a,c,d))?a:e?Tu(b,c,d):null}function Tu(a,b,c){if(!a)return null;var d=bo(a,Pu,c);return d?d:gv(a,b,c)}function fv(a,b,c){var d=bo(a,Pu,c);return d?d:gv(a,b,c)}
832
- function gv(a,b,c){a=Wu(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ao(a[e],"urn:ebu:tt:style",c);f||(f=bo(a[e],Pu,c));f||(f=fv(a[e],b,c));f&&(d=f)}return d}
833
- function Wu(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?ao(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 Yu(a,b,c,d){a=Xu(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}}
834
- function Xu(a,b){var c=hv(a.getAttribute("begin"),b),d=hv(a.getAttribute("end"),b),e=hv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
835
- function hv(a,b){var c=null;if(iv.test(a)){c=iv.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(jv.test(a))c=kv(jv,a);else if(lv.test(a))c=kv(lv,a);else if(mv.test(a))c=mv.exec(a),c=Number(c[1])/b.frameRate;else if(nv.test(a))c=nv.exec(a),c=Number(c[1])/b.g;else if(ov.test(a))c=kv(ov,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
836
- function kv(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}M("shaka.text.TtmlTextParser",Nu);Nu.prototype.parseMedia=Nu.prototype.parseMedia;Nu.prototype.setSequenceMode=Nu.prototype.setSequenceMode;Nu.prototype.parseInit=Nu.prototype.parseInit;
837
- function Qu(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]))}
838
- var Ru=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,dv=/^(\d{1,2}(?:\.\d+)?|100)%$/,cv=/^(\d+px|\d+em|\d*\.?\d+c)$/,Su=/^(\d+)px (\d+)px$/,iv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,jv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,lv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,mv=/^(\d*(?:\.\d*)?)f$/,nv=/^(\d*(?:\.\d*)?)t$/,ov=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),bv={left:pb,center:"center",right:"end",start:pb,
839
- end:"end"},av={left:"line-left",center:"center",right:"line-right"},Ou=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Pu=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Vu=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Qc["application/ttml+xml"]=function(){return new Nu};function pv(){this.g=new Nu}pv.prototype.parseInit=function(a){var b=!1;(new kg).box("moov",og).box("trak",og).box("mdia",og).box("minf",og).box("stbl",og).S("stsd",qg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};pv.prototype.setSequenceMode=function(){};pv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new kg).box("mdat",rg(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};
840
- M("shaka.text.Mp4TtmlParser",pv);pv.prototype.parseMedia=pv.prototype.parseMedia;pv.prototype.setSequenceMode=pv.prototype.setSequenceMode;pv.prototype.parseInit=pv.prototype.parseInit;Qc['application/mp4; codecs="stpp"']=function(){return new pv};Qc['application/mp4; codecs="stpp.ttml"']=function(){return new pv};Qc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new pv};Qc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new pv};function qv(){this.g=!1}qv.prototype.parseInit=function(){};qv.prototype.setSequenceMode=function(a){this.g=a};
841
- qv.prototype.parseMedia=function(a,b){var c=qc(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.vttOffset;if(d[0].includes("X-TIMESTAMP-MAP")&&!this.g){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=rv(new pq(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/
842
- 9E4-c}}f=[];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 pq(g);var h=new kb;sq(g);qq(g);for(var k=sq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
843
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");qq(g);k=sq(g)}f.push(h)}e=new Map;sv(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 hb(0,0,"");for(var p=!1,n=0;n<k.length;n++){var q=
844
- /^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var v=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":p=!0;m.backgroundColor=v;break;case "color":p=!0;m.color=v;break;case "font-family":p=!0;m.fontFamily=v;break;case "font-size":p=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(p=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":p=!0;m.fontStyle=sb;break;case "italic":p=!0;m.fontStyle="italic";break;case "oblique":p=!0,m.fontStyle="oblique"}break;case "opacity":p=
845
- !0;m.opacity=parseFloat(v);break;case "white-space":p=!0,m.wrapLine="noWrap"!=v}}}p&&e.set(l,m)}n=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new pq(h[0]);m=rv(k);q=rq(k,/[ \t]+--\x3e[ \t]+/g);p=rv(k);if(null==m||null==q||null==p)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=n;p+=n;n=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=p,h.payload=
846
- ""):h=new hb(m,p,"");tv(n,h,e);qq(k);for(m=sq(k);m;)uv(h,m,f),qq(k),m=sq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function sv(a){for(var b=t(Object.entries(xb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new hb(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(yb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new hb(0,0,""),e.backgroundColor=d,a.set(c,e)}
847
- function tv(a,b,c){0===c.size&&sv(c);a=vv(a);var d=oo("<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())wv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
848
- function vv(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 xv(a,b){return a&&0<a.length?a:b}
849
- function wv(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=xv(h.backgroundColor,e.backgroundColor),e.color=xv(h.color,e.color),e.fontFamily=xv(h.fontFamily,e.fontFamily),e.fontSize=xv(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=
850
- "italic";break;case "u":e.textDecoration.push("underline")}}if(eo(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())wv(a.value,e,c,d)}
851
- function uv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=mb:a.textAlign=ub[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
852
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=yv(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ob,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function yv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
853
- function rv(a){a=rq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.VttTextParser",qv);qv.prototype.parseMedia=qv.prototype.parseMedia;qv.prototype.setSequenceMode=qv.prototype.setSequenceMode;qv.prototype.parseInit=qv.prototype.parseInit;Qc["text/vtt"]=function(){return new qv};Qc['text/vtt; codecs="vtt"']=function(){return new qv};
854
- Qc['text/vtt; codecs="wvtt"']=function(){return new qv};function zv(){this.g=null}zv.prototype.parseInit=function(a){var b=this,c=!1;(new kg).box("moov",og).box("trak",og).box("mdia",og).S("mdhd",function(d){d=Bh(d.reader,d.version);b.g=d.timescale}).box("minf",og).box("stbl",og).S("stsd",qg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};zv.prototype.setSequenceMode=function(){};
855
- zv.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 kg).box("moof",og).box("traf",og).S("tfdt",function(A){g=!0;c=Ah(A.reader,A.version).be}).S("tfhd",function(A){l=zh(A.reader,A.flags).he}).S("trun",function(A){h=!0;d=Ch(A.reader,A.version,A.flags).ze}).box("mdat",rg(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,p=new hg(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=q.value;var v=q.Nd||l,x=q.Uc?
856
- c+q.Uc:m;m=x+(v||0);var w=0;do{var y=p.N();w+=y;var D=p.N(),C=null;"vttc"==sg(D)?8<y&&(C=p.ab(y-8)):p.skip(y-8);v&&C&&(y=Av(C,b.periodStart+x/this.g,b.periodStart+m/this.g),f.push(y))}while(q.sampleSize&&w<q.sampleSize)}return f.filter(dc)};function Av(a,b,c){var d,e,f;(new kg).box("payl",rg(function(g){d=qc(g)})).box("iden",rg(function(g){e=qc(g)})).box("sttg",rg(function(g){f=qc(g)})).parse(a);return d?Bv(d,e,f,b,c):null}
857
- function Bv(a,b,c,d,e){d=new hb(d,e,"");tv(a,d,new Map);b&&(d.id=b);if(c)for(a=new pq(c),b=sq(a);b;)uv(d,b,[]),qq(a),b=sq(a);return d}M("shaka.text.Mp4VttParser",zv);zv.prototype.parseMedia=zv.prototype.parseMedia;zv.prototype.setSequenceMode=zv.prototype.setSequenceMode;zv.prototype.parseInit=zv.prototype.parseInit;Qc['application/mp4; codecs="wvtt"']=function(){return new zv};function Cv(){}Cv.prototype.parseInit=function(){};Cv.prototype.setSequenceMode=function(){};Cv.prototype.parseMedia=function(a){var b=qc(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 pq(c[0]),e=Dv(d),f=rq(d,/,/g);d=Dv(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 hb(e,d,c.slice(1).join("\n").trim()))}return a};
858
- function Dv(a){a=rq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",Cv);Cv.prototype.parseMedia=Cv.prototype.parseMedia;Cv.prototype.setSequenceMode=Cv.prototype.setSequenceMode;Cv.prototype.parseInit=Cv.prototype.parseInit;Qc["text/x-subviewer"]=function(){return new Cv};function Ev(){this.g=new qv}Ev.prototype.parseInit=function(){};Ev.prototype.setSequenceMode=function(){};Ev.prototype.parseMedia=function(a,b){var c=qc(a);c=Fv(c);c=Gb(uc(c));return this.g.parseMedia(c,b)};function Fv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}M("shaka.text.SrtTextParser",Ev);
859
- Ev.srt2webvtt=Fv;Ev.prototype.parseMedia=Ev.prototype.parseMedia;Ev.prototype.setSequenceMode=Ev.prototype.setSequenceMode;Ev.prototype.parseInit=Ev.prototype.parseInit;Qc["text/srt"]=function(){return new Ev};function Gv(){}Gv.prototype.parseInit=function(){};Gv.prototype.setSequenceMode=function(){};
860
- Gv.prototype.parseMedia=function(a){var b="",c="";a=qc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Hv.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=Iv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Jv);else if("Style"==e){e=f.split(Jv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
861
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={kd:e.kd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Iv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Jv);else if("Dialogue"==f){g=g.split(Jv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Kv(f.Start);var k=Kv(f.End);g=new hb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.kd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.kd}}(e)))&&Lv(g,f);d.push(g)}return d};
862
- function Lv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Mv(c))a.color=c;if(c=b.BackColour)if(c=Mv(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=qb;a.textAlign="start";break;case 2:a.displayAlign=qb;a.textAlign=mb;break;case 3:a.displayAlign=qb;a.textAlign="end";
812
+ 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;}Lt.prototype.createMediaKeys=function(){var a=new Kt(this.g);return Promise.resolve(a)};Lt.prototype.getConfiguration=function(){return this.h};function Kt(a){this.l=a;this.h=null;this.g=new hf;this.i=[];this.j=new Map}
813
+ function Nt(a,b){a.h=b;a.g.pc();var c=Ht;b&&(a.g.B(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Hb(d.initData);a.h.dispatchEvent(e)}),a.g.B(b,c+"keymessage",function(d){var e=Ot(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Pc()?"licenserequest":"licenserenewal").set("message",d.message),d=new S("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.B(b,c+"keyadded",function(d){if(d=Ot(a,d.sessionId))Pt(d,"usable"),
814
+ d.g&&d.g.resolve(),d.g=null}),a.g.B(b,c+"keyerror",function(d){var e=Ot(a,d.sessionId);e&&e.handleError(d)}))}Kt.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 Qt(b,this.l,a);this.i.push(a);return a};Kt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
815
+ function Ot(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 Qt(a,b,c){Qe.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 nc;this.keyStatuses=new Rt}qa(Qt,Qe);r=Qt.prototype;
816
+ r.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Pt(this,"output-restricted"):1==b?Pt(this,"expired"):Pt(this,"internal-error"))};
817
+ function St(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=Gb(uc("LOAD_SESSION|"+c));else{var e=uc("PERSISTENT|");d=Cc(e,b)}else d=Gb(b)}catch(g){return Promise.reject(g)}a.h=new nc;var f=Mt("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new R(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
818
+ function Tt(a,b,c){if(a.g)a.g.then(function(){return Tt(a,b,c)})["catch"](function(){return Tt(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=qc(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=zc(e.keys[0].k);e=zc(e.keys[0].kid)}else d=Gb(c),e=null;var f=Mt("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
819
+ function Pt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new S("keystatuseschange");a.dispatchEvent(c)}r.generateRequest=function(a,b){return St(this,b,null)};r.load=function(a){return"persistent-license"==this.l?St(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new nc;Tt(this,b,a);return b};
820
+ r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Mt("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Rt(){this.size=0;this.g=void 0}r=Rt.prototype;r.Pc=function(){return this.g};
821
+ r.forEach=function(a){this.g&&a(this.g,eg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=eg.value();return this.g&&Eb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var Ht="";$s(Gt);function Ut(){}function Vt(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Wt,Object.defineProperty(a,"disablePictureInPicture",{get:Xt,set:Yt,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Zt,document.addEventListener("webkitpresentationmodechanged",$t,!0))}}
822
+ function $t(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)}
823
+ function Wt(){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 Zt(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
824
+ function Xt(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Yt(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Zs.PiPWebkit=Ut;Ut.install=Vt;$s(Vt);function au(){}function bu(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=cu))}function cu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Zs.RandomUUID=au;au.install=bu;$s(bu);function du(){}function eu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=fu)}function fu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Zs.StorageEstimate=du;du.install=eu;$s(eu);function gu(){}function hu(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:iu})}function iu(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Zs.Symbol=gu;gu.install=hu;$s(hu);function ju(){}function ku(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Zs.VideoPlayPromise=ju;ju.install=ku;$s(ku);function lu(){}function mu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=nu)}}function nu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Zs.VideoPlaybackQuality=lu;lu.install=mu;$s(mu);function ou(){}function pu(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=qu;else if(6==b)a=ru;else{try{var c=!!qu(1,2,"")}catch(d){c=!1}c&&(a=qu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function qu(a,b,c){return new window.TextTrackCue(a,b,c)}function ru(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Zs.VTTCue=ou;ou.install=pu;$s(pu);function su(){}su.prototype.parseInit=function(){};su.prototype.setSequenceMode=function(){};su.prototype.parseMedia=function(a,b){var c=null,d=[],e=qc(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=tu.exec(f))){var g=uu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new ib(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};M("shaka.text.LrcTextParser",su);su.prototype.parseMedia=su.prototype.parseMedia;
825
+ su.prototype.setSequenceMode=su.prototype.setSequenceMode;su.prototype.parseInit=su.prototype.parseInit;var tu=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,uu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Rc["application/x-subtitle-lrc"]=function(){return new su};function vu(){}vu.prototype.parseInit=function(){};vu.prototype.setSequenceMode=function(){};
826
+ vu.prototype.parseMedia=function(a,b){var c=qc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(C){throw new N(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new N(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new N(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=Kn(g,wu,"frameRate"),k=Kn(g,wu,"subFrameRate"),l=Kn(g,wu,"frameRateMultiplier"),
827
+ m=Kn(g,wu,"tickRate"),p=Kn(g,wu,"cellResolution");c=g.getAttribute("xml:space")||"default";e=Kn(g,xu,"extent");if("default"!=c&&"preserve"!=c)throw new N(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new yu(h,k,l,m);p=p?(p=/^(\d+) (\d+)$/.exec(p))?{columns:parseInt(p[1],10),rows:parseInt(p[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 n=t(g),q=n.next();!q.done;q=
828
+ n.next()){var x=q.value;q=new kb;var w=x.getAttribute("xml:id");if(w){q.id=w;var v=null;e&&(v=zu.exec(e)||Au.exec(e));w=v?Number(v[1]):null;v=v?Number(v[2]):null;var y,D;if(y=Bu(x,l,"extent"))y=(D=zu.exec(y))||Au.exec(y),null!=y&&(q.width=Number(y[1]),q.height=Number(y[2]),D||(null!=w&&(q.width=100*q.width/w),null!=v&&(q.height=100*q.height/v)),q.widthUnits=D||null!=w?Bb:0,q.heightUnits=D||null!=v?Bb:0);if(x=Bu(x,l,"origin"))y=(D=zu.exec(x))||Au.exec(x),null!=y&&(q.viewportAnchorX=Number(y[1]),q.viewportAnchorY=
829
+ Number(y[2]),D||(null!=v&&(q.viewportAnchorY=100*q.viewportAnchorY/v),null!=w&&(q.viewportAnchorX=100*q.viewportAnchorX/w)),q.viewportAnchorUnits=D||null!=w?Bb:0)}else q=null;q&&m.push(q)}if(Fn(f,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=t(Fn(f,"div"));for(n=e.next();!n.done;n=e.next())if(Fn(n.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");(f=Cu(f,b.periodStart,h,k,l,g,m,c,p,null,!1))&&d.push(f)}return d};
830
+ function Cu(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var q=null,x=t(Du),w=x.next();!w.done&&!(q=Eu(n,"backgroundImage",d,"#",w.value)[0]);w=x.next());x=m;if("p"==a.nodeName||q)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));w=Array.from(n.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
831
+ a=[];if(!w)for(var v=t(n.childNodes),y=v.next();!y.done;y=v.next())(y=Cu(y.value,b,c,d,e,f,g,h,k,n,m))&&a.push(y);d=null!=l;v=/\S/.test(n.textContent);var D=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(D||v||"br"==n.tagName||0!=a.length||d&&!h))return null;y=Fu(n,c);v=y.start;for(y=y.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)y=Gu(p,c,v,y),v=y.start,y=y.end,p=p.parentNode;null==v&&(v=0);v+=b;y=null==y?Infinity:y+b;if(!D&&0<a.length)for(v=Infinity,y=0,b=t(a),
832
+ c=b.next();!c.done;c=b.next())c=c.value,v=Math.min(v,c.startTime),y=Math.max(y,c.endTime);if("br"==n.tagName)return e=new ib(v,y,""),e.lineBreak=!0,e;b="";w&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new ib(v,y,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Eu(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var C=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==C})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&
833
+ (g=Eu(l,"region",f,"")[0]);Hu(b,n,g,q,e,x,0==a.length);return b}
834
+ function Hu(a,b,c,d,e,f,g){f=f||g;"rtl"==Iu(b,c,e,"direction",f)&&(a.direction="rtl");g=Iu(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=jb);(g=Iu(b,c,e,"textAlign",!0))?(a.positionAlign=Ju[g],a.lineAlign=Ku[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=mb;if(g=Iu(b,c,e,"displayAlign",!0))a.displayAlign=vb[g.toUpperCase()];if(g=Iu(b,c,e,"color",f))a.color=g;if(g=Iu(b,c,e,"backgroundColor",
835
+ f))a.backgroundColor=g;if(g=Iu(b,c,e,"border",f))a.border=g;if(g=Iu(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Iu(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Iu(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Iu(b,c,e,"lineHeight",f))&&g.match(Lu)&&(a.lineHeight=g);(g=Iu(b,c,e,"fontSize",f))&&(g.match(Lu)||g.match(Mu))&&(a.fontSize=g);if(g=Iu(b,c,e,"fontStyle",f))a.fontStyle=zb[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
836
+ d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=Iu(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(Lu)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Lu)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Iu(b,c,e,"letterSpacing",f))&&d.match(Lu)&&(a.letterSpacing=d);(d=Iu(b,c,e,"linePadding",f))&&d.match(Lu)&&(a.linePadding=d);if(f=Iu(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Bu(c,e,"textDecoration"))&&Nu(a,c);(b=
837
+ Ou(b,e,"textDecoration"))&&Nu(a,b)}
838
+ function Nu(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")&&eb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&eb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
839
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&eb(a.textDecoration,"overline")}}function Iu(a,b,c,d,e){e=void 0===e?!0:e;return(a=Ou(a,c,d))?a:e?Bu(b,c,d):null}function Bu(a,b,c){if(!a)return null;var d=Kn(a,xu,c);return d?d:Pu(a,b,c)}function Ou(a,b,c){var d=Kn(a,xu,c);return d?d:Pu(a,b,c)}
840
+ function Pu(a,b,c){a=Eu(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],xu,c));f||(f=Ou(a[e],b,c));f&&(d=f)}return d}
841
+ function Eu(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 Gu(a,b,c,d){a=Fu(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}}
842
+ function Fu(a,b){var c=Qu(a.getAttribute("begin"),b),d=Qu(a.getAttribute("end"),b),e=Qu(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
843
+ function Qu(a,b){var c=null;if(Ru.test(a)){c=Ru.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(Su.test(a))c=Tu(Su,a);else if(Uu.test(a))c=Tu(Uu,a);else if(Vu.test(a))c=Vu.exec(a),c=Number(c[1])/b.frameRate;else if(Wu.test(a))c=Wu.exec(a),c=Number(c[1])/b.g;else if(Xu.test(a))c=Tu(Xu,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
844
+ function Tu(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}M("shaka.text.TtmlTextParser",vu);vu.prototype.parseMedia=vu.prototype.parseMedia;vu.prototype.setSequenceMode=vu.prototype.setSequenceMode;vu.prototype.parseInit=vu.prototype.parseInit;
845
+ function yu(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]))}
846
+ var zu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Mu=/^(\d{1,2}(?:\.\d+)?|100)%$/,Lu=/^(\d+px|\d+em|\d*\.?\d+c)$/,Au=/^(\d+)px (\d+)px$/,Ru=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Su=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Uu=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Vu=/^(\d*(?:\.\d*)?)f$/,Wu=/^(\d*(?:\.\d*)?)t$/,Xu=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Ku={left:pb,center:"center",right:"end",start:pb,
847
+ end:"end"},Ju={left:"line-left",center:"center",right:"line-right"},wu=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],xu=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Du=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Rc["application/ttml+xml"]=function(){return new vu};function Yu(){this.g=new vu}Yu.prototype.parseInit=function(a){var b=!1;(new og).box("moov",sg).box("trak",sg).box("mdia",sg).box("minf",sg).box("stbl",sg).U("stsd",ug).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};Yu.prototype.setSequenceMode=function(){};Yu.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new og).box("mdat",vg(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};
848
+ M("shaka.text.Mp4TtmlParser",Yu);Yu.prototype.parseMedia=Yu.prototype.parseMedia;Yu.prototype.setSequenceMode=Yu.prototype.setSequenceMode;Yu.prototype.parseInit=Yu.prototype.parseInit;Rc['application/mp4; codecs="stpp"']=function(){return new Yu};Rc['application/mp4; codecs="stpp.ttml"']=function(){return new Yu};Rc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Yu};Rc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Yu};function Zu(){this.g=!1}Zu.prototype.parseInit=function(){};Zu.prototype.setSequenceMode=function(a){this.g=a};
849
+ Zu.prototype.parseMedia=function(a,b){var c=qc(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.vttOffset;if(d[0].includes("X-TIMESTAMP-MAP")&&this.g){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=$u(new Yp(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-
850
+ c}}f=[];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 Yp(g);var h=new kb;aq(g);Zp(g);for(var k=aq(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))?
851
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Zp(g);k=aq(g)}f.push(h)}e=new Map;av(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new ib(0,0,"");for(var p=!1,n=0;n<k.length;n++){var q=
852
+ /^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var x=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":p=!0;m.backgroundColor=x;break;case "color":p=!0;m.color=x;break;case "font-family":p=!0;m.fontFamily=x;break;case "font-size":p=!0;m.fontSize=x;break;case "font-weight":700<=parseInt(x,10)&&(p=!0,m.fontWeight=700);break;case "font-style":switch(x){case "normal":p=!0;m.fontStyle=sb;break;case "italic":p=!0;m.fontStyle="italic";break;case "oblique":p=!0,m.fontStyle="oblique"}break;case "opacity":p=
853
+ !0;m.opacity=parseFloat(x);break;case "text-shadow":p=!0;m.textShadow=x;break;case "white-space":p=!0,m.wrapLine="noWrap"!=x}}}p&&e.set(l,m)}n=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 Yp(h[0]);m=$u(k);q=$p(k,/[ \t]+--\x3e[ \t]+/g);p=$u(k);if(null==m||null==q||null==p)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=n;p+=n;n=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),
854
+ h.startTime=m,h.endTime=p,h.payload=""):h=new ib(m,p,"");bv(n,h,e);Zp(k);for(m=aq(k);m;)cv(h,m,f),Zp(k),m=aq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function av(a){for(var b=t(Object.entries(xb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new ib(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(yb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new ib(0,0,""),e.backgroundColor=d,a.set(c,e)}
855
+ function bv(a,b,c){0===c.size&&av(c);a=dv(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())ev(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
856
+ function dv(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 fv(a,b){return a&&0<a.length?a:b}
857
+ function ev(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=fv(h.backgroundColor,e.backgroundColor),e.color=fv(h.color,e.color),e.fontFamily=fv(h.fontFamily,e.fontFamily),e.fontSize=fv(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=
858
+ "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())ev(a.value,e,c,d)}
859
+ function cv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=mb:a.textAlign=ub[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
860
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=gv(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ob,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function gv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
861
+ function $u(a){a=$p(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.VttTextParser",Zu);Zu.prototype.parseMedia=Zu.prototype.parseMedia;Zu.prototype.setSequenceMode=Zu.prototype.setSequenceMode;Zu.prototype.parseInit=Zu.prototype.parseInit;Rc["text/vtt"]=function(){return new Zu};Rc['text/vtt; codecs="vtt"']=function(){return new Zu};
862
+ Rc['text/vtt; codecs="wvtt"']=function(){return new Zu};function hv(){this.g=null}hv.prototype.parseInit=function(a){var b=this,c=!1;(new og).box("moov",sg).box("trak",sg).box("mdia",sg).U("mdhd",function(d){d=Fh(d.reader,d.version);b.g=d.timescale}).box("minf",sg).box("stbl",sg).U("stsd",ug).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};hv.prototype.setSequenceMode=function(){};
863
+ hv.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 og).box("moof",sg).box("traf",sg).U("tfdt",function(A){g=!0;c=Eh(A.reader,A.version).he}).U("tfhd",function(A){l=Dh(A.reader,A.flags).ne}).U("trun",function(A){h=!0;d=Gh(A.reader,A.version,A.flags).He}).box("mdat",vg(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,p=new lg(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=q.value;var x=q.Rd||l,w=q.$c?
864
+ c+q.$c:m;m=w+(x||0);var v=0;do{var y=p.N();v+=y;var D=p.N(),C=null;"vttc"==wg(D)?8<y&&(C=p.ab(y-8)):p.skip(y-8);x&&C&&(y=iv(C,b.periodStart+w/this.g,b.periodStart+m/this.g),f.push(y))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(dc)};function iv(a,b,c){var d,e,f;(new og).box("payl",vg(function(g){d=qc(g)})).box("iden",vg(function(g){e=qc(g)})).box("sttg",vg(function(g){f=qc(g)})).parse(a);return d?jv(d,e,f,b,c):null}
865
+ function jv(a,b,c,d,e){d=new ib(d,e,"");bv(a,d,new Map);b&&(d.id=b);if(c)for(a=new Yp(c),b=aq(a);b;)cv(d,b,[]),Zp(a),b=aq(a);return d}M("shaka.text.Mp4VttParser",hv);hv.prototype.parseMedia=hv.prototype.parseMedia;hv.prototype.setSequenceMode=hv.prototype.setSequenceMode;hv.prototype.parseInit=hv.prototype.parseInit;Rc['application/mp4; codecs="wvtt"']=function(){return new hv};function kv(){}kv.prototype.parseInit=function(){};kv.prototype.setSequenceMode=function(){};kv.prototype.parseMedia=function(a){var b=qc(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 Yp(c[0]),e=lv(d),f=$p(d,/,/g);d=lv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ib(e,d,c.slice(1).join("\n").trim()))}return a};
866
+ function lv(a){a=$p(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",kv);kv.prototype.parseMedia=kv.prototype.parseMedia;kv.prototype.setSequenceMode=kv.prototype.setSequenceMode;kv.prototype.parseInit=kv.prototype.parseInit;Rc["text/x-subviewer"]=function(){return new kv};function mv(){this.g=new Zu}mv.prototype.parseInit=function(){};mv.prototype.setSequenceMode=function(){};mv.prototype.parseMedia=function(a,b){var c=qc(a);c=nv(c);c=Gb(uc(c));return this.g.parseMedia(c,b)};function nv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}M("shaka.text.SrtTextParser",mv);
867
+ mv.srt2webvtt=nv;mv.prototype.parseMedia=mv.prototype.parseMedia;mv.prototype.setSequenceMode=mv.prototype.setSequenceMode;mv.prototype.parseInit=mv.prototype.parseInit;Rc["text/srt"]=function(){return new mv};function ov(){}ov.prototype.parseInit=function(){};ov.prototype.setSequenceMode=function(){};
868
+ ov.prototype.parseMedia=function(a){var b="",c="";a=qc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=pv.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=qv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(rv);else if("Style"==e){e=f.split(rv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
869
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={qd:e.qd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=qv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(rv);else if("Dialogue"==f){g=g.split(rv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=sv(f.Start);var k=sv(f.End);g=new ib(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.qd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.qd}}(e)))&&tv(g,f);d.push(g)}return d};
870
+ function tv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=uv(c))a.color=c;if(c=b.BackColour)if(c=uv(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=qb;a.textAlign="start";break;case 2:a.displayAlign=qb;a.textAlign=mb;break;case 3:a.displayAlign=qb;a.textAlign="end";
863
871
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=mb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=mb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
864
- function Mv(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 Kv(a){a=Nv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",Gv);Gv.prototype.parseMedia=Gv.prototype.parseMedia;Gv.prototype.setSequenceMode=Gv.prototype.setSequenceMode;Gv.prototype.parseInit=Gv.prototype.parseInit;
865
- var Hv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Iv=/^\s*([^:]+):\s*(.*)/,Jv=/\s*,\s*/,Nv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Qc["text/x-ssa"]=function(){return new Gv};function Ov(){}M("shaka.util.FairPlayUtils",Ov);Ov.commonFairPlayResponse=function(a,b){if(2===a){try{var c=qc(b.data)}catch(f){return}var d=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),d=!0);try{var e=JSON.parse(c);e.ckc&&(c=e.ckc,d=!0);e.CkcMessage&&(c=e.CkcMessage,d=!0);e.License&&(c=e.License,d=!0)}catch(f){}d&&(b.data=Hb(zc(c)))}};
866
- Ov.spcFairPlayRequest=function(a,b){if(2===a){var c=Gb(b.body);c=yc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=uc("spc="+c)}};Ov.initDataTransform=function(a,b,c){function d(h){Jb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Gb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=vc(b,!0):e=b;a=tc(a);a=vc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f};
867
- Ov.defaultGetContentId=function(a){a=tc(a);return(new Ob(a)).Ha};Ov.isFairPlaySupported=function(){var a;return K(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},B(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b["return"](!0);E(b);return b["return"](!1)})};/*
872
+ function uv(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 sv(a){a=vv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",ov);ov.prototype.parseMedia=ov.prototype.parseMedia;ov.prototype.setSequenceMode=ov.prototype.setSequenceMode;ov.prototype.parseInit=ov.prototype.parseInit;
873
+ var pv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,qv=/^\s*([^:]+):\s*(.*)/,rv=/\s*,\s*/,vv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Rc["text/x-ssa"]=function(){return new ov};function wv(){}M("shaka.util.FairPlayUtils",wv);wv.commonFairPlayResponse=function(a,b){if(2===a){try{var c=qc(b.data)}catch(f){return}var d=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),d=!0);try{var e=JSON.parse(c);e.ckc&&(c=e.ckc,d=!0);e.CkcMessage&&(c=e.CkcMessage,d=!0);e.License&&(c=e.License,d=!0)}catch(f){}d&&(b.data=Hb(zc(c)))}};
874
+ wv.spcFairPlayRequest=function(a,b){if(2===a){var c=Gb(b.body);c=yc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=uc("spc="+c)}};wv.initDataTransform=function(a,b,c){function d(h){Jb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Gb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=vc(b,!0):e=b;a=tc(a);a=vc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f};
875
+ wv.defaultGetContentId=function(a){a=tc(a);return(new Ob(a)).Ha};wv.isFairPlaySupported=function(){var a;return L(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},B(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b["return"](!0);F(b);return b["return"](!1)})};/*
868
876
  @license
869
877
  EME Encryption Scheme Polyfill
870
878
  Copyright 2019 Google LLC
871
879
  SPDX-License-Identifier: Apache-2.0
872
880
  */
873
- 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")}
874
- function Sv(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,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,
881
+ function xv(){}var yv;function zv(){yv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(yv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Av):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
882
+ function Av(a,b){var c=this,d;return L(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,yv.call(c,a,b),2);d=e.h;if(Bv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=yv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Cv;return e["return"](Cv.call(c,
875
883
  a,b))})}
876
- function Uv(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return K(function(q){if(1==q.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 p=Error("Unsupported keySystem or supportedConfigurations."),
877
- p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(q,Qv.call(c,a,e),2)}n=q.h;return q["return"](new Xv(n,d))})}function Wv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",Pv);Pv.install=Rv;function Yv(){}var Zv;
878
- 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")}
879
- function aw(a){var b=this,c,d;return K(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(e,Zv.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Tv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Zv,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
880
- navigator.mediaCapabilities.decodingInfo=bw;return e["return"](bw.call(b,a))})}
881
- function bw(a){var b=this,c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.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)?p["return"](h):u(p,Zv.call(b,a),2);case 2:k=p.h;if(k.keySystemAccess){k.keySystemAccess=
882
- new Xv(k.keySystemAccess,c);p.A(3);break}if(!a.keySystemConfiguration){p.A(3);break}var n=a.keySystemConfiguration,q=[],v=[];n.audio&&q.push({robustness:n.audio.robustness||"",contentType:a.audio.contentType});n.video&&v.push({robustness:n.video.robustness||"",contentType:a.video.contentType});n={initDataTypes:n.initDataType?[n.initDataType]:[],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes};q.length&&(n.audioCapabilities=q);v.length&&(n.videoCapabilities=
883
- v);l=n;m=k;return u(p,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=p.h;case 3:return p["return"](k)}})}M("McEncryptionSchemePolyfill",Yv);Yv.install=$v;function Xv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
884
- 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()};
885
- function Vv(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function 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}function cw(){}
886
- function yt(){Rv();$v()}M("EncryptionSchemePolyfills",cw);cw.install=yt;"undefined"!==typeof module&&module.exports&&(module.exports=cw);}).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})();
884
+ function Cv(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return L(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Dv(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Ev(h.videoCapabilities,d),l=Ev(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 p=Error("Unsupported keySystem or supportedConfigurations."),
885
+ p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(q,yv.call(c,a,e),2)}n=q.h;return q["return"](new Fv(n,d))})}function Ev(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",xv);xv.install=zv;function Gv(){}var Hv;
886
+ function Iv(){Hv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Hv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Jv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
887
+ function Jv(a){var b=this,c,d;return L(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(e,Hv.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Bv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Hv,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
888
+ navigator.mediaCapabilities.decodingInfo=Kv;return e["return"](Kv.call(b,a))})}
889
+ function Kv(a){var b=this,c,d,e,f,g,h,k,l,m;return L(function(p){switch(p.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=Dv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?p["return"](h):u(p,Hv.call(b,a),2);case 2:k=p.h;if(k.keySystemAccess){k.keySystemAccess=
890
+ new Fv(k.keySystemAccess,c);p.A(3);break}if(!a.keySystemConfiguration){p.A(3);break}var n=a.keySystemConfiguration,q=[],x=[];n.audio&&q.push({robustness:n.audio.robustness||"",contentType:a.audio.contentType});n.video&&x.push({robustness:n.video.robustness||"",contentType:a.video.contentType});n={initDataTypes:n.initDataType?[n.initDataType]:[],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes};q.length&&(n.audioCapabilities=q);x.length&&(n.videoCapabilities=
891
+ x);l=n;m=k;return u(p,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=p.h;case 3:return p["return"](k)}})}M("McEncryptionSchemePolyfill",Gv);Gv.install=Iv;function Fv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
892
+ Fv.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};Fv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
893
+ function Dv(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Bv(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function Lv(){}
894
+ function gt(){zv();Iv()}M("EncryptionSchemePolyfills",Lv);Lv.install=gt;"undefined"!==typeof module&&module.exports&&(module.exports=Lv);}).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})();
887
895
 
888
896
  //# sourceMappingURL=shaka-player.compiled.map